All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pm80xx: fix Adaptec 71605H hang
@ 2013-07-14  8:25 Hans Verkuil
  2013-07-15  9:44 ` Jack Wang
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Verkuil @ 2013-07-14  8:25 UTC (permalink / raw)
  To: linux-scsi
  Cc: AnandKumar.Santhanam, lindar_liu, Sangeetha.Gnanasekaran, xjtuwjp

The IO command size is 128 bytes for these new controllers as opposed to 64
for the old 8001 controller.

The Adaptec out-of-tree driver did this correctly. After comparing the two
this turned out to be the crucial difference.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: AnandKumar.Santhanam@pmcs.com
Cc: stable@vger.kernel.org      # for v3.10 and up
---
 drivers/scsi/pm8001/pm80xx_hwi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index 302514d..e1db5ca 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -275,7 +275,7 @@ static void init_default_table_values(struct pm8001_hba_info *pm8001_ha)
 
 	for (i = 0; i < PM8001_MAX_SPCV_INB_NUM; i++) {
 		pm8001_ha->inbnd_q_tbl[i].element_pri_size_cnt	=
-			PM8001_MPI_QUEUE | (64 << 16) | (0x00<<30);
+			PM8001_MPI_QUEUE | (128 << 16) | (0x00<<30);
 		pm8001_ha->inbnd_q_tbl[i].upper_base_addr	=
 			pm8001_ha->memoryMap.region[IB + i].phys_addr_hi;
 		pm8001_ha->inbnd_q_tbl[i].lower_base_addr	=
@@ -301,7 +301,7 @@ static void init_default_table_values(struct pm8001_hba_info *pm8001_ha)
 	}
 	for (i = 0; i < PM8001_MAX_SPCV_OUTB_NUM; i++) {
 		pm8001_ha->outbnd_q_tbl[i].element_size_cnt	=
-			PM8001_MPI_QUEUE | (64 << 16) | (0x01<<30);
+			PM8001_MPI_QUEUE | (128 << 16) | (0x01<<30);
 		pm8001_ha->outbnd_q_tbl[i].upper_base_addr	=
 			pm8001_ha->memoryMap.region[OB + i].phys_addr_hi;
 		pm8001_ha->outbnd_q_tbl[i].lower_base_addr	=
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] pm80xx: fix Adaptec 71605H hang
  2013-07-14  8:25 [PATCH] pm80xx: fix Adaptec 71605H hang Hans Verkuil
@ 2013-07-15  9:44 ` Jack Wang
  2013-07-25  4:44   ` Anand Kumar Santhanam
  0 siblings, 1 reply; 5+ messages in thread
From: Jack Wang @ 2013-07-15  9:44 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: linux-scsi, AnandKumar.Santhanam, lindar_liu,
	Sangeetha.Gnanasekaran, jinpu.wang

On 07/14/2013 10:25 AM, Hans Verkuil wrote:
> The IO command size is 128 bytes for these new controllers as opposed to 64
> for the old 8001 controller.
> 
> The Adaptec out-of-tree driver did this correctly. After comparing the two
> this turned out to be the crucial difference.
Thanks Hans for this fix.
We'd better use more meaningful Micro like:

#define MPI_IOMB_SIZE_SPCV 128 and replace current hard coded one.

Thanks,
Jack
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Acked-by: AnandKumar.Santhanam@pmcs.com
> Cc: stable@vger.kernel.org      # for v3.10 and up
> ---
>  drivers/scsi/pm8001/pm80xx_hwi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
> index 302514d..e1db5ca 100644
> --- a/drivers/scsi/pm8001/pm80xx_hwi.c
> +++ b/drivers/scsi/pm8001/pm80xx_hwi.c
> @@ -275,7 +275,7 @@ static void init_default_table_values(struct pm8001_hba_info *pm8001_ha)
>  
>  	for (i = 0; i < PM8001_MAX_SPCV_INB_NUM; i++) {
>  		pm8001_ha->inbnd_q_tbl[i].element_pri_size_cnt	=
> -			PM8001_MPI_QUEUE | (64 << 16) | (0x00<<30);
> +			PM8001_MPI_QUEUE | (128 << 16) | (0x00<<30);
>  		pm8001_ha->inbnd_q_tbl[i].upper_base_addr	=
>  			pm8001_ha->memoryMap.region[IB + i].phys_addr_hi;
>  		pm8001_ha->inbnd_q_tbl[i].lower_base_addr	=
> @@ -301,7 +301,7 @@ static void init_default_table_values(struct pm8001_hba_info *pm8001_ha)
>  	}
>  	for (i = 0; i < PM8001_MAX_SPCV_OUTB_NUM; i++) {
>  		pm8001_ha->outbnd_q_tbl[i].element_size_cnt	=
> -			PM8001_MPI_QUEUE | (64 << 16) | (0x01<<30);
> +			PM8001_MPI_QUEUE | (128 << 16) | (0x01<<30);
>  		pm8001_ha->outbnd_q_tbl[i].upper_base_addr	=
>  			pm8001_ha->memoryMap.region[OB + i].phys_addr_hi;
>  		pm8001_ha->outbnd_q_tbl[i].lower_base_addr	=
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] pm80xx: fix Adaptec 71605H hang
  2013-07-15  9:44 ` Jack Wang
@ 2013-07-25  4:44   ` Anand Kumar Santhanam
  2013-07-25  6:47     ` Hans Verkuil
  0 siblings, 1 reply; 5+ messages in thread
From: Anand Kumar Santhanam @ 2013-07-25  4:44 UTC (permalink / raw)
  To: Jack Wang, Hans Verkuil
  Cc: linux-scsi, lindar_liu, Sangeetha Gnanasekaran, jinpu.wang

Hi Hans,

Are you planning to address the below comment and submit an updated
patch?

Regards
Anand

-----Original Message-----
From: Jack Wang [mailto:xjtuwjp@gmail.com] 
Sent: Monday, July 15, 2013 3:14 PM
To: Hans Verkuil
Cc: linux-scsi@vger.kernel.org; Anand Kumar Santhanam;
lindar_liu@usish.com; Sangeetha Gnanasekaran;
jinpu.wang@profitbricks.com
Subject: Re: [PATCH] pm80xx: fix Adaptec 71605H hang

On 07/14/2013 10:25 AM, Hans Verkuil wrote:
> The IO command size is 128 bytes for these new controllers as opposed 
> to 64 for the old 8001 controller.
> 
> The Adaptec out-of-tree driver did this correctly. After comparing the

> two this turned out to be the crucial difference.
Thanks Hans for this fix.
We'd better use more meaningful Micro like:

#define MPI_IOMB_SIZE_SPCV 128 and replace current hard coded one.

Thanks,
Jack
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Acked-by: AnandKumar.Santhanam@pmcs.com
> Cc: stable@vger.kernel.org      # for v3.10 and up
> ---
>  drivers/scsi/pm8001/pm80xx_hwi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c 
> b/drivers/scsi/pm8001/pm80xx_hwi.c
> index 302514d..e1db5ca 100644
> --- a/drivers/scsi/pm8001/pm80xx_hwi.c
> +++ b/drivers/scsi/pm8001/pm80xx_hwi.c
> @@ -275,7 +275,7 @@ static void init_default_table_values(struct 
> pm8001_hba_info *pm8001_ha)
>  
>  	for (i = 0; i < PM8001_MAX_SPCV_INB_NUM; i++) {
>  		pm8001_ha->inbnd_q_tbl[i].element_pri_size_cnt	=
> -			PM8001_MPI_QUEUE | (64 << 16) | (0x00<<30);
> +			PM8001_MPI_QUEUE | (128 << 16) | (0x00<<30);
>  		pm8001_ha->inbnd_q_tbl[i].upper_base_addr	=
>  			pm8001_ha->memoryMap.region[IB +
i].phys_addr_hi;
>  		pm8001_ha->inbnd_q_tbl[i].lower_base_addr	=
> @@ -301,7 +301,7 @@ static void init_default_table_values(struct
pm8001_hba_info *pm8001_ha)
>  	}
>  	for (i = 0; i < PM8001_MAX_SPCV_OUTB_NUM; i++) {
>  		pm8001_ha->outbnd_q_tbl[i].element_size_cnt	=
> -			PM8001_MPI_QUEUE | (64 << 16) | (0x01<<30);
> +			PM8001_MPI_QUEUE | (128 << 16) | (0x01<<30);
>  		pm8001_ha->outbnd_q_tbl[i].upper_base_addr	=
>  			pm8001_ha->memoryMap.region[OB +
i].phys_addr_hi;
>  		pm8001_ha->outbnd_q_tbl[i].lower_base_addr	=
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] pm80xx: fix Adaptec 71605H hang
  2013-07-25  4:44   ` Anand Kumar Santhanam
@ 2013-07-25  6:47     ` Hans Verkuil
  2013-07-25  7:20       ` Anand Kumar Santhanam
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Verkuil @ 2013-07-25  6:47 UTC (permalink / raw)
  To: Anand Kumar Santhanam
  Cc: Jack Wang, linux-scsi, lindar_liu, Sangeetha Gnanasekaran, jinpu.wang

Hi Anand,

On 07/25/2013 06:44 AM, Anand Kumar Santhanam wrote:
> Hi Hans,
> 
> Are you planning to address the below comment and submit an updated
> patch?

I think there was a misunderstanding there. It was my impression that you
would do a follow-up patch for that.

I can add the define if you want, but where do you want it? In pm8001_defs.h
with the name PM80XX_MPI_IOMB_SIZE_SPCV? Should I create a PM8001_MPI_IOMB_SIZE_SPCV
as well?

Regards,

	Hans

> 
> Regards
> Anand
> 
> -----Original Message-----
> From: Jack Wang [mailto:xjtuwjp@gmail.com] 
> Sent: Monday, July 15, 2013 3:14 PM
> To: Hans Verkuil
> Cc: linux-scsi@vger.kernel.org; Anand Kumar Santhanam;
> lindar_liu@usish.com; Sangeetha Gnanasekaran;
> jinpu.wang@profitbricks.com
> Subject: Re: [PATCH] pm80xx: fix Adaptec 71605H hang
> 
> On 07/14/2013 10:25 AM, Hans Verkuil wrote:
>> The IO command size is 128 bytes for these new controllers as opposed 
>> to 64 for the old 8001 controller.
>>
>> The Adaptec out-of-tree driver did this correctly. After comparing the
> 
>> two this turned out to be the crucial difference.
> Thanks Hans for this fix.
> We'd better use more meaningful Micro like:
> 
> #define MPI_IOMB_SIZE_SPCV 128 and replace current hard coded one.
> 
> Thanks,
> Jack
>>
>> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
>> Acked-by: AnandKumar.Santhanam@pmcs.com
>> Cc: stable@vger.kernel.org      # for v3.10 and up
>> ---
>>  drivers/scsi/pm8001/pm80xx_hwi.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c 
>> b/drivers/scsi/pm8001/pm80xx_hwi.c
>> index 302514d..e1db5ca 100644
>> --- a/drivers/scsi/pm8001/pm80xx_hwi.c
>> +++ b/drivers/scsi/pm8001/pm80xx_hwi.c
>> @@ -275,7 +275,7 @@ static void init_default_table_values(struct 
>> pm8001_hba_info *pm8001_ha)
>>  
>>  	for (i = 0; i < PM8001_MAX_SPCV_INB_NUM; i++) {
>>  		pm8001_ha->inbnd_q_tbl[i].element_pri_size_cnt	=
>> -			PM8001_MPI_QUEUE | (64 << 16) | (0x00<<30);
>> +			PM8001_MPI_QUEUE | (128 << 16) | (0x00<<30);
>>  		pm8001_ha->inbnd_q_tbl[i].upper_base_addr	=
>>  			pm8001_ha->memoryMap.region[IB +
> i].phys_addr_hi;
>>  		pm8001_ha->inbnd_q_tbl[i].lower_base_addr	=
>> @@ -301,7 +301,7 @@ static void init_default_table_values(struct
> pm8001_hba_info *pm8001_ha)
>>  	}
>>  	for (i = 0; i < PM8001_MAX_SPCV_OUTB_NUM; i++) {
>>  		pm8001_ha->outbnd_q_tbl[i].element_size_cnt	=
>> -			PM8001_MPI_QUEUE | (64 << 16) | (0x01<<30);
>> +			PM8001_MPI_QUEUE | (128 << 16) | (0x01<<30);
>>  		pm8001_ha->outbnd_q_tbl[i].upper_base_addr	=
>>  			pm8001_ha->memoryMap.region[OB +
> i].phys_addr_hi;
>>  		pm8001_ha->outbnd_q_tbl[i].lower_base_addr	=
>>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] pm80xx: fix Adaptec 71605H hang
  2013-07-25  6:47     ` Hans Verkuil
@ 2013-07-25  7:20       ` Anand Kumar Santhanam
  0 siblings, 0 replies; 5+ messages in thread
From: Anand Kumar Santhanam @ 2013-07-25  7:20 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Jack Wang, linux-scsi, lindar_liu, Sangeetha Gnanasekaran, jinpu.wang

Hans,

The below #defines are available in pm8001_defs.h

/* Inbound/Outbound queue size */
#define IOMB_SIZE_SPC           64
#define IOMB_SIZE_SPCV        128

You can use IOMB_SIZE_SPC in pm8001_hwi.c file and IOMB_SIZE_SPCV in
pm80xx_hwi.c 

Regards
Anand

-----Original Message-----
From: Hans Verkuil [mailto:hverkuil@xs4all.nl] 
Sent: Thursday, July 25, 2013 12:17 PM
To: Anand Kumar Santhanam
Cc: Jack Wang; linux-scsi@vger.kernel.org; lindar_liu@usish.com;
Sangeetha Gnanasekaran; jinpu.wang@profitbricks.com
Subject: Re: [PATCH] pm80xx: fix Adaptec 71605H hang

Hi Anand,

On 07/25/2013 06:44 AM, Anand Kumar Santhanam wrote:
> Hi Hans,
> 
> Are you planning to address the below comment and submit an updated 
> patch?

I think there was a misunderstanding there. It was my impression that
you would do a follow-up patch for that.

I can add the define if you want, but where do you want it? In
pm8001_defs.h with the name PM80XX_MPI_IOMB_SIZE_SPCV? Should I create a
PM8001_MPI_IOMB_SIZE_SPCV as well?

Regards,

	Hans

> 
> Regards
> Anand
> 
> -----Original Message-----
> From: Jack Wang [mailto:xjtuwjp@gmail.com]
> Sent: Monday, July 15, 2013 3:14 PM
> To: Hans Verkuil
> Cc: linux-scsi@vger.kernel.org; Anand Kumar Santhanam; 
> lindar_liu@usish.com; Sangeetha Gnanasekaran; 
> jinpu.wang@profitbricks.com
> Subject: Re: [PATCH] pm80xx: fix Adaptec 71605H hang
> 
> On 07/14/2013 10:25 AM, Hans Verkuil wrote:
>> The IO command size is 128 bytes for these new controllers as opposed

>> to 64 for the old 8001 controller.
>>
>> The Adaptec out-of-tree driver did this correctly. After comparing 
>> the
> 
>> two this turned out to be the crucial difference.
> Thanks Hans for this fix.
> We'd better use more meaningful Micro like:
> 
> #define MPI_IOMB_SIZE_SPCV 128 and replace current hard coded one.
> 
> Thanks,
> Jack
>>
>> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
>> Acked-by: AnandKumar.Santhanam@pmcs.com
>> Cc: stable@vger.kernel.org      # for v3.10 and up
>> ---
>>  drivers/scsi/pm8001/pm80xx_hwi.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c
>> b/drivers/scsi/pm8001/pm80xx_hwi.c
>> index 302514d..e1db5ca 100644
>> --- a/drivers/scsi/pm8001/pm80xx_hwi.c
>> +++ b/drivers/scsi/pm8001/pm80xx_hwi.c
>> @@ -275,7 +275,7 @@ static void init_default_table_values(struct 
>> pm8001_hba_info *pm8001_ha)
>>  
>>  	for (i = 0; i < PM8001_MAX_SPCV_INB_NUM; i++) {
>>  		pm8001_ha->inbnd_q_tbl[i].element_pri_size_cnt	=
>> -			PM8001_MPI_QUEUE | (64 << 16) | (0x00<<30);
>> +			PM8001_MPI_QUEUE | (128 << 16) | (0x00<<30);
>>  		pm8001_ha->inbnd_q_tbl[i].upper_base_addr	=
>>  			pm8001_ha->memoryMap.region[IB +
> i].phys_addr_hi;
>>  		pm8001_ha->inbnd_q_tbl[i].lower_base_addr	=
>> @@ -301,7 +301,7 @@ static void init_default_table_values(struct
> pm8001_hba_info *pm8001_ha)
>>  	}
>>  	for (i = 0; i < PM8001_MAX_SPCV_OUTB_NUM; i++) {
>>  		pm8001_ha->outbnd_q_tbl[i].element_size_cnt	=
>> -			PM8001_MPI_QUEUE | (64 << 16) | (0x01<<30);
>> +			PM8001_MPI_QUEUE | (128 << 16) | (0x01<<30);
>>  		pm8001_ha->outbnd_q_tbl[i].upper_base_addr	=
>>  			pm8001_ha->memoryMap.region[OB +
> i].phys_addr_hi;
>>  		pm8001_ha->outbnd_q_tbl[i].lower_base_addr	=
>>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-07-25  7:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-14  8:25 [PATCH] pm80xx: fix Adaptec 71605H hang Hans Verkuil
2013-07-15  9:44 ` Jack Wang
2013-07-25  4:44   ` Anand Kumar Santhanam
2013-07-25  6:47     ` Hans Verkuil
2013-07-25  7:20       ` Anand Kumar Santhanam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.