I'm now seeing some more interesting behavior. We get a GET_DESCRIPTOR request, *seem* to send a short in, but for whatever reason, the host doesn't get it. BTW, I got it working earlier today, and stupidly failed to check in my changes. (Hmm, just clean up a few printks here, there... WTF? It doesn't work!) Heisenbug?
Not likely a Heisenbug ... more likely just that some of what you thought you'd "fixed" just changed the timing enough to mask some kind of problem! When I'm touching that level of code, I've found that removing more than one printk at a time is dangerous. (And using short printks -- three of four characters -- is a win, they don't perturb timings as much.)
I have no reason to suspect that short IN transactions on ep0 should misbehave; they're used quite regularly. Although do take note of that "#if 1" segment of code, which papers over a "should not exist" chip problem which I never managed to get to the bottom of. (It came from Frank Becker's code, but my version doesn't spin as long -- didn't seem necessary. The driver wanted to misbehave there, until I added that spinning.)
You should remember that except for the automagic cases, the only synchronization point the PXA really offers is receipt of the SETUP packet itself. Automagic doesn't really offer any, except on newer chips (PXA 255) in cases where the new UDCCFR register is used.
Ideally, all USB device controllers would let the drivers synchronize before starting the STATUS stage of a control transaction. The way the PXA does it seems prone to races at low levels, where software can't prevent misbehavior.
- Dave
Log: <7>udc: USB resume <7>udc: USB reset start <7>udc: USB reset done, gadget driver 'char' <7>udc: irq 00.01 Idle packet! <7>udc: SETUP 00.05 v0022 i0000 l0000 <7>udc: ep0start address, 00/00 <7>udc: irq 00.01 Idle packet! <7>udc: SETUP 80.06 v0100 i0000 l0008 Enterring IN phase. GChar_setup: 6 <7>udc: ep0 queue req c3ffe4e0, len 8 buf c3ed9980 <7>udc: ep0in 8 bytes 0 left c3ffe4e0 <7>udc: ep0start short IN, 00/02 Short IN being sent --> NOW <7>udc: irq 00.01 Broken hardware... <7>udc: SETUP 80.06 v0100 i0000 l0012 Enterring IN phase. GChar_setup: 6 <7>udc: ep0 queue req c3ffe4e0, len 18 buf c3ed9980 <7>udc: ep0in 16 bytes 2 left c3ffe4e0 <7>udc: ep0start IN, 00/00 <6>Freeing init memory: 64K <6>lab: Starting LAB [Linux As Bootloader] <6>lab: Attempting to connect using USB... <6>lab: Please plug in the cable. <7>udc: irq 00.01 <7>gchar: setup complete --> 0, 16/18 Idle packet! <7>udc: SETUP 80.06 v0100 i0000 l0012 Enterring IN phase. GChar_setup: 6 <7>udc: ep0 queue req c3ffe4e0, len 18 buf c3ed9980 <7>udc: ep0in 16 bytes 2 left c3ffe4e0 <7>udc: ep0start IN, 00/00 <6>lab: Please plug in the cable. <7>udc: irq 00.01 <7>gchar: setup complete --> 0, 16/18 Idle packet! <7>udc: SETUP 80.06 v0100 i0000 l0012 Enterring IN phase. GChar_setup: 6 <7>udc: ep0 queue req c3ffe4e0, len 18 buf c3ed9980 <7>udc: ep0in 16 bytes 2 left c3ffe4e0 <7>udc: ep0start IN, 00/00 <7>udc: irq 00.01 <7>gchar: setup complete --> 0, 16/18
- -- Joshua Wise | www.joshuawise.com
GPG Key | 0xEA80E0B3
Quote | <lilo> I akilled [EMAIL PROTECTED] by mistake
-------------------------------------------------------
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