Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
"This is a set of minor qla and virto fixes plus one major regression
fix (oops in all legacy host drivers)."

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
[SCSI] virtio_scsi: fix TMF use-after-free
[SCSI] fix oops in all legacy host adapters caused by 6f381fa
[SCSI] qla2xxx: Update version number to 8.04.00.03-k.
[SCSI] qla2xxx: Properly check for current state after the fabric-login request.
[SCSI] qla2xxx: Proper completion to scsi-ml for scsi status task_set_full and busy.
[SCSI] qla2xxx: Block flash access from application when device is initialized for ISP82xx.
[SCSI] qla2xxx: Fix reset time out as qla2xxx not ack to reset request.

+57 -18
+3
drivers/scsi/hosts.c
··· 218 218 219 219 if (!shost->shost_gendev.parent) 220 220 shost->shost_gendev.parent = dev ? dev : &platform_bus; 221 + if (!dma_dev) 222 + dma_dev = shost->shost_gendev.parent; 223 + 221 224 shost->dma_dev = dma_dev; 222 225 223 226 error = device_add(&shost->shost_gendev);
+3
drivers/scsi/qla2xxx/qla_bsg.c
··· 1367 1367 struct qla_hw_data *ha = vha->hw; 1368 1368 int rval = 0; 1369 1369 1370 + if (ha->flags.isp82xx_reset_hdlr_active) 1371 + return -EBUSY; 1372 + 1370 1373 rval = qla2x00_optrom_setup(bsg_job, vha, 0); 1371 1374 if (rval) 1372 1375 return rval;
+1 -1
drivers/scsi/qla2xxx/qla_dbg.c
··· 15 15 * | Mailbox commands | 0x113e | 0x112c-0x112e | 16 16 * | | | 0x113a | 17 17 * | Device Discovery | 0x2086 | 0x2020-0x2022 | 18 - * | Queue Command and IO tracing | 0x302f | 0x3006,0x3008 | 18 + * | Queue Command and IO tracing | 0x3030 | 0x3006,0x3008 | 19 19 * | | | 0x302d-0x302e | 20 20 * | DPC Thread | 0x401c | | 21 21 * | Async Events | 0x505d | 0x502b-0x502f |
+13 -2
drivers/scsi/qla2xxx/qla_isr.c
··· 1715 1715 res = DID_ERROR << 16; 1716 1716 break; 1717 1717 } 1718 - } else { 1718 + } else if (lscsi_status != SAM_STAT_TASK_SET_FULL && 1719 + lscsi_status != SAM_STAT_BUSY) { 1720 + /* 1721 + * scsi status of task set and busy are considered to be 1722 + * task not completed. 1723 + */ 1724 + 1719 1725 ql_dbg(ql_dbg_io, fcport->vha, 0x301f, 1720 1726 "Dropped frame(s) detected (0x%x " 1721 - "of 0x%x bytes).\n", resid, scsi_bufflen(cp)); 1727 + "of 0x%x bytes).\n", resid, 1728 + scsi_bufflen(cp)); 1722 1729 1723 1730 res = DID_ERROR << 16 | lscsi_status; 1724 1731 goto check_scsi_status; 1732 + } else { 1733 + ql_dbg(ql_dbg_io, fcport->vha, 0x3030, 1734 + "scsi_status: 0x%x, lscsi_status: 0x%x\n", 1735 + scsi_status, lscsi_status); 1725 1736 } 1726 1737 1727 1738 res = DID_OK << 16 | lscsi_status;
+1
drivers/scsi/qla2xxx/qla_nx.c
··· 3125 3125 ql_log(ql_log_info, vha, 0x00b7, 3126 3126 "HW State: COLD/RE-INIT.\n"); 3127 3127 qla82xx_wr_32(ha, QLA82XX_CRB_DEV_STATE, QLA82XX_DEV_COLD); 3128 + qla82xx_set_rst_ready(ha); 3128 3129 if (ql2xmdenable) { 3129 3130 if (qla82xx_md_collect(vha)) 3130 3131 ql_log(ql_log_warn, vha, 0xb02c,
+17 -1
drivers/scsi/qla2xxx/qla_os.c
··· 3577 3577 continue; 3578 3578 /* Attempt a retry. */ 3579 3579 status = 1; 3580 - } else 3580 + } else { 3581 3581 status = qla2x00_fabric_login(vha, 3582 3582 fcport, &next_loopid); 3583 + if (status == QLA_SUCCESS) { 3584 + int status2; 3585 + uint8_t opts; 3586 + 3587 + opts = 0; 3588 + if (fcport->flags & 3589 + FCF_FCP2_DEVICE) 3590 + opts |= BIT_1; 3591 + status2 = 3592 + qla2x00_get_port_database( 3593 + vha, fcport, 3594 + opts); 3595 + if (status2 != QLA_SUCCESS) 3596 + status = 1; 3597 + } 3598 + } 3583 3599 } else 3584 3600 status = qla2x00_local_device_login(vha, 3585 3601 fcport);
+3
drivers/scsi/qla2xxx/qla_sup.c
··· 1017 1017 !IS_CNA_CAPABLE(ha) && !IS_QLA2031(ha)) 1018 1018 return; 1019 1019 1020 + if (ha->flags.isp82xx_reset_hdlr_active) 1021 + return; 1022 + 1020 1023 ha->isp_ops->read_optrom(vha, (uint8_t *)&hdr, 1021 1024 ha->flt_region_npiv_conf << 2, sizeof(struct qla_npiv_header)); 1022 1025 if (hdr.version == __constant_cpu_to_le16(0xffff))
+3 -3
drivers/scsi/qla2xxx/qla_version.h
··· 7 7 /* 8 8 * Driver version 9 9 */ 10 - #define QLA2XXX_VERSION "8.03.07.13-k" 10 + #define QLA2XXX_VERSION "8.04.00.03-k" 11 11 12 12 #define QLA_DRIVER_MAJOR_VER 8 13 - #define QLA_DRIVER_MINOR_VER 3 14 - #define QLA_DRIVER_PATCH_VER 7 13 + #define QLA_DRIVER_MINOR_VER 4 14 + #define QLA_DRIVER_PATCH_VER 0 15 15 #define QLA_DRIVER_BETA_VER 3
+13 -11
drivers/scsi/virtio_scsi.c
··· 175 175 176 176 if (cmd->comp) 177 177 complete_all(cmd->comp); 178 - mempool_free(cmd, virtscsi_cmd_pool); 178 + else 179 + mempool_free(cmd, virtscsi_cmd_pool); 179 180 } 180 181 181 182 static void virtscsi_ctrl_done(struct virtqueue *vq) ··· 312 311 static int virtscsi_tmf(struct virtio_scsi *vscsi, struct virtio_scsi_cmd *cmd) 313 312 { 314 313 DECLARE_COMPLETION_ONSTACK(comp); 315 - int ret; 314 + int ret = FAILED; 316 315 317 316 cmd->comp = &comp; 318 - ret = virtscsi_kick_cmd(vscsi, vscsi->ctrl_vq, cmd, 319 - sizeof cmd->req.tmf, sizeof cmd->resp.tmf, 320 - GFP_NOIO); 321 - if (ret < 0) 322 - return FAILED; 317 + if (virtscsi_kick_cmd(vscsi, vscsi->ctrl_vq, cmd, 318 + sizeof cmd->req.tmf, sizeof cmd->resp.tmf, 319 + GFP_NOIO) < 0) 320 + goto out; 323 321 324 322 wait_for_completion(&comp); 325 - if (cmd->resp.tmf.response != VIRTIO_SCSI_S_OK && 326 - cmd->resp.tmf.response != VIRTIO_SCSI_S_FUNCTION_SUCCEEDED) 327 - return FAILED; 323 + if (cmd->resp.tmf.response == VIRTIO_SCSI_S_OK || 324 + cmd->resp.tmf.response == VIRTIO_SCSI_S_FUNCTION_SUCCEEDED) 325 + ret = SUCCESS; 328 326 329 - return SUCCESS; 327 + out: 328 + mempool_free(cmd, virtscsi_cmd_pool); 329 + return ret; 330 330 } 331 331 332 332 static int virtscsi_device_reset(struct scsi_cmnd *sc)