SCSI fixes for 3.19-rc5
Subsystems (2)
James Bottomley
maintainerThis patch consists of four real fixes and three MAINTAINER updates. Three of the fixes are obvious (the DIX and atomic allocation are bug on and warn on fixes and the other is just trivial) and the ipr one is a bit more involved but is required because without it, the card double completes aborted commands and causes a kernel oops.
The patch is available here:
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes
The short changelog is:
Brian King (1):
ipr: wait for aborted command responses
Colin Ian King (1):
scsi_debug: test always evaluates to false, || should be used instead
Dave Jiang (1):
MAINTAINERS: Remove self as isci maintainer
Ewan D. Milne (1):
scsi: Avoid crashing if device uses DIX but adapter does not support it
Sasha Levin (1):
scsi_debug: use atomic allocation in resp_rsup_opcodes
Tyrel Datwyler (2):
MAINTAINERS: ibmvscsi driver maintainer change
MAINTAINERS: ibmvfc driver maintainer change
and the diffstat:
MAINTAINERS | 5 ++- drivers/scsi/ipr.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/scsi/ipr.h | 1 + drivers/scsi/scsi_debug.c | 4 +-- drivers/scsi/scsi_lib.c | 12 ++++++- 5 files changed, 108 insertions(+), 6 deletions(-)
With full diff below.
James
---
MAINTAINERS +2 -3
@@ -4754,14 +4754,14 @@ S: Supported F: drivers/net/ethernet/ibm/ibmveth.* IBM Power Virtual SCSI Device Drivers -M: Nathan Fontenot <[email protected]> +M: Tyrel Datwyler <[email protected]> L: [email protected] S: Supported F: drivers/scsi/ibmvscsi/ibmvscsi* F: drivers/scsi/ibmvscsi/viosrp.h IBM Power Virtual FC Device Drivers -M: Brian King <[email protected]> +M: Tyrel Datwyler <[email protected]> L: [email protected] S: Supported F: drivers/scsi/ibmvscsi/ibmvfc*
@@ -4951,7 +4951,6 @@ K: \b(ABS|SYN)_MT_ INTEL C600 SERIES SAS CONTROLLER DRIVER M: Intel SCU Linux support <[email protected]> M: Artur Paszkiewicz <[email protected]> -M: Dave Jiang <[email protected]> L: [email protected] T: git git://git.code.sf.net/p/intel-sas/isci S: Supported
drivers/scsi/ipr.c +92 -0
134 lines not on this page · raw message
drivers/scsi/ipr.h +1 -0
@@ -1606,6 +1606,7 @@ struct ipr_cmnd {struct scsi_device *sdev; } u; +struct completion *eh_comp;struct ipr_hrr_queue *hrrq;struct ipr_ioa_cfg *ioa_cfg; };
drivers/scsi/scsi_debug.c +2 -2
@@ -1623,7 +1623,7 @@ resp_rsup_opcodes(struct scsi_cmnd *scp, struct sdebug_dev_info *devip) req_opcode = cmd[3 ]; req_sa =get_unaligned_be16 (cmd +4 ); alloc_len =get_unaligned_be32 (cmd +6 ); -if (alloc_len <4 && alloc_len >0xffff ) { +if (alloc_len <4 || alloc_len >0xffff ) {mk_sense_invalid_fld (scp,SDEB_IN_CDB ,6 ,-1 );return check_condition_result; }
@@ -1631,7 +1631,7 @@ resp_rsup_opcodes(struct scsi_cmnd *scp, struct sdebug_dev_info *devip) a_len =8192 ; else a_len = alloc_len; - arr =kzalloc ((a_len <256 ) ?320 : a_len +64 ,GFP_KERNEL ); + arr =kzalloc ((a_len <256 ) ?320 : a_len +64 ,GFP_ATOMIC );if (NULL == arr) {mk_sense_buffer (scp,ILLEGAL_REQUEST ,INSUFF_RES_ASC ,INSUFF_RES_ASCQ );
drivers/scsi/scsi_lib.c +11 -1
@@ -1143,7 +1143,17 @@ int scsi_init_io(struct scsi_cmnd *cmd)struct scsi_data_buffer *prot_sdb = cmd->prot_sdb;int ivecs, count; -BUG_ON (prot_sdb ==NULL ); +if (prot_sdb ==NULL ) { +/* +* This can happen if someone (e.g. multipath) +* queues a command to a device on an adapter +* that does not support DIX. +*/ +WARN_ON_ONCE (1 ); + error =BLKPREP_KILL ; + goto err_exit; + } + ivecs =blk_rq_count_integrity_sg (rq->q, rq->bio);if (scsi_alloc_sgtable (prot_sdb, ivecs, is_mq)) {