diff options
| author | Jason Yan <[email protected]> | 2021-03-30 19:47:27 +0800 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2021-05-10 13:24:03 -0400 |
| commit | 1ee2753422349723d27009f2f973d03289d430ab (patch) | |
| tree | 93585d8287ed504d2129b25e1c2588955dcebaf2 /tools/perf/scripts/python | |
| parent | 6efb943b8616ec53a5e444193dccf1af9ad627b5 (diff) | |
scsi: core: Treat device offline as a failure
When a SCSI device is offline a MODE SENSE command will return a result
with only DID_NO_CONNECT set. In sd_read_write_protect_flag() only the
status byte of the result is checked. Despite a returned status of
DID_NO_CONNECT the command is considered successful and we read
sdkp->write_prot from a buffer containing garbage.
Modify scsi_status_is_good() to treat DID_NO_CONNECT as a failure case.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jason Yan <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions