[pkg-fso-commits] [SCM] linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko branch, andy-tracking, updated. upstream/20090303.gitb9de904e-140-g23b564c

Werner Almesberger werner at openmoko.org
Mon Jun 8 17:29:49 UTC 2009


The following commit has been merged in the andy-tracking branch:
commit f63e59c84aa21d2745f115209bf949eca27008b1
Author: Aric D. Blumer <aric at sdgsystems.com>
Date:   Mon Mar 16 16:28:45 2009 -0600

    Zero packet length detection for RNDIS fix. Migrated from 2.6.24 series kernel
    
    This patch fixes the issues of RNDIS on the Openmoko Freerunner (and
    subsequently Windows networking with the Freerunner). It arises from the
    case where a stall is being issued by the upper level RNDIS driver to
    the s3c2410_udc.c in the 2.6.28 series driver and it not being handled
    correctly. This patch changes the RNDIS driver to send zero-length
    packets instead of a stall, a condition that allowed the udc driver to
    function correctly in 2.6.24 series kernels.
    
    Further investigation into the udc driver is recommended. I am currently
    looking into it to be able to use the Android ADB gadget driver, which
    currently has stability issues using the underlying udc on both Linux
    and Windows (although, it's possible that the Android ADB gadget has
    problems).
    
    Traces and logs of the USB traffic are available upon request. Thanks to
    Aric at SDG Systems for all of his work on this matter.
    
    Regards,
    Brian Code
    
    From de386af349bbfe1ad6d45c810185123975888d8d Mon Sep 17 00:00:00 2001
    From: Aric D. Blumer <aric at sdgsystems.com>
    Date: Mon, 16 Mar 2009 16:04:02 -0600
    Subject: [PATCH] Zero packet length detection for RNDIS fix. Migrated from 2.6.24 series kernel
    
    Signed-off-by: Aric D. Blumer <aric at sdgsystems.com>
    Signed-off-by: Brian Code <Brian.Code at koolu.com>

diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c
index 3a8bb53..d7c7f19 100644
--- a/drivers/usb/gadget/f_rndis.c
+++ b/drivers/usb/gadget/f_rndis.c
@@ -437,7 +437,8 @@ invalid:
 		DBG(cdev, "rndis req%02x.%02x v%04x i%04x l%d\n",
 			ctrl->bRequestType, ctrl->bRequest,
 			w_value, w_index, w_length);
-		req->zero = 0;
+		req->zero = value < w_length
+				&& (value % cdev->gadget->ep0->maxpacket) == 0;
 		req->length = value;
 		value = usb_ep_queue(cdev->gadget->ep0, req, GFP_ATOMIC);
 		if (value < 0)

-- 
linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko



More information about the pkg-fso-commits mailing list