Bug 205461 - Power-On-Reset Prevents Successful Receive Diagnostics Command in SES Module.
Summary: Power-On-Reset Prevents Successful Receive Diagnostics Command in SES Module.
Status: NEW
Alias: None
Product: SCSI Drivers
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: scsi_drivers-other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-07 15:58 UTC by Steven Siwinski
Modified: 2019-11-07 16:00 UTC (History)
1 user (show)

See Also:
Kernel Version: 5.4-rc6
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Power-On-Reset Prevents Successful Receive Diagnostics Command (3.41 MB, application/octet-stream)
2019-11-07 15:58 UTC, Steven Siwinski
Details
SAS trace of AVAGO HBA that issues 'mode sense' prior to SES sending 'Receive Diagnostics' (2.90 MB, application/octet-stream)
2019-11-07 16:00 UTC, Steven Siwinski
Details

Description Steven Siwinski 2019-11-07 15:58:33 UTC
Created attachment 285817 [details]
Power-On-Reset Prevents Successful Receive Diagnostics Command

Overview:

When booting an SES device connected to an ATTO SAS HBA, the SES module issues a 'Receive Diagnostics' command that fails with check condition power-on-reset and is not retried by the SES module.

Interestingly, when booting an SES device connected to an LSI SAS HBA, the Receive Diagnostics succeeds due to LSI issuing a 'Mode Sense' command prior to the SES module sending the 'Receive Diagnostics' that clears the check condition power-on-reset.

Us (ATTO) does not want to have to issue a command to clear the check condition power-on-reset unless we must. There is no spec that states this is what must happen and seems to be a case that the SES module should handle.


Steps to Reproduce:

With an ATTO SAS HBA:
Connect an SES device to an ATTO SAS HBA, then power on the SES device. 

With an LSI SAS HBA:
I was able to reproduce this issue with an LSI SAS HBA and other SAS HBAs by unloading the SES module, issuing a target reset to the SES device, then re-loading the SES module.


Actual Results:

In the system log you will see

[  953.809858] scsi 7:0:0:0: Power-on or device reset occurred
[  953.809891] scsi 7:0:0:0: Failed to get diagnostic page 0x1
[  953.809931] scsi 7:0:0:0: Failed to bind enclosure -19

This can also be observed in the "sas_poweron_atto.scs" SAS trace.


Expected Results:

The Receive Diagnostics command to succeed and no error logged to the system log.

This can also be observed in a SAS trace of an SES device connected to an LSI HBA, where the 'Receive Diagnostics' command succeeds due to the check condition power-on-reset being cleared by the 'Mode Sense' command issued prior to the 'Receive Diagnostics'. (Trace can be provided upon request).


Additional Information:

It appears that I cannot attach SAS traces from both ATTO and LSI devices, so I have attached the trace while connected to an ATTO SAS HBA that clearly exhibits the error. If both traces are needed, I can provide them by a different means.
Comment 1 Steven Siwinski 2019-11-07 16:00:20 UTC
Created attachment 285819 [details]
SAS trace of AVAGO HBA that issues 'mode sense' prior to SES sending 'Receive Diagnostics'

Note You need to log in before you can comment on or make changes to this bug.