* [PATCHv2] pm80xx: fix Adaptec 71605H hang
@ 2013-07-26 16:43 Hans Verkuil
2013-07-27 2:51 ` Anand Kumar Santhanam
2013-07-31 15:19 ` Jack Wang
0 siblings, 2 replies; 4+ messages in thread
From: Hans Verkuil @ 2013-07-26 16:43 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.
So don't hardcode the IO command size, instead use pm8001_ha->iomb_size as
that is the correct value for both old and new controllers.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: stable@vger.kernel.org # for v3.10 and up
---
drivers/scsi/pm8001/pm8001_hwi.c | 4 ++--
drivers/scsi/pm8001/pm80xx_hwi.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
index 69dd49c..ce3f129d 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.c
+++ b/drivers/scsi/pm8001/pm8001_hwi.c
@@ -221,7 +221,7 @@ static void init_default_table_values(struct pm8001_hba_info *pm8001_ha)
pm8001_ha->main_cfg_tbl.pm8001_tbl.fatal_err_interrupt = 0x01;
for (i = 0; i < PM8001_MAX_INB_NUM; i++) {
pm8001_ha->inbnd_q_tbl[i].element_pri_size_cnt =
- PM8001_MPI_QUEUE | (64 << 16) | (0x00<<30);
+ PM8001_MPI_QUEUE | (pm8001_ha->iomb_size << 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 =
@@ -247,7 +247,7 @@ static void init_default_table_values(struct pm8001_hba_info *pm8001_ha)
}
for (i = 0; i < PM8001_MAX_OUTB_NUM; i++) {
pm8001_ha->outbnd_q_tbl[i].element_size_cnt =
- PM8001_MPI_QUEUE | (64 << 16) | (0x01<<30);
+ PM8001_MPI_QUEUE | (pm8001_ha->iomb_size << 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 =
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index 302514d..e1c4896 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 | (pm8001_ha->iomb_size << 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 | (pm8001_ha->iomb_size << 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] 4+ messages in thread* RE: [PATCHv2] pm80xx: fix Adaptec 71605H hang
2013-07-26 16:43 [PATCHv2] pm80xx: fix Adaptec 71605H hang Hans Verkuil
@ 2013-07-27 2:51 ` Anand Kumar Santhanam
2013-07-31 15:19 ` Jack Wang
1 sibling, 0 replies; 4+ messages in thread
From: Anand Kumar Santhanam @ 2013-07-27 2:51 UTC (permalink / raw)
To: Hans Verkuil, linux-scsi; +Cc: lindar_liu, Sangeetha Gnanasekaran, xjtuwjp
Hi Hans,
Thanks for addressing the comment.
Acked-by: AnandKumar.Santhanam@pmcs.com
Regards
Anand
-----Original Message-----
From: Hans Verkuil [mailto:hverkuil@xs4all.nl]
Sent: Friday, July 26, 2013 10:14 PM
To: linux-scsi@vger.kernel.org
Cc: Anand Kumar Santhanam; lindar_liu@usish.com; Sangeetha Gnanasekaran;
xjtuwjp@gmail.com
Subject: [PATCHv2] pm80xx: fix Adaptec 71605H hang
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.
So don't hardcode the IO command size, instead use pm8001_ha->iomb_size
as that is the correct value for both old and new controllers.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: stable@vger.kernel.org # for v3.10 and up
---
drivers/scsi/pm8001/pm8001_hwi.c | 4 ++--
drivers/scsi/pm8001/pm80xx_hwi.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c
b/drivers/scsi/pm8001/pm8001_hwi.c
index 69dd49c..ce3f129d 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.c
+++ b/drivers/scsi/pm8001/pm8001_hwi.c
@@ -221,7 +221,7 @@ static void init_default_table_values(struct
pm8001_hba_info *pm8001_ha)
pm8001_ha->main_cfg_tbl.pm8001_tbl.fatal_err_interrupt
= 0x01;
for (i = 0; i < PM8001_MAX_INB_NUM; i++) {
pm8001_ha->inbnd_q_tbl[i].element_pri_size_cnt =
- PM8001_MPI_QUEUE | (64 << 16) | (0x00<<30);
+ PM8001_MPI_QUEUE | (pm8001_ha->iomb_size << 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 =
@@ -247,7 +247,7 @@ static void init_default_table_values(struct
pm8001_hba_info *pm8001_ha)
}
for (i = 0; i < PM8001_MAX_OUTB_NUM; i++) {
pm8001_ha->outbnd_q_tbl[i].element_size_cnt =
- PM8001_MPI_QUEUE | (64 << 16) | (0x01<<30);
+ PM8001_MPI_QUEUE | (pm8001_ha->iomb_size << 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 =
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c
b/drivers/scsi/pm8001/pm80xx_hwi.c
index 302514d..e1c4896 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 | (pm8001_ha->iomb_size << 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 | (pm8001_ha->iomb_size << 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] 4+ messages in thread* Re: [PATCHv2] pm80xx: fix Adaptec 71605H hang
2013-07-26 16:43 [PATCHv2] pm80xx: fix Adaptec 71605H hang Hans Verkuil
2013-07-27 2:51 ` Anand Kumar Santhanam
@ 2013-07-31 15:19 ` Jack Wang
2013-08-21 12:53 ` Jack Wang
1 sibling, 1 reply; 4+ messages in thread
From: Jack Wang @ 2013-07-31 15:19 UTC (permalink / raw)
To: Hans Verkuil, James Bottomley
Cc: linux-scsi, AnandKumar.Santhanam, lindar_liu,
Sangeetha.Gnanasekaran
On 07/26/2013 06:43 PM, 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.
>
> So don't hardcode the IO command size, instead use pm8001_ha->iomb_size as
> that is the correct value for both old and new controllers.
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Cc: stable@vger.kernel.org # for v3.10 and up
snip
Thanks Hans.
Looks good now.
Acked-by: Jack Wang <xjtuwjp@gmail.com>
James,
Could you consider to include this fix into your fixes tree, without
this fix new Adaptec controller support is broken, sorry for that.
Jack
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCHv2] pm80xx: fix Adaptec 71605H hang
2013-07-31 15:19 ` Jack Wang
@ 2013-08-21 12:53 ` Jack Wang
0 siblings, 0 replies; 4+ messages in thread
From: Jack Wang @ 2013-08-21 12:53 UTC (permalink / raw)
To: James Bottomley
Cc: Hans Verkuil, linux-scsi, AnandKumar.Santhanam, lindar_liu,
Sangeetha.Gnanasekaran
On 07/31/2013 05:19 PM, Jack Wang wrote:
> On 07/26/2013 06:43 PM, 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.
>>
>> So don't hardcode the IO command size, instead use pm8001_ha->iomb_size as
>> that is the correct value for both old and new controllers.
>>
>> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
>> Cc: stable@vger.kernel.org # for v3.10 and up
> snip
>
> Thanks Hans.
> Looks good now.
>
> Acked-by: Jack Wang <xjtuwjp@gmail.com>
>
> James,
>
> Could you consider to include this fix into your fixes tree, without
> this fix new Adaptec controller support is broken, sorry for that.
>
>
> Jack
>
Hi, James,
Could you include this patch, or you need we resend?
KR
Jack
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-08-21 12:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-26 16:43 [PATCHv2] pm80xx: fix Adaptec 71605H hang Hans Verkuil
2013-07-27 2:51 ` Anand Kumar Santhanam
2013-07-31 15:19 ` Jack Wang
2013-08-21 12:53 ` Jack Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).