This code implements the setting of devices offline during the removal
phase.

Greg, please apply.

Matt

# This is a BitKeeper generated patch for the following project:
# Project Name: greg k-h's linux 2.5 USB kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#                  ChangeSet    1.677   -> 1.678  
#       drivers/usb/storage/usb.c       1.75    -> 1.76   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/02/02      [EMAIL PROTECTED]       1.678
# Implement code to set devices offline prior to disconnecting them.
# --------------------------------------------
#
diff -Nru a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
--- a/drivers/usb/storage/usb.c Sun Feb  2 11:10:26 2003
+++ b/drivers/usb/storage/usb.c Sun Feb  2 11:10:27 2003
@@ -941,6 +941,7 @@
 static void storage_disconnect(struct usb_interface *intf)
 {
        struct us_data *ss;
+       struct scsi_device *sdev;
 
        US_DEBUGP("storage_disconnect() called\n");
 
@@ -952,7 +953,11 @@
         */
        BUG_ON(ss == NULL);
 
-       /* TODO: set devices offline -- need host lock for this */
+       /* set devices offline -- need host lock for this */
+       scsi_lock(ss->host);
+       list_for_each_entry(sdev, &ss->host->my_devices, siblings)
+               sdev->online = 0;
+       scsi_unlock(ss->host);
 
        /* lock device access -- no need to unlock, as we're going away */
        down(&(ss->dev_semaphore));
-- 
Matthew Dharm                              Home: [EMAIL PROTECTED] 
Maintainer, Linux USB Mass Storage Driver

You were using cheat codes too.  You guys suck.
                                        -- Greg to General Studebaker
User Friendly, 12/16/1997

Attachment: msg11215/pgp00000.pgp
Description: PGP signature

Reply via email to