Commit 3259b12a 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:
 "This is our remaining set of three fixes for 4.0: two oops fixes(one
  for cable pulls triggering oopses and the other be2iscsi specific) and
  one warn on in sysfs on multipath devices using enclosures"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  Defer processing of REQ_PREEMPT requests for blocked devices
  be2iscsi: Fix kernel panic when device initialization fails
  enclosure: fix WARN_ON removing an adapter in multi-path devices
parents 49850a14 bba0bdd7
...@@ -202,16 +202,17 @@ static void enclosure_remove_links(struct enclosure_component *cdev) ...@@ -202,16 +202,17 @@ static void enclosure_remove_links(struct enclosure_component *cdev)
{ {
char name[ENCLOSURE_NAME_SIZE]; char name[ENCLOSURE_NAME_SIZE];
enclosure_link_name(cdev, name);
/* /*
* In odd circumstances, like multipath devices, something else may * In odd circumstances, like multipath devices, something else may
* already have removed the links, so check for this condition first. * already have removed the links, so check for this condition first.
*/ */
if (!cdev->dev->kobj.sd) if (cdev->dev->kobj.sd)
return; sysfs_remove_link(&cdev->dev->kobj, name);
enclosure_link_name(cdev, name); if (cdev->cdev.kobj.sd)
sysfs_remove_link(&cdev->dev->kobj, name); sysfs_remove_link(&cdev->cdev.kobj, "device");
sysfs_remove_link(&cdev->cdev.kobj, "device");
} }
static int enclosure_add_links(struct enclosure_component *cdev) static int enclosure_add_links(struct enclosure_component *cdev)
......
...@@ -5734,9 +5734,9 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev, ...@@ -5734,9 +5734,9 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev,
hba_free: hba_free:
if (phba->msix_enabled) if (phba->msix_enabled)
pci_disable_msix(phba->pcidev); pci_disable_msix(phba->pcidev);
iscsi_host_remove(phba->shost);
pci_dev_put(phba->pcidev); pci_dev_put(phba->pcidev);
iscsi_host_free(phba->shost); iscsi_host_free(phba->shost);
pci_set_drvdata(pcidev, NULL);
disable_pci: disable_pci:
pci_disable_device(pcidev); pci_disable_device(pcidev);
return ret; return ret;
......
...@@ -1311,9 +1311,11 @@ scsi_prep_state_check(struct scsi_device *sdev, struct request *req) ...@@ -1311,9 +1311,11 @@ scsi_prep_state_check(struct scsi_device *sdev, struct request *req)
"rejecting I/O to dead device\n"); "rejecting I/O to dead device\n");
ret = BLKPREP_KILL; ret = BLKPREP_KILL;
break; break;
case SDEV_QUIESCE:
case SDEV_BLOCK: case SDEV_BLOCK:
case SDEV_CREATED_BLOCK: case SDEV_CREATED_BLOCK:
ret = BLKPREP_DEFER;
break;
case SDEV_QUIESCE:
/* /*
* If the devices is blocked we defer normal commands. * If the devices is blocked we defer normal commands.
*/ */
......
...@@ -181,7 +181,9 @@ enum rq_flag_bits { ...@@ -181,7 +181,9 @@ enum rq_flag_bits {
__REQ_ELVPRIV, /* elevator private data attached */ __REQ_ELVPRIV, /* elevator private data attached */
__REQ_FAILED, /* set if the request failed */ __REQ_FAILED, /* set if the request failed */
__REQ_QUIET, /* don't worry about errors */ __REQ_QUIET, /* don't worry about errors */
__REQ_PREEMPT, /* set for "ide_preempt" requests */ __REQ_PREEMPT, /* set for "ide_preempt" requests and also
for requests for which the SCSI "quiesce"
state must be ignored. */
__REQ_ALLOCED, /* request came from our alloc pool */ __REQ_ALLOCED, /* request came from our alloc pool */
__REQ_COPY_USER, /* contains copies of user pages */ __REQ_COPY_USER, /* contains copies of user pages */
__REQ_FLUSH_SEQ, /* request for flush sequence */ __REQ_FLUSH_SEQ, /* request for flush sequence */
......
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