SRU request for LP#192411
Tim Gardner
tcanonical at tpi.com
Fri May 16 06:44:18 UTC 2008
Colin Ian King wrote:
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/192411
>
> SRU justification:
>
> Impact
>
> 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
> upstream:
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=10d0f27c1baa4a094b4965708a15f2b0c4d65f5e
>
> 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:
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/192411/comments/18
>
> 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
> \n");
> + 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);
>
>
>
ACK
--
Tim Gardner tim.gardner at ubuntu.com
More information about the kernel-team
mailing list