Hi, On Thu, Nov 07, 2013 at 11:54:48AM -0600, Bin Liu wrote: > I am debugging a weird musb problem in which musb is in high-speed > device mode loaded with g_mass_storage. For some reason, musb received > 10 bytes in SETUP packets during enumeration. Please see the following > log from musb. > > <after connected to host> > [ 447.100858] musb-hdrc musb-hdrc.0: usbintr (1) epintr(0) > [ 447.250856] musb-hdrc musb-hdrc.0: usbintr (4) epintr(0) > [ 447.569139] musb-hdrc musb-hdrc.0: usbintr (0) epintr(1) > [ 447.574515] musb_g_ep0_irq 720: SetupEnd came in a wrong ep0stage setup > [ 447.581189] musb_g_ep0_irq 815: SETUP packet len 10 != 8 ? > [ 447.586737] musb-hdrc musb-hdrc.0: usbintr (0) epintr(1) > [ 447.592103] musb_g_ep0_irq 815: SETUP packet len 10 != 8 ? > [ 447.597652] musb-hdrc musb-hdrc.0: Unhandled USB IRQ 00000001-00000000 > ...... > > When look at the following code in musb_gadget_ep0.c, when len != 8, > musb_read_setup() is not called, so it just breaks out without > flushing the fifo or sending > MUSB_CSR0_P_SVDRXPKTRDY. Is this a bug? I would think in this error in a sense, yes. OTOH, a setup packet with less than 8 bytes is a much larger bug on the host side, right ? Still, I think that you should reply with a stall in that case. -- balbi
Attachment:
signature.asc
Description: Digital signature