diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/Kconfig | 2 | ||||
-rw-r--r-- | drivers/usb/atm/ueagle-atm.c | 1 | ||||
-rw-r--r-- | drivers/usb/core/hub.c | 1 | ||||
-rw-r--r-- | drivers/usb/gadget/file_storage.c | 3 | ||||
-rw-r--r-- | drivers/usb/misc/auerswald.c | 4 | ||||
-rw-r--r-- | drivers/usb/storage/usb.c | 3 |
6 files changed, 9 insertions, 5 deletions
diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index 071b9675a78..7dd73546bf4 100644 --- a/drivers/usb/Kconfig +++ b/drivers/usb/Kconfig @@ -16,7 +16,7 @@ config USB_ARCH_HAS_HCD boolean default y if USB_ARCH_HAS_OHCI default y if USB_ARCH_HAS_EHCI - default y if PCMCIA # sl811_cs + default y if PCMCIA && !M32R # sl811_cs default y if ARM # SL-811 default PCI diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c index 4973e147bc7..8f046659b4e 100644 --- a/drivers/usb/atm/ueagle-atm.c +++ b/drivers/usb/atm/ueagle-atm.c @@ -1168,6 +1168,7 @@ static int uea_kthread(void *data) struct uea_softc *sc = data; int ret = -EAGAIN; + set_freezable(); uea_enters(INS_TO_USBDEV(sc)); while (!kthread_should_stop()) { if (ret < 0 || sc->reset) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 50e79010401..fd74c50b180 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -2728,6 +2728,7 @@ loop: static int hub_thread(void *__unused) { + set_freezable(); do { hub_events(); wait_event_interruptible(khubd_wait, diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index 8712ef98717..be7a1bd2823 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c @@ -3434,6 +3434,9 @@ static int fsg_main_thread(void *fsg_) allow_signal(SIGKILL); allow_signal(SIGUSR1); + /* Allow the thread to be frozen */ + set_freezable(); + /* Arrange for userspace references to be interpreted as kernel * pointers. That way we can pass a kernel pointer to a routine * that expects a __user pointer and it will work okay. */ diff --git a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c index 1fd5fc220cd..42d4e6454a7 100644 --- a/drivers/usb/misc/auerswald.c +++ b/drivers/usb/misc/auerswald.c @@ -630,7 +630,7 @@ static int auerchain_start_wait_urb (pauerchain_t acp, struct urb *urb, int time } else status = urb->status; - if (actual_length) + if (status >= 0) *actual_length = urb->actual_length; return status; @@ -664,7 +664,7 @@ static int auerchain_control_msg (pauerchain_t acp, struct usb_device *dev, unsi int ret; struct usb_ctrlrequest *dr; struct urb *urb; - int length; + int uninitialized_var(length); dbg ("auerchain_control_msg"); dr = kmalloc (sizeof (struct usb_ctrlrequest), GFP_KERNEL); diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index bef8bcd9bd9..28842d208bb 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c @@ -311,8 +311,6 @@ static int usb_stor_control_thread(void * __us) struct Scsi_Host *host = us_to_host(us); int autopm_rc; - current->flags |= PF_NOFREEZE; - for(;;) { US_DEBUGP("*** thread sleeping.\n"); if(down_interruptible(&us->sema)) @@ -920,6 +918,7 @@ static int usb_stor_scan_thread(void * __us) printk(KERN_DEBUG "usb-storage: device found at %d\n", us->pusb_dev->devnum); + set_freezable(); /* Wait for the timeout to expire or for a disconnect */ if (delay_use > 0) { printk(KERN_DEBUG "usb-storage: waiting for device " |