[PATCH 24/97] Bluetooth: Prevent ill-timed autosuspend in USB driver

From: Greg Kroah-Hartman
Date: Mon Jan 04 2010 - 19:52:46 EST


From: Oliver Neukum <oliver@xxxxxxxxxx>

commit 652fd781a52ad6e24b908cd8b83d12699754f253 upstream.

The device must be marked busy as it receives data.

Signed-off-by: Oliver Neukum <oliver@xxxxxxxxxx>
Tested-by: Matthew Garrett <mjg@xxxxxxxxxx>
Signed-off-by: Marcel Holtmann <marcel@xxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
drivers/bluetooth/btusb.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 44bc8bb..1be7631 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -307,6 +307,7 @@ static void btusb_bulk_complete(struct urb *urb)
return;

usb_anchor_urb(urb, &data->bulk_anchor);
+ usb_mark_last_busy(data->udev);

err = usb_submit_urb(urb, GFP_ATOMIC);
if (err < 0) {
--
1.6.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/