Re: [PATCH v3 0/2] scsi: libsas: Support spinup notification for SAS devices

yangxingui <[email protected]> Thu, 6 Aug 2026 09:45:49 +0800
Newsgroups gmane.linux.scsi,gmane.linux.kernel
Message-ID <[email protected]>

On 2026/8/5 19:43, John Garry wrote:
> On 04/08/2026 10:30, yangxingui wrote:
>>>
>>> How would other SAS HBAs which use libsas handle this scenario? Since 
>>> they have FW, would the FW automatically issue this NOTIFY(ENABLE 
>>> SPINUP)?
>>>
>>> I just wonder why hisi_sas seems to be only driver which would need 
>>> this.
>>
>> Thanks for the question. This affects only SAS HDDs. I checked pm8001, 
>> isci, and aic94xx — all handle NOTIFY(ENABLE SPINUP) at the driver level:
>>
>> - pm8001: sends once at phy-up, then mdelay(200) — comment: "delay a 
>> moment to wait disk to spinup" — before notifying libsas.
>>
>> - isci: enables hardware periodic insertion during link idle (ENABLE 
>> bit in notify_enable_spinup_control), cleared at phy stop.
>>
>> - aic94xx: enables microcode periodic insertion during link idle 
>> (NOTIFY_TIMER_TIMEOUT = 500ms interval), stops at phy down.
>>
>> hisi_sas also calls sl_notify_ssp() at phy-up, but the NOTIFY_EN bit 
>> is held for only 1ms — msleep(1) between setting and clearing — before 
>> immediately notifying libsas.
>>
>> The root cause appears to be that 1ms is insufficient compared to 
>> pm8001's 200ms. An alternative to hisi_sas would be to simply increase 
>> the hold time in sl_notify_ssp() to match pm8001's approach, keeping 
>> the fix within hisi_sas.
>>
>> Would you prefer this simpler approach, or do you still see value in 
>> the libsas-level sense detection and callback from hisi_sas? ^-^
> 
> I think that if you can resolve this in the LL driver then that would be 
> better.

Okay, thanks a lot.

Xingui