From: stefan.seyfried@googlemail.com
To: gregkh@suse.de
Cc: linux-bluetooth@vger.kernel.org,
Stefan Seyfried <seife+kernel@b1-systems.com>,
Oliver Neukum <oneukum@suse.de>
Subject: [PATCH] btusb: Fix log spamming due to autosuspend
Date: Tue, 30 Nov 2010 21:49:08 +0100 [thread overview]
Message-ID: <1291150148-14376-1-git-send-email-stefan.seyfried@googlemail.com> (raw)
From: Stefan Seyfried <seife+kernel@b1-systems.com>
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>
---
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
next reply other threads:[~2010-11-30 20:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-30 20:49 stefan.seyfried [this message]
2010-11-30 21:51 ` [PATCH] btusb: Fix log spamming due to autosuspend Stefan Seyfried
2010-11-30 23:47 ` Greg KH
2010-12-01 10:42 ` Marcel Holtmann
2010-12-01 14:47 ` Stefan Seyfried
2010-12-01 17:49 ` Gustavo F. Padovan
2010-12-09 19:16 ` Stefan Seyfried
2010-12-13 17:46 ` Gustavo F. Padovan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1291150148-14376-1-git-send-email-stefan.seyfried@googlemail.com \
--to=stefan.seyfried@googlemail.com \
--cc=gregkh@suse.de \
--cc=linux-bluetooth@vger.kernel.org \
--cc=oneukum@suse.de \
--cc=seife+kernel@b1-systems.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).