Joshua Wise wrote:

I can no longer get pxa2xx-udc to work. Failure mode seems to be that the handheld can do IN, but OUT seems not to get through to the gadget driver. Verified both with g_char and g_serial. Note how callbacks stop happening in this dmesg from the PC side.

And that looks like the problem ... your host for some reason closed the link, got a pair of "-ENOENT" errors (synchronous unlink) and stopped writing. Could be the "ipaqboot.c" code. That would explain why it doesn't matter what gadget driver you use ... :)


usb.c: USB device 30 (vend/prod 0x5f9/0xffff) is not claimed by any active
driver.
usbserial.c: USB Serial deregistering driver Linux As Bootloader device
usbserial.c: USB Serial support registered for Linux As Bootloader device
usbserial.c: descriptor matches
usbserial.c: found bulk in
usbserial.c: found bulk out
usbserial.c: Linux As Bootloader device converter detected
usbserial.c: get_free_serial 1
usbserial.c: get_free_serial - minor base = 0
ipaqboot.c: ipaq_startup
usb.c: selecting invalid configuration 1

That looks odd too. The gadget code was using config #2...



usbserial.c: usb_serial_probe - setting up 1 port structures for this device
usbserial.c: Linux As Bootloader device converter now attached to ttyUSB0 (or
usb/tts/0 for devfs)
ipaqboot.c: USB iPAQ (PocketPC/hh.org bootldr) driver v0.3
usbserial.c: serial_open
ipaqboot.c: ipaq_open - port 0
usbserial.c: serial_ioctl - port 0, cmd 0x5401
usbserial.c: serial_ioctl - port 0, cmd 0x540b
usbserial.c: serial_ioctl - port 0, cmd 0x5402
usbserial.c: serial_set_termios - port 0
usbserial.c: serial_ioctl - port 0, cmd 0x5402
usbserial.c: serial_set_termios - port 0
usbserial.c: serial_ioctl - port 0, cmd 0x5403
ipaqboot.c: ipaq_chars_in_buffer - queuelen 0
usbserial.c: serial_set_termios - port 0
usbserial.c: serial_write - port 0, 1 byte(s)
ipaqboot.c: ipaq_write - port 0
ipaqboot.c: ipaq_write - length = 1, data = 0d
ipaqboot.c: ipaq_write_bulk - length = 1, data = 0d
ipaqboot.c: ipaq_write_bulk_callback - port 0
usbserial.c: port_softint - port 0
usbserial.c: serial_write - port 0, 1 byte(s)
ipaqboot.c: ipaq_write - port 0
ipaqboot.c: ipaq_write - length = 1, data = 0d
ipaqboot.c: ipaq_write_bulk - length = 1, data = 0d
usbserial.c: serial_ioctl - port 0, cmd 0x5403
ipaqboot.c: ipaq_chars_in_buffer - queuelen 0
usbserial.c: serial_set_termios - port 0

Here's where the host closed things and stopped writing/reading:


usbserial.c: serial_close - port 0
ipaqboot.c: ipaq_close - port 0
ipaqboot.c: ipaq_write_bulk_callback - port 0
ipaqboot.c: ipaq_write_bulk_callback - nonzero write bulk status received: -2
usbserial.c: port_softint - port 0
ipaqboot.c: ipaq_read_bulk_callback - port 0
ipaqboot.c: ipaq_read_bulk_callback - nonzero read bulk status received: -2
usbserial.c: serial_open
ipaqboot.c: ipaq_open - port 0
...

For completeness, here are the iPAQ's boot messages.
boot> armboot fs:/zImage
ARMBoot: [EMAIL PROTECTED](00080000)(H3XXX boot firmware)
ARMBoot: [EMAIL PROTECTED](03F40000)(H3XXX root jffs2)
ARMBoot: [EMAIL PROTECTED](00040000)(asset)
...
Linux version 2.6.0-test7-rmk1-hh0 ([EMAIL PROTECTED]) (gcc
version 3.3.2 20030820 (prerelease)) #288 Thu Oct 16 19:22:04 EDT 2003
CPU: XScale-PXA250 [69052903] revision 3 (ARMv5TE)

PXA 250 B1 ...


<6>pxa2xx_udc: version alpha (15-Oct-2003)
<7>udc: disabled OUT dma
<6>pxa2xx_udc: IRQ 4 (!cfr) (broken dma-out) (full dma)
<7>udc: host  EP0_IDLE, uicr FF.FF, usir 00.00, ufnr 40.00
<7>udc: udccr A0 = rem srm
<7>udc: no gadget driver bound

Well, I wouldn't turn DMA on by default yet. It's not that robust, even if IN-DMA does handle NFSroot; some things won't work right, and I suspect network retries helped.


<6>gs_bind: Gadget Serial v0.1 bound
<7>udc: registered gadget driver 'g_serial'
Enabling LCD
<7>udc: USB reset done, gadget driver 'g_serial'
<7>udc: host  EP0_IDLE, uicr FF.FE, usir 00.00, ufnr 40.00
<7>udc: USB suspend
<7>udc: udccr 03 = uda ude
<7>udc: ep0 driver 'g_serial'
<7>udc: udccs0 EP0_IDLE 00 =
<7>udc: ep0 IN 0/0, OUT 0/0
<6>gs_module_init: Gadget Serial v0.1 loaded

Normal init.


<7>udc: USB resume
<7>udc: USB reset start
<6>gs_disconnect: Gadget Serial disconnected
<7>udc: USB reset done, gadget driver 'g_serial'
<7>udc: SETUP 80.06 v0100 i0000 l0008
<7>udc: SETUP 80.06 v0100 i0000 l0012
<5>lab: loaded command unlink
<7>udc: SETUP 80.06 v0200 i0000 l0008
<7>udc: SETUP 80.06 v0200 i0000 l0020
<5>lab: loaded command rm

Then SET_CONFIGURATION to #2 after those descriptor fetches:


<7>udc: SETUP 00.09 v0002 i0000 l0000
<7>udc: ep11in-bulk using dma8
<7>udc: enabled ep11in-bulk
<7>udc: enabled ep12out-bulk
<6>gs_set_config: Gadget Serial configured for full speed
<7>udc: ep0 config ack raced
<7>udc: SETUP 00.00 v0000 i0000 l0000
<3>gs_setup: unknown request, type=00, request=00, value=0000, index=0000,
length=0
<7>udc: protocol STALL, 81 err -95

Do you happen to know what this request should have been? Was it maybe changing the config to #1, from #2?

Your particular hardware doesn't have the UDCCFR register
(new in PXA 255) so SET_CONFIGURATION requests have no way
to hold off the next request (NAK) till they're done.  So
the next request gets mangled sometimes.  If it's a problem,
making the host delay a few msec after SET_CONFIGURATION
might help.  Plus this is B1 silicon, so other problems in
that area wouldn't surprise me much.

Other than that, and the host side oddness, it looks
like it initialized fine.

- Dave




-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise Linux in the Boardroom; in the Front Office; & in the Server Room http://www.enterpriselinuxforum.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to