From: David Brownell <david-b@pacbell.net>
To: Daniel Blueman <daniel.blueman@gmx.net>
Cc: Alan Stern <stern@rowland.harvard.edu>,
linux-kernel@vger.kernel.org,
linux-usb-devel@lists.sourceforge.net
Subject: Re: [linux-usb-devel] [linux-2.6.5] oops when plugging CDC USB network device...
Date: Tue, 11 May 2004 07:53:58 -0700 [thread overview]
Message-ID: <40A0E906.2090302@pacbell.net> (raw)
In-Reply-To: <27198.1084272848@www53.gmx.net>
[-- Attachment #1: Type: text/plain, Size: 662 bytes --]
Daniel Blueman wrote:
> Alan, David,
>
> Thanks for your response - the problem observed in linux-2.6.5 is fixed in
> 2.6.6. Now I get a status code of -75 [1] and see no additional networking
> devices.
In drivers/usb/core/message.c::usb_string(), try making the retry
cases consider not just -EPIPE faults but also -EOVERFLOW. Likewise
in the get_descriptor() logic. (Some devices seem to have firmware
bugs that cause those failures, and are often amenable to retries.)
Also, this patch should help correct the "missing diagnostics with
CONFIG_USB_DEBUG during CDC Ethernet probe()" issue ... and help
show more precisely where the problem is.
- Dave
[-- Attachment #2: usbnet.patch --]
[-- Type: text/plain, Size: 2304 bytes --]
--- linux-2.5/drivers/usb/net/usbnet.c 2004-04-23 19:19:49.000000000 -0700
+++ gadget-2.6/drivers/usb/net/usbnet.c 2004-05-09 13:10:23.000000000 -0700
@@ -107,7 +107,13 @@
*
*-------------------------------------------------------------------------*/
+// #define DEBUG // error path messages, extra info
+// #define VERBOSE // more; success messages
+
#include <linux/config.h>
+#ifdef CONFIG_USB_DEBUG
+# define DEBUG
+#endif
#include <linux/module.h>
#include <linux/kmod.h>
#include <linux/sched.h>
@@ -120,25 +126,15 @@
#include <linux/mii.h>
#include <asm/uaccess.h>
#include <asm/unaligned.h>
-
-
-// #define DEBUG // error path messages, extra info
-// #define VERBOSE // more; success messages
-#define REALLY_QUEUE
-
-#if !defined (DEBUG) && defined (CONFIG_USB_DEBUG)
-# define DEBUG
-#endif
#include <linux/usb.h>
-
#include <asm/io.h>
#include <asm/scatterlist.h>
#include <linux/mm.h>
#include <linux/dma-mapping.h>
-
#define DRIVER_VERSION "25-Aug-2003"
+
/*-------------------------------------------------------------------------*/
/*
@@ -148,13 +144,8 @@
* For high speed, each frame comfortably fits almost 36 max size
* Ethernet packets (so queues should be bigger).
*/
-#ifdef REALLY_QUEUE
#define RX_QLEN(dev) (((dev)->udev->speed == USB_SPEED_HIGH) ? 60 : 4)
#define TX_QLEN(dev) (((dev)->udev->speed == USB_SPEED_HIGH) ? 60 : 4)
-#else
-#define RX_QLEN(dev) 1
-#define TX_QLEN(dev) 1
-#endif
// packets are always ethernet inside
// ... except they can be bigger (limit of 64K with NetChip framing)
@@ -1006,7 +997,7 @@
if (!info->control || !info->data) {
dev_dbg (&intf->dev,
"master #%u/%p slave #%u/%p\n",
- info->u->bMasterInterface0
+ info->u->bMasterInterface0,
info->control,
info->u->bSlaveInterface0,
info->data);
@@ -1142,10 +1133,13 @@
unsigned char buf [13];
tmp = usb_string (dev->udev, e->iMACAddress, buf, sizeof buf);
- if (tmp < 0)
+ if (tmp != 12) {
+ dev_dbg (&dev->udev->dev,
+ "bad MAC string %d fetch, %d\n", e->iMACAddress, tmp);
+ if (tmp >= 0)
+ tmp = -EINVAL;
return tmp;
- else if (tmp != 12)
- return -EINVAL;
+ }
for (i = tmp = 0; i < 6; i++, tmp += 2)
dev->net->dev_addr [i] =
(nibble (buf [tmp]) << 4) + nibble (buf [tmp + 1]);
prev parent reply other threads:[~2004-05-11 14:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-07 13:20 [linux-2.6.5] oops when plugging CDC USB network device Daniel Blueman
2004-05-07 14:23 ` [linux-usb-devel] " Alan Stern
2004-05-11 10:54 ` Daniel Blueman
2004-05-11 14:53 ` David Brownell [this message]
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=40A0E906.2090302@pacbell.net \
--to=david-b@pacbell.net \
--cc=daniel.blueman@gmx.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=stern@rowland.harvard.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.