musb: bluk_split only worked for the first segment(PIO only)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,
   if musb bulk_split is enable, the segment size will be set according
to hw_ep->max_packet_sz_tx, and the segment will be writen to fifo.
   But after the first tranfser end, the segment size will be set no larger
than qh->maxpacket (in musb_host_tx),and the bluk_split  make no sense.
   so please check the following patch, I have tested it on my board.

diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index 6582a20..f251132 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -1455,8 +1455,8 @@ done:
  * (and presumably, FIFO is not half-full) we should write *two*
  * packets before updating TXCSR; other docs disagree...
  */
- if (length > qh->maxpacket)
- length = qh->maxpacket;
+ if (length > qh->segsize)
+ length = qh->segsize;
  /* Unmap the buffer so that CPU can use it */
  usb_hcd_unmap_urb_for_dma(musb->hcd, urb);
--
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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux