linux-stable/drivers/scsi
John Garry 0e7b61dce6 scsi: libsas: Check SMP PHY control function result
[ Upstream commit 01929a65df ]

Currently the SMP PHY control execution result is checked, however the
function result for the command is not.

As such, we may be missing all potential errors, like SMP FUNCTION FAILED,
INVALID REQUEST FRAME LENGTH, etc., meaning the PHY control request has
failed.

In some scenarios we need to ensure the function result is accepted, so add
a check for this.

Tested-by: Jian Luo <luojian5@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-05 15:38:03 +01:00
..
aacraid scsi: aacraid: Fix performance issue on logical drives 2019-03-23 14:35:20 +01:00
aic7xxx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
aic94xx scsi: aic94xx: fix module loading 2019-02-12 19:46:13 +01:00
arcmsr arcmsr: add const to bin_attribute structures 2017-08-10 19:40:50 -04:00
arm scsi: fas216: fix sense buffer initialization 2018-04-26 11:02:10 +02:00
be2iscsi scsi: be2iscsi: Replace PCI pool old API 2017-08-07 14:04:01 -04:00
bfa scsi: bfa: convert to strlcpy/strlcat 2018-12-08 13:03:35 +01:00
bnx2fc scsi: bnx2fc: fix incorrect cast to u64 on shift operation 2019-06-19 08:20:57 +02:00
bnx2i scsi: bnx2i: add error handling for ioremap_nocache 2018-10-03 17:00:52 -07:00
csiostor scsi: csiostor: fix incorrect dma device in case of vport 2019-12-05 15:37:39 +01:00
cxgbi scsi: libcxgbi: add a check for NULL pointer in cxgbi_check_route() 2019-06-22 08:16:18 +02:00
cxlflash scsi: cxlflash: Prevent deadlock when adapter probe fails 2019-02-12 19:46:12 +01:00
device_handler scsi: scsi_dh_alua: handle RTPG sense code correctly during state transitions 2019-11-10 11:25:09 +01:00
dpt sched/wait: Rename wait_queue_t => wait_queue_entry_t 2017-06-20 12:18:27 +02:00
esas2r scsi: esas2r: constify pci_device_id. 2017-08-24 22:28:52 -04:00
fcoe scsi: fcoe: Embed fc_rport_priv in fcoe_rport structure 2019-08-09 17:53:31 +02:00
fnic License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hisi_sas scsi: hisi_sas: Set PHY linkrate when disconnected 2019-04-05 22:31:26 +02:00
ibmvscsi scsi: ibmvfc: fix WARN_ON during event pool release 2019-08-16 10:13:54 +02:00
ibmvscsi_tgt scsi: ibmvscsis: Ensure partition name is properly NUL terminated 2018-10-20 09:48:50 +02:00
isci scsi: isci: Change sci_controller_start_task's return type to sci_status 2019-12-01 09:13:29 +01:00
libfc scsi: fcoe: Embed fc_rport_priv in fcoe_rport structure 2019-08-09 17:53:31 +02:00
libsas scsi: libsas: Check SMP PHY control function result 2019-12-05 15:38:03 +01:00
lpfc scsi: lpfc: Enable Management features for IF_TYPE=6 2019-12-05 15:37:16 +01:00
megaraid scsi: megaraid_sas: Fix goto labels in error handling 2019-12-01 09:14:10 +01:00
mpt3sas scsi: mpt3sas: Fix driver modifying persistent data in Manufacturing page11 2019-12-01 09:14:09 +01:00
mvsas scsi: mvsas: fix wrong endianness of sgpio api 2018-05-25 16:17:50 +02:00
osd block: fix blk_rq_append_bio 2018-01-02 20:31:05 +01:00
pcmcia License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pm8001 scsi: pm80xx: Fixed system hang issue during kexec boot 2019-11-20 17:59:56 +01:00
qedf scsi: qedf: Add missing return in qedf_post_io_req() in the fcport offload check 2019-05-31 06:47:32 -07:00
qedi scsi: qedi: remove set but not used variables 'cdev' and 'udev' 2019-06-19 08:20:56 +02:00
qla2xxx scsi: qla2xxx: deadlock by configfs_depend_item 2019-12-05 15:37:39 +01:00
qla4xxx scsi: qla4xxx: avoid freeing unallocated dma memory 2019-05-31 06:47:33 -07:00
smartpqi scsi: smartpqi: unlock on error in pqi_submit_raid_request_synchronous() 2019-06-25 11:36:53 +08:00
snic License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sym53c8xx_2 scsi: sym53c8xx: fix NULL pointer dereference panic in sym_int_sir() 2019-11-20 17:59:54 +01:00
ufs scsi: ufs: skip shutdown if hba is not powered 2019-10-29 09:16:52 +01:00
.gitignore
3w-9xxx.c scsi: 3ware: fix return 0 on the error path of probe 2018-09-19 22:43:42 +02:00
3w-9xxx.h
3w-sas.c scsi: 3ware: fix return 0 on the error path of probe 2018-09-19 22:43:42 +02:00
3w-sas.h
3w-xxxx.c scsi: 3ware: fix return 0 on the error path of probe 2018-09-19 22:43:42 +02:00
3w-xxxx.h
53c700.c scsi: 53c700: pass correct "dev" to dma_alloc_attrs() 2019-03-13 14:03:15 -07:00
53c700.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
53c700.scr
53c700_d.h_shipped
a100u2w.c
a100u2w.h
a2091.c scsi: drop bus reset for wd33c93-compatible boards 2017-08-25 17:21:10 -04:00
a2091.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
a3000.c scsi: drop bus reset for wd33c93-compatible boards 2017-08-25 17:21:10 -04:00
a3000.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
a4000t.c
advansys.c
aha152x.c scsi: aha152x: drop host reset 2017-08-25 17:21:11 -04:00
aha152x.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
aha1542.c scsi: aha1542: constify pnp_device_id 2017-08-24 22:29:07 -04:00
aha1542.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
aha1740.c
aha1740.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
am53c974.c
atari_scsi.c scsi: NCR5380: Move bus reset to host reset 2017-08-25 17:21:11 -04:00
atp870u.c
atp870u.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
BusLogic.c
BusLogic.h
bvme6000_scsi.c
ch.c scsi: ch: Make it possible to open a ch device multiple times again 2019-10-29 09:17:32 +01:00
constants.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dc395x.c scsi: dc395x: fix DMA API usage in sg_update_list 2019-12-01 09:13:34 +01:00
dc395x.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dmx3191d.c scsi: NCR5380: Move bus reset to host reset 2017-08-25 17:21:11 -04:00
dpt_i2o.c scsi: dpt_i2o: remove redundant null check on array device 2017-08-10 19:55:35 -04:00
dpti.h
eata.c scsi: eata: remove 'arg_done' from eata2x_eh_host_reset() 2017-08-25 17:21:12 -04:00
eata_generic.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
eata_pio.c
eata_pio.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
esp_scsi.c scsi: esp_scsi: Track residual for PIO transfers 2018-11-13 11:14:56 -08:00
esp_scsi.h scsi: esp_scsi: Track residual for PIO transfers 2018-11-13 11:14:56 -08:00
fdomain.c scsi: fdomain: move bus reset to host reset 2017-08-25 17:21:10 -04:00
fdomain.h scsi: fdomain: move bus reset to host reset 2017-08-25 17:21:10 -04:00
FlashPoint.c
g_NCR5380.c scsi: NCR5380: Move bus reset to host reset 2017-08-25 17:21:11 -04:00
gdth.c scsi: gdth: avoid buffer overflow warning 2017-08-07 14:04:01 -04:00
gdth.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gdth_ioctl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gdth_proc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gdth_proc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gvp11.c scsi: drop bus reset for wd33c93-compatible boards 2017-08-25 17:21:10 -04:00
gvp11.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hosts.c scsi: core: introduce force_blk_mq 2018-08-15 18:12:47 +02:00
hpsa.c scsi: hpsa: correct scsi command status issue after reset 2019-08-25 10:50:13 +02:00
hpsa.h scsi: hpsa: fix selection of reply queue 2018-08-15 18:12:47 +02:00
hpsa_cmd.h scsi: hpsa: correct ioaccel2 chaining 2019-07-10 09:54:35 +02:00
hptiop.c scsi: hptiop: Simplify reset handling 2017-08-25 17:21:10 -04:00
hptiop.h
imm.c scsi: imm: drop duplicate bus_reset handler 2017-08-25 17:21:11 -04:00
imm.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
initio.c
initio.h
ipr.c scsi: ipr: System hung while dlpar adding primary ipr adapter back 2018-10-20 09:48:51 +02:00
ipr.h scsi: ipr: System hung while dlpar adding primary ipr adapter back 2018-10-20 09:48:51 +02:00
ips.c scsi: ips: fix missing break in switch 2019-12-01 09:13:27 +01:00
ips.h sched/wait: Rename wait_queue_t => wait_queue_entry_t 2017-06-20 12:18:27 +02:00
iscsi_boot_sysfs.c
iscsi_tcp.c scsi: iscsi_tcp: Explicitly cast param in iscsi_sw_tcp_host_get_param 2019-12-01 09:13:30 +01:00
iscsi_tcp.h
jazz_esp.c
Kconfig scsi: fix kconfig dependency warning related to 53C700_LE_ON_BE 2019-11-10 11:25:11 +01:00
lasi700.c parisc/scsi/lasi700: Fix section mismatches 2017-08-22 16:34:36 +02:00
libiscsi.c scsi: libiscsi: Fix race between iscsi_xmit_task and iscsi_complete_task 2019-03-23 14:35:14 +01:00
libiscsi_tcp.c
mac53c94.c scsi: Convert to using %pOF instead of full_name 2017-08-07 14:04:02 -04:00
mac53c94.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mac_esp.c scsi: esp_scsi: Track residual for PIO transfers 2018-11-13 11:14:56 -08:00
mac_scsi.c scsi: mac_scsi: Fix pseudo DMA implementation, take 2 2019-07-31 07:28:35 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
megaraid.c scsi: megaraid: disable device when probe failed after enabled device 2019-10-29 09:16:53 +01:00
megaraid.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mesh.c
mesh.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mvme16x_scsi.c
mvme147.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mvme147.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mvumi.c scsi: mvumi: remove code handling zero scsi_sg_count(scmd) case 2017-04-24 18:16:49 -04:00
mvumi.h
ncr53c8xx.c
ncr53c8xx.h
NCR53c406a.c
NCR5380.c scsi: NCR5380: Check for bus reset 2019-11-20 18:00:51 +01:00
NCR5380.h scsi: NCR5380: Have NCR5380_select() return a bool 2019-11-20 18:00:48 +01:00
NCR_D700.c
NCR_D700.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
NCR_Q720.c dma-coherent: remove the DMA_MEMORY_MAP and DMA_MEMORY_IO flags 2017-09-01 11:59:17 +02:00
NCR_Q720.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nsp32.c scsi: nsp32: drop bus reset 2017-08-25 17:21:11 -04:00
nsp32.h
nsp32_debug.c
nsp32_io.h
osst.c scsi: osst: silence underflow warning in osst_verify_frame() 2017-08-24 22:29:01 -04:00
osst.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
osst_detect.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
osst_options.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pmcraid.c scsi: pmcraid: fix duplicated code for different branches 2017-08-24 22:29:05 -04:00
pmcraid.h scsi: pmcraid: Replace PCI pool old API 2017-08-07 14:04:01 -04:00
ppa.c scsi: ppa: drop duplicate bus_reset handler 2017-08-25 17:21:11 -04:00
ppa.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ps3rom.c
qla1280.c ia64, scsi: update references for the device-io book 2017-05-16 08:44:21 -03:00
qla1280.h
qlogicfas.c scsi: qlogicfas: move bus_reset to host_reset 2017-08-25 17:21:11 -04:00
qlogicfas408.c scsi: qlogicfas: move bus_reset to host_reset 2017-08-25 17:21:11 -04:00
qlogicfas408.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qlogicpti.c scsi: qlogicpti: fixup qlogicpti_reset() definition 2017-08-28 22:15:46 -04:00
qlogicpti.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
raid_class.c scsi: raid_attrs: fix unused variable warning 2019-05-16 19:42:27 +02:00
script_asm.pl
scsi.c Merge branch 'fixes' into misc 2017-09-07 12:12:43 -07:00
scsi.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
scsi_common.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
scsi_debug.c scsi: scsi_debug: write_same: fix error report 2017-12-20 10:10:28 +01:00
scsi_debugfs.c scsi: core: Fix a scsi_show_rq() NULL pointer dereference 2017-12-20 10:10:20 +01:00
scsi_debugfs.h scsi: Implement blk_mq_ops.show_rq() 2017-04-26 15:09:04 -06:00
scsi_devinfo.c scsi: core: add new RDAC LENOVO/DE_Series device 2019-05-08 07:20:49 +02:00
scsi_dh.c scsi: core: add new RDAC LENOVO/DE_Series device 2019-05-08 07:20:49 +02:00
scsi_error.c scsi: core: save/restore command resid for error handling 2019-10-29 09:17:31 +01:00
scsi_ioctl.c scsi: Suppress gcc 7 fall-through warnings reported with W=1 2017-08-25 17:08:07 -04:00
scsi_lib.c scsi: core: Handle drivers which set sg_tablesize to zero 2019-11-20 17:59:24 +01:00
scsi_lib_dma.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
scsi_logging.c scsi: core: Reduce memory required for SCSI logging 2019-10-07 18:55:06 +02:00
scsi_logging.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
scsi_module.c
scsi_netlink.c
scsi_pm.c scsi: core: Synchronize request queue PM status only on successful resume 2019-01-23 08:09:48 +01:00
scsi_priv.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
scsi_proc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
scsi_sas_internal.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
scsi_scan.c scsi: core: replace GFP_ATOMIC with GFP_KERNEL in scsi_scan.c 2019-04-05 22:31:30 +02:00
scsi_sysctl.c
scsi_sysfs.c scsi: core: try to get module before removing device 2019-10-29 09:17:32 +01:00
scsi_trace.c
scsi_transport_api.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
scsi_transport_fc.c scsi: fc: check for rport presence in fc_block_scsi_eh 2017-10-11 14:33:12 -04:00
scsi_transport_iscsi.c scsi: iscsi: flush running unbind operations when removing a session 2019-04-20 09:15:01 +02:00
scsi_transport_sas.c scsi: scsi_transport_sas: switch to bsg-lib for SMP passthrough 2017-08-29 21:51:45 -04:00
scsi_transport_spi.c
scsi_transport_srp.c scsi: scsi_transport_srp: Fix shost to rport translation 2018-06-05 11:41:59 +02:00
scsi_typedefs.h
scsicam.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sd.c scsi: sd: Ignore a failure to sync cache due to lack of authorization 2019-10-29 09:17:31 +01:00
sd.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sd_dif.c
sd_zbc.c scsi: sd_zbc: Fix variable type and bogus comment 2018-07-25 11:25:06 +02:00
sense_codes.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ses.c scsi: ses: don't ask for diagnostic pages repeatedly during probe 2018-03-19 08:42:51 +01:00
sg.c scsi: sg: fix minor memory leak in error path 2018-08-06 16:20:52 +02:00
sgiwd93.c scsi: drop bus reset for wd33c93-compatible boards 2017-08-25 17:21:10 -04:00
sim710.c
sni_53c710.c scsi: sni_53c710: fix compilation error 2019-11-10 11:25:10 +01:00
sr.c scsi: sr: Avoid that opening a CD-ROM hangs with runtime power management enabled 2018-08-15 18:12:47 +02:00
sr.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sr_ioctl.c sr: pass down correctly sized SCSI sense buffer 2018-05-30 07:51:49 +02:00
sr_vendor.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
st.c scsi: st: fix blk_get_queue usage 2017-08-08 11:49:51 -04:00
st.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
st_options.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
stex.c scsi: stex: make S6flag static 2017-04-26 18:32:29 -04:00
storvsc_drv.c scsi: storvsc: Fix calculation of sub-channel count 2019-05-08 07:20:50 +02:00
sun3_scsi.c scsi: NCR5380: Move bus reset to host reset 2017-08-25 17:21:11 -04:00
sun3_scsi_vme.c
sun3x_esp.c
sun_esp.c scsi: sun_esp: fix device reference leaks 2017-06-27 21:46:55 -04:00
sym53c416.c
sym53c416.h
virtio_scsi.c scsi: virtio_scsi: don't send sc payload with tmfs 2019-03-23 14:35:20 +01:00
vmw_pvscsi.c scsi: vmw_pscsi: Fix use-after-free in pvscsi_queue_lck() 2019-07-03 13:16:00 +02:00
vmw_pvscsi.h
wd33c93.c scsi: drop bus reset for wd33c93-compatible boards 2017-08-25 17:21:10 -04:00
wd33c93.h
wd719x.c
wd719x.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xen-scsifront.c scsi: xen-scsifront: add error handling for xenbus_printf 2018-08-24 13:09:01 +02:00
zalon.c parisc/scsi/zalon: Fix section mismatches 2017-08-22 16:34:36 +02:00
zorro7xx.c