RE: [PATCH 0/8] pm80xx: Driver updates

2015-07-29 Thread Suresh Thiagarajan
.c | 15 - >> drivers/scsi/pm8001/pm8001_sas.h | 12 +++- >> drivers/scsi/pm8001/pm80xx_hwi.c | 111 >> +++-- >> drivers/scsi/pm8001/pm80xx_hwi.h |5 +- >> 6 files changed, 112 insertions(+), 36 deletions(-) >> > For the whole

RE: [PATCH] pm80xx: Added pm8006 controller support

2015-07-29 Thread Suresh Thiagarajan
Hi James, This patch is not pulled in yet. Regards, Suresh -Original Message- From: Jack Wang [mailto:xjtu...@gmail.com] Sent: Tuesday, February 24, 2015 2:07 PM To: Suresh Thiagarajan Cc: linux-scsi@vger.kernel.org; James Bottomley; Viswas G; pmc...@pmcs.com Subject: Re: [PATCH

[PATCH] pm80xx: Added pm8006 controller support

2015-02-11 Thread Suresh Thiagarajan
Added the pm8006 controller id in pci table Signed-off-by: Suresh Thiagarajan Signed-off-by: Viswas G --- drivers/scsi/pm8001/pm8001_defs.h |3 ++- drivers/scsi/pm8001/pm8001_init.c |5 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/pm8001

RE: Adaptec 71605H HBA randomly failing to detect any drives at init

2014-09-02 Thread Suresh Thiagarajan
On Mon, Sep 1, 2014 at 9:36 PM, Andrew Robertson wrote: > Hi, > > I have an Adaptec 71605H HBA that's randomly failing to detect any > drives at boot. I have two systems with this HBA, and both are > showing the exact same behavior. I can reproduce this randomly about > 3 out of 4 times, where

[PATCH] pm8001: Update nvmd response data to request buffer

2014-08-10 Thread Suresh Thiagarajan
Instead of using the virt_ptr use request buffer for copying back the nvmd response data and use the same in request function also Signed-off-by: Suresh Thiagarajan Reviewed-by: Tomas Henzl --- drivers/scsi/pm8001/pm8001_ctl.c |4 +--- drivers/scsi/pm8001/pm8001_hwi.c |8 2

RE: [PATCH 3/3] pm8001: Update MAINTAINERS list

2014-07-31 Thread Suresh Thiagarajan
On Wed, Jul 30, 2014 at 5:42 PM, James Bottomley wrote: > On Wed, 2014-07-30 at 17:37 +0530, Suresh Thiagarajan wrote: >> From: Suresh Thiagarajan >> >> Update pmcs mail list for pm8001 driver support >> >> Signed-off-by: Suresh Thiagarajan >> --- >&

[PATCH 2/3] pm8001: Fix erratic calculation in update_flash

2014-07-30 Thread Suresh Thiagarajan
From: Tomas Henzl The loopcount is calculated by using some weird magic. Use instead a boring macro Signed-off-by: Tomas Henzl Signed-off-by: Suresh Thiagarajan --- drivers/scsi/pm8001/pm8001_ctl.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/scsi

[PATCH 1/3] pm8001: fix pm8001_store_update_fw

2014-07-30 Thread Suresh Thiagarajan
From: Tomas Henzl The current implementation may mix the negative value returned from pm8001_set_nvmd with with count. -(-ENOMEM) could be interpreted as bytes programmed, this patch fixes it. Signed-off-by: Tomas Henzl Signed-off-by: Suresh Thiagarajan --- drivers/scsi/pm8001/pm8001_ctl.c

RE: [PATCH 1/3] pm8001: fix pm8001_store_update_fw

2014-07-30 Thread Suresh Thiagarajan
On Wed, Jul 30, 2014 at 5:40 PM, James Bottomley wrote: > On Wed, 2014-07-30 at 17:33 +0530, Suresh Thiagarajan wrote: >> From: Suresh Thiagarajan >> >> The current implementation may mix the negative value returned >> from pm8001_set_nvmd with with count. -(-E

[PATCH 3/3] pm8001: Update MAINTAINERS list

2014-07-30 Thread Suresh Thiagarajan
From: Suresh Thiagarajan Update pmcs mail list for pm8001 driver support Signed-off-by: Suresh Thiagarajan --- MAINTAINERS |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 3f2e171..a63259c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

[PATCH 2/3] pm8001: Fix erratic calculation in update_flash

2014-07-30 Thread Suresh Thiagarajan
From: Suresh Thiagarajan The loopcount is calculated by using some weird magic. Use instead a boring macro Signed-off-by: Tomas Henzl Signed-off-by: Suresh Thiagarajan --- drivers/scsi/pm8001/pm8001_ctl.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH 1/3] pm8001: fix pm8001_store_update_fw

2014-07-30 Thread Suresh Thiagarajan
From: Suresh Thiagarajan The current implementation may mix the negative value returned from pm8001_set_nvmd with with count. -(-ENOMEM) could be interpreted as bytes programmed, this patch fixes it. Signed-off-by: Tomas Henzl Signed-off-by: Suresh Thiagarajan --- drivers/scsi/pm8001

RE: [PATCH 2/4] scsi: pm8001: fix update_flash

2014-07-10 Thread Suresh Thiagarajan
as. Acked-by: Suresh Thiagarajan > > Signed-off-by: Tomas Henzl > --- > drivers/scsi/pm8001/pm8001_ctl.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/scsi/pm8001/pm8001_ctl.c > b/drivers/scsi/pm8001/pm8001_ctl.c > index 211ff

RE: [PATCH 3/4] scsi: pm8001: fix a memory leak in flash_update

2014-07-10 Thread Suresh Thiagarajan
nd the completion thread takes the info from virt_ptr again. Looks good. Thanks Tomas. Acked-by: Suresh Thiagarajan > > Signed-off-by: Tomas Henzl > --- > drivers/scsi/pm8001/pm8001_hwi.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drive

RE: [PATCH 1/4] scsi: pm8001: fix a memory leak in nvmd_resp

2014-07-10 Thread Suresh Thiagarajan
On Mon, Jul 7, 2014 at 8:49 PM, Tomas Henzl wrote: > Instead of copying information to fw_control_context free it. > > The task is forgotten thus also the reference to fw_control_context > and the completion thread takes the info from virt_ptr again. Looks good. Thanks Tomas. Acke

[PATCH 8/8][RESEND] pm8001: more fixes to honor return value

2014-07-09 Thread Suresh Thiagarajan
From: Suresh Thiagarajan The driver ignores the return value in a lot of places, fix it at least somewhere (and release the resources in such cases), to avoid that bad things happen. A memory leak is fixed too. Signed-off-by: Tomas Henzl Acked-by: Suresh Thiagarajan --- drivers/scsi/pm8001

[PATCH 7/8][RESEND] pm8001: add a new spinlock to protect the CCB

2014-07-09 Thread Suresh Thiagarajan
From: Suresh Thiagarajan Patch adds a new spinlock to protect the ccb management. It may happen that concurrent threads become the same tag value from the 'alloc' function', the spinlock prevents this situation. Signed-off-by: Tomas Henzl Acked-by: Suresh Thiagarajan --- driv

[PATCH 6/8] pm8001: honor return value

2014-07-09 Thread Suresh Thiagarajan
From: Suresh Thiagarajan The driver ignores the return value in a lot of places, fix it at least somewhere (and release the resources in such cases), to avoid that bad things happen. Signed-off-by: Tomas Henzl Signed-off-by: Suresh Thiagarajan --- drivers/scsi/pm8001/pm8001_hwi.c | 33

[PATCH 3/8][RESEND] pm8001: Fix hibernation issue

2014-07-09 Thread Suresh Thiagarajan
From: Suresh Thiagarajan During hibernation, the HBA firmware may lose power and forget the device id info. This causes the HBA to reject IO upon resume. The fix is to call the libsas power management routines to make the domain device forgetful. This fixes bug 76681: https

[PATCH 4/8][RESEND] pm8001: Fix potential null pointer dereference and memory leak.

2014-07-09 Thread Suresh Thiagarajan
From: Suresh Thiagarajan The pm8001_get_phy_settings_info() function does not check the kzalloc() return value and does not free the allocated memory. Signed-off-by: Maurizio Lombardi Acked-by: Jack Wang Acked-by: Suresh Thiagarajan --- drivers/scsi/pm8001/pm8001_init.c | 13

[PATCH 5/8][RESEND] pm8001: clean bitmap management functions

2014-07-09 Thread Suresh Thiagarajan
From: Suresh Thiagarajan In the driver two different functions are used to free the same resource, this patch makes the code easier to read. In addittion to that, some minor optimisations were made too. Signed-off-by: Tomas Henzl Acked-by: Suresh Thiagarajan --- drivers/scsi/pm8001

[PATCH 2/8][RESEND] pm8001: Cleaning up uninitialized variables

2014-07-09 Thread Suresh Thiagarajan
From: Suresh Thiagarajan There is a risk that the variable will be used without being initialized. This was largely found by using a static code analysis program called cppche Signed-off-by: Rickard Strandqvist Acked-by: Suresh Thiagarajan --- drivers/scsi/pm8001/pm80xx_hwi.c |6

[PATCH 1/8][RESEND] pm8001: Fix to remove null pointer checks that could never happen

2014-07-09 Thread Suresh Thiagarajan
From: Suresh Thiagarajan Removal of null pointer checks that could never happen Signed-off-by: Rickard Strandqvist Acked-by: Suresh Thiagarajan --- drivers/scsi/pm8001/pm8001_hwi.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b

[PATCH 0/8] pm8001: Resend previous patches

2014-07-09 Thread Suresh Thiagarajan
From: Suresh Thiagarajan Updated comments for pm8001: honor return value Remaining patches are resend Suresh Thiagarajan (8): pm8001: Fix to remove null pointer checks that could never happen pm8001: Cleaning up uninitialized variables pm8001: Fix hibernation issue pm8001: Fix potential

RE: [PATCH 1/4] pm8001: clean bitmap management functions

2014-07-07 Thread Suresh Thiagarajan
On Mon, Jul 7, 2014 at 7:14 PM, Tomas Henzl wrote: > On 07/07/2014 03:12 PM, Suresh Thiagarajan wrote: >> >> On Thu, Jul 3, 2014 at 2:15 PM, Christoph Hellwig wrote: >>> Suresh, >>> >>> do you maintain pm8001 for pmcs now? There have been lots of pm

RE: [PATCH 1/4] pm8001: clean bitmap management functions

2014-07-07 Thread Suresh Thiagarajan
n't uptodate anymore > please update it. Will send a patch to update the Maintainer's list. Thanks, Suresh Thiagarajan > > Thanks, > Christoph > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in > the body of a message to majo

RE: [PATCH 3/4] pm8001: add a new spinlock to protect the CCB

2014-07-02 Thread Suresh Thiagarajan
001_tag_alloc, better way is to use this bitmap lock. Thanks for adding it. Thanks Tomas. Looks good Acked-by: Suresh Thiagarajan > pm8001_chip_get_nvmd_req is invoked and there is a new 'tag' allocated. > I have noticed your lock nowhere in the path, in addition I was able > to t

RE: [PATCH 4/4] pm8001: more fixes to honor return value

2014-07-02 Thread Suresh Thiagarajan
nzl Thanks Tomas. Looks good Acked-by: Suresh Thiagarajan > --- > drivers/scsi/pm8001/pm8001_ctl.c | 5 - > drivers/scsi/pm8001/pm8001_init.c | 22 -- > 2 files changed, 24 insertions(+), 3 deletions(-) > > diff --git a/drivers/scsi/pm8001/pm8001_ctl.c

RE: [PATCH 2/4] pm8001: honor return value

2014-07-02 Thread Suresh Thiagarajan
-1821,7 +1822,10 @@ static void pm8001_send_read_log(struct > pm8001_hba_info *pm8001_ha, When tag allocation is failed, task needs to be freed. When domain device allocation fails, task and tag needs to be freed. > memcpy(&sata_cmd.sata_fis, &fis, si

RE: [PATCH 1/4] pm8001: clean bitmap management functions

2014-07-02 Thread Suresh Thiagarajan
mas. Looks good Acked-by: Suresh Thiagarajan > --- > drivers/scsi/pm8001/pm8001_hwi.c | 10 +- > drivers/scsi/pm8001/pm8001_sas.c | 31 +++ > drivers/scsi/pm8001/pm8001_sas.h | 1 - > 3 files changed, 12 insertions(+), 30 deletions(-) > &

RE: [PATCH] scsi: pm8001: pm80xx_hwi.c: Cleaning up variable is set more than once

2014-06-27 Thread Suresh Thiagarajan
at this fields is only set and appears > to be never used, > maybe it could be completely removed. You are correct. The whole forensic_info structure itself is not used or referred anywhere. I will remove it and send a patch. Regards, Suresh Thiagarajan > > Regards, > Maurizio Lombard

RE: [PATCH] pm8001: Fix potential null pointer dereference and memory leak.

2014-06-20 Thread Suresh Thiagarajan
rdi > > Looks good, thanks > Acked-by: Jack Wang Looks good, Thanks Maurizio Acked-by: Suresh Thiagarajan >> --- >> drivers/scsi/pm8001/pm8001_init.c | 13 ++--- >> 1 file changed, 10 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/scsi/pm8

[PATCH] pm80xx : Fix missing NULL pointer checks and memory leaks

2014-05-08 Thread Suresh Thiagarajan
Checking return value for the memory allocattion and freeing it while exiting the function Signed-off-by: Viswas G Signed-off-by: Suresh Thiagarajan --- drivers/scsi/pm8001/pm8001_ctl.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/scsi/pm8001/pm8001_ctl.c

RE: spinlock_irqsave() && flags (Was: pm80xx: Spinlock fix)

2014-01-02 Thread Suresh Thiagarajan
On Fri, Dec 27, 2013 at 9:48 PM, Oleg Nesterov wrote: > On 12/24, Suresh Thiagarajan wrote: >> >> Below is a small pseudo code on protecting/serializing the flag for global >> access. >> struct temp >> { >> ... >> spinlock_t lock; >

RE: spinlock_irqsave() && flags (Was: pm80xx: Spinlock fix)

2013-12-24 Thread Suresh Thiagarajan
On Tue, Dec 24, 2013 at 1:59 PM, Ingo Molnar wrote: > > * Oleg Nesterov wrote: > >> On 12/23, Ingo Molnar wrote: >> > >> > * Oleg Nesterov wrote: >> > >> > > Initially I thought that this is obviously wrong, irqsave/irqrestore >> > > assume that "flags" is owned by the caller, not by the lock.

RE: [PATCH] pm80xx: Spinlock fix

2013-12-23 Thread Suresh Thiagarajan
-Original Message- From: Jack Wang [mailto:xjtu...@gmail.com] Sent: Monday, December 23, 2013 7:03 PM To: Tomas Henzl; Viswas G Cc: linux-scsi@vger.kernel.org; jason.seb...@gmail.com; jbottom...@parallels.com; Vasanthalakshmi Tharmarajan; Suresh Thiagarajan Subject: Re: [PATCH] pm80xx

RE: Possible locking bug in pm8xxx/pm8001

2013-12-16 Thread Suresh Thiagarajan
Jason, I have sent you the patch for testing. Could you please help testing this patch? Will submit it here once it is tested by you. Regards, Suresh -Original Message- From: Suresh Thiagarajan [mailto:sureshka...@gmail.com] Sent: Wednesday, November 27, 2013 11:11 AM To: Jason Seba Cc

Re: pm8001 issue‏

2013-12-11 Thread Suresh Thiagarajan
Niall Drievers hotmail.com> writes: > > Jack, Suresh > > Thanks for your response! Here's what I get from lspci - 30:00.0 Serial Attached SCSI controller: > PMC-Sierra Inc. Device 8001 (rev 05)  > > cat /sys/class/scsi_host/host7/version_product  > PM8001  > > cat /sys/class/scsi_host/host7/

RE: pm8001 issue

2013-12-10 Thread Suresh Thiagarajan
Hi Niall, Please update the firmware from http://www.adaptec.com/en-us/support/sas/#sas_raid Adaptec Series 7 SAS/SATA 6 Gb - Host Bus Adapter section based on your card. What is the current firmware version? You can get from the sys file "fw_version" under /sys/devices. Can you please try che

Re: Possible locking bug in pm8xxx/pm8001

2013-11-26 Thread Suresh Thiagarajan
Hi Jason On Sat, Oct 12, 2013 at 2:02 AM, Jason Seba wrote: > The pm8xxx driver uses a per-adapter spinlock (pm8001_ha->lock) which > is usually acquired and released with the irqsave routines. However, > some functions which are called with the lock held > (mpi_sata_completion, mpi_sata_event, p