[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1409231909590.7196@localhost.localdomain>
Date: Tue, 23 Sep 2014 19:12:40 +0000 (UTC)
From: Scot Doyle <lkml14@...tdoyle.com>
To: Alan Stern <stern@...land.harvard.edu>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Sarah Sharp <sarah.a.sharp@...ux.intel.com>,
Dan Williams <dan.j.williams@...el.com>
cc: Daniel Mack <daniel@...aq.de>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v2] usb: core: downgrade log severity to info when descriptor
unavailable
According to commit 0cce2eda19923e5e5ccc8b042dec5af87b3ffad0
USB: fix LANGID=0 regression
usb devices are not required to report string descriptors. Since they are
optional, log an info message instead of an error message.
Signed-off-by: Scot Doyle <lkml14@...tdoyle.com>
---
drivers/usb/core/message.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index 0c8a7fc..da2f1f2 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -780,8 +780,12 @@ static int usb_get_langid(struct usb_device *dev, unsigned char *tbuf)
* deal with strings at all. Set string_langid to -1 in order to
* prevent any string to be retrieved from the device */
if (err < 0) {
- dev_err(&dev->dev, "string descriptor 0 read error: %d\n",
- err);
+ if (err == -EPIPE)
+ dev_info(&dev->dev,
+ "string descriptor 0 read error: -EPIPE\n");
+ else
+ dev_err(&dev->dev,
+ "string descriptor 0 read error: %d\n", err);
dev->string_langid = -1;
return -EPIPE;
}
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists