Commit 9599e9e7 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 0aea6d5c e094fd34
...@@ -2629,7 +2629,7 @@ struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht, ...@@ -2629,7 +2629,7 @@ struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht,
"iscsi_q_%d", shost->host_no); "iscsi_q_%d", shost->host_no);
ihost->workq = alloc_workqueue("%s", ihost->workq = alloc_workqueue("%s",
WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND, WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND,
2, ihost->workq_name); 1, ihost->workq_name);
if (!ihost->workq) if (!ihost->workq)
goto free_host; goto free_host;
} }
......
...@@ -3145,19 +3145,18 @@ BRM_status_show(struct device *cdev, struct device_attribute *attr, ...@@ -3145,19 +3145,18 @@ BRM_status_show(struct device *cdev, struct device_attribute *attr,
if (!ioc->is_warpdrive) { if (!ioc->is_warpdrive) {
ioc_err(ioc, "%s: BRM attribute is only for warpdrive\n", ioc_err(ioc, "%s: BRM attribute is only for warpdrive\n",
__func__); __func__);
goto out; return 0;
} }
/* pci_access_mutex lock acquired by sysfs show path */ /* pci_access_mutex lock acquired by sysfs show path */
mutex_lock(&ioc->pci_access_mutex); mutex_lock(&ioc->pci_access_mutex);
if (ioc->pci_error_recovery || ioc->remove_host) { if (ioc->pci_error_recovery || ioc->remove_host)
mutex_unlock(&ioc->pci_access_mutex); goto out;
return 0;
}
/* allocate upto GPIOVal 36 entries */ /* allocate upto GPIOVal 36 entries */
sz = offsetof(Mpi2IOUnitPage3_t, GPIOVal) + (sizeof(u16) * 36); sz = offsetof(Mpi2IOUnitPage3_t, GPIOVal) + (sizeof(u16) * 36);
io_unit_pg3 = kzalloc(sz, GFP_KERNEL); io_unit_pg3 = kzalloc(sz, GFP_KERNEL);
if (!io_unit_pg3) { if (!io_unit_pg3) {
rc = -ENOMEM;
ioc_err(ioc, "%s: failed allocating memory for iounit_pg3: (%d) bytes\n", ioc_err(ioc, "%s: failed allocating memory for iounit_pg3: (%d) bytes\n",
__func__, sz); __func__, sz);
goto out; goto out;
...@@ -3167,6 +3166,7 @@ BRM_status_show(struct device *cdev, struct device_attribute *attr, ...@@ -3167,6 +3166,7 @@ BRM_status_show(struct device *cdev, struct device_attribute *attr,
0) { 0) {
ioc_err(ioc, "%s: failed reading iounit_pg3\n", ioc_err(ioc, "%s: failed reading iounit_pg3\n",
__func__); __func__);
rc = -EINVAL;
goto out; goto out;
} }
...@@ -3174,12 +3174,14 @@ BRM_status_show(struct device *cdev, struct device_attribute *attr, ...@@ -3174,12 +3174,14 @@ BRM_status_show(struct device *cdev, struct device_attribute *attr,
if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { if (ioc_status != MPI2_IOCSTATUS_SUCCESS) {
ioc_err(ioc, "%s: iounit_pg3 failed with ioc_status(0x%04x)\n", ioc_err(ioc, "%s: iounit_pg3 failed with ioc_status(0x%04x)\n",
__func__, ioc_status); __func__, ioc_status);
rc = -EINVAL;
goto out; goto out;
} }
if (io_unit_pg3->GPIOCount < 25) { if (io_unit_pg3->GPIOCount < 25) {
ioc_err(ioc, "%s: iounit_pg3->GPIOCount less than 25 entries, detected (%d) entries\n", ioc_err(ioc, "%s: iounit_pg3->GPIOCount less than 25 entries, detected (%d) entries\n",
__func__, io_unit_pg3->GPIOCount); __func__, io_unit_pg3->GPIOCount);
rc = -EINVAL;
goto out; goto out;
} }
......
...@@ -239,6 +239,7 @@ static struct { ...@@ -239,6 +239,7 @@ static struct {
{"LSI", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, {"LSI", "Universal Xport", "*", BLIST_NO_ULD_ATTACH},
{"ENGENIO", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, {"ENGENIO", "Universal Xport", "*", BLIST_NO_ULD_ATTACH},
{"LENOVO", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, {"LENOVO", "Universal Xport", "*", BLIST_NO_ULD_ATTACH},
{"FUJITSU", "Universal Xport", "*", BLIST_NO_ULD_ATTACH},
{"SanDisk", "Cruzer Blade", NULL, BLIST_TRY_VPD_PAGES | {"SanDisk", "Cruzer Blade", NULL, BLIST_TRY_VPD_PAGES |
BLIST_INQUIRY_36}, BLIST_INQUIRY_36},
{"SMSC", "USB 2 HS-CF", NULL, BLIST_SPARSELUN | BLIST_INQUIRY_36}, {"SMSC", "USB 2 HS-CF", NULL, BLIST_SPARSELUN | BLIST_INQUIRY_36},
......
...@@ -63,6 +63,7 @@ static const struct scsi_dh_blist scsi_dh_blist[] = { ...@@ -63,6 +63,7 @@ static const struct scsi_dh_blist scsi_dh_blist[] = {
{"LSI", "INF-01-00", "rdac", }, {"LSI", "INF-01-00", "rdac", },
{"ENGENIO", "INF-01-00", "rdac", }, {"ENGENIO", "INF-01-00", "rdac", },
{"LENOVO", "DE_Series", "rdac", }, {"LENOVO", "DE_Series", "rdac", },
{"FUJITSU", "ETERNUS_AHB", "rdac", },
{NULL, NULL, NULL }, {NULL, NULL, NULL },
}; };
......
...@@ -4760,7 +4760,7 @@ static __init int iscsi_transport_init(void) ...@@ -4760,7 +4760,7 @@ static __init int iscsi_transport_init(void)
iscsi_eh_timer_workq = alloc_workqueue("%s", iscsi_eh_timer_workq = alloc_workqueue("%s",
WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND, WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND,
2, "iscsi_eh"); 1, "iscsi_eh");
if (!iscsi_eh_timer_workq) { if (!iscsi_eh_timer_workq) {
err = -ENOMEM; err = -ENOMEM;
goto release_nls; goto release_nls;
......
...@@ -339,7 +339,7 @@ store_spi_transport_##field(struct device *dev, \ ...@@ -339,7 +339,7 @@ store_spi_transport_##field(struct device *dev, \
struct spi_transport_attrs *tp \ struct spi_transport_attrs *tp \
= (struct spi_transport_attrs *)&starget->starget_data; \ = (struct spi_transport_attrs *)&starget->starget_data; \
\ \
if (i->f->set_##field) \ if (!i->f->set_##field) \
return -EINVAL; \ return -EINVAL; \
val = simple_strtoul(buf, NULL, 0); \ val = simple_strtoul(buf, NULL, 0); \
if (val > tp->max_##field) \ if (val > tp->max_##field) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment