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
Unified · Split
| @@ -3878,10 +3878,9 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, · 3877 unmodified lines | ||
| 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); |
| @@ -1392,10 +1392,8 @@ static void qedi_free_nvm_iscsi_cfg(struct qedi_ctx *qedi) · 1391 unmodified lines | ||
| 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"); |
| @@ -2236,14 +2234,13 @@ static void qedi_boot_release(void *data) · 834 unmodified lines | ||
| 2236 | 2234 | static int qedi_get_boot_info(struct qedi_ctx *qedi) |
| 2237 | 2235 | { |
| 2238 | 2236 | int ret = 1; |
| 2239 | − struct qedi_nvm_iscsi_image nvm_image; | |
| 2240 | 2237 | |
| 2241 | 2238 | QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_INFO, |
| 2242 | 2239 | "Get NVM iSCSI CFG image\n"); |
| 2243 | 2240 | ret = qedi_ops->common->nvm_get_image(qedi->cdev, |
| 2244 | 2241 | QED_NVM_IMAGE_ISCSI_CFG, |
| 2245 | 2242 | (char *)qedi->iscsi_image, |
| 2246 | − sizeof(nvm_image)); | |
| 2243 | + sizeof(struct qedi_nvm_iscsi_image)); | |
| 2247 | 2244 | if (ret) |
| 2248 | 2245 | QEDI_ERR(&qedi->dbg_ctx, |
| 2249 | 2246 | "Could not get NVM image. ret = %d\n", ret); |
| @@ -238,6 +238,7 @@ static struct { · 237 unmodified lines | ||
| 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 */ |
| @@ -75,6 +75,7 @@ static const struct scsi_dh_blist scsi_dh_blist[] = { · 74 unmodified lines | ||
| 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 | |
| @@ -385,7 +385,7 @@ enum storvsc_request_type { · 384 unmodified lines | ||
| 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,13 +668,22 @@ static void handle_multichannel_storage(struct hv_device *device, int max_chns) · 276 unmodified lines | ||
| 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; |