[kernel] r15524 - in dists/sid/linux-2.6/debian: . patches/bugfix/all patches/series
Ben Hutchings
benh at alioth.debian.org
Mon Apr 19 23:09:47 UTC 2010
Author: benh
Date: Mon Apr 19 23:09:43 2010
New Revision: 15524
Log:
rndis_host: Poll status channel before control channel (Closes: #576929)
Added:
dists/sid/linux-2.6/debian/patches/bugfix/all/rndis_host-Poll-status-channel-before-control-channel.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/12
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Sun Apr 18 15:32:45 2010 (r15523)
+++ dists/sid/linux-2.6/debian/changelog Mon Apr 19 23:09:43 2010 (r15524)
@@ -21,6 +21,7 @@
(Closes: #577724)
* forcedeth: Fix hardware version check for TX bug workaround
(Closes: #572201)
+ * rndis_host: Poll status channel before control channel (Closes: #576929)
[ maximilian attems]
* Ignore ABI breakage due to libata switch.
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/rndis_host-Poll-status-channel-before-control-channel.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/rndis_host-Poll-status-channel-before-control-channel.patch Mon Apr 19 23:09:43 2010 (r15524)
@@ -0,0 +1,62 @@
+From 1c941691a933e9c2d0314c9b84ea77b6ef2807e1 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Fri, 9 Apr 2010 01:55:27 +0100
+Subject: [PATCH] rndis_host: Poll status channel before control channel
+
+Some RNDIS devices don't respond on the control channel until polled
+on the status channel. In particular, this was reported to be the
+case for the 2Wire HomePortal 1000SW.
+
+This is roughly based on a patch by John Carr <john.carr at unrouted.co.uk>
+which is reported to be needed for use with some Windows Mobile devices
+and which is currently applied by Mandriva.
+
+Reported-by: Mark Glassberg <vzeeaxwl at myfairpoint.net>
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+Tested-by: Mark Glassberg <vzeeaxwl at myfairpoint.net>
+---
+ drivers/net/usb/rndis_host.c | 18 ++++++++++++------
+ 1 files changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
+index f56dec6..52faca1 100644
+--- a/drivers/net/usb/rndis_host.c
++++ b/drivers/net/usb/rndis_host.c
+@@ -103,8 +103,10 @@ static void rndis_msg_indicate(struct usbnet *dev, struct rndis_indicate *msg,
+ int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen)
+ {
+ struct cdc_state *info = (void *) &dev->data;
++ struct usb_cdc_notification notification;
+ int master_ifnum;
+ int retval;
++ int partial;
+ unsigned count;
+ __le32 rsp;
+ u32 xid = 0, msg_len, request_id;
+@@ -132,13 +134,17 @@ int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen)
+ if (unlikely(retval < 0 || xid == 0))
+ return retval;
+
+- // FIXME Seems like some devices discard responses when
+- // we time out and cancel our "get response" requests...
+- // so, this is fragile. Probably need to poll for status.
++ /* Some devices don't respond on the control channel until
++ * polled on the status channel, so do that first. */
++ retval = usb_interrupt_msg(
++ dev->udev,
++ usb_rcvintpipe(dev->udev, dev->status->desc.bEndpointAddress),
++ ¬ification, sizeof(notification), &partial,
++ RNDIS_CONTROL_TIMEOUT_MS);
++ if (unlikely(retval < 0))
++ return retval;
+
+- /* ignore status endpoint, just poll the control channel;
+- * the request probably completed immediately
+- */
++ /* Poll the control channel; the request probably completed immediately */
+ rsp = buf->msg_type | RNDIS_MSG_COMPLETION;
+ for (count = 0; count < 10; count++) {
+ memset(buf, 0, CONTROL_BUFFER_SIZE);
+--
+1.7.0.3
+
Modified: dists/sid/linux-2.6/debian/patches/series/12
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/12 Sun Apr 18 15:32:45 2010 (r15523)
+++ dists/sid/linux-2.6/debian/patches/series/12 Mon Apr 19 23:09:43 2010 (r15524)
@@ -11,3 +11,4 @@
+ bugfix/all/libata-ata_piix-clear-spurious-IRQ.patch
+ bugfix/all/block-blk_abort_request-lock-fix.patch
+ bugfix/mips/enable-pata-platform.patch
++ bugfix/all/rndis_host-Poll-status-channel-before-control-channel.patch
More information about the Kernel-svn-changes
mailing list