pm80xx: fix Adaptec 71605H hang
Subsystems (2)
PATCH 1/1 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.
--- drivers/scsi/pm8001/pm80xx_hwi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/pm8001/pm80xx_hwi.c +2 -2
@@ -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 =
Signature · 1 line
1.8.3.2
Quoted 5 lines · Hans Verkuil
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
Quoted 31 lines
Signed-off-by Hans Verkuil <[email protected]>Acked-by [email protected]Cc [email protected] # for v3.10 and up--- drivers/scsi/pm8001/pm80xx_hwi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/scsi/pm8001/pm80xx_hwi.c +2
-2@@ -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 =
Hi Hans,
Are you planning to address the below comment and submit an updated patch?
Regards
Anand
-----Original Message-----
From: Jack Wang [mailto:[email protected]]
Sent: Monday, July 15, 2013 3:14 PM
To: Hans Verkuil
Cc: [email protected]; Anand Kumar Santhanam; [email protected]; Sangeetha Gnanasekaran; [email protected]
Subject: Re: [PATCH] pm80xx: fix Adaptec 71605H hang
Quoted 6 lines · Hans Verkuil
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
Quoted 14 lines
Signed-off-by Hans Verkuil <[email protected]>Acked-by [email protected]Cc [email protected] # for v3.10 and up--- drivers/scsi/pm8001/pm80xx_hwi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/scsi/pm8001/pm80xx_hwi.c +0
-0
drivers/scsi/pm8001/pm80xx_hwi.c static void init_default_table_values(struct · line 281
Quoted 8 lines
drivers/scsi/pm8001/pm80xx_hwi.c +1
-1@@ -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;
drivers/scsi/pm8001/pm80xx_hwi.c static void init_default_table_values(struct
Quoted 2 lines
drivers/scsi/pm8001/pm80xx_hwi.c +0
-0pm8001_ha->inbnd_q_tbl[i].lower_base_addr =@@ -301,7 +301,7 @@ static void init_default_table_values(struct
pm8001_hba_info *pm8001_ha)
drivers/scsi/pm8001/pm80xx_hwi.c static void init_default_table_values(struct pm8001_hba_info *pm8001_ha)
Quoted 7 lines
drivers/scsi/pm8001/pm80xx_hwi.c +1
-1}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;
Quoted 2 lines
drivers/scsi/pm8001/pm80xx_hwi.c +0
-0pm8001_ha->outbnd_q_tbl[i].lower_base_addr =
Hi Anand,
Quoted 4 lines · Anand Kumar Santhanam
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
Quoted 63 lines
Regards
Anand-----Original Message-----
From: Jack Wang [mailto:[email protected]]
Sent: Monday, July 15, 2013 3:14 PM
To: Hans Verkuil
Cc: [email protected]; Anand Kumar Santhanam; [email protected]; Sangeetha Gnanasekaran; [email protected]
Subject: Re: [PATCH] pm80xx: fix Adaptec 71605H hangQuoted 6 lines · Hans Verkuil
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_SPCV128 and replace current hard coded one.Thanks,
JackQuoted 14 lines
Signed-off-by Hans Verkuil <[email protected]>Acked-by [email protected]Cc [email protected] # for v3.10 and up--- drivers/scsi/pm8001/pm80xx_hwi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/scsi/pm8001/pm80xx_hwi.c +0
-0drivers/scsi/pm8001/pm80xx_hwi.c static void init_default_table_values(struct · line 281
Quoted 8 lines
drivers/scsi/pm8001/pm80xx_hwi.c +1
-1@@ -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;
drivers/scsi/pm8001/pm80xx_hwi.c static void init_default_table_values(struct
Quoted 2 lines
drivers/scsi/pm8001/pm80xx_hwi.c +0
-0pm8001_ha->inbnd_q_tbl[i].lower_base_addr =@@ -301,7 +301,7 @@ static void init_default_table_values(struct
pm8001_hba_info*pm8001_ha)drivers/scsi/pm8001/pm80xx_hwi.c static void init_default_table_values(struct pm8001_hba_info *pm8001_ha)
Quoted 7 lines
drivers/scsi/pm8001/pm80xx_hwi.c +1
-1}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;
Quoted 2 lines
drivers/scsi/pm8001/pm80xx_hwi.c +0
-0pm8001_ha->outbnd_q_tbl[i].lower_base_addr =
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:[email protected]]
Sent: Thursday, July 25, 2013 12:17 PM
To: Anand Kumar Santhanam
Cc: Jack Wang; [email protected]; [email protected]; Sangeetha Gnanasekaran; [email protected]
Subject: Re: [PATCH] pm80xx: fix Adaptec 71605H hang
Hi Anand,
Quoted 4 lines · Anand Kumar Santhanam
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
Quoted 65 lines
Regards
Anand-----Original Message-----
From: Jack Wang [mailto:[email protected]]
Sent: Monday, July 15, 2013 3:14 PM
To: Hans Verkuil
Cc: [email protected]; Anand Kumar Santhanam; [email protected]; Sangeetha Gnanasekaran; [email protected]
Subject: Re: [PATCH] pm80xx: fix Adaptec 71605H hangQuoted 8 lines · Hans Verkuil
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_SPCV128 and replace current hard coded one.Thanks,
JackQuoted 14 lines
Signed-off-by Hans Verkuil <[email protected]>Acked-by [email protected]Cc [email protected] # for v3.10 and up--- drivers/scsi/pm8001/pm80xx_hwi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/scsi/pm8001/pm80xx_hwi.c +0
-0drivers/scsi/pm8001/pm80xx_hwi.c static void init_default_table_values(struct · line 281
Quoted 8 lines
drivers/scsi/pm8001/pm80xx_hwi.c +1
-1@@ -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;
drivers/scsi/pm8001/pm80xx_hwi.c static void init_default_table_values(struct
Quoted 2 lines
drivers/scsi/pm8001/pm80xx_hwi.c +0
-0pm8001_ha->inbnd_q_tbl[i].lower_base_addr =@@ -301,7 +301,7 @@ static void init_default_table_values(struct
pm8001_hba_info*pm8001_ha)drivers/scsi/pm8001/pm80xx_hwi.c static void init_default_table_values(struct pm8001_hba_info *pm8001_ha)
Quoted 7 lines
drivers/scsi/pm8001/pm80xx_hwi.c +1
-1}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;
Quoted 2 lines
drivers/scsi/pm8001/pm80xx_hwi.c +0
-0pm8001_ha->outbnd_q_tbl[i].lower_base_addr =