adb: fix adb push
author黄涛 <huangtao@rock-chips.com>
Fri, 15 Oct 2010 06:15:03 +0000 (14:15 +0800)
committer黄涛 <huangtao@rock-chips.com>
Fri, 15 Oct 2010 06:15:19 +0000 (14:15 +0800)
drivers/usb/dwc_otg/dwc_otg_cil.c
drivers/usb/dwc_otg/dwc_otg_pcd.c
drivers/usb/gadget/f_adb.c

index 273357b71091555f25af2d7a0c80a4426e5497c5..b90b792c788a5e9f69f744250281e0820da6c59b 100755 (executable)
@@ -2298,6 +2298,9 @@ void dwc_otg_ep_start_transfer(dwc_otg_core_if_t *_core_if, dwc_ep_t *_ep)
                                        (_ep->xfer_len + (_ep->maxpacket - 1)) /
                                        _ep->maxpacket;
                        deptsiz.b.xfersize = deptsiz.b.pktcnt * _ep->maxpacket;
+                       // yk@20101014
+                       // actual length will be caculate by xfer_len - xfersize
+                       _ep->xfer_len = deptsiz.b.xfersize;
                }
                dwc_write_reg32(&out_regs->doeptsiz, deptsiz.d32);
 
index 4394e6ca420fb2ba511b00f909a132093a9cb595..4215a0ba67084b589c7a52c353ed2fc648caf0de 100755 (executable)
@@ -338,6 +338,10 @@ static int dwc_otg_pcd_ep_enable(struct usb_ep *_ep,
          */
         if(ep->dwc_ep.num == 0)
                ep->dwc_ep.tx_fifo_num = 0;
+        else if(ep->dwc_ep.num == 1)
+                ep->dwc_ep.tx_fifo_num = 1;
+        else if(ep->dwc_ep.num == 3)
+                ep->dwc_ep.tx_fifo_num = 3;
         else
            ep->dwc_ep.tx_fifo_num = (ep->dwc_ep.num>>1)+1 ; /* 1,3,5 */
        }                
index ec23b72dd8bdcd54920466ae6a2e7a6557c6e15a..1cd22a57550abe92b1fc183dac86c7b24519b30f 100644 (file)
@@ -77,7 +77,7 @@ static struct usb_endpoint_descriptor adb_highspeed_in_desc = {
        .bDescriptorType        = USB_DT_ENDPOINT,
        .bEndpointAddress       = USB_DIR_IN,
        .bmAttributes           = USB_ENDPOINT_XFER_BULK,
-       .wMaxPacketSize         = __constant_cpu_to_le16(512),
+       .wMaxPacketSize         = __constant_cpu_to_le16(64),
 };
 
 static struct usb_endpoint_descriptor adb_highspeed_out_desc = {