Re: [PATCH v2 2/2] scsi: hisi_sas: add spinup_notify callback to handle Active_Wait/Idle_Wait SSP devices
From: John Garry
Date: Mon Jul 20 2026 - 05:52:04 EST
+
+void hisi_sas_spinup_notify(struct scsi_device *sdev)This could go in libsas
+{
+ struct domain_device *dev = sdev_to_domain_dev(sdev);
+ struct sas_ha_struct *sha;
+ struct hisi_hba *hisi_hba;
+ struct sas_phy *local_phy;
+ struct hisi_sas_phy *phy;
+
+ if (dev->parent && dev_is_expander(dev->parent->dev_type))
+ return;
+
+ sha = SHOST_TO_SAS_HA(sdev->host);
+ hisi_hba = sha->lldd_ha;
+
+ local_phy = sas_get_local_phy(dev);
+ phy = &hisi_hba->phy[local_phy->number];
+ if (phy->identify.target_port_protocols & SAS_PROTOCOL_SSP)
+ hisi_sas_notify_phy_event(phy, HISI_PHYE_SPINUP_NOTIFY);
+ sas_put_local_phy(local_phy);
+}
+EXPORT_SYMBOL_GPL(hisi_sas_spinup_notify);