Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
"Five small fixes. Four in three drivers: qedi, lpfc and storvsc. The
final one is labelled core, but merely adds a dh rdac entry for Lenovo
systems"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: lpfc: Fix missing wakeups on abort threads
scsi: storvsc: Reduce default ring buffer size to 128 Kbytes
scsi: storvsc: Fix calculation of sub-channel count
scsi: core: add new RDAC LENOVO/DE_Series device
scsi: qedi: remove declaration of nvm_image from stack

Changed files
+19 -12
drivers
+3 -4
drivers/scsi/lpfc/lpfc_scsi.c
··· 3878 3878 * wake up the thread. 3879 3879 */ 3880 3880 spin_lock(&lpfc_cmd->buf_lock); 3881 - if (unlikely(lpfc_cmd->cur_iocbq.iocb_flag & LPFC_DRIVER_ABORTED)) { 3882 - lpfc_cmd->cur_iocbq.iocb_flag &= ~LPFC_DRIVER_ABORTED; 3883 - if (lpfc_cmd->waitq) 3884 - wake_up(lpfc_cmd->waitq); 3881 + lpfc_cmd->cur_iocbq.iocb_flag &= ~LPFC_DRIVER_ABORTED; 3882 + if (lpfc_cmd->waitq) { 3883 + wake_up(lpfc_cmd->waitq); 3885 3884 lpfc_cmd->waitq = NULL; 3886 3885 } 3887 3886 spin_unlock(&lpfc_cmd->buf_lock);
+2 -5
drivers/scsi/qedi/qedi_main.c
··· 1392 1392 1393 1393 static int qedi_alloc_nvm_iscsi_cfg(struct qedi_ctx *qedi) 1394 1394 { 1395 - struct qedi_nvm_iscsi_image nvm_image; 1396 - 1397 1395 qedi->iscsi_image = dma_alloc_coherent(&qedi->pdev->dev, 1398 - sizeof(nvm_image), 1396 + sizeof(struct qedi_nvm_iscsi_image), 1399 1397 &qedi->nvm_buf_dma, GFP_KERNEL); 1400 1398 if (!qedi->iscsi_image) { 1401 1399 QEDI_ERR(&qedi->dbg_ctx, "Could not allocate NVM BUF.\n"); ··· 2234 2236 static int qedi_get_boot_info(struct qedi_ctx *qedi) 2235 2237 { 2236 2238 int ret = 1; 2237 - struct qedi_nvm_iscsi_image nvm_image; 2238 2239 2239 2240 QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_INFO, 2240 2241 "Get NVM iSCSI CFG image\n"); 2241 2242 ret = qedi_ops->common->nvm_get_image(qedi->cdev, 2242 2243 QED_NVM_IMAGE_ISCSI_CFG, 2243 2244 (char *)qedi->iscsi_image, 2244 - sizeof(nvm_image)); 2245 + sizeof(struct qedi_nvm_iscsi_image)); 2245 2246 if (ret) 2246 2247 QEDI_ERR(&qedi->dbg_ctx, 2247 2248 "Could not get NVM image. ret = %d\n", ret);
+1
drivers/scsi/scsi_devinfo.c
··· 238 238 {"NETAPP", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, 239 239 {"LSI", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, 240 240 {"ENGENIO", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, 241 + {"LENOVO", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, 241 242 {"SMSC", "USB 2 HS-CF", NULL, BLIST_SPARSELUN | BLIST_INQUIRY_36}, 242 243 {"SONY", "CD-ROM CDU-8001", NULL, BLIST_BORKEN}, 243 244 {"SONY", "TSL", NULL, BLIST_FORCELUN}, /* DDS3 & DDS4 autoloaders */
+1
drivers/scsi/scsi_dh.c
··· 75 75 {"NETAPP", "INF-01-00", "rdac", }, 76 76 {"LSI", "INF-01-00", "rdac", }, 77 77 {"ENGENIO", "INF-01-00", "rdac", }, 78 + {"LENOVO", "DE_Series", "rdac", }, 78 79 {NULL, NULL, NULL }, 79 80 }; 80 81
+12 -3
drivers/scsi/storvsc_drv.c
··· 385 385 * This is the end of Protocol specific defines. 386 386 */ 387 387 388 - static int storvsc_ringbuffer_size = (256 * PAGE_SIZE); 388 + static int storvsc_ringbuffer_size = (128 * 1024); 389 389 static u32 max_outstanding_req_per_channel; 390 390 391 391 static int storvsc_vcpus_per_sub_channel = 4; ··· 668 668 { 669 669 struct device *dev = &device->device; 670 670 struct storvsc_device *stor_device; 671 - int num_cpus = num_online_cpus(); 672 671 int num_sc; 673 672 struct storvsc_cmd_request *request; 674 673 struct vstor_packet *vstor_packet; 675 674 int ret, t; 676 675 677 - num_sc = ((max_chns > num_cpus) ? num_cpus : max_chns); 676 + /* 677 + * If the number of CPUs is artificially restricted, such as 678 + * with maxcpus=1 on the kernel boot line, Hyper-V could offer 679 + * sub-channels >= the number of CPUs. These sub-channels 680 + * should not be created. The primary channel is already created 681 + * and assigned to one CPU, so check against # CPUs - 1. 682 + */ 683 + num_sc = min((int)(num_online_cpus() - 1), max_chns); 684 + if (!num_sc) 685 + return; 686 + 678 687 stor_device = get_out_stor_device(device); 679 688 if (!stor_device) 680 689 return;