Bug #1446

USB flash drives not working on one of my machines

Added by rumcic over 5 years ago. Updated over 5 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

On master whenever I plug in an USB flash drive I get:
Aug 9 14:29:50 rumko kernel: usbd_transfer_cb: short transfer 0<8
Aug 9 14:29:50 rumko kernel: usbd_new_device: addr=2, getting first desc
failed
Aug 9 14:29:50 rumko kernel: uhub_explore: usb_new_device failed,
error=SHORT_XFER
Aug 9 14:29:50 rumko kernel: uhub1: device problem (SHORT_XFER), disabling
port 1

Found a freebsd PR (http://www.freebsd.org/cgi/query-pr.cgi?pr=103167&amp;cat=)
that showed the same problem and a solution
(http://lists.freebsd.org/pipermail/cvs-all/2006-October/190784.html).
So I added the following patches:
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/usb/Attic/ehci.c.diff?hideattic=0&amp;r2=1.50&amp;r1=1.49&amp;f=u
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/usb/Attic/ohci.c.diff?hideattic=0&amp;r2=1.165&amp;r1=1.164&amp;f=u
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/usb/Attic/usb_subr.c.diff?hideattic=0&amp;r2=1.87&amp;r1=1.86&amp;f=u

But now I get (3 tries on 2 different ports):
Aug 9 15:47:13 rumko kernel: usbd_get_string: getting lang failed, using 0
Aug 9 15:47:39 rumko kernel: uhub_explore: usb_new_device failed,
error=TIMEOUT
Aug 9 15:47:39 rumko kernel: uhub1: device problem (TIMEOUT), disabling port 1
Aug 9 15:48:03 rumko kernel: usbd_get_string: getting lang failed, using 0
Aug 9 15:48:19 rumko kernel: uhub_explore: usb_new_device failed,
error=TIMEOUT
Aug 9 15:48:19 rumko kernel: uhub1: device problem (TIMEOUT), disabling port 8
Aug 9 15:52:17 rumko kernel: usbd_get_string: getting lang failed, using 0
Aug 9 15:52:33 rumko kernel: uhub_explore: usb_new_device failed,
error=STALLED
Aug 9 15:52:33 rumko kernel: uhub1: device problem (STALLED), disabling port 1

So it still doesn't work and am at a loss as to what to do next. I have 2 other
machines (another dfly and one freebsd), but the flash drives work there
without problems so it's fortunately not a big problem for me.
This machine is nforce4 based (recent dmesg can be seen at
http://www.rumko.net/dragonfly/dmesg.boot).
--
Regards,
Rumko

History

#1 Updated by dillon over 5 years ago

Try this patch, Rumko, and tell me if it works.

fetch http://apollo.backplane.com/DFlyMisc/usb01.patch

The basic problem is that our ohci and ehci drivers have some old code
which plays tricks when dealing with the device address that makes
the FreeBSD patch simply not work.

-Matt

#2 Updated by dillon over 5 years ago

:Just a quick question ... in the patch I see 2 blocks of "#if 1" ... "#endi=
:f"=20
:code ... on purpose or should it be #if 0?
:
:I'll test it in the evening ... in your timezone, morning I think
:
:=2D-=20
:Regards,
:Rumko

#if 1 ... the patch is correct. It's a bit meaningless, I know. It's
just a quick hack to see if it works or not.

-Matt

#3 Updated by dillon over 5 years ago

I've committed a somewhat different version of the patch to master.

I also fixed some issues with EHCI probing during early boot that
were not in the patch.

-Matt

#4 Updated by rumcic over 5 years ago

Matthew Dillon wrote:

> I've committed a somewhat different version of the patch to master.
>
> I also fixed some issues with EHCI probing during early boot that
> were not in the patch.
>
> -Matt

Unfortunately, still doesn't work (just a few mins ago updated to HEAD).

I turned up some debugging (set hw.usb.ehci.debug, hw.usb.debug and
hw.usb.uhub.debug to 4) and the output is at http://pastebin.com/m7055f929

Also available in: Atom PDF