Skip to contentSkip to conversation

btusb: Fix log spamming due to autosuspend

PATCH In review [email protected] 4 participants 8 messages Nov 30, 2010 – Dec 13, 2010 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btusb: Fix log spamming due to autosuspend

From: Stefan Seyfried <[email protected]>

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)

---
 drivers/bluetooth/btusb.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
drivers/bluetooth/btusb.c +6 -3
index ab3894f..d323c1a 100644
@@ -239,7 +239,8 @@ static void btusb_intr_complete(struct urb *urb)
 
 	err = usb_submit_urb(urb, GFP_ATOMIC);
 	if (err < 0) {
-		BT_ERR("%s urb %p failed to resubmit (%d)",
+		if (err != -EPERM)
+			BT_ERR("%s urb %p failed to resubmit (%d)",
 						hdev->name, urb, -err);
 		usb_unanchor_urb(urb);
 	}
@@ -323,7 +324,8 @@ static void btusb_bulk_complete(struct urb *urb)
 
 	err = usb_submit_urb(urb, GFP_ATOMIC);
 	if (err < 0) {
-		BT_ERR("%s urb %p failed to resubmit (%d)",
+		if (err != -EPERM)
+			BT_ERR("%s urb %p failed to resubmit (%d)",
 						hdev->name, urb, -err);
 		usb_unanchor_urb(urb);
 	}
@@ -412,7 +414,8 @@ static void btusb_isoc_complete(struct urb *urb)
 
 	err = usb_submit_urb(urb, GFP_ATOMIC);
 	if (err < 0) {
-		BT_ERR("%s urb %p failed to resubmit (%d)",
+		if (err != -EPERM)
+			BT_ERR("%s urb %p failed to resubmit (%d)",
 						hdev->name, urb, -err);
 		usb_unanchor_urb(urb);
 	}
Signature · 1 line
1.7.3.1
#1 lore raw
Quoted 9 lines · On Tue, 30 Nov 2010 21:49:08 +0100 [email protected] wrote:

From: Stefan Seyfried <[email protected]>

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)

As Greg has told me, this needs to go through the bluetooth Maintainer. Personally, with 2.6.37 having autosuspend enabled by default I think this is pretty urgent, as it spams the log continuously when using a Bluetooth mouse. So please forward this if deemed acceptable.

Thanks

Signature · 4 lines
Stefan Seyfried

"Any ideas, John?"
"Well, surrounding them's out."
#2 lore raw
In reply to [email protected]
Quoted 11 lines · On Tue, Nov 30, 2010 at 09:49:08PM +0100, [email protected] wrote:

From: Stefan Seyfried <[email protected]>

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)

---
 drivers/bluetooth/btusb.c |    9 ++++++---

This one doesn't go through me, sorry:

> ./scripts/get_maintainer.pl --file --roles drivers/bluetooth/btusb.c Marcel Holtmann <[email protected]> (maintainer:BLUETOOTH DRIVERS) "Gustavo F. Padovan" <[email protected]> (maintainer:BLUETOOTH DRIVERS) [email protected] (open list:BLUETOOTH DRIVERS) [email protected] (open list)

Marcel and Gustavo are the ones that need to handle it.

thanks,

greg k-h

maintainer Acked-by on v1 1/1
#3 lore raw
In reply to [email protected]

Hi Stefan,

Quoted 7 lines

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)

we had a similar one some time ago, but I am fine with this one as well. Actually this one might be a bit better since it still keeps some errors.

Regards

Marcel

#4 lore raw

Hi Marcel,

Quoted 7 lines · On Wed, 01 Dec 2010 11:42:20 +0100 Marcel Holtmann <[email protected]> wrote:

Hi Stefan,

Quoted 5 lines

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)

Quoted 8 lines
Quoted 2 lines

we had a similar one some time ago, but I am fine with this one as well. Actually this one might be a bit better since it still keeps some errors.

Could you (or Gustavo) send it to Linus? It's pretty trivial, but the messages are annoying and users will complain if they are still in 2.6.37 final.

It will probably have more weight if the maintainer sends it than if I send it ;)

Signature · 4 lines
Stefan Seyfried

"Any ideas, John?"
"Well, surrounding them's out."
#5 lore raw

Hi Stefan,

Quoted 19 lines · Stefan Seyfried

Hi Marcel,

Quoted 14 lines · On Wed, 01 Dec 2010 11:42:20 +0100 Marcel Holtmann <[email protected]> wrote:

Hi Stefan,

Quoted 7 lines

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)

we had a similar one some time ago, but I am fine with this one as well. Actually this one might be a bit better since it still keeps some errors.

Quoted 5 lines
Quoted 1 line

Could you (or Gustavo) send it to Linus? It's pretty trivial, but the messages are annoying and users will complain if they are still in 2.6.37 final.

I'll send it, applied to bluetooth-2.6 tree. Thanks.

Signature · 2 lines
Gustavo F. Padovan
http://profusion.mobi
#6 lore raw

Hi all,

Quoted 16 lines · On Wed, 1 Dec 2010 15:49:10 -0200 "Gustavo F. Padovan"…

Hi Stefan,

Quoted 12 lines · Stefan Seyfried
Quoted 12 lines
Quoted 7 lines

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)

we had a similar one some time ago, but I am fine with this one as well. Actually this one might be a bit better since it still keeps some errors.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Could you (or Gustavo) send it to Linus? It's pretty trivial, but the messages are annoying and users will complain if they are still in 2.6.37 final.

I'll send it, applied to bluetooth-2.6 tree. Thanks.

unfortunately, it does not seem to make it into 2.6.37?

Signature · 4 lines
Stefan Seyfried

"Any ideas, John?"
"Well, surrounding them's out."
#7 lore raw

Hi Stefan,

Quoted 23 lines · Stefan Seyfried

Hi all,

Quoted 18 lines · On Wed, 1 Dec 2010 15:49:10 -0200 "Gustavo F. Padovan"…

Hi Stefan,

Quoted 14 lines · Stefan Seyfried
Quoted 13 lines
Quoted 7 lines

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)

we had a similar one some time ago, but I am fine with this one as well. Actually this one might be a bit better since it still keeps some errors.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Could you (or Gustavo) send it to Linus? It's pretty trivial, but the messages are annoying and users will complain if they are still in 2.6.37 final.

I'll send it, applied to bluetooth-2.6 tree. Thanks.

unfortunately, it does not seem to make it into 2.6.37?

Patch is in net-2.6 right now. Should go to mainline soon.

Signature · 2 lines
Gustavo F. Padovan
http://profusion.mobi