usb.c (9374430a52dfae5c013b88f7f030c04a6774d410) usb.c (831441862956fffa17b9801db37e6ea1650b0f69)
1/* Driver for USB Mass Storage compliant devices
2 *
3 * $Id: usb.c,v 1.75 2002/04/22 03:39:43 mdharm Exp $
4 *
5 * Current development and maintenance by:
6 * (c) 1999-2003 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
7 *
8 * Developed with the assistance of:

--- 297 unchanged lines hidden (view full) ---

306}
307
308static int usb_stor_control_thread(void * __us)
309{
310 struct us_data *us = (struct us_data *)__us;
311 struct Scsi_Host *host = us_to_host(us);
312 int autopm_rc;
313
1/* Driver for USB Mass Storage compliant devices
2 *
3 * $Id: usb.c,v 1.75 2002/04/22 03:39:43 mdharm Exp $
4 *
5 * Current development and maintenance by:
6 * (c) 1999-2003 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
7 *
8 * Developed with the assistance of:

--- 297 unchanged lines hidden (view full) ---

306}
307
308static int usb_stor_control_thread(void * __us)
309{
310 struct us_data *us = (struct us_data *)__us;
311 struct Scsi_Host *host = us_to_host(us);
312 int autopm_rc;
313
314 current->flags |= PF_NOFREEZE;
315
316 for(;;) {
317 US_DEBUGP("*** thread sleeping.\n");
318 if(down_interruptible(&us->sema))
319 break;
320
321 US_DEBUGP("*** thread awakened.\n");
322
323 /* Autoresume the device */

--- 591 unchanged lines hidden (view full) ---

915/* Thread to carry out delayed SCSI-device scanning */
916static int usb_stor_scan_thread(void * __us)
917{
918 struct us_data *us = (struct us_data *)__us;
919
920 printk(KERN_DEBUG
921 "usb-storage: device found at %d\n", us->pusb_dev->devnum);
922
314 for(;;) {
315 US_DEBUGP("*** thread sleeping.\n");
316 if(down_interruptible(&us->sema))
317 break;
318
319 US_DEBUGP("*** thread awakened.\n");
320
321 /* Autoresume the device */

--- 591 unchanged lines hidden (view full) ---

913/* Thread to carry out delayed SCSI-device scanning */
914static int usb_stor_scan_thread(void * __us)
915{
916 struct us_data *us = (struct us_data *)__us;
917
918 printk(KERN_DEBUG
919 "usb-storage: device found at %d\n", us->pusb_dev->devnum);
920
921 set_freezable();
923 /* Wait for the timeout to expire or for a disconnect */
924 if (delay_use > 0) {
925 printk(KERN_DEBUG "usb-storage: waiting for device "
926 "to settle before scanning\n");
927retry:
928 wait_event_interruptible_timeout(us->delay_wait,
929 test_bit(US_FLIDX_DISCONNECTING, &us->flags),
930 delay_use * HZ);

--- 192 unchanged lines hidden ---
922 /* Wait for the timeout to expire or for a disconnect */
923 if (delay_use > 0) {
924 printk(KERN_DEBUG "usb-storage: waiting for device "
925 "to settle before scanning\n");
926retry:
927 wait_event_interruptible_timeout(us->delay_wait,
928 test_bit(US_FLIDX_DISCONNECTING, &us->flags),
929 delay_use * HZ);

--- 192 unchanged lines hidden ---