aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorStefan Seyfried <seife+kernel@b1-systems.com>2010-11-30 15:49:08 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2010-12-01 12:46:42 -0500
commit61faddf661a65a179751dc9fd209cb694d9a28af (patch)
treeeab3c6255b905f801e77d470e51f489fe2c29b2b /drivers/bluetooth
parentc89ad7372232b69fd37edf90d6f5d2a8d6381214 (diff)
Bluetooth: Fix log spamming in btusb due to autosuspend
If a device is autosuspended an inability to resubmit URBs is to be expected. Check the error code and only log real errors. (Now that autosuspend is default enabled for btusb, those log messages were happening all the time e.g. with a BT mouse) Signed-off-by: Stefan Seyfried <seife+kernel@b1-systems.com> Signed-off-by: Oliver Neukum <oneukum@suse.de> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/btusb.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index ab3894f742c3..d323c1a8ecbb 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -239,7 +239,8 @@ static void btusb_intr_complete(struct urb *urb)
239 239
240 err = usb_submit_urb(urb, GFP_ATOMIC); 240 err = usb_submit_urb(urb, GFP_ATOMIC);
241 if (err < 0) { 241 if (err < 0) {
242 BT_ERR("%s urb %p failed to resubmit (%d)", 242 if (err != -EPERM)
243 BT_ERR("%s urb %p failed to resubmit (%d)",
243 hdev->name, urb, -err); 244 hdev->name, urb, -err);
244 usb_unanchor_urb(urb); 245 usb_unanchor_urb(urb);
245 } 246 }
@@ -323,7 +324,8 @@ static void btusb_bulk_complete(struct urb *urb)
323 324
324 err = usb_submit_urb(urb, GFP_ATOMIC); 325 err = usb_submit_urb(urb, GFP_ATOMIC);
325 if (err < 0) { 326 if (err < 0) {
326 BT_ERR("%s urb %p failed to resubmit (%d)", 327 if (err != -EPERM)
328 BT_ERR("%s urb %p failed to resubmit (%d)",
327 hdev->name, urb, -err); 329 hdev->name, urb, -err);
328 usb_unanchor_urb(urb); 330 usb_unanchor_urb(urb);
329 } 331 }
@@ -412,7 +414,8 @@ static void btusb_isoc_complete(struct urb *urb)
412 414
413 err = usb_submit_urb(urb, GFP_ATOMIC); 415 err = usb_submit_urb(urb, GFP_ATOMIC);
414 if (err < 0) { 416 if (err < 0) {
415 BT_ERR("%s urb %p failed to resubmit (%d)", 417 if (err != -EPERM)
418 BT_ERR("%s urb %p failed to resubmit (%d)",
416 hdev->name, urb, -err); 419 hdev->name, urb, -err);
417 usb_unanchor_urb(urb); 420 usb_unanchor_urb(urb);
418 } 421 }