linux-stable/include/scsi
Jason Yan 1ee2753422 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/20210330114727.234467-1-yanaijie@huawei.com
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-05-10 13:24:03 -04:00
..
fc scsi: scsi_transport_fc: Match HBA Attribute Length with HBAAPI V2.0 definitions 2020-07-15 14:50:23 -04:00
fc_frame.h scsi: libfc: Move scsi/fc_encode.h to libfc 2020-10-29 21:49:25 -04:00
fcoe_sysfs.h
iscsi_if.h scsi: iscsi: Add support for asynchronous iSCSI session destruction 2020-03-11 23:07:57 -04:00
iscsi_proto.h scsi: Revert "target: iscsi: Wait for all commands to finish before freeing a session" 2020-02-14 17:13:54 -05:00
iser.h
libfc.h scsi: libfc: Whitespace cleanup in libfc.h 2019-07-29 20:43:06 -04:00
libfcoe.h Fix misc new gcc warnings 2021-04-27 17:05:53 -07:00
libiscsi.h scsi: libiscsi: Add helper to calculate max SCSI cmds per session 2021-02-08 22:39:04 -05:00
libiscsi_tcp.h SCSI misc on 20190709 2019-07-11 15:14:01 -07:00
libsas.h scsi: libsas: Remove temporarily-added _gfp() API variants 2021-01-22 21:31:10 -05:00
sas.h scsi: libsas: Replace zero-length array with flexible-array 2020-05-11 22:26:32 -04:00
sas_ata.h
scsi.h scsi: core: Treat device offline as a failure 2021-05-10 13:24:03 -04:00
scsi_bsg_iscsi.h scsi: Replace zero-length array with flexible-array member 2020-03-11 23:07:56 -04:00
scsi_cmnd.h SCSI misc on 20210428 2021-04-28 17:22:10 -07:00
scsi_common.h scsi: target: core: Add CONTROL field for trace events 2020-10-02 18:36:19 -04:00
scsi_dbg.h scsi: core: Reduce memory required for SCSI logging 2019-08-07 21:47:29 -04:00
scsi_device.h scsi: core: Remove an incorrect comment 2021-04-15 22:44:40 -04:00
scsi_devinfo.h
scsi_dh.h scsi: core: Introduce enum scsi_disposition 2021-04-15 22:44:40 -04:00
scsi_driver.h
scsi_eh.h scsi: core: Introduce enum scsi_disposition 2021-04-15 22:44:40 -04:00
scsi_host.h SCSI misc on 20210428 2021-04-28 17:22:10 -07:00
scsi_ioctl.h scsi: Replace zero-length array with flexible-array member 2020-03-11 23:07:56 -04:00
scsi_proto.h
scsi_request.h
scsi_tcq.h scsi: core: Only return started requests from scsi_host_find_tag() 2020-07-24 22:09:56 -04:00
scsi_transport.h SCSI misc on 20190709 2019-07-11 15:14:01 -07:00
scsi_transport_fc.h scsi: scsi_transport_fc: Add a new rport state FC_PORTSTATE_MARGINAL 2021-01-14 22:55:17 -05:00
scsi_transport_iscsi.h scsi: iscsi: Fix race condition between login and sync thread 2021-03-29 21:17:45 -04:00
scsi_transport_sas.h
scsi_transport_spi.h
scsi_transport_srp.h
scsicam.h scsi: simplify scsi_partsize 2020-03-24 07:57:07 -06:00
sg.h scsi: docs: convert scsi-generic.txt to ReST 2020-03-11 23:08:02 -04:00
srp.h scsi: Replace zero-length array with flexible-array member 2020-03-11 23:07:56 -04:00
viosrp.h