 /* Prevent new USB transfers, stop the current command, and * interrupt a SCSI-scan or device-reset delay */ set_bit(US_FLIDX_DISCONNECTING, &us->flags); usb_stor_stop_transport(us); wake_up(&us->delay_wait);  /* It doesn't matter if the SCSI-scanning thread is still running. * The thread will exit when it sees the DISCONNECTING flag. */  /* Wait for the current command to finish, then remove the host */ down(&us->dev_semaphore); up(&us->dev_semaphore); scsi_remove_host(us_to_host(us));  /* Wait for everything to become idle and release all our resources */ usb_stor_release_resources(us); dissociate_dev(us);  /* Drop our reference to the host; the SCSI core will free it * (and "us" along with it) when the refcount becomes 0. */ scsi_host_put(us_to_host(us)); 
quiesce_and_remove_host(us); release_everything(us); 
static void storage_disconnect(struct usb_interface *intf){	struct us_data *us = usb_get_intfdata(intf);	US_DEBUGP("storage_disconnect() called\n");	/* Prevent new USB transfers, stop the current command, and	 * interrupt a SCSI-scan or device-reset delay */	set_bit(US_FLIDX_DISCONNECTING, &us->flags);	usb_stor_stop_transport(us);	wake_up(&us->delay_wait);	/* It doesn't matter if the SCSI-scanning thread is still running.	 * The thread will exit when it sees the DISCONNECTING flag. */	/* Wait for the current command to finish, then remove the host */	down(&us->dev_semaphore);	up(&us->dev_semaphore);	scsi_remove_host(us_to_host(us));	/* Wait for everything to become idle and release all our resources */	usb_stor_release_resources(us);	dissociate_dev(us);	/* Drop our reference to the host; the SCSI core will free it	 * (and "us" along with it) when the refcount becomes 0. */	scsi_host_put(us_to_host(us));}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/77f46328fb83b64befd889ebce6d7fb959932509/usb.c/buggy/drivers/usb/storage/usb.c