aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/misc/enclosure.c11
-rw-r--r--drivers/scsi/be2iscsi/be_main.c2
-rw-r--r--drivers/scsi/scsi_lib.c4
-rw-r--r--include/linux/blk_types.h4
4 files changed, 13 insertions, 8 deletions
diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c
index 38552a31304a..65fed7146e9b 100644
--- a/drivers/misc/enclosure.c
+++ b/drivers/misc/enclosure.c
@@ -202,16 +202,17 @@ static void enclosure_remove_links(struct enclosure_component *cdev)
202{ 202{
203 char name[ENCLOSURE_NAME_SIZE]; 203 char name[ENCLOSURE_NAME_SIZE];
204 204
205 enclosure_link_name(cdev, name);
206
205 /* 207 /*
206 * In odd circumstances, like multipath devices, something else may 208 * In odd circumstances, like multipath devices, something else may
207 * already have removed the links, so check for this condition first. 209 * already have removed the links, so check for this condition first.
208 */ 210 */
209 if (!cdev->dev->kobj.sd) 211 if (cdev->dev->kobj.sd)
210 return; 212 sysfs_remove_link(&cdev->dev->kobj, name);
211 213
212 enclosure_link_name(cdev, name); 214 if (cdev->cdev.kobj.sd)
213 sysfs_remove_link(&cdev->dev->kobj, name); 215 sysfs_remove_link(&cdev->cdev.kobj, "device");
214 sysfs_remove_link(&cdev->cdev.kobj, "device");
215} 216}
216 217
217static int enclosure_add_links(struct enclosure_component *cdev) 218static int enclosure_add_links(struct enclosure_component *cdev)
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index a7cc61837818..923a2b5a2439 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -5734,9 +5734,9 @@ free_port:
5734hba_free: 5734hba_free:
5735 if (phba->msix_enabled) 5735 if (phba->msix_enabled)
5736 pci_disable_msix(phba->pcidev); 5736 pci_disable_msix(phba->pcidev);
5737 iscsi_host_remove(phba->shost);
5738 pci_dev_put(phba->pcidev); 5737 pci_dev_put(phba->pcidev);
5739 iscsi_host_free(phba->shost); 5738 iscsi_host_free(phba->shost);
5739 pci_set_drvdata(pcidev, NULL);
5740disable_pci: 5740disable_pci:
5741 pci_disable_device(pcidev); 5741 pci_disable_device(pcidev);
5742 return ret; 5742 return ret;
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 54d7a6cbb98a..b1a263137a23 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1311,9 +1311,11 @@ scsi_prep_state_check(struct scsi_device *sdev, struct request *req)
1311 "rejecting I/O to dead device\n"); 1311 "rejecting I/O to dead device\n");
1312 ret = BLKPREP_KILL; 1312 ret = BLKPREP_KILL;
1313 break; 1313 break;
1314 case SDEV_QUIESCE:
1315 case SDEV_BLOCK: 1314 case SDEV_BLOCK:
1316 case SDEV_CREATED_BLOCK: 1315 case SDEV_CREATED_BLOCK:
1316 ret = BLKPREP_DEFER;
1317 break;
1318 case SDEV_QUIESCE:
1317 /* 1319 /*
1318 * If the devices is blocked we defer normal commands. 1320 * If the devices is blocked we defer normal commands.
1319 */ 1321 */
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index c294e3e25e37..a1b25e35ea5f 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -181,7 +181,9 @@ enum rq_flag_bits {
181 __REQ_ELVPRIV, /* elevator private data attached */ 181 __REQ_ELVPRIV, /* elevator private data attached */
182 __REQ_FAILED, /* set if the request failed */ 182 __REQ_FAILED, /* set if the request failed */
183 __REQ_QUIET, /* don't worry about errors */ 183 __REQ_QUIET, /* don't worry about errors */
184 __REQ_PREEMPT, /* set for "ide_preempt" requests */ 184 __REQ_PREEMPT, /* set for "ide_preempt" requests and also
185 for requests for which the SCSI "quiesce"
186 state must be ignored. */
185 __REQ_ALLOCED, /* request came from our alloc pool */ 187 __REQ_ALLOCED, /* request came from our alloc pool */
186 __REQ_COPY_USER, /* contains copies of user pages */ 188 __REQ_COPY_USER, /* contains copies of user pages */
187 __REQ_FLUSH_SEQ, /* request for flush sequence */ 189 __REQ_FLUSH_SEQ, /* request for flush sequence */