Skip to content

Commit 5a9b80e

Browse files
pebolleGustavo F. Padovan
authored andcommitted
Bluetooth: btusb: also be quiet when suspending
usb_submit_urb() returns -ENODEV when a usb device is disconnected. In commit 4935f1c ("Bluetooth: btusb: be quiet on device disconnect") I stopped treating that return as an error in the three btusb_*_complete() functions. It turns out btusb_send_frame() generates a similar error if the system is suspended while the bluetooth usb device is enabled. The sensible thing to do here seems to be to treat -ENODEV (and -EPERM) just like the btusb_*_complete() functions now do. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
1 parent 3e90dc8 commit 5a9b80e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎drivers/bluetooth/btusb.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,9 @@ static int btusb_send_frame(struct sk_buff *skb)
767767

768768
err = usb_submit_urb(urb, GFP_ATOMIC);
769769
if (err < 0) {
770-
BT_ERR("%s urb %p submission failed", hdev->name, urb);
770+
if (err != -EPERM && err != -ENODEV)
771+
BT_ERR("%s urb %p submission failed (%d)",
772+
hdev->name, urb, -err);
771773
kfree(urb->setup_packet);
772774
usb_unanchor_urb(urb);
773775
} else {

0 commit comments

Comments
 (0)