Commit f44f725f authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] USB: usbnet, zaurus mtu fixup

This includes an MTU fixup which could affect larger packets with newer
Zaurii, described as http://bugzilla.kernel.org/show_bug.cgi?id=6286;
plus minor whitespace cleanup.
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 86478944
...@@ -109,7 +109,7 @@ static const struct driver_info zaurus_sl5x00_info = { ...@@ -109,7 +109,7 @@ static const struct driver_info zaurus_sl5x00_info = {
.check_connect = always_connected, .check_connect = always_connected,
.bind = zaurus_bind, .bind = zaurus_bind,
.unbind = usbnet_cdc_unbind, .unbind = usbnet_cdc_unbind,
.tx_fixup = zaurus_tx_fixup, .tx_fixup = zaurus_tx_fixup,
}; };
#define ZAURUS_STRONGARM_INFO ((unsigned long)&zaurus_sl5x00_info) #define ZAURUS_STRONGARM_INFO ((unsigned long)&zaurus_sl5x00_info)
...@@ -119,7 +119,7 @@ static const struct driver_info zaurus_pxa_info = { ...@@ -119,7 +119,7 @@ static const struct driver_info zaurus_pxa_info = {
.check_connect = always_connected, .check_connect = always_connected,
.bind = zaurus_bind, .bind = zaurus_bind,
.unbind = usbnet_cdc_unbind, .unbind = usbnet_cdc_unbind,
.tx_fixup = zaurus_tx_fixup, .tx_fixup = zaurus_tx_fixup,
}; };
#define ZAURUS_PXA_INFO ((unsigned long)&zaurus_pxa_info) #define ZAURUS_PXA_INFO ((unsigned long)&zaurus_pxa_info)
...@@ -129,7 +129,7 @@ static const struct driver_info olympus_mxl_info = { ...@@ -129,7 +129,7 @@ static const struct driver_info olympus_mxl_info = {
.check_connect = always_connected, .check_connect = always_connected,
.bind = zaurus_bind, .bind = zaurus_bind,
.unbind = usbnet_cdc_unbind, .unbind = usbnet_cdc_unbind,
.tx_fixup = zaurus_tx_fixup, .tx_fixup = zaurus_tx_fixup,
}; };
#define OLYMPUS_MXL_INFO ((unsigned long)&olympus_mxl_info) #define OLYMPUS_MXL_INFO ((unsigned long)&olympus_mxl_info)
...@@ -228,6 +228,11 @@ static int blan_mdlm_bind(struct usbnet *dev, struct usb_interface *intf) ...@@ -228,6 +228,11 @@ static int blan_mdlm_bind(struct usbnet *dev, struct usb_interface *intf)
detail->bDetailData[2]); detail->bDetailData[2]);
goto bad_desc; goto bad_desc;
} }
/* same extra framing as for non-BLAN mode */
dev->net->hard_header_len += 6;
dev->rx_urb_size = dev->net->hard_header_len
+ dev->net->mtu;
break; break;
} }
next_desc: next_desc:
...@@ -258,7 +263,7 @@ static const struct driver_info bogus_mdlm_info = { ...@@ -258,7 +263,7 @@ static const struct driver_info bogus_mdlm_info = {
.description = "pseudo-MDLM (BLAN) device", .description = "pseudo-MDLM (BLAN) device",
.flags = FLAG_FRAMING_Z, .flags = FLAG_FRAMING_Z,
.check_connect = always_connected, .check_connect = always_connected,
.tx_fixup = zaurus_tx_fixup, .tx_fixup = zaurus_tx_fixup,
.bind = blan_mdlm_bind, .bind = blan_mdlm_bind,
}; };
...@@ -367,13 +372,13 @@ static struct usb_driver zaurus_driver = { ...@@ -367,13 +372,13 @@ static struct usb_driver zaurus_driver = {
static int __init zaurus_init(void) static int __init zaurus_init(void)
{ {
return usb_register(&zaurus_driver); return usb_register(&zaurus_driver);
} }
module_init(zaurus_init); module_init(zaurus_init);
static void __exit zaurus_exit(void) static void __exit zaurus_exit(void)
{ {
usb_deregister(&zaurus_driver); usb_deregister(&zaurus_driver);
} }
module_exit(zaurus_exit); module_exit(zaurus_exit);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment