Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 May 2009 14:33:26 +0900
From:      Weongyo Jeong <weongyo.jeong@gmail.com>
To:        Hans Petter Selasky <hselasky@freebsd.org>
Cc:        Lucius Windschuh <lwindschuh@googlemail.com>, freebsd-current@freebsd.org
Subject:   Re: HEADSUP: uath(4) has been committed.
Message-ID:  <20090519053326.GF42412@weongyo.cdnetworks.kr>
In-Reply-To: <200905182349.06150.hselasky@freebsd.org>
References:  <20090407022956.GA71377@weongyo.cdnetworks.kr> <90a5caac0905161502x3771072n22d58111a235de24@mail.gmail.com> <200905182349.06150.hselasky@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--WYTEVAkct0FjGQmd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Mon, May 18, 2009 at 11:49:05PM +0200, Hans Petter Selasky wrote:
> On Sunday 17 May 2009, Lucius Windschuh wrote:
> > 2009/4/7 Weongyo Jeong <weongyo.jeong@gmail.com>
> >
> 
> Here's one more device, which is currently not listed in if_uath.c:
> 
> ugen3.10: <WPN111 Atheros Communications Inc> at usbus3, cfg=0 md=HOST 
> spd=HIGH (480Mbps) pwr=ON
> 
>   bLength = 0x0012 
>   bDescriptorType = 0x0001 
>   bcdUSB = 0x0200 
>   bDeviceClass = 0x00ff 
>   bDeviceSubClass = 0x0000 
>   bDeviceProtocol = 0x0000 
>   bMaxPacketSize0 = 0x0040 
>   idVendor = 0x1385 
>   idProduct = 0x5f01 
>   bcdDevice = 0x0001 
>   iManufacturer = 0x0001  <Atheros Communications Inc>
>   iProduct = 0x0002  <WPN111>
>   iSerialNumber = 0x0003  <1.0>
>   bNumConfigurations = 0x0001 
> 
> Resulting dmesg after running uathload:
> 
> uath0: timeout waiting for reply to cmd 0x4 (4)
> uath0: could not read capability 2
> uath0: could not get device capabilities
> device_attach: uath0 attach returned 35
> uath0: timeout waiting for reply to cmd 0x1 (1)
> uath0: could not initialize adapter
> device_attach: uath0 attach returned 35
> 
> Can this be fixed?

Because I don't have WPN111 stick which failed to buy in my local store
I couldn't test it fully but one thing you can try is that adding some
delays for each usb commands could be helpful like a attached patch.

Could you please test with attached patch and show results?  I think you
can increase or decrease delay values or add delays at other places.

regards,
Weongyo Jeong


--WYTEVAkct0FjGQmd
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="patch_uath_20090519_wpn111.diff"

Index: if_uath.c
===================================================================
--- if_uath.c	(revision 192371)
+++ if_uath.c	(working copy)
@@ -392,6 +392,7 @@
 		device_printf(sc->sc_dev, "could not initialize adapter\n");
 		goto fail3;
 	}
+	usb2_pause_mtx(NULL, 500);
 	error = uath_get_devcap(sc);
 	if (error != 0) {
 		device_printf(sc->sc_dev,
@@ -842,6 +843,7 @@
 uath_get_devcap(struct uath_softc *sc)
 {
 #define	GETCAP(x, v) do {				\
+	usb2_pause_mtx(NULL, 200);			\
 	error = uath_get_capability(sc, x, &v);		\
 	if (error != 0)					\
 		return (error);				\

--WYTEVAkct0FjGQmd--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090519053326.GF42412>