Skip to contentSkip to conversation

scsi: hisi_sas: fix tags freeing for the reserverd tags

PATCH In review Jason Yan 4 participants 6 messages Dec 15, 2022 – Jan 5, 2023

Subsystems (2)
lore
Share & tools
lore

Jason Yan

author
#0 lore raw

PATCH v2 1/1 scsi: hisi_sas: fix tags freeing for the reserverd tags

John put the reserverd tags in lower region of tagset in commit f7d190a94e35 ("scsi: hisi_sas: Put reserved tags in lower region of tagset"). However he only change the allocate function and forgot to change the tags free function. This made my board failed to boot.

[   33.467345] hisi_sas_v3_hw 0000:b4:02.0: task exec: failed[-132]!
[   33.473413] sas: Executing internal abort failed 5000000000000603 (-132)
[   33.480088] hisi_sas_v3_hw 0000:b4:02.0: I_T nexus reset: internal abort (-132)
[   33.657336] hisi_sas_v3_hw 0000:b4:02.0: task exec: failed[-132]!
[   33.663403] ata7.00: failed to IDENTIFY (I/O error, err_mask=0x40)
[   35.787344] hisi_sas_v3_hw 0000:b4:04.0: task exec: failed[-132]!
[   35.793411] sas: Executing internal abort failed 5000000000000703 (-132)
[   35.800084] hisi_sas_v3_hw 0000:b4:04.0: I_T nexus reset: internal abort (-132)
[   35.977335] hisi_sas_v3_hw 0000:b4:04.0: task exec: failed[-132]!
[   35.983403] ata10.00: failed to IDENTIFY (I/O error, err_mask=0x40)
[   35.989643] ata10.00: revalidation failed (errno=-5)
Fixes f7d190a94e35 ("scsi: hisi_sas: Put reserved tags in lower region of tagset")
Cc John Garry <[email protected]>
Cc Xiang Chen <[email protected]>

---

v1->v2: replace HISI_SAS_UNRESERVED_IPTT with HISI_SAS_RESERVED_IPTT

 drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/hisi_sas/hisi_sas_main.c +1 -1
index 41ba22f6c7f0..e9c2d306ed87 100644
@@ -162,7 +162,7 @@ static void hisi_sas_slot_index_clear(struct hisi_hba *hisi_hba, int slot_idx)
 static void hisi_sas_slot_index_free(struct hisi_hba *hisi_hba, int slot_idx)
 {
 	if (hisi_hba->hw->slot_index_alloc ||
-	    slot_idx >= HISI_SAS_UNRESERVED_IPTT) {
+	    slot_idx < HISI_SAS_RESERVED_IPTT) {
 		spin_lock(&hisi_hba->lock);
 		hisi_sas_slot_index_clear(hisi_hba, slot_idx);
 		spin_unlock(&hisi_hba->lock);
Signature · 1 line
2.31.1
Acked-by on v2 1/1
#1 lore raw
Quoted 17 lines · Jason Yan

John put the reserverd tags in lower region of tagset in commit f7d190a94e35 ("scsi: hisi_sas: Put reserved tags in lower region of tagset"). However he only change the allocate function and forgot to change the tags free function. This made my board failed to boot.

[   33.467345] hisi_sas_v3_hw 0000:b4:02.0: task exec: failed[-132]!
[   33.473413] sas: Executing internal abort failed 5000000000000603 (-132)
[   33.480088] hisi_sas_v3_hw 0000:b4:02.0: I_T nexus reset: internal abort (-132)
[   33.657336] hisi_sas_v3_hw 0000:b4:02.0: task exec: failed[-132]!
[   33.663403] ata7.00: failed to IDENTIFY (I/O error, err_mask=0x40)
[   35.787344] hisi_sas_v3_hw 0000:b4:04.0: task exec: failed[-132]!
[   35.793411] sas: Executing internal abort failed 5000000000000703 (-132)
[   35.800084] hisi_sas_v3_hw 0000:b4:04.0: I_T nexus reset: internal abort (-132)
[   35.977335] hisi_sas_v3_hw 0000:b4:04.0: task exec: failed[-132]!
[   35.983403] ata10.00: failed to IDENTIFY (I/O error, err_mask=0x40)
[   35.989643] ata10.00: revalidation failed (errno=-5)
Quoted 4 lines
Fixes f7d190a94e35 ("scsi: hisi_sas: Put reserved tags in lower region of tagset")
Cc John Garry <[email protected]>
Cc Xiang Chen <[email protected]>

Thanks

Quoted 20 lines

---

v1->v2: replace HISI_SAS_UNRESERVED_IPTT with HISI_SAS_RESERVED_IPTT

  drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/hisi_sas/hisi_sas_main.c +1 -1
index 41ba22f6c7f0..e9c2d306ed87 100644
@@ -162,7 +162,7 @@ static void hisi_sas_slot_index_clear(struct hisi_hba *hisi_hba, int slot_idx)
  static void hisi_sas_slot_index_free(struct hisi_hba *hisi_hba, int slot_idx)
  {
  	if (hisi_hba->hw->slot_index_alloc ||
-	    slot_idx >= HISI_SAS_UNRESERVED_IPTT) {
+	    slot_idx < HISI_SAS_RESERVED_IPTT) {
  		spin_lock(&hisi_hba->lock);
  		hisi_sas_slot_index_clear(hisi_hba, slot_idx);
  		spin_unlock(&hisi_hba->lock);
Reviewed-by on v2 1/1
#2 lore raw
In reply to Jason Yan
Quoted 17 lines · Jason Yan

John put the reserverd tags in lower region of tagset in commit f7d190a94e35 ("scsi: hisi_sas: Put reserved tags in lower region of tagset"). However he only change the allocate function and forgot to change the tags free function. This made my board failed to boot.

[   33.467345] hisi_sas_v3_hw 0000:b4:02.0: task exec: failed[-132]!
[   33.473413] sas: Executing internal abort failed 5000000000000603 (-132)
[   33.480088] hisi_sas_v3_hw 0000:b4:02.0: I_T nexus reset: internal abort (-132)
[   33.657336] hisi_sas_v3_hw 0000:b4:02.0: task exec: failed[-132]!
[   33.663403] ata7.00: failed to IDENTIFY (I/O error, err_mask=0x40)
[   35.787344] hisi_sas_v3_hw 0000:b4:04.0: task exec: failed[-132]!
[   35.793411] sas: Executing internal abort failed 5000000000000703 (-132)
[   35.800084] hisi_sas_v3_hw 0000:b4:04.0: I_T nexus reset: internal abort (-132)
[   35.977335] hisi_sas_v3_hw 0000:b4:04.0: task exec: failed[-132]!
[   35.983403] ata10.00: failed to IDENTIFY (I/O error, err_mask=0x40)
[   35.989643] ata10.00: revalidation failed (errno=-5)
Quoted 5 lines
Fixes f7d190a94e35 ("scsi: hisi_sas: Put reserved tags in lower region of tagset")
Cc John Garry<[email protected]>
Cc Xiang Chen<[email protected]>

---

#3 lore raw
In reply to Jason Yan

Hi martin,

I notice that this patch is not merged till now, which affect the boot of this driver. Could you consider to merge it as soon as possible?

Thanks,
Xiang Chen

Quoted 41 lines · Jason Yan

John put the reserverd tags in lower region of tagset in commit f7d190a94e35 ("scsi: hisi_sas: Put reserved tags in lower region of tagset"). However he only change the allocate function and forgot to change the tags free function. This made my board failed to boot.

[   33.467345] hisi_sas_v3_hw 0000:b4:02.0: task exec: failed[-132]!
[   33.473413] sas: Executing internal abort failed 5000000000000603 (-132)
[   33.480088] hisi_sas_v3_hw 0000:b4:02.0: I_T nexus reset: internal abort (-132)
[   33.657336] hisi_sas_v3_hw 0000:b4:02.0: task exec: failed[-132]!
[   33.663403] ata7.00: failed to IDENTIFY (I/O error, err_mask=0x40)
[   35.787344] hisi_sas_v3_hw 0000:b4:04.0: task exec: failed[-132]!
[   35.793411] sas: Executing internal abort failed 5000000000000703 (-132)
[   35.800084] hisi_sas_v3_hw 0000:b4:04.0: I_T nexus reset: internal abort (-132)
[   35.977335] hisi_sas_v3_hw 0000:b4:04.0: task exec: failed[-132]!
[   35.983403] ata10.00: failed to IDENTIFY (I/O error, err_mask=0x40)
[   35.989643] ata10.00: revalidation failed (errno=-5)
Fixes f7d190a94e35 ("scsi: hisi_sas: Put reserved tags in lower region of tagset")
Cc John Garry <[email protected]>
Cc Xiang Chen <[email protected]>

---

v1->v2: replace HISI_SAS_UNRESERVED_IPTT with HISI_SAS_RESERVED_IPTT

  drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/hisi_sas/hisi_sas_main.c +1 -1
index 41ba22f6c7f0..e9c2d306ed87 100644
@@ -162,7 +162,7 @@ static void hisi_sas_slot_index_clear(struct hisi_hba *hisi_hba, int slot_idx)
  static void hisi_sas_slot_index_free(struct hisi_hba *hisi_hba, int slot_idx)
  {
  	if (hisi_hba->hw->slot_index_alloc ||
-	    slot_idx >= HISI_SAS_UNRESERVED_IPTT) {
+	    slot_idx < HISI_SAS_RESERVED_IPTT) {
  		spin_lock(&hisi_hba->lock);
  		hisi_sas_slot_index_clear(hisi_hba, slot_idx);
  		spin_unlock(&hisi_hba->lock);
#4 lore raw
Quoted 3 lines

I notice that this patch is not merged till now, which affect the boot of this driver. Could you consider to merge it as soon as possible?

It's already in 6.2/scsi-fixes.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#5 lore raw
Quoted 3 lines · Martin K. Petersen
Quoted 2 lines

I notice that this patch is not merged till now, which affect the boot of this driver. Could you consider to merge it as soon as possible?

It's already in 6.2/scsi-fixes.

Ok, thanks!