Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Apr 2008 18:49:10 +0200
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        "Xiaofan Chen" <xiaofanc@gmail.com>
Cc:        freebsd-usb@freebsd.org
Subject:   Re: PICDEM FS USB Bootloader under FreeBSD
Message-ID:  <200804251849.11283.hselasky@c2i.net>
In-Reply-To: <a276da400804250659t7b413c60ib9974d2c19c1d3e4@mail.gmail.com>
References:  <a276da400710120806k636347eew876ee0fb3fc17ab3@mail.gmail.com> <a276da400804241956r3a7759bp298c76ccdaf8eb76@mail.gmail.com> <a276da400804250659t7b413c60ib9974d2c19c1d3e4@mail.gmail.com>

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

1) Try to get debugging from USB instead of OHCI.

sysctl hw.usb.ohci.debug=0
sysctl hw.usb.debug=15

Retry.

2) Patch /sys/dev/usb/ugen.c

Change all lines looking like the following, that are not in a function 
named "xxx_callback":

sce->read_stall = 1;
sce->write_stall = 1;

Into:

sce->read_stall = 0;
sce->write_stall = 0;

Recompile ugen an try again.

My analysis so far:

The USB device refuses a control transfer, possibly the clear-stall request:

ohci_setup_standard_chain: addr=2 endpt=0 sumlen=8 speed=2
ohci_setup_standard_chain: nexttog=1; data before transfer:
TD(0xc4d6b600) at 0x0b06d600: -TOG0 delay=7 ec=0 cc=15
cbp=0x13ceb210 next=0x0b06d700 be=0x13ceb217
TD(0xc4d6b700) at 0x0b06d700: -R-IN-TOG1 delay=1 ec=0 cc=15
cbp=0x00000000 next=0x00000000 be=0xffffffff
_ohci_append_qh: 0xc4d6b680 to 0xc4071980
ohci_check_transfer: xfer=0xc4f61140 checking transfer
ohci_non_isoc_done: xfer=0xc4f61140 pipe=0xc4ee81b0 transfer done
TD(0xc4d6b600) at 0x0b06d600: -TOG1 delay=7 ec=0 cc=0
cbp=0x00000000 next=0x00000000 be=0x13ceb217
ohci_device_done: xfer=0xc4f61140, pipe=0xc4ee81b0, error=22

The OHCI wants to receive 4 bytes from endpoint 1, but does never get those 
bytes. The transfer times out.

ohci_setup_standard_chain: addr=2 endpt=1 sumlen=4 speed=2
ohci_setup_standard_chain: nexttog=0; data before transfer:
TD(0xc4d6b380) at 0x0b06d380: -R-IN-TOG0 delay=1 ec=0 cc=15
cbp=0x13d12140 next=0x00000000 be=0x13d12143
_ohci_append_qh: 0xc4d6b400 to 0xc4071900
ohci_timeout: xfer=0xc4f51070
ohci_device_done: xfer=0xc4f51070, pipe=0xc4ee81d8, error=20

--HPS



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