Skip to contentSkip to conversation

hisi_sas: Some misc update

PATCH Applied chenxiang 2 participants 4 messages Jan 4, 2023 – Jan 14, 2023

Subsystems (2)
lore
Share & tools
lore

chenxiang

author
#0 lore raw

cover hisi_sas: Some misc update

From: Xiang Chen <[email protected]>

There are two bugfixes related to hisi sas driver:
- Use abort task set command to reset SAS disks when discovered;
- Set a port invalid only if there is no devices attached when refreshing port id;

Xingui Yang (1):
scsi: hisi_sas: Use abort task set to reset SAS disks when discovered

Yihang Li (1):
scsi: hisi_sas: Set a port invalid only if there is no devices
attached when refreshing port id

 drivers/scsi/hisi_sas/hisi_sas_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.8.1
author
#1 lore raw

PATCH 1/2 scsi: hisi_sas: Use abort task set to reset SAS disks when discovered

From: Xingui Yang <[email protected]>

Currently clear task set is used to abort all commands remaining in the disk when the SAS disk is discovered, and if the disk is discovered by two initiators, other I_T nexuses are also affected. So use abort task set instead and take affect only on the specified I_T nexus.

---
 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 41ba22f6..7ce26bf 100644
@@ -704,7 +704,7 @@ static int hisi_sas_init_device(struct domain_device *device)
 		int_to_scsilun(0, &lun);
 
 		while (retry-- > 0) {
-			rc = sas_clear_task_set(device, lun.scsi_lun);
+			rc = sas_abort_task_set(device, lun.scsi_lun);
 			if (rc == TMF_RESP_FUNC_COMPLETE) {
 				hisi_sas_release_task(hisi_hba, device);
 				break;
Signature · 1 line
2.8.1
author
#2 lore raw

PATCH 2/2 scsi: hisi_sas: Set a port invalid only if there is no devices attached when refreshing port id

In reply to chenxiang

From: Yihang Li <[email protected]>

Currently it sets the port invalid if one phy in the port is not enabled, which may cause issues in expander situation. In directly attached situation, if phy up doesn't occur in time when refreshing port id, the port is incorrectly set to invalid which will also cause disk lost.

Therefore set a port invalid only if there is no devices attached to the port.

---
 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 7ce26bf..bffe4a8 100644
@@ -1316,7 +1316,7 @@ static void hisi_sas_refresh_port_id(struct hisi_hba *hisi_hba)
 				device->linkrate = phy->sas_phy.linkrate;
 
 			hisi_hba->hw->setup_itct(hisi_hba, sas_dev);
-		} else
+		} else if (!port->port_attached)
 			port->id = 0xff;
 	}
 }
Signature · 1 line
2.8.1
#3 lore raw
In reply to chenxiang
Quoted 9 lines · chenxiang

There are two bugfixes related to hisi sas driver:
- Use abort task set command to reset SAS disks when discovered;
- Set a port invalid only if there is no devices attached when refreshing port id;

Xingui Yang (1):
scsi: hisi_sas: Use abort task set to reset SAS disks when discovered

[...]

Applied to 6.2/scsi-fixes, thanks!

[1/2] scsi: hisi_sas: Use abort task set to reset SAS disks when discovered

      https://git.kernel.org/mkp/scsi/c/037b48057e8b
[2/2] scsi: hisi_sas: Set a port invalid only if there is no devices attached when refreshing port id
      https://git.kernel.org/mkp/scsi/c/f58c89700630
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering