Endre Bakka | 1 Dec 04:41 2008
Picon

OHCI bad entry problem

Hi,

I have a custom board with an Altera FPGA running uClinux (2.6.27 kernel)  
on a Nios2 soft core processor, a ISP1564 USB controller and a Zydas based  
Wi-Fi USB stick. I'm trying to get the wi-fi stick working using the  
zd1211rw driver and the ohci driver. It works fine for a short while - I  
am usually able to do a iwlist scanning and sometimes it even manages to  
run a dhcp client to obtain an IP address, but then I get a bad entry  
error. After this e.g. iwlist scanning only returns "wlan0  Interface  
doesn't support scanning" or "wlan0  Failed to read scan data : Resource  
temporarily unavailable". I have also tried the vendor based driver and  
gotten the same results (although the first time I tried it, I seemed to  
get a lot further before the bad entry problem showed up).

I added some debug statements to the ohci driver, and to me it seems to  
get an errounous TD from the host controller. I am hoping somebody can  
provide me with additional pointers on what goes wrong (and even better,  
how to fix it) based on the debug output and usbmon output found below.

Thanks,
- Endre

==============================================
Debug output from ohci (Free and alloc statment are from td_free and  
td_alloc, good entry is in dl_reverse_done_list just below the if where  
bad entry is printed (added a timestamp to both to find the relevant  
entries in usbmon).
==============================================
ohci_hcd 0000:00:02.0: 852167452: good entry  be67080 (8be67080)
ohci_hcd 0000:00:02.0: 852167452: good entry  be67440 (8be67440)
(Continue reading)

Greg Kroah-Hartman | 1 Dec 07:17 2008
Picon

[PATCH 3/7] USB: fsl_qe_udc: Report disconnect before unbinding

From: Anton Vorontsov <avorontsov@...>

Gadgets disable endpoints in their disconnect callbacks, so
we must call disconnect before unbinding. This also fixes
muram memory leak, since we free muram in the qe_ep_disable().

But mainly the patch fixes following badness:

root <at> b1:~# insmod fsl_qe_udc.ko
fsl_qe_udc: Freescale QE/CPM USB Device Controller driver, 1.0
fsl_qe_udc e01006c0.usb: QE USB controller initialized as device
root <at> b1:~# insmod g_ether.ko
g_ether gadget: using random self ethernet address
g_ether gadget: using random host ethernet address
usb0: MAC be:2d:3c:fa:be:f0
usb0: HOST MAC 62:b8:6a:df:38:66
g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
g_ether gadget: g_ether ready
fsl_qe_udc e01006c0.usb: fsl_qe_udc bind to driver g_ether
g_ether gadget: high speed config #1: CDC Ethernet (ECM)
root <at> b1:~# rmmod g_ether.ko
------------[ cut here ]------------
Badness at drivers/usb/gadget/composite.c:871
[...]
NIP [d10c1374] composite_unbind+0x24/0x15c [g_ether]
LR [d10a82f4] usb_gadget_unregister_driver+0x128/0x168 [fsl_qe_udc]
Call Trace:
[cfb93e80] [cfb1f3a0] 0xcfb1f3a0 (unreliable)
[cfb93eb0] [d10a82f4] usb_gadget_unregister_driver+0x128/0x168 [fsl_qe_udc]
[cfb93ed0] [d10c2a3c] usb_composite_unregister+0x3c/0x4c [g_ether]
(Continue reading)

Greg Kroah-Hartman | 1 Dec 07:17 2008
Picon

[PATCH 4/7] USB: fsl_usb2_udc: Report disconnect before unbinding

From: Anton Vorontsov <avorontsov@...>

Gadgets disable endpoints in their disconnect callbacks, so
we must call disconnect before unbinding.

The patch fixes following badness:

root <at> b1:~# insmod fsl_usb2_udc.ko
Freescale High-Speed USB SOC Device Controller driver (Apr 20, 2007)
root <at> b1:~# insmod g_ether.ko
g_ether gadget: using random self ethernet address
g_ether gadget: using random host ethernet address
usb0: MAC 26:07:ba:c0:44:33
usb0: HOST MAC 96:81:0c:05:4d:e3
g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
g_ether gadget: g_ether ready
fsl-usb2-udc: bind to driver g_ether
g_ether gadget: high speed config #1: CDC Ethernet (ECM)
root <at> b1:~# rmmod g_ether.ko
------------[ cut here ]------------
Badness at drivers/usb/gadget/composite.c:871
[...]
NIP [e10c3454] composite_unbind+0x24/0x15c [g_ether]
LR [e10aa454] usb_gadget_unregister_driver+0x13c/0x164 [fsl_usb2_udc]
Call Trace:
[df145e80] [ffffff94] 0xffffff94 (unreliable)
[df145eb0] [e10aa454] usb_gadget_unregister_driver+0x13c/0x164 [fsl_usb2_udc]
[df145ed0] [e10c4c40] usb_composite_unregister+0x3c/0x4c [g_ether]
[df145ee0] [c006bcc0] sys_delete_module+0x130/0x19c
[df145f40] [c00142d8] ret_from_syscall+0x0/0x38
(Continue reading)

Greg Kroah-Hartman | 1 Dec 07:17 2008
Picon

[PATCH 1/7] Revert "USB: improve ehci_watchdog's side effect in CPU power management"

This reverts commit f0d781d59cb621e1795d510039df973d0f8b23fc.

It was the wrong thing to do, and does not really do what it said
it did.

Cc: Yi Yang <yi.y.yang@...>
Cc: David Brownell <dbrownell@...>
Cc: Alan Stern <stern@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/host/ehci.h |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index b11798d..c7d4b5a 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
 <at>  <at>  -183,16 +183,14  <at>  <at>  timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action)
 	 * the async ring; just the I/O watchdog.  Note that if a
 	 * SHRINK were pending, OFF would never be requested.
 	 */
-	enum ehci_timer_action oldactions = ehci->actions;
+	if (timer_pending(&ehci->watchdog)
+			&& ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF))
+				& ehci->actions))
+		return;

 	if (!test_and_set_bit (action, &ehci->actions)) {
 		unsigned long t;

(Continue reading)

Greg KH | 1 Dec 07:16 2008
Picon

[GIT PATCH] USB fixes for 2.6.28-git

Here are a few USB fixes against your current git tree.

These patches are:
	- revert ehci patch that was incorrect
	- fix for a different broken AMD USB controller
	- 2 gadget bugfixes
	- usb storage quirks
	- new device ids

Please pull from:
	master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6.git/

All of these patches have been in the -next and -mm tree for a few
releases.

The full patches will be sent to the linux-usb mailing list, if anyone
wants to see them.

thanks,

greg k-h

------------------

 drivers/usb/gadget/fsl_qe_udc.c    |    3 +++
 drivers/usb/gadget/fsl_usb2_udc.c  |    3 +++
 drivers/usb/host/ehci-pci.c        |    9 ++++++---
 drivers/usb/host/ehci.h            |   12 +++++-------
 drivers/usb/serial/option.c        |   35 +++++++++++++++++++++++++++++++++++
 drivers/usb/storage/unusual_devs.h |   19 +++++++++++++++++++
(Continue reading)

Greg Kroah-Hartman | 1 Dec 07:17 2008
Picon

[PATCH 2/7] USB: fix SB600 USB subsystem hang bug

From: Shane Huang <shane.huang@...>

This patch is required for all AMD SB600 revisions to avoid USB subsystem hang
symptom. The USB subsystem hang symptom is observed when the system has
multiple USB devices connected to it. In some cases a USB hub may be required
to observe this symptom.

Reported in bugzilla as #11599, the similar patch for SB700 old revision is:
commit b09bc6cbae4dd3a2d35722668ef2c502a7b8b093

Reported-by: raffaele <ralfconn@...>
Tested-by: Roman Mamedov <roman@...>
Signed-off-by: Shane Huang <shane.huang@...>
Cc: stable <stable@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/host/ehci-pci.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index 9d0ea57..36864f9 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
 <at>  <at>  -169,18 +169,21  <at>  <at>  static int ehci_pci_setup(struct usb_hcd *hcd)
 		}
 		break;
 	case PCI_VENDOR_ID_ATI:
-		/* SB700 old version has a bug in EHCI controller,
+		/* SB600 and old version of SB700 have a bug in EHCI controller,
 		 * which causes usb devices lose response in some cases.
(Continue reading)

Greg Kroah-Hartman | 1 Dec 07:17 2008
Picon

[PATCH 7/7] USB: serial: add more Onda device ids to option driver

Thanks to Domenico Riccio for pointing these out.

Cc: Domenico Riccio <domenico.riccio@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/serial/option.c |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 6fa1ec4..809697b 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
 <at>  <at>  -224,6 +224,7  <at>  <at>  static int  option_send_setup(struct tty_struct *tty, struct usb_serial_port *po
 #define ONDA_VENDOR_ID				0x19d2
 #define ONDA_PRODUCT_MSA501HS			0x0001
 #define ONDA_PRODUCT_ET502HS			0x0002
+#define ONDA_PRODUCT_MT503HS			0x0200

 #define BANDRICH_VENDOR_ID			0x1A8D
 #define BANDRICH_PRODUCT_C100_1			0x1002
 <at>  <at>  -413,6 +414,40  <at>  <at>  static struct usb_device_id option_ids[] = {
 	{ USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) },
 	{ USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MSA501HS) },
 	{ USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_ET502HS) },
+	{ USB_DEVICE(ONDA_VENDOR_ID, 0x0003) },
+	{ USB_DEVICE(ONDA_VENDOR_ID, 0x0004) },
+	{ USB_DEVICE(ONDA_VENDOR_ID, 0x0005) },
+	{ USB_DEVICE(ONDA_VENDOR_ID, 0x0006) },
+	{ USB_DEVICE(ONDA_VENDOR_ID, 0x0007) },
+	{ USB_DEVICE(ONDA_VENDOR_ID, 0x0008) },
(Continue reading)

Greg Kroah-Hartman | 1 Dec 07:17 2008
Picon

[PATCH 6/7] USB: usb-storage: unusual_devs entry for Nikon D2H

From: Tobias Kunze Briseño <t <at> fictive.com>

This patch adds an unusual_devs entry for the Nikon D2H camera.

From: Tobias Kunze Briseño <t <at> fictive.com>,
Signed-off-by: Alan Stern <stern@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/storage/unusual_devs.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index e8e3eda..e61f2bf 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
 <at>  <at>  -389,6 +389,13  <at>  <at>  UNUSUAL_DEV(  0x04b0, 0x0401, 0x0200, 0x0200,
 		US_SC_DEVICE, US_PR_DEVICE, NULL,
 		US_FL_FIX_CAPACITY),

+/* Reported by Tobias Kunze Briseno <t-linux@...> */
+UNUSUAL_DEV(  0x04b0, 0x0403, 0x0200, 0x0200,
+		"NIKON",
+		"NIKON DSC D2H",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		US_FL_FIX_CAPACITY),
+
 /* Reported by Milinevsky Dmitry <niam.niam@...> */
 UNUSUAL_DEV(  0x04b0, 0x0409, 0x0100, 0x0100,
 		"NIKON",
--

-- 
(Continue reading)

Greg Kroah-Hartman | 1 Dec 07:17 2008
Picon

[PATCH 5/7] USB: storage: unusual_devs entry for Mio C520-GPS

From: Alan Stern <stern@...>

This patch (as1176) adds an unusual_devs entry for the Mio C520 GPS
unit.  Other devices also based on the Mitac hardware use the same USB
interface firmware, so the Vendor and Product names are generalized.

This fixes Bugzilla #11583.

Signed-off-by: Alan Stern <stern@...>
Tested-by: Tamas Kerecsen <kerecsen@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/storage/unusual_devs.h |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index 6da9a7a..e8e3eda 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
 <at>  <at>  -318,6 +318,18  <at>  <at>  UNUSUAL_DEV(  0x045a, 0x5210, 0x0101, 0x0101,
 		US_SC_SCSI, US_PR_KARMA, rio_karma_init, 0),
 #endif

+/* Reported by Tamas Kerecsen <kerecsen@...>
+ * Obviously the PROM has not been customized by the VAR;
+ * the Vendor and Product string descriptors are:
+ *	Generic Mass Storage (PROTOTYPE--Remember to change idVendor)
+ *	Generic Manufacturer (PROTOTYPE--Remember to change idVendor)
+ */
+UNUSUAL_DEV(  0x045e, 0xffff, 0x0000, 0x0000,
(Continue reading)

RE: [PATCH 2.6.27] usb isp1760: initialize port 1 of ISP1761


> -----Original Message-----
> From: Sebastian Andrzej Siewior [mailto:sebastian@...] 
> Sent: Samstag, 29. November 2008 19:22
> To: Hommel, Thomas (GE EntSol, Intelligent Platforms)
> Cc: linux-usb@...; Nate Case
> Subject: Re: [PATCH 2.6.27] usb isp1760: initialize port 1 of ISP1761
> 
> * Hommel, Thomas (GE EntSol, Intelligent Platforms) | 
> 2008-11-21 14:39:52 [+0100]:
> 
> >This patch enables port 1 as a host controller port on an 
> ISP1761 chip.
> >On this chip, the register is called OTG control register, 
> but the init
> >value is the same as on the ISP1760.
> >
> >Signed-off-by: Thomas Hommel <thomas.hommel@...>
> >
> >--- linux-2.6.27-vanilla/drivers/usb/host/isp1760-hcd.c 2008-10-10
> >00:13:53.000000000 +0200
> >+++ linux-2.6.27/drivers/usb/host/isp1760-hcd.c 2008-11-21
> >11:27:27.000000000 +0100
> > <at>  <at>  -435,10 +438,9  <at>  <at>  static int isp1760_hc_setup(struct usb_h
> >
> >        /*
> >         * PORT 1 Control register of the ISP1760 is the OTG control
> >-        * register on ISP1761.
> >+        * register on ISP1761, but enabling port 1 is the 
> same pattern
(Continue reading)


Gmane