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 fixes, all in drivers: three fairly obvious small ones and a
large one in aacraid to add block queue completion mapping and fix a
CPU offline hang"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: lpfc: Fix incorrect big endian type assignment in bsg loopback path
scsi: target: core: Fix error path in target_setup_session()
scsi: storvsc: Always set no_report_opcodes
scsi: aacraid: Reply queue mapping to CPUs based on IRQ affinity

+51 -7
+1
drivers/scsi/aacraid/aacraid.h
··· 1678 1678 u32 handle_pci_error; 1679 1679 bool init_reset; 1680 1680 u8 soft_reset_support; 1681 + u8 use_map_queue; 1681 1682 }; 1682 1683 1683 1684 #define aac_adapter_interrupt(dev) \
+5 -1
drivers/scsi/aacraid/commsup.c
··· 223 223 struct fib *aac_fib_alloc_tag(struct aac_dev *dev, struct scsi_cmnd *scmd) 224 224 { 225 225 struct fib *fibptr; 226 + u32 blk_tag; 227 + int i; 226 228 227 - fibptr = &dev->fibs[scsi_cmd_to_rq(scmd)->tag]; 229 + blk_tag = blk_mq_unique_tag(scsi_cmd_to_rq(scmd)); 230 + i = blk_mq_unique_tag_to_tag(blk_tag); 231 + fibptr = &dev->fibs[i]; 228 232 /* 229 233 * Null out fields that depend on being zero at the start of 230 234 * each I/O
+14
drivers/scsi/aacraid/linit.c
··· 19 19 20 20 #include <linux/compat.h> 21 21 #include <linux/blkdev.h> 22 + #include <linux/blk-mq-pci.h> 22 23 #include <linux/completion.h> 23 24 #include <linux/init.h> 24 25 #include <linux/interrupt.h> ··· 503 502 sdev->tagged_supported = 1; 504 503 505 504 return 0; 505 + } 506 + 507 + static void aac_map_queues(struct Scsi_Host *shost) 508 + { 509 + struct aac_dev *aac = (struct aac_dev *)shost->hostdata; 510 + 511 + blk_mq_pci_map_queues(&shost->tag_set.map[HCTX_TYPE_DEFAULT], 512 + aac->pdev, 0); 513 + aac->use_map_queue = true; 506 514 } 507 515 508 516 /** ··· 1498 1488 .bios_param = aac_biosparm, 1499 1489 .shost_groups = aac_host_groups, 1500 1490 .slave_configure = aac_slave_configure, 1491 + .map_queues = aac_map_queues, 1501 1492 .change_queue_depth = aac_change_queue_depth, 1502 1493 .sdev_groups = aac_dev_groups, 1503 1494 .eh_abort_handler = aac_eh_abort, ··· 1786 1775 shost->max_lun = AAC_MAX_LUN; 1787 1776 1788 1777 pci_set_drvdata(pdev, shost); 1778 + shost->nr_hw_queues = aac->max_msix; 1779 + shost->host_tagset = 1; 1789 1780 1790 1781 error = scsi_add_host(shost, &pdev->dev); 1791 1782 if (error) ··· 1919 1906 struct aac_dev *aac = (struct aac_dev *)shost->hostdata; 1920 1907 1921 1908 aac_cancel_rescan_worker(aac); 1909 + aac->use_map_queue = false; 1922 1910 scsi_remove_host(shost); 1923 1911 1924 1912 __aac_shutdown(aac);
+23 -2
drivers/scsi/aacraid/src.c
··· 493 493 #endif 494 494 495 495 u16 vector_no; 496 + struct scsi_cmnd *scmd; 497 + u32 blk_tag; 498 + struct Scsi_Host *shost = dev->scsi_host_ptr; 499 + struct blk_mq_queue_map *qmap; 496 500 497 501 atomic_inc(&q->numpending); 498 502 ··· 509 505 if ((dev->comm_interface == AAC_COMM_MESSAGE_TYPE3) 510 506 && dev->sa_firmware) 511 507 vector_no = aac_get_vector(dev); 512 - else 513 - vector_no = fib->vector_no; 508 + else { 509 + if (!fib->vector_no || !fib->callback_data) { 510 + if (shost && dev->use_map_queue) { 511 + qmap = &shost->tag_set.map[HCTX_TYPE_DEFAULT]; 512 + vector_no = qmap->mq_map[raw_smp_processor_id()]; 513 + } 514 + /* 515 + * We hardcode the vector_no for 516 + * reserved commands as a valid shost is 517 + * absent during the init 518 + */ 519 + else 520 + vector_no = 0; 521 + } else { 522 + scmd = (struct scsi_cmnd *)fib->callback_data; 523 + blk_tag = blk_mq_unique_tag(scsi_cmd_to_rq(scmd)); 524 + vector_no = blk_mq_unique_tag_to_hwq(blk_tag); 525 + } 526 + } 514 527 515 528 if (native_hba) { 516 529 if (fib->flags & FIB_CONTEXT_FLAG_NATIVE_HBA_TMF) {
+4 -4
drivers/scsi/lpfc/lpfc_bsg.c
··· 889 889 struct lpfc_iocbq *piocbq) 890 890 { 891 891 uint32_t evt_req_id = 0; 892 - uint32_t cmd; 892 + u16 cmd; 893 893 struct lpfc_dmabuf *dmabuf = NULL; 894 894 struct lpfc_bsg_event *evt; 895 895 struct event_data *evt_dat = NULL; ··· 915 915 916 916 ct_req = (struct lpfc_sli_ct_request *)bdeBuf1->virt; 917 917 evt_req_id = ct_req->FsType; 918 - cmd = ct_req->CommandResponse.bits.CmdRsp; 918 + cmd = be16_to_cpu(ct_req->CommandResponse.bits.CmdRsp); 919 919 920 920 spin_lock_irqsave(&phba->ct_ev_lock, flags); 921 921 list_for_each_entry(evt, &phba->ct_ev_waiters, node) { ··· 3186 3186 ctreq->RevisionId.bits.InId = 0; 3187 3187 ctreq->FsType = SLI_CT_ELX_LOOPBACK; 3188 3188 ctreq->FsSubType = 0; 3189 - ctreq->CommandResponse.bits.CmdRsp = ELX_LOOPBACK_DATA; 3190 - ctreq->CommandResponse.bits.Size = size; 3189 + ctreq->CommandResponse.bits.CmdRsp = cpu_to_be16(ELX_LOOPBACK_DATA); 3190 + ctreq->CommandResponse.bits.Size = cpu_to_be16(size); 3191 3191 segment_offset = ELX_LOOPBACK_HEADER_SZ; 3192 3192 } else 3193 3193 segment_offset = 0;
+2
drivers/scsi/storvsc_drv.c
··· 1567 1567 { 1568 1568 blk_queue_rq_timeout(sdevice->request_queue, (storvsc_timeout * HZ)); 1569 1569 1570 + /* storvsc devices don't support MAINTENANCE_IN SCSI cmd */ 1571 + sdevice->no_report_opcodes = 1; 1570 1572 sdevice->no_write_same = 1; 1571 1573 1572 1574 /*
+2
drivers/target/target_core_transport.c
··· 504 504 505 505 free_sess: 506 506 transport_free_session(sess); 507 + return ERR_PTR(rc); 508 + 507 509 free_cnt: 508 510 target_free_cmd_counter(cmd_cnt); 509 511 return ERR_PTR(rc);