public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Anderson <andmike@us.ibm.com>
To: linux-scsi@vger.kernel.org
Subject: [PATCH] scsi host / scsi device ref counting take 2 [2/3]
Date: Fri, 1 Aug 2003 13:25:41 -0700	[thread overview]
Message-ID: <20030801202541.GF3868@beaverton.ibm.com> (raw)
In-Reply-To: <20030801202431.GE3868@beaverton.ibm.com>

-andmike
--
Michael Anderson
andmike@us.ibm.com


DESC
Align usb storage shutdown with changes in the shost shutdown.
EDESC


 drivers/usb/storage/usb.c |   14 +-------------
 1 files changed, 1 insertion(+), 13 deletions(-)

diff -puN drivers/usb/storage/usb.c~usb_stor_fixups drivers/usb/storage/usb.c
--- patched-scsi-misc-2.5/drivers/usb/storage/usb.c~usb_stor_fixups	Fri Aug  1 07:07:17 2003
+++ patched-scsi-misc-2.5-andmike/drivers/usb/storage/usb.c	Fri Aug  1 07:07:17 2003
@@ -978,16 +978,9 @@ BadDevice:
 static void storage_disconnect(struct usb_interface *intf)
 {
 	struct us_data *us = usb_get_intfdata(intf);
-	struct scsi_device *sdev;
 
 	US_DEBUGP("storage_disconnect() called\n");
 
-	/* Set devices offline -- need host lock for this */
-	scsi_lock(us->host);
-	list_for_each_entry(sdev, &us->host->my_devices, siblings)
-		sdev->online = 0;
-	scsi_unlock(us->host);
-
 	/* Prevent new USB transfers and stop the current command */
 	set_bit(US_FLIDX_DISCONNECTING, &us->flags);
 	usb_stor_stop_transport(us);
@@ -995,12 +988,7 @@ static void storage_disconnect(struct us
 	/* Dissociate from the USB device */
 	dissociate_dev(us);
 
-	/* Begin the SCSI host removal sequence */
-	if (scsi_remove_host(us->host)) {
-		US_DEBUGP("-- SCSI refused to remove the host\n");
-		BUG();
-		return;
-	}
+	scsi_remove_host(us->host);
 
 	/* TODO: somehow, wait for the device to
 	 * be 'idle' (tasklet completion) */

_

  reply	other threads:[~2003-08-01 20:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-01 20:24 [PATCH] scsi host / scsi device ref counting take 2 [1/3] Mike Anderson
2003-08-01 20:25 ` Mike Anderson [this message]
2003-08-01 20:26   ` [PATCH] scsi host / scsi device ref counting take 2 [3/3] Mike Anderson
2003-08-02 16:50 ` [PATCH] scsi host / scsi device ref counting take 2 [1/3] Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030801202541.GF3868@beaverton.ibm.com \
    --to=andmike@us.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox