On Thu, Sep 30, 2010 at 12:27:05AM -0500, Ming Lei wrote:
If you write hw_ep->max_packet_sz_tx to MUSB_TXMAXP, musb chip sends packet with this size always in usb bus. At full
this is only true if you have packet combining/splitting. Otherwise, it'll send 64-bytes in full speed.
speed mode, max packet size is much less than that of high speed mode, so overflow problem can happen. We should always set this register with the value from endpoint descriptor.
by the time we setup the endpoints (to allocate fifo) we don't have descriptors available. Look at ep_config_from_table() for instance.
You can reproduce the problem easily by connecting musb gadget with one uhci or ohci only usb host controller.
check your sniffs. If you have >64byte packet in full speed. It's the packet combining/splitting kicking. Check whether the below helps: diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 472b2a7..459b6b5 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -1427,14 +1427,6 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb) strcat(aInfo, ", dyn FIFOs"); musb->dyn_fifo = true; } - if (reg & MUSB_CONFIGDATA_MPRXE) { - strcat(aInfo, ", bulk combine"); - musb->bulk_combine = true; - } - if (reg & MUSB_CONFIGDATA_MPTXE) { - strcat(aInfo, ", bulk split"); - musb->bulk_split = true; - } if (reg & MUSB_CONFIGDATA_HBRXE) { strcat(aInfo, ", HB-ISO Rx"); musb->hb_iso_rx = true;
Also hw_ep->max_packet_sz_tx is only half size of the actual endpoint hw fifo size in double buffer mode, and double buffer feature is indicated by hw_ep->tx_double_buffered. So your previous commit is wrong...
agreed. -- balbi -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html