Skip to content

Commit 9599e9e

Browse files
committed
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 driver and one in the SCSI Parallel transport, which fixes an incredibly old bug so I suspect no-one has actually used the functionality it fixes" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: dh: Add Fujitsu device to devinfo and dh lists scsi: mpt3sas: Fix error returns in BRM_status_show scsi: mpt3sas: Fix unlock imbalance scsi: iscsi: Change iSCSI workqueue max_active back to 1 scsi: scsi_transport_spi: Fix function pointer check
2 parents 0aea6d5 + e094fd3 commit 9599e9e

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed

drivers/scsi/libiscsi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2629,7 +2629,7 @@ struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht,
26292629
"iscsi_q_%d", shost->host_no);
26302630
ihost->workq = alloc_workqueue("%s",
26312631
WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND,
2632-
2, ihost->workq_name);
2632+
1, ihost->workq_name);
26332633
if (!ihost->workq)
26342634
goto free_host;
26352635
}

drivers/scsi/mpt3sas/mpt3sas_ctl.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3145,19 +3145,18 @@ BRM_status_show(struct device *cdev, struct device_attribute *attr,
31453145
if (!ioc->is_warpdrive) {
31463146
ioc_err(ioc, "%s: BRM attribute is only for warpdrive\n",
31473147
__func__);
3148-
goto out;
3148+
return 0;
31493149
}
31503150
/* pci_access_mutex lock acquired by sysfs show path */
31513151
mutex_lock(&ioc->pci_access_mutex);
3152-
if (ioc->pci_error_recovery || ioc->remove_host) {
3153-
mutex_unlock(&ioc->pci_access_mutex);
3154-
return 0;
3155-
}
3152+
if (ioc->pci_error_recovery || ioc->remove_host)
3153+
goto out;
31563154

31573155
/* allocate upto GPIOVal 36 entries */
31583156
sz = offsetof(Mpi2IOUnitPage3_t, GPIOVal) + (sizeof(u16) * 36);
31593157
io_unit_pg3 = kzalloc(sz, GFP_KERNEL);
31603158
if (!io_unit_pg3) {
3159+
rc = -ENOMEM;
31613160
ioc_err(ioc, "%s: failed allocating memory for iounit_pg3: (%d) bytes\n",
31623161
__func__, sz);
31633162
goto out;
@@ -3167,19 +3166,22 @@ BRM_status_show(struct device *cdev, struct device_attribute *attr,
31673166
0) {
31683167
ioc_err(ioc, "%s: failed reading iounit_pg3\n",
31693168
__func__);
3169+
rc = -EINVAL;
31703170
goto out;
31713171
}
31723172

31733173
ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & MPI2_IOCSTATUS_MASK;
31743174
if (ioc_status != MPI2_IOCSTATUS_SUCCESS) {
31753175
ioc_err(ioc, "%s: iounit_pg3 failed with ioc_status(0x%04x)\n",
31763176
__func__, ioc_status);
3177+
rc = -EINVAL;
31773178
goto out;
31783179
}
31793180

31803181
if (io_unit_pg3->GPIOCount < 25) {
31813182
ioc_err(ioc, "%s: iounit_pg3->GPIOCount less than 25 entries, detected (%d) entries\n",
31823183
__func__, io_unit_pg3->GPIOCount);
3184+
rc = -EINVAL;
31833185
goto out;
31843186
}
31853187

drivers/scsi/scsi_devinfo.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ static struct {
239239
{"LSI", "Universal Xport", "*", BLIST_NO_ULD_ATTACH},
240240
{"ENGENIO", "Universal Xport", "*", BLIST_NO_ULD_ATTACH},
241241
{"LENOVO", "Universal Xport", "*", BLIST_NO_ULD_ATTACH},
242+
{"FUJITSU", "Universal Xport", "*", BLIST_NO_ULD_ATTACH},
242243
{"SanDisk", "Cruzer Blade", NULL, BLIST_TRY_VPD_PAGES |
243244
BLIST_INQUIRY_36},
244245
{"SMSC", "USB 2 HS-CF", NULL, BLIST_SPARSELUN | BLIST_INQUIRY_36},

drivers/scsi/scsi_dh.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ static const struct scsi_dh_blist scsi_dh_blist[] = {
6363
{"LSI", "INF-01-00", "rdac", },
6464
{"ENGENIO", "INF-01-00", "rdac", },
6565
{"LENOVO", "DE_Series", "rdac", },
66+
{"FUJITSU", "ETERNUS_AHB", "rdac", },
6667
{NULL, NULL, NULL },
6768
};
6869

drivers/scsi/scsi_transport_iscsi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4760,7 +4760,7 @@ static __init int iscsi_transport_init(void)
47604760

47614761
iscsi_eh_timer_workq = alloc_workqueue("%s",
47624762
WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND,
4763-
2, "iscsi_eh");
4763+
1, "iscsi_eh");
47644764
if (!iscsi_eh_timer_workq) {
47654765
err = -ENOMEM;
47664766
goto release_nls;

drivers/scsi/scsi_transport_spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ store_spi_transport_##field(struct device *dev, \
339339
struct spi_transport_attrs *tp \
340340
= (struct spi_transport_attrs *)&starget->starget_data; \
341341
\
342-
if (i->f->set_##field) \
342+
if (!i->f->set_##field) \
343343
return -EINVAL; \
344344
val = simple_strtoul(buf, NULL, 0); \
345345
if (val > tp->max_##field) \

0 commit comments

Comments
 (0)