FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 05-14-2008, 08:53 AM
Colin Ian King
 
Default SRU request for LP#192411

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=10d0f27c1baa4a094b4965708a15f2b 0c4d65f5e

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

");
+ 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);



--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 05-16-2008, 06:44 AM
Tim Gardner
 
Default SRU request for LP#192411

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=10d0f27c1baa4a094b4965708a15f2b 0c4d65f5e
>
> 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
>
");
> + 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@ubuntu.com

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 03:45 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org