[Balloon-svn] r488 - balloon/trunk/kernel/2.6.25.2

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: subversion@balloonboard.org
Date:  
To: balloon-svn
Subject: [Balloon-svn] r488 - balloon/trunk/kernel/2.6.25.2
Author: nick
Date: 2008-05-26 12:06:53 +0100 (Mon, 26 May 2008)
New Revision: 488

Modified:
balloon/trunk/kernel/2.6.25.2/pxa27x-udc.patch
Log:
fix pxa27x_udc.h to have a 16 byte status endpoint fifo - needed for RNDIS - and faked bcdDevice to look like pxa so cdc_subset host driver binds correctly when using RNDIS device desctiptors. pxa270_udc + g_ether now seems to work for the first time with both Windows and linux. Tested with WinXP sp2 and linux 2.6.16 running Debian

Modified: balloon/trunk/kernel/2.6.25.2/pxa27x-udc.patch
===================================================================
--- balloon/trunk/kernel/2.6.25.2/pxa27x-udc.patch    2008-05-22 13:44:43 UTC (rev 487)
+++ balloon/trunk/kernel/2.6.25.2/pxa27x-udc.patch    2008-05-26 11:06:53 UTC (rev 488)
@@ -1,7 +1,7 @@
Index: linux-2.6.25.2/drivers/usb/gadget/Kconfig
===================================================================
---- linux-2.6.25.2.orig/drivers/usb/gadget/Kconfig    2008-05-09 21:52:43.000000000 +0100
-+++ linux-2.6.25.2/drivers/usb/gadget/Kconfig    2008-05-09 22:02:53.000000000 +0100
+--- linux-2.6.25.2.orig/drivers/usb/gadget/Kconfig    2008-05-07 00:21:32.000000000 +0100
++++ linux-2.6.25.2/drivers/usb/gadget/Kconfig    2008-05-15 10:36:12.000000000 +0100
@@ -231,6 +231,26 @@
     However, this problem is improved if change a value of
     NET_IP_ALIGN to 4.
@@ -31,8 +31,8 @@
    depends on PCI
Index: linux-2.6.25.2/drivers/usb/gadget/Makefile
===================================================================
---- linux-2.6.25.2.orig/drivers/usb/gadget/Makefile    2008-05-09 21:52:43.000000000 +0100
-+++ linux-2.6.25.2/drivers/usb/gadget/Makefile    2008-05-09 21:52:46.000000000 +0100
+--- linux-2.6.25.2.orig/drivers/usb/gadget/Makefile    2008-05-07 00:21:32.000000000 +0100
++++ linux-2.6.25.2/drivers/usb/gadget/Makefile    2008-05-15 10:36:12.000000000 +0100
@@ -9,6 +9,7 @@
obj-$(CONFIG_USB_NET2280)    += net2280.o
obj-$(CONFIG_USB_AMD5536UDC)    += amd5536udc.o
@@ -43,8 +43,8 @@
obj-$(CONFIG_USB_LH7A40X)    += lh7a40x_udc.o
Index: linux-2.6.25.2/drivers/usb/gadget/ether.c
===================================================================
---- linux-2.6.25.2.orig/drivers/usb/gadget/ether.c    2008-05-09 21:52:43.000000000 +0100
-+++ linux-2.6.25.2/drivers/usb/gadget/ether.c    2008-05-09 21:52:46.000000000 +0100
+--- linux-2.6.25.2.orig/drivers/usb/gadget/ether.c    2008-05-07 00:21:32.000000000 +0100
++++ linux-2.6.25.2/drivers/usb/gadget/ether.c    2008-05-26 10:41:17.000000000 +0100
@@ -236,7 +236,7 @@
#endif

@@ -54,10 +54,24 @@
#endif

#ifdef CONFIG_USB_GADGET_S3C2410
+@@ -2303,6 +2303,13 @@
+
+     gcnum = usb_gadget_controller_number (gadget);
+     if (gcnum >= 0)
++#ifdef CONFIG_USB_GADGET_PXA27X
++        // this needs to be faked to be a pxa gadget (#3) so a
++        // linux host cdc_subset driver will bind correctly
++        if (gadget_is_pxa27x (gadget))
++            device_desc.bcdDevice = cpu_to_le16 (0x0200 + 3);
++        else
++#endif
+         device_desc.bcdDevice = cpu_to_le16 (0x0200 + gcnum);
+     else {
+         /* can't assume CDC works. don't want to default to
Index: linux-2.6.25.2/drivers/usb/gadget/pxa27x_udc.c
===================================================================
--- /dev/null    1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.25.2/drivers/usb/gadget/pxa27x_udc.c    2008-05-09 21:52:46.000000000 +0100
++++ linux-2.6.25.2/drivers/usb/gadget/pxa27x_udc.c    2008-05-15 10:36:12.000000000 +0100
@@ -0,0 +1,2397 @@
+/*
+ * Handles the Intel 27x USB Device Controller (UDC)
@@ -2459,8 +2473,8 @@
Index: linux-2.6.25.2/drivers/usb/gadget/pxa27x_udc.h
===================================================================
--- /dev/null    1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.25.2/drivers/usb/gadget/pxa27x_udc.h    2008-05-09 21:52:46.000000000 +0100
-@@ -0,0 +1,478 @@
++++ linux-2.6.25.2/drivers/usb/gadget/pxa27x_udc.h    2008-05-26 10:53:52.000000000 +0100
+@@ -0,0 +1,479 @@
+/*
+ * linux/drivers/usb/gadget/pxa27x_udc.h
+ * Intel PXA27x on-chip full speed USB device controller
@@ -2861,7 +2875,8 @@
+#define EP0_FIFO_SIZE    16U
+#define BULK_FIFO_SIZE    64U
+#define ISO_FIFO_SIZE    256U
-+#define INT_FIFO_SIZE    8U
++// 16 bytes needed for RNDIS #define INT_FIFO_SIZE    8U
++#define INT_FIFO_SIZE    16U
+
+struct udc_stats {
+    unsigned long    irqs_reset;