SCSI fixes for 5.4-rc7
Subsystems (2)
James Bottomley
maintainerThree small changes: two in the core and one in the qla2xxx driver. The sg_tablesize fix affects a thinko in the migration to blk-mq of certain legacy drivers which could cause an oops and the sd core change should only affect zoned block devices which were wrongly suppressing error messages for reset all zones.
The patch is available here:
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes
The short changelog is:
Damien Le Moal (1):
scsi: sd_zbc: Fix sd_zbc_complete()
Martin Wilck (1):
scsi: qla2xxx: fix NPIV tear down process
Michael Schmitz (1):
scsi: core: Handle drivers which set sg_tablesize to zero
And the diffstat:
drivers/scsi/qla2xxx/qla_mid.c | 8 +++++--- drivers/scsi/qla2xxx/qla_os.c | 8 +++++--- drivers/scsi/scsi_lib.c | 3 ++- drivers/scsi/sd_zbc.c | 29 ++++++++++------------------- 4 files changed, 22 insertions(+), 26 deletions(-)
With full diff below.
James
---
drivers/scsi/qla2xxx/qla_mid.c +5 -3
@@ -76,9 +76,11 @@ qla24xx_deallocate_vp_id(scsi_qla_host_t *vha)* ensures no active vp_list traversal while the vport is removed * from the queue) */ -for (i =0 ; i <10 &&atomic_read (&vha->vref_count); i++) -wait_event_timeout (vha->vref_waitq, -atomic_read (&vha->vref_count),HZ ); +for (i =0 ; i <10 ; i++) { +if (wait_event_timeout (vha->vref_waitq, + !atomic_read (&vha->vref_count),HZ ) >0 ) +break ; + }spin_lock_irqsave (&ha->vport_slock, flags);if (atomic_read (&vha->vref_count)) {
drivers/scsi/qla2xxx/qla_os.c +5 -3
@@ -1119,9 +1119,11 @@ qla2x00_wait_for_sess_deletion(scsi_qla_host_t *vha)qla2x00_mark_all_devices_lost (vha,0 ); -for (i =0 ; i <10 ; i++) -wait_event_timeout (vha->fcport_waitQ,test_fcport_count (vha), -HZ ); +for (i =0 ; i <10 ; i++) { +if (wait_event_timeout (vha->fcport_waitQ, +test_fcport_count (vha),HZ ) >0 ) +break ; + }flush_workqueue (vha->hw->wq); }
drivers/scsi/scsi_lib.c +2 -1
@@ -1882,7 +1882,8 @@ int scsi_mq_setup_tags(struct Scsi_Host *shost) {unsigned int cmd_size, sgl_size; - sgl_size =scsi_mq_inline_sgl_size (shost); + sgl_size = max_t(unsigned int, sizeof(struct scatterlist), +scsi_mq_inline_sgl_size (shost)); cmd_size =sizeof (struct scsi_cmnd ) + shost->hostt->cmd_size + sgl_size;if (scsi_host_get_prot (shost)) cmd_size += sizeof(struct scsi_data_buffer) +
drivers/scsi/sd_zbc.c +10 -19
@@ -263,25 +263,16 @@ void sd_zbc_complete(struct scsi_cmnd *cmd, unsigned int good_bytes,int result = cmd->result;struct request *rq = cmd->request; -switch (req_op (rq)) { -case REQ_OP_ZONE_RESET : -case REQ_OP_ZONE_RESET_ALL : - -if (result && - sshdr->sense_key ==ILLEGAL_REQUEST && - sshdr->asc ==0x24 ) -/* -* INVALID FIELD IN CDB error: reset of a conventional -* zone was attempted. Nothing to worry about, so be -* quiet about the error. -*/ - rq->rq_flags |=RQF_QUIET ; -break ; - -case REQ_OP_WRITE : -case REQ_OP_WRITE_ZEROES : -case REQ_OP_WRITE_SAME : -break ; +if (req_op (rq) ==REQ_OP_ZONE_RESET && + result && + sshdr->sense_key ==ILLEGAL_REQUEST && + sshdr->asc ==0x24 ) { +/* +* INVALID FIELD IN CDB error: reset of a conventional +* zone was attempted. Nothing to worry about, so be +* quiet about the error. +*/ + rq->rq_flags |=RQF_QUIET ; } }
The pull request you sent on Mon, 11 Nov 2019 09:08:37 -0800:
The pull request you sent on Mon, 11 Nov 2019 09:08:37 -0800:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.gitscsi-fixes
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/72d5ac679e246c15d94a00d53a6289e142cfcf86
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker