aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/storage/usb.c')
-rw-r--r--drivers/usb/storage/usb.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 783548485868..01e43a13a6bf 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -45,6 +45,10 @@
45 * 675 Mass Ave, Cambridge, MA 02139, USA. 45 * 675 Mass Ave, Cambridge, MA 02139, USA.
46 */ 46 */
47 47
48#ifdef CONFIG_USB_STORAGE_DEBUG
49#define DEBUG
50#endif
51
48#include <linux/sched.h> 52#include <linux/sched.h>
49#include <linux/errno.h> 53#include <linux/errno.h>
50#include <linux/freezer.h> 54#include <linux/freezer.h>
@@ -808,14 +812,13 @@ static int usb_stor_scan_thread(void * __us)
808{ 812{
809 struct us_data *us = (struct us_data *)__us; 813 struct us_data *us = (struct us_data *)__us;
810 814
811 printk(KERN_DEBUG 815 dev_dbg(&us->pusb_intf->dev, "device found\n");
812 "usb-storage: device found at %d\n", us->pusb_dev->devnum);
813 816
814 set_freezable(); 817 set_freezable();
815 /* Wait for the timeout to expire or for a disconnect */ 818 /* Wait for the timeout to expire or for a disconnect */
816 if (delay_use > 0) { 819 if (delay_use > 0) {
817 printk(KERN_DEBUG "usb-storage: waiting for device " 820 dev_dbg(&us->pusb_intf->dev, "waiting for device to settle "
818 "to settle before scanning\n"); 821 "before scanning\n");
819 wait_event_freezable_timeout(us->delay_wait, 822 wait_event_freezable_timeout(us->delay_wait,
820 test_bit(US_FLIDX_DONT_SCAN, &us->dflags), 823 test_bit(US_FLIDX_DONT_SCAN, &us->dflags),
821 delay_use * HZ); 824 delay_use * HZ);
@@ -832,7 +835,7 @@ static int usb_stor_scan_thread(void * __us)
832 mutex_unlock(&us->dev_mutex); 835 mutex_unlock(&us->dev_mutex);
833 } 836 }
834 scsi_scan_host(us_to_host(us)); 837 scsi_scan_host(us_to_host(us));
835 printk(KERN_DEBUG "usb-storage: device scan complete\n"); 838 dev_dbg(&us->pusb_intf->dev, "scan complete\n");
836 839
837 /* Should we unbind if no devices were detected? */ 840 /* Should we unbind if no devices were detected? */
838 } 841 }