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:
"Six small fixes, five in drivers and one to correct another minor
regression from cc97923a5bcc ("block: move dma drain handling to
scsi") where we still need the drain stub to be built in to the kernel
for the modular libata, non-modular SAS driver case"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: mptscsih: Fix read sense data size
scsi: zfcp: Fix panic on ERP timeout for previously dismissed ERP action
scsi: lpfc: Avoid another null dereference in lpfc_sli4_hba_unset()
scsi: libata: Fix the ata_scsi_dma_need_drain stub
scsi: qla2xxx: Keep initiator ports after RSCN
scsi: qla2xxx: Set NVMe status code for failed NVMe FCP request

+20 -9
+1 -3
drivers/message/fusion/mptscsih.c
··· 118 118 int mptscsih_resume(struct pci_dev *pdev); 119 119 #endif 120 120 121 - #define SNS_LEN(scp) SCSI_SENSE_BUFFERSIZE 122 - 123 121 124 122 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 125 123 /* ··· 2420 2422 /* Copy the sense received into the scsi command block. */ 2421 2423 req_index = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); 2422 2424 sense_data = ((u8 *)ioc->sense_buf_pool + (req_index * MPT_SENSE_BUFFER_ALLOC)); 2423 - memcpy(sc->sense_buffer, sense_data, SNS_LEN(sc)); 2425 + memcpy(sc->sense_buffer, sense_data, MPT_SENSE_BUFFER_ALLOC); 2424 2426 2425 2427 /* Log SMART data (asc = 0x5D, non-IM case only) if required. 2426 2428 */
+11 -2
drivers/s390/scsi/zfcp_erp.c
··· 577 577 ZFCP_STATUS_ERP_TIMEDOUT)) { 578 578 req->status |= ZFCP_STATUS_FSFREQ_DISMISSED; 579 579 zfcp_dbf_rec_run("erscf_1", act); 580 - req->erp_action = NULL; 580 + /* lock-free concurrent access with 581 + * zfcp_erp_timeout_handler() 582 + */ 583 + WRITE_ONCE(req->erp_action, NULL); 581 584 } 582 585 if (act->status & ZFCP_STATUS_ERP_TIMEDOUT) 583 586 zfcp_dbf_rec_run("erscf_2", act); ··· 616 613 void zfcp_erp_timeout_handler(struct timer_list *t) 617 614 { 618 615 struct zfcp_fsf_req *fsf_req = from_timer(fsf_req, t, timer); 619 - struct zfcp_erp_action *act = fsf_req->erp_action; 616 + struct zfcp_erp_action *act; 620 617 618 + if (fsf_req->status & ZFCP_STATUS_FSFREQ_DISMISSED) 619 + return; 620 + /* lock-free concurrent access with zfcp_erp_strategy_check_fsfreq() */ 621 + act = READ_ONCE(fsf_req->erp_action); 622 + if (!act) 623 + return; 621 624 zfcp_erp_notify(act, ZFCP_STATUS_ERP_TIMEDOUT); 622 625 } 623 626
+2 -1
drivers/scsi/lpfc/lpfc_init.c
··· 11878 11878 lpfc_sli4_xri_exchange_busy_wait(phba); 11879 11879 11880 11880 /* per-phba callback de-registration for hotplug event */ 11881 - lpfc_cpuhp_remove(phba); 11881 + if (phba->pport) 11882 + lpfc_cpuhp_remove(phba); 11882 11883 11883 11884 /* Disable PCI subsystem interrupt */ 11884 11885 lpfc_sli4_disable_intr(phba);
+3 -1
drivers/scsi/qla2xxx/qla_gs.c
··· 3496 3496 qla2x00_clear_loop_id(fcport); 3497 3497 fcport->flags |= FCF_FABRIC_DEVICE; 3498 3498 } else if (fcport->d_id.b24 != rp->id.b24 || 3499 - fcport->scan_needed) { 3499 + (fcport->scan_needed && 3500 + fcport->port_type != FCT_INITIATOR && 3501 + fcport->port_type != FCT_NVME_INITIATOR)) { 3500 3502 qlt_schedule_sess_for_deletion(fcport); 3501 3503 } 3502 3504 fcport->d_id.b24 = rp->id.b24;
+2 -1
drivers/scsi/qla2xxx/qla_nvme.c
··· 139 139 sp->priv = NULL; 140 140 if (priv->comp_status == QLA_SUCCESS) { 141 141 fd->rcv_rsplen = le16_to_cpu(nvme->u.nvme.rsp_pyld_len); 142 + fd->status = NVME_SC_SUCCESS; 142 143 } else { 143 144 fd->rcv_rsplen = 0; 144 145 fd->transferred_length = 0; 146 + fd->status = NVME_SC_INTERNAL; 145 147 } 146 - fd->status = 0; 147 148 spin_unlock_irqrestore(&priv->cmd_lock, flags); 148 149 149 150 fd->done(fd);
+1 -1
include/linux/libata.h
··· 1095 1095 #define ATA_SCSI_COMPAT_IOCTL /* empty */ 1096 1096 #endif 1097 1097 extern int ata_scsi_queuecmd(struct Scsi_Host *h, struct scsi_cmnd *cmd); 1098 - #if IS_ENABLED(CONFIG_ATA) 1098 + #if IS_REACHABLE(CONFIG_ATA) 1099 1099 bool ata_scsi_dma_need_drain(struct request *rq); 1100 1100 #else 1101 1101 #define ata_scsi_dma_need_drain NULL