2010-11-30 20:49:08

by Stefan Seyfried

[permalink] [raw]
Subject: [PATCH] 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)

Signed-off-by: Stefan Seyfried <[email protected]>
Signed-off-by: Oliver Neukum <[email protected]>
---
drivers/bluetooth/btusb.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index ab3894f..d323c1a 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -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);
}
--
1.7.3.1



2010-11-30 23:47:45

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] btusb: Fix log spamming due to autosuspend

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)
>
> Signed-off-by: Stefan Seyfried <[email protected]>
> Signed-off-by: Oliver Neukum <[email protected]>
> ---
> 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

2010-11-30 21:51:06

by Stefan Seyfried

[permalink] [raw]
Subject: Re: [PATCH] btusb: Fix log spamming due to autosuspend

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)
>
> Signed-off-by: Stefan Seyfried <[email protected]>
> Signed-off-by: Oliver Neukum <[email protected]>

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
--
Stefan Seyfried

"Any ideas, John?"
"Well, surrounding them's out."

2010-12-13 17:46:24

by Gustavo Padovan

[permalink] [raw]
Subject: Re: [PATCH] btusb: Fix log spamming due to autosuspend

Hi Stefan,

* Stefan Seyfried <[email protected]> [2010-12-09 20:16:57 +0100]:

> Hi all,
>
> On Wed, 1 Dec 2010 15:49:10 -0200
> "Gustavo F. Padovan" <[email protected]> wrote:
>
> > Hi Stefan,
> >
> > * Stefan Seyfried <[email protected]> [2010-12-01 15:47:14 +0100]:
>
> > > > > 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 <[email protected]>
> > > > > Signed-off-by: Oliver Neukum <[email protected]>
> > > >
> > > > 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.
> > > >
> > > > Acked-by: Marcel Holtmann <[email protected]>
> > >
> > > 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.

--
Gustavo F. Padovan
http://profusion.mobi

2010-12-09 19:16:57

by Stefan Seyfried

[permalink] [raw]
Subject: Re: [PATCH] btusb: Fix log spamming due to autosuspend

Hi all,

On Wed, 1 Dec 2010 15:49:10 -0200
"Gustavo F. Padovan" <[email protected]> wrote:

> Hi Stefan,
>
> * Stefan Seyfried <[email protected]> [2010-12-01 15:47:14 +0100]:

> > > > 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 <[email protected]>
> > > > Signed-off-by: Oliver Neukum <[email protected]>
> > >
> > > 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.
> > >
> > > Acked-by: Marcel Holtmann <[email protected]>
> >
> > 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?
--
Stefan Seyfried

"Any ideas, John?"
"Well, surrounding them's out."

2010-12-01 17:49:10

by Gustavo Padovan

[permalink] [raw]
Subject: Re: [PATCH] btusb: Fix log spamming due to autosuspend

Hi Stefan,

* Stefan Seyfried <[email protected]> [2010-12-01 15:47:14 +0100]:

> Hi Marcel,
>
> On Wed, 01 Dec 2010 11:42:20 +0100
> Marcel Holtmann <[email protected]> wrote:
>
> > Hi Stefan,
> >
> > > 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 <[email protected]>
> > > Signed-off-by: Oliver Neukum <[email protected]>
> >
> > 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.
> >
> > Acked-by: Marcel Holtmann <[email protected]>
>
> 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.

--
Gustavo F. Padovan
http://profusion.mobi

2010-12-01 14:47:14

by Stefan Seyfried

[permalink] [raw]
Subject: Re: [PATCH] btusb: Fix log spamming due to autosuspend

Hi Marcel,

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

> Hi Stefan,
>
> > 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 <[email protected]>
> > Signed-off-by: Oliver Neukum <[email protected]>
>
> 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.
>
> Acked-by: Marcel Holtmann <[email protected]>

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 ;)
--
Stefan Seyfried

"Any ideas, John?"
"Well, surrounding them's out."

2010-12-01 10:42:20

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH] btusb: Fix log spamming due to autosuspend

Hi Stefan,

> 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 <[email protected]>
> Signed-off-by: Oliver Neukum <[email protected]>

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.

Acked-by: Marcel Holtmann <[email protected]>

Regards

Marcel