SRU request for LP#192411

Colin Ian King colin.king at
Wed May 14 08:53:55 UTC 2008

SRU justification:


When a WM5 smartphone is plugged into its USB cradle, the establishment
of the RNDIS session to communicate with the phone fails because of a
driver bug negotiating an improper frame size with the device. The dccm
daemon would therefore not detect the phone and no dialog is possible.

The attached patch is relatively simple and been backported from

Testing: User has tested against my PPA patched kernel, plugging and
unplugging various other USB devices (printers/cameras/scanners...) with
no noticeable negative effects. All seems well and the WM device is
working. See:

Below: The patch

diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index 1ebe325..5448835 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -499,6 +499,14 @@ static int rndis_bind(struct usbnet *dev, struct
usb_interface *intf)
        net->hard_header_len += sizeof (struct rndis_data_hdr);
        dev->hard_mtu = net->mtu + net->hard_header_len;

+       dev->maxpacket = usb_maxpacket(dev->udev, dev->out, 1);
+       if (dev->maxpacket == 0) {
+               if (netif_msg_probe(dev))
+                       dev_dbg(&intf->dev, "dev->maxpacket can't be 0
+               retval = -EINVAL;
+               goto fail_and_release;
+       }
        dev->rx_urb_size = dev->hard_mtu + (dev->maxpacket + 1);
        dev->rx_urb_size &= ~(dev->maxpacket - 1);
        u.init->max_transfer_size = cpu_to_le32(dev->rx_urb_size);

More information about the kernel-team mailing list