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:
"Three HBA driver and one upper level driver (sg) fix.

The sg change is the largest, but that results mostly from moving code
to avoid the described race condition"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: ufs: core: Add ufshcd_update_evt_hist() for UFS suspend error
scsi: sg: Fix occasional bogus elapsed time that exceeds timeout
scsi: mpi3mr: Read missing IOCFacts flag for reply queue full overflow
scsi: scsi_debug: Fix atomic write enable module param description

+21 -9
+1
drivers/scsi/mpi3mr/mpi/mpi30_ioc.h
··· 166 166 #define MPI3_IOCFACTS_FLAGS_SIGNED_NVDATA_REQUIRED (0x00010000) 167 167 #define MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_MASK (0x0000ff00) 168 168 #define MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_SHIFT (8) 169 + #define MPI3_IOCFACTS_FLAGS_MAX_REQ_PER_REPLY_QUEUE_LIMIT (0x00000040) 169 170 #define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_MASK (0x00000030) 170 171 #define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_SHIFT (4) 171 172 #define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_NOT_STARTED (0x00000000)
+2
drivers/scsi/mpi3mr/mpi3mr_fw.c
··· 3158 3158 mrioc->facts.dma_mask = (facts_flags & 3159 3159 MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_MASK) >> 3160 3160 MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_SHIFT; 3161 + mrioc->facts.max_req_limit = (facts_flags & 3162 + MPI3_IOCFACTS_FLAGS_MAX_REQ_PER_REPLY_QUEUE_LIMIT); 3161 3163 mrioc->facts.protocol_flags = facts_data->protocol_flags; 3162 3164 mrioc->facts.mpi_version = le32_to_cpu(facts_data->mpi_version.word); 3163 3165 mrioc->facts.max_reqs = le16_to_cpu(facts_data->max_outstanding_requests);
+1 -1
drivers/scsi/scsi_debug.c
··· 7459 7459 MODULE_PARM_DESC(lbpu, "enable LBP, support UNMAP command (def=0)"); 7460 7460 MODULE_PARM_DESC(lbpws, "enable LBP, support WRITE SAME(16) with UNMAP bit (def=0)"); 7461 7461 MODULE_PARM_DESC(lbpws10, "enable LBP, support WRITE SAME(10) with UNMAP bit (def=0)"); 7462 - MODULE_PARM_DESC(atomic_write, "enable ATOMIC WRITE support, support WRITE ATOMIC(16) (def=0)"); 7462 + MODULE_PARM_DESC(atomic_wr, "enable ATOMIC WRITE support, support WRITE ATOMIC(16) (def=0)"); 7463 7463 MODULE_PARM_DESC(lowest_aligned, "lowest aligned lba (def=0)"); 7464 7464 MODULE_PARM_DESC(lun_format, "LUN format: 0->peripheral (def); 1 --> flat address method"); 7465 7465 MODULE_PARM_DESC(max_luns, "number of LUNs per target to simulate(def=1)");
+13 -7
drivers/scsi/sg.c
··· 731 731 sg_remove_request(sfp, srp); 732 732 return -EFAULT; 733 733 } 734 + hp->duration = jiffies_to_msecs(jiffies); 735 + 734 736 if (hp->interface_id != 'S') { 735 737 sg_remove_request(sfp, srp); 736 738 return -ENOSYS; ··· 817 815 return -ENODEV; 818 816 } 819 817 820 - hp->duration = jiffies_to_msecs(jiffies); 821 818 if (hp->interface_id != '\0' && /* v3 (or later) interface */ 822 819 (SG_FLAG_Q_AT_TAIL & hp->flags)) 823 820 at_head = 0; ··· 1339 1338 "sg_cmd_done: pack_id=%d, res=0x%x\n", 1340 1339 srp->header.pack_id, result)); 1341 1340 srp->header.resid = resid; 1342 - ms = jiffies_to_msecs(jiffies); 1343 - srp->header.duration = (ms > srp->header.duration) ? 1344 - (ms - srp->header.duration) : 0; 1345 1341 if (0 != result) { 1346 1342 struct scsi_sense_hdr sshdr; 1347 1343 ··· 1387 1389 done = 0; 1388 1390 } 1389 1391 srp->done = done; 1392 + ms = jiffies_to_msecs(jiffies); 1393 + srp->header.duration = (ms > srp->header.duration) ? 1394 + (ms - srp->header.duration) : 0; 1390 1395 write_unlock_irqrestore(&sfp->rq_list_lock, iflags); 1391 1396 1392 1397 if (likely(done)) { ··· 2534 2533 const sg_io_hdr_t *hp; 2535 2534 const char * cp; 2536 2535 unsigned int ms; 2536 + unsigned int duration; 2537 2537 2538 2538 k = 0; 2539 2539 list_for_each_entry(fp, &sdp->sfds, sfd_siblings) { ··· 2572 2570 seq_printf(s, " id=%d blen=%d", 2573 2571 srp->header.pack_id, blen); 2574 2572 if (srp->done) 2575 - seq_printf(s, " dur=%d", hp->duration); 2573 + seq_printf(s, " dur=%u", hp->duration); 2576 2574 else { 2577 2575 ms = jiffies_to_msecs(jiffies); 2578 - seq_printf(s, " t_o/elap=%d/%d", 2576 + duration = READ_ONCE(hp->duration); 2577 + if (duration) 2578 + duration = (ms > duration ? 2579 + ms - duration : 0); 2580 + seq_printf(s, " t_o/elap=%u/%u", 2579 2581 (new_interface ? hp->timeout : 2580 2582 jiffies_to_msecs(fp->timeout)), 2581 - (ms > hp->duration ? ms - hp->duration : 0)); 2583 + duration); 2582 2584 } 2583 2585 seq_printf(s, "ms sgat=%d op=0x%02x\n", usg, 2584 2586 (int) srp->data.cmd_opcode);
+4 -1
drivers/ufs/core/ufshcd.c
··· 10359 10359 ret = ufshcd_setup_clocks(hba, false); 10360 10360 if (ret) { 10361 10361 ufshcd_enable_irq(hba); 10362 - return ret; 10362 + goto out; 10363 10363 } 10364 10364 if (ufshcd_is_clkgating_allowed(hba)) { 10365 10365 hba->clk_gating.state = CLKS_OFF; ··· 10371 10371 /* Put the host controller in low power mode if possible */ 10372 10372 ufshcd_hba_vreg_set_lpm(hba); 10373 10373 ufshcd_pm_qos_update(hba, false); 10374 + out: 10375 + if (ret) 10376 + ufshcd_update_evt_hist(hba, UFS_EVT_SUSPEND_ERR, (u32)ret); 10374 10377 return ret; 10375 10378 } 10376 10379