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:
"Four small fixes, three in drivers. The core fix is yet another
attempt to insulate us from UFS devices' weird behaviour for VPD
pages"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: mpt3sas: Don't print sense pool info twice
scsi: core: Improve scsi_vpd_inquiry() checks
scsi: megaraid_sas: Fix crash after a double completion
scsi: megaraid_sas: Fix fw_crash_buffer_show()

+12 -10
+1 -1
drivers/scsi/megaraid/megaraid_sas_base.c
··· 3298 3298 3299 3299 spin_lock_irqsave(&instance->crashdump_lock, flags); 3300 3300 buff_offset = instance->fw_crash_buffer_offset; 3301 - if (!instance->crash_dump_buf && 3301 + if (!instance->crash_dump_buf || 3302 3302 !((instance->fw_crash_state == AVAILABLE) || 3303 3303 (instance->fw_crash_state == COPYING))) { 3304 3304 dev_err(&instance->pdev->dev,
+2 -2
drivers/scsi/megaraid/megaraid_sas_fusion.c
··· 4771 4771 devhandle = megasas_get_tm_devhandle(scmd->device); 4772 4772 4773 4773 if (devhandle == (u16)ULONG_MAX) { 4774 - ret = SUCCESS; 4774 + ret = FAILED; 4775 4775 sdev_printk(KERN_INFO, scmd->device, 4776 4776 "task abort issued for invalid devhandle\n"); 4777 4777 mutex_unlock(&instance->reset_mutex); ··· 4841 4841 devhandle = megasas_get_tm_devhandle(scmd->device); 4842 4842 4843 4843 if (devhandle == (u16)ULONG_MAX) { 4844 - ret = SUCCESS; 4844 + ret = FAILED; 4845 4845 sdev_printk(KERN_INFO, scmd->device, 4846 4846 "target reset issued for invalid devhandle\n"); 4847 4847 mutex_unlock(&instance->reset_mutex);
-5
drivers/scsi/mpt3sas/mpt3sas_base.c
··· 6616 6616 else if (rc == -EAGAIN) 6617 6617 goto try_32bit_dma; 6618 6618 total_sz += sense_sz; 6619 - ioc_info(ioc, 6620 - "sense pool(0x%p)- dma(0x%llx): depth(%d)," 6621 - "element_size(%d), pool_size(%d kB)\n", 6622 - ioc->sense, (unsigned long long)ioc->sense_dma, ioc->scsiio_depth, 6623 - SCSI_SENSE_BUFFERSIZE, sz / 1024); 6624 6619 /* reply pool, 4 byte align */ 6625 6620 sz = ioc->reply_free_queue_depth * ioc->reply_sz; 6626 6621 rc = _base_allocate_reply_pool(ioc, sz);
+9 -2
drivers/scsi/scsi.c
··· 314 314 if (result) 315 315 return -EIO; 316 316 317 - /* Sanity check that we got the page back that we asked for */ 317 + /* 318 + * Sanity check that we got the page back that we asked for and that 319 + * the page size is not 0. 320 + */ 318 321 if (buffer[1] != page) 319 322 return -EIO; 320 323 321 - return get_unaligned_be16(&buffer[2]) + 4; 324 + result = get_unaligned_be16(&buffer[2]); 325 + if (!result) 326 + return -EIO; 327 + 328 + return result + 4; 322 329 } 323 330 324 331 static int scsi_get_vpd_size(struct scsi_device *sdev, u8 page)