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

Merge remote-tracking branch 'mkp-scsi/4.5/scsi-fixes' into fixes

+31 -20
+4 -2
block/blk-core.c
··· 2455 2455 2456 2456 rq = NULL; 2457 2457 break; 2458 - } else if (ret == BLKPREP_KILL) { 2458 + } else if (ret == BLKPREP_KILL || ret == BLKPREP_INVALID) { 2459 + int err = (ret == BLKPREP_INVALID) ? -EREMOTEIO : -EIO; 2460 + 2459 2461 rq->cmd_flags |= REQ_QUIET; 2460 2462 /* 2461 2463 * Mark this request as started so we don't trigger 2462 2464 * any debug logic in the end I/O path. 2463 2465 */ 2464 2466 blk_start_request(rq); 2465 - __blk_end_request_all(rq, -EIO); 2467 + __blk_end_request_all(rq, err); 2466 2468 } else { 2467 2469 printk(KERN_ERR "%s: bad return=%d\n", __func__, ret); 2468 2470 break;
+3 -1
drivers/scsi/device_handler/scsi_dh_rdac.c
··· 562 562 /* 563 563 * Command Lock contention 564 564 */ 565 - err = SCSI_DH_RETRY; 565 + err = SCSI_DH_IMM_RETRY; 566 566 break; 567 567 default: 568 568 break; ··· 611 611 if (err != SCSI_DH_OK) { 612 612 err = mode_select_handle_sense(sdev, h->sense); 613 613 if (err == SCSI_DH_RETRY && retry_cnt--) 614 + goto retry; 615 + if (err == SCSI_DH_IMM_RETRY) 614 616 goto retry; 615 617 } 616 618 if (err == SCSI_DH_OK) {
+1 -1
drivers/scsi/hisi_sas/Kconfig
··· 1 1 config SCSI_HISI_SAS 2 2 tristate "HiSilicon SAS" 3 - depends on HAS_DMA 3 + depends on HAS_DMA && HAS_IOMEM 4 4 depends on ARM64 || COMPILE_TEST 5 5 select SCSI_SAS_LIBSAS 6 6 select BLK_DEV_INTEGRITY
+3 -6
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
··· 1289 1289 goto out; 1290 1290 } 1291 1291 1292 - if (cmplt_hdr_data & CMPLT_HDR_ERR_RCRD_XFRD_MSK) { 1293 - if (!(cmplt_hdr_data & CMPLT_HDR_CMD_CMPLT_MSK) || 1294 - !(cmplt_hdr_data & CMPLT_HDR_RSPNS_XFRD_MSK)) 1295 - ts->stat = SAS_DATA_OVERRUN; 1296 - else 1297 - slot_err_v1_hw(hisi_hba, task, slot); 1292 + if (cmplt_hdr_data & CMPLT_HDR_ERR_RCRD_XFRD_MSK && 1293 + !(cmplt_hdr_data & CMPLT_HDR_RSPNS_XFRD_MSK)) { 1298 1294 1295 + slot_err_v1_hw(hisi_hba, task, slot); 1299 1296 goto out; 1300 1297 } 1301 1298
+1
drivers/scsi/scsi_devinfo.c
··· 205 205 {"Intel", "Multi-Flex", NULL, BLIST_NO_RSOC}, 206 206 {"iRiver", "iFP Mass Driver", NULL, BLIST_NOT_LOCKABLE | BLIST_INQUIRY_36}, 207 207 {"LASOUND", "CDX7405", "3.10", BLIST_MAX5LUN | BLIST_SINGLELUN}, 208 + {"Marvell", "Console", NULL, BLIST_SKIP_VPD_PAGES}, 208 209 {"MATSHITA", "PD-1", NULL, BLIST_FORCELUN | BLIST_SINGLELUN}, 209 210 {"MATSHITA", "DMC-LC5", NULL, BLIST_NOT_LOCKABLE | BLIST_INQUIRY_36}, 210 211 {"MATSHITA", "DMC-LC40", NULL, BLIST_NOT_LOCKABLE | BLIST_INQUIRY_36},
+2 -2
drivers/scsi/sd.c
··· 761 761 break; 762 762 763 763 default: 764 - ret = BLKPREP_KILL; 764 + ret = BLKPREP_INVALID; 765 765 goto out; 766 766 } 767 767 ··· 839 839 int ret; 840 840 841 841 if (sdkp->device->no_write_same) 842 - return BLKPREP_KILL; 842 + return BLKPREP_INVALID; 843 843 844 844 BUG_ON(bio_offset(bio) || bio_iovec(bio).bv_len != sdp->sector_size); 845 845
+11 -5
drivers/scsi/storvsc_drv.c
··· 42 42 #include <scsi/scsi_devinfo.h> 43 43 #include <scsi/scsi_dbg.h> 44 44 #include <scsi/scsi_transport_fc.h> 45 + #include <scsi/scsi_transport.h> 45 46 46 47 /* 47 48 * All wire protocol details (storage protocol between the guest and the host) ··· 478 477 struct storvsc_scan_work { 479 478 struct work_struct work; 480 479 struct Scsi_Host *host; 481 - uint lun; 480 + u8 lun; 481 + u8 tgt_id; 482 482 }; 483 483 484 484 static void storvsc_device_scan(struct work_struct *work) 485 485 { 486 486 struct storvsc_scan_work *wrk; 487 - uint lun; 488 487 struct scsi_device *sdev; 489 488 490 489 wrk = container_of(work, struct storvsc_scan_work, work); 491 - lun = wrk->lun; 492 490 493 - sdev = scsi_device_lookup(wrk->host, 0, 0, lun); 491 + sdev = scsi_device_lookup(wrk->host, 0, wrk->tgt_id, wrk->lun); 494 492 if (!sdev) 495 493 goto done; 496 494 scsi_rescan_device(&sdev->sdev_gendev); ··· 540 540 if (!scsi_host_get(wrk->host)) 541 541 goto done; 542 542 543 - sdev = scsi_device_lookup(wrk->host, 0, 0, wrk->lun); 543 + sdev = scsi_device_lookup(wrk->host, 0, wrk->tgt_id, wrk->lun); 544 544 545 545 if (sdev) { 546 546 scsi_remove_device(sdev); ··· 940 940 941 941 wrk->host = host; 942 942 wrk->lun = vm_srb->lun; 943 + wrk->tgt_id = vm_srb->target_id; 943 944 INIT_WORK(&wrk->work, process_err_fn); 944 945 schedule_work(&wrk->work); 945 946 } ··· 1771 1770 fc_transport_template = fc_attach_transport(&fc_transport_functions); 1772 1771 if (!fc_transport_template) 1773 1772 return -ENODEV; 1773 + 1774 + /* 1775 + * Install Hyper-V specific timeout handler. 1776 + */ 1777 + fc_transport_template->eh_timed_out = storvsc_eh_timed_out; 1774 1778 #endif 1775 1779 1776 1780 ret = vmbus_driver_register(&storvsc_drv);
+6 -3
include/linux/blkdev.h
··· 682 682 /* 683 683 * q->prep_rq_fn return values 684 684 */ 685 - #define BLKPREP_OK 0 /* serve it */ 686 - #define BLKPREP_KILL 1 /* fatal error, kill */ 687 - #define BLKPREP_DEFER 2 /* leave on queue */ 685 + enum { 686 + BLKPREP_OK, /* serve it */ 687 + BLKPREP_KILL, /* fatal error, kill, return -EIO */ 688 + BLKPREP_DEFER, /* leave on queue */ 689 + BLKPREP_INVALID, /* invalid command, kill, return -EREMOTEIO */ 690 + }; 688 691 689 692 extern unsigned long blk_max_low_pfn, blk_max_pfn; 690 693