Mailinglist Archive: opensuse-kernel (83 mails)
| < Previous | Next > |
Re: [opensuse-kernel] Re: continuous flow of: btusb_intr_complete: hci0 urb ffff8800b553e980 failed to resubmit (1)
- From: Stefan Seyfried <stefan.seyfried@xxxxxxxxxxxxxx>
- Date: Tue, 30 Nov 2010 17:59:46 +0100
- Message-id: <20101130175946.734d9f72@susi>
On Tue, 30 Nov 2010 14:39:57 +0100
Oliver Neukum <oneukum@xxxxxxx> wrote:
No need to test, the patch is obviously wrong ;-)
(I tested it anyway, just for fun, and it leads to 100% CPU usage and hard
lockup shortly afterwards).
you are forgetting the usb_unanchor_urb for the -EPERM case here.
From 9cd3d383b5b172b78e7887b38f9b30acfb469d52 Mon Sep 17 00:00:00 2001
From: Stefan Seyfried <seife+kernel@xxxxxxxxxxxxxx>
Date: Tue, 30 Nov 2010 17:46:23 +0100
Subject: [PATCH] btusb: Fix log spamming 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.
Signed-off-by: Stefan Seyfried <seife+kernel@xxxxxxxxxxxxxx>
---
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
--
Stefan Seyfried
"Any ideas, John?"
"Well, surrounding them's out."
Date: Tue, 30 Nov 2010 17:46:23 +0100
Subject: [PATCH] btusb: Fix log spamming 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.
Signed-off-by: Stefan Seyfried <seife+kernel@xxxxxxxxxxxxxx>
---
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
Oliver Neukum <oneukum@xxxxxxx> wrote:
as no good dead goes unpunished, here's a patch to test.
No need to test, the patch is obviously wrong ;-)
(I tested it anyway, just for fun, and it leads to 100% CPU usage and hard
lockup shortly afterwards).
err = usb_submit_urb(urb, GFP_ATOMIC);
- if (err < 0) {
+ if (err < 0 && err != -EPERM) {
BT_ERR("%s urb %p failed to resubmit (%d)",
hdev->name, urb, -err);
usb_unanchor_urb(urb);
you are forgetting the usb_unanchor_urb for the -EPERM case here.
From 9cd3d383b5b172b78e7887b38f9b30acfb469d52 Mon Sep 17 00:00:00 2001
From: Stefan Seyfried <seife+kernel@xxxxxxxxxxxxxx>
Date: Tue, 30 Nov 2010 17:46:23 +0100
Subject: [PATCH] btusb: Fix log spamming 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.
Signed-off-by: Stefan Seyfried <seife+kernel@xxxxxxxxxxxxxx>
---
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
--
Stefan Seyfried
"Any ideas, John?"
"Well, surrounding them's out."
From 9cd3d383b5b172b78e7887b38f9b30acfb469d52 Mon Sep 17 00:00:00 2001From: Stefan Seyfried <seife+kernel@xxxxxxxxxxxxxx>
Date: Tue, 30 Nov 2010 17:46:23 +0100
Subject: [PATCH] btusb: Fix log spamming 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.
Signed-off-by: Stefan Seyfried <seife+kernel@xxxxxxxxxxxxxx>
---
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
| < Previous | Next > |