aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ieee1394/sbp2.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index c2c776fbda01..8963dd484eb9 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -643,9 +643,15 @@ static int sbp2_remove(struct device *dev)
643 if (!scsi_id) 643 if (!scsi_id)
644 return 0; 644 return 0;
645 645
646 /* Trigger shutdown functions in scsi's highlevel. */ 646 if (scsi_id->scsi_host) {
647 if (scsi_id->scsi_host) 647 /* Get rid of enqueued commands if there is no chance to
648 * send them. */
649 if (!sbp2util_node_is_available(scsi_id))
650 sbp2scsi_complete_all_commands(scsi_id, DID_NO_CONNECT);
651 /* scsi_remove_device() will trigger shutdown functions of SCSI
652 * highlevel drivers which would deadlock if blocked. */
648 scsi_unblock_requests(scsi_id->scsi_host); 653 scsi_unblock_requests(scsi_id->scsi_host);
654 }
649 sdev = scsi_id->sdev; 655 sdev = scsi_id->sdev;
650 if (sdev) { 656 if (sdev) {
651 scsi_id->sdev = NULL; 657 scsi_id->sdev = NULL;