aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/net')
-rw-r--r--drivers/usb/net/asix.c4
-rw-r--r--drivers/usb/net/cdc_ether.c14
-rw-r--r--drivers/usb/net/pegasus.c29
-rw-r--r--drivers/usb/net/rndis_host.c2
-rw-r--r--drivers/usb/net/zaurus.c19
5 files changed, 56 insertions, 12 deletions
diff --git a/drivers/usb/net/asix.c b/drivers/usb/net/asix.c
index 12b599a0b539..37111acec875 100644
--- a/drivers/usb/net/asix.c
+++ b/drivers/usb/net/asix.c
@@ -912,6 +912,10 @@ static const struct usb_device_id products [] = {
912 USB_DEVICE (0x0b95, 0x7720), 912 USB_DEVICE (0x0b95, 0x7720),
913 .driver_info = (unsigned long) &ax88772_info, 913 .driver_info = (unsigned long) &ax88772_info,
914}, { 914}, {
915 // ASIX AX88178 10/100/1000
916 USB_DEVICE (0x0b95, 0x1780),
917 .driver_info = (unsigned long) &ax88772_info,
918}, {
915 // Linksys USB200M Rev 2 919 // Linksys USB200M Rev 2
916 USB_DEVICE (0x13b1, 0x0018), 920 USB_DEVICE (0x13b1, 0x0018),
917 .driver_info = (unsigned long) &ax88772_info, 921 .driver_info = (unsigned long) &ax88772_info,
diff --git a/drivers/usb/net/cdc_ether.c b/drivers/usb/net/cdc_ether.c
index 63f1f3ba8e0b..efd195b5912c 100644
--- a/drivers/usb/net/cdc_ether.c
+++ b/drivers/usb/net/cdc_ether.c
@@ -31,7 +31,7 @@
31#include <linux/workqueue.h> 31#include <linux/workqueue.h>
32#include <linux/mii.h> 32#include <linux/mii.h>
33#include <linux/usb.h> 33#include <linux/usb.h>
34#include <linux/usb_cdc.h> 34#include <linux/usb/cdc.h>
35 35
36#include "usbnet.h" 36#include "usbnet.h"
37 37
@@ -455,6 +455,18 @@ static const struct usb_device_id products [] = {
455 .driver_info = 0, 455 .driver_info = 0,
456}, 456},
457 457
458/* Olympus has some models with a Zaurus-compatible option.
459 * R-1000 uses a FreeScale i.MXL cpu (ARMv4T)
460 */
461{
462 .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
463 | USB_DEVICE_ID_MATCH_DEVICE,
464 .idVendor = 0x07B4,
465 .idProduct = 0x0F02, /* R-1000 */
466 ZAURUS_MASTER_INTERFACE,
467 .driver_info = 0,
468},
469
458/* 470/*
459 * WHITELIST!!! 471 * WHITELIST!!!
460 * 472 *
diff --git a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c
index 7683926a1b6f..ab21f960d255 100644
--- a/drivers/usb/net/pegasus.c
+++ b/drivers/usb/net/pegasus.c
@@ -163,6 +163,8 @@ static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
163 163
164 /* using ATOMIC, we'd never wake up if we slept */ 164 /* using ATOMIC, we'd never wake up if we slept */
165 if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { 165 if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) {
166 if (ret == -ENODEV)
167 netif_device_detach(pegasus->net);
166 if (netif_msg_drv(pegasus)) 168 if (netif_msg_drv(pegasus))
167 dev_err(&pegasus->intf->dev, "%s, status %d\n", 169 dev_err(&pegasus->intf->dev, "%s, status %d\n",
168 __FUNCTION__, ret); 170 __FUNCTION__, ret);
@@ -217,6 +219,8 @@ static int set_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
217 set_current_state(TASK_UNINTERRUPTIBLE); 219 set_current_state(TASK_UNINTERRUPTIBLE);
218 220
219 if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { 221 if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) {
222 if (ret == -ENODEV)
223 netif_device_detach(pegasus->net);
220 if (netif_msg_drv(pegasus)) 224 if (netif_msg_drv(pegasus))
221 dev_err(&pegasus->intf->dev, "%s, status %d\n", 225 dev_err(&pegasus->intf->dev, "%s, status %d\n",
222 __FUNCTION__, ret); 226 __FUNCTION__, ret);
@@ -268,6 +272,8 @@ static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data)
268 set_current_state(TASK_UNINTERRUPTIBLE); 272 set_current_state(TASK_UNINTERRUPTIBLE);
269 273
270 if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { 274 if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) {
275 if (ret == -ENODEV)
276 netif_device_detach(pegasus->net);
271 if (netif_msg_drv(pegasus)) 277 if (netif_msg_drv(pegasus))
272 dev_err(&pegasus->intf->dev, "%s, status %d\n", 278 dev_err(&pegasus->intf->dev, "%s, status %d\n",
273 __FUNCTION__, ret); 279 __FUNCTION__, ret);
@@ -298,10 +304,13 @@ static int update_eth_regs_async(pegasus_t * pegasus)
298 (char *) &pegasus->dr, 304 (char *) &pegasus->dr,
299 pegasus->eth_regs, 3, ctrl_callback, pegasus); 305 pegasus->eth_regs, 3, ctrl_callback, pegasus);
300 306
301 if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) 307 if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) {
308 if (ret == -ENODEV)
309 netif_device_detach(pegasus->net);
302 if (netif_msg_drv(pegasus)) 310 if (netif_msg_drv(pegasus))
303 dev_err(&pegasus->intf->dev, "%s, status %d\n", 311 dev_err(&pegasus->intf->dev, "%s, status %d\n",
304 __FUNCTION__, ret); 312 __FUNCTION__, ret);
313 }
305 314
306 return ret; 315 return ret;
307} 316}
@@ -692,7 +701,10 @@ goon:
692 usb_rcvbulkpipe(pegasus->usb, 1), 701 usb_rcvbulkpipe(pegasus->usb, 1),
693 pegasus->rx_skb->data, PEGASUS_MTU + 8, 702 pegasus->rx_skb->data, PEGASUS_MTU + 8,
694 read_bulk_callback, pegasus); 703 read_bulk_callback, pegasus);
695 if (usb_submit_urb(pegasus->rx_urb, GFP_ATOMIC)) { 704 rx_status = usb_submit_urb(pegasus->rx_urb, GFP_ATOMIC);
705 if (rx_status == -ENODEV)
706 netif_device_detach(pegasus->net);
707 else if (rx_status) {
696 pegasus->flags |= PEGASUS_RX_URB_FAIL; 708 pegasus->flags |= PEGASUS_RX_URB_FAIL;
697 goto tl_sched; 709 goto tl_sched;
698 } else { 710 } else {
@@ -709,6 +721,7 @@ static void rx_fixup(unsigned long data)
709{ 721{
710 pegasus_t *pegasus; 722 pegasus_t *pegasus;
711 unsigned long flags; 723 unsigned long flags;
724 int status;
712 725
713 pegasus = (pegasus_t *) data; 726 pegasus = (pegasus_t *) data;
714 if (pegasus->flags & PEGASUS_UNPLUG) 727 if (pegasus->flags & PEGASUS_UNPLUG)
@@ -734,7 +747,10 @@ static void rx_fixup(unsigned long data)
734 pegasus->rx_skb->data, PEGASUS_MTU + 8, 747 pegasus->rx_skb->data, PEGASUS_MTU + 8,
735 read_bulk_callback, pegasus); 748 read_bulk_callback, pegasus);
736try_again: 749try_again:
737 if (usb_submit_urb(pegasus->rx_urb, GFP_ATOMIC)) { 750 status = usb_submit_urb(pegasus->rx_urb, GFP_ATOMIC);
751 if (status == -ENODEV)
752 netif_device_detach(pegasus->net);
753 else if (status) {
738 pegasus->flags |= PEGASUS_RX_URB_FAIL; 754 pegasus->flags |= PEGASUS_RX_URB_FAIL;
739 tasklet_schedule(&pegasus->rx_tl); 755 tasklet_schedule(&pegasus->rx_tl);
740 } else { 756 } else {
@@ -836,6 +852,8 @@ static void intr_callback(struct urb *urb, struct pt_regs *regs)
836 } 852 }
837 853
838 status = usb_submit_urb(urb, SLAB_ATOMIC); 854 status = usb_submit_urb(urb, SLAB_ATOMIC);
855 if (status == -ENODEV)
856 netif_device_detach(pegasus->net);
839 if (status && netif_msg_timer(pegasus)) 857 if (status && netif_msg_timer(pegasus))
840 printk(KERN_ERR "%s: can't resubmit interrupt urb, %d\n", 858 printk(KERN_ERR "%s: can't resubmit interrupt urb, %d\n",
841 net->name, status); 859 net->name, status);
@@ -874,6 +892,7 @@ static int pegasus_start_xmit(struct sk_buff *skb, struct net_device *net)
874 /* cleanup should already have been scheduled */ 892 /* cleanup should already have been scheduled */
875 break; 893 break;
876 case -ENODEV: /* disconnect() upcoming */ 894 case -ENODEV: /* disconnect() upcoming */
895 netif_device_detach(pegasus->net);
877 break; 896 break;
878 default: 897 default:
879 pegasus->stats.tx_errors++; 898 pegasus->stats.tx_errors++;
@@ -999,6 +1018,8 @@ static int pegasus_open(struct net_device *net)
999 pegasus->rx_skb->data, PEGASUS_MTU + 8, 1018 pegasus->rx_skb->data, PEGASUS_MTU + 8,
1000 read_bulk_callback, pegasus); 1019 read_bulk_callback, pegasus);
1001 if ((res = usb_submit_urb(pegasus->rx_urb, GFP_KERNEL))) { 1020 if ((res = usb_submit_urb(pegasus->rx_urb, GFP_KERNEL))) {
1021 if (res == -ENODEV)
1022 netif_device_detach(pegasus->net);
1002 if (netif_msg_ifup(pegasus)) 1023 if (netif_msg_ifup(pegasus))
1003 pr_debug("%s: failed rx_urb, %d", net->name, res); 1024 pr_debug("%s: failed rx_urb, %d", net->name, res);
1004 goto exit; 1025 goto exit;
@@ -1009,6 +1030,8 @@ static int pegasus_open(struct net_device *net)
1009 pegasus->intr_buff, sizeof (pegasus->intr_buff), 1030 pegasus->intr_buff, sizeof (pegasus->intr_buff),
1010 intr_callback, pegasus, pegasus->intr_interval); 1031 intr_callback, pegasus, pegasus->intr_interval);
1011 if ((res = usb_submit_urb(pegasus->intr_urb, GFP_KERNEL))) { 1032 if ((res = usb_submit_urb(pegasus->intr_urb, GFP_KERNEL))) {
1033 if (res == -ENODEV)
1034 netif_device_detach(pegasus->net);
1012 if (netif_msg_ifup(pegasus)) 1035 if (netif_msg_ifup(pegasus))
1013 pr_debug("%s: failed intr_urb, %d\n", net->name, res); 1036 pr_debug("%s: failed intr_urb, %d\n", net->name, res);
1014 usb_kill_urb(pegasus->rx_urb); 1037 usb_kill_urb(pegasus->rx_urb);
diff --git a/drivers/usb/net/rndis_host.c b/drivers/usb/net/rndis_host.c
index 94ddfe16fdda..f551546d7521 100644
--- a/drivers/usb/net/rndis_host.c
+++ b/drivers/usb/net/rndis_host.c
@@ -30,7 +30,7 @@
30#include <linux/workqueue.h> 30#include <linux/workqueue.h>
31#include <linux/mii.h> 31#include <linux/mii.h>
32#include <linux/usb.h> 32#include <linux/usb.h>
33#include <linux/usb_cdc.h> 33#include <linux/usb/cdc.h>
34 34
35#include "usbnet.h" 35#include "usbnet.h"
36 36
diff --git a/drivers/usb/net/zaurus.c b/drivers/usb/net/zaurus.c
index f7ac9d6b9856..813e470d0600 100644
--- a/drivers/usb/net/zaurus.c
+++ b/drivers/usb/net/zaurus.c
@@ -30,7 +30,7 @@
30#include <linux/mii.h> 30#include <linux/mii.h>
31#include <linux/crc32.h> 31#include <linux/crc32.h>
32#include <linux/usb.h> 32#include <linux/usb.h>
33#include <linux/usb_cdc.h> 33#include <linux/usb/cdc.h>
34 34
35#include "usbnet.h" 35#include "usbnet.h"
36 36
@@ -109,7 +109,7 @@ static const struct driver_info zaurus_sl5x00_info = {
109 .check_connect = always_connected, 109 .check_connect = always_connected,
110 .bind = zaurus_bind, 110 .bind = zaurus_bind,
111 .unbind = usbnet_cdc_unbind, 111 .unbind = usbnet_cdc_unbind,
112 .tx_fixup = zaurus_tx_fixup, 112 .tx_fixup = zaurus_tx_fixup,
113}; 113};
114#define ZAURUS_STRONGARM_INFO ((unsigned long)&zaurus_sl5x00_info) 114#define ZAURUS_STRONGARM_INFO ((unsigned long)&zaurus_sl5x00_info)
115 115
@@ -119,7 +119,7 @@ static const struct driver_info zaurus_pxa_info = {
119 .check_connect = always_connected, 119 .check_connect = always_connected,
120 .bind = zaurus_bind, 120 .bind = zaurus_bind,
121 .unbind = usbnet_cdc_unbind, 121 .unbind = usbnet_cdc_unbind,
122 .tx_fixup = zaurus_tx_fixup, 122 .tx_fixup = zaurus_tx_fixup,
123}; 123};
124#define ZAURUS_PXA_INFO ((unsigned long)&zaurus_pxa_info) 124#define ZAURUS_PXA_INFO ((unsigned long)&zaurus_pxa_info)
125 125
@@ -129,7 +129,7 @@ static const struct driver_info olympus_mxl_info = {
129 .check_connect = always_connected, 129 .check_connect = always_connected,
130 .bind = zaurus_bind, 130 .bind = zaurus_bind,
131 .unbind = usbnet_cdc_unbind, 131 .unbind = usbnet_cdc_unbind,
132 .tx_fixup = zaurus_tx_fixup, 132 .tx_fixup = zaurus_tx_fixup,
133}; 133};
134#define OLYMPUS_MXL_INFO ((unsigned long)&olympus_mxl_info) 134#define OLYMPUS_MXL_INFO ((unsigned long)&olympus_mxl_info)
135 135
@@ -228,6 +228,11 @@ bad_detail:
228 detail->bDetailData[2]); 228 detail->bDetailData[2]);
229 goto bad_desc; 229 goto bad_desc;
230 } 230 }
231
232 /* same extra framing as for non-BLAN mode */
233 dev->net->hard_header_len += 6;
234 dev->rx_urb_size = dev->net->hard_header_len
235 + dev->net->mtu;
231 break; 236 break;
232 } 237 }
233next_desc: 238next_desc:
@@ -258,7 +263,7 @@ static const struct driver_info bogus_mdlm_info = {
258 .description = "pseudo-MDLM (BLAN) device", 263 .description = "pseudo-MDLM (BLAN) device",
259 .flags = FLAG_FRAMING_Z, 264 .flags = FLAG_FRAMING_Z,
260 .check_connect = always_connected, 265 .check_connect = always_connected,
261 .tx_fixup = zaurus_tx_fixup, 266 .tx_fixup = zaurus_tx_fixup,
262 .bind = blan_mdlm_bind, 267 .bind = blan_mdlm_bind,
263}; 268};
264 269
@@ -367,13 +372,13 @@ static struct usb_driver zaurus_driver = {
367 372
368static int __init zaurus_init(void) 373static int __init zaurus_init(void)
369{ 374{
370 return usb_register(&zaurus_driver); 375 return usb_register(&zaurus_driver);
371} 376}
372module_init(zaurus_init); 377module_init(zaurus_init);
373 378
374static void __exit zaurus_exit(void) 379static void __exit zaurus_exit(void)
375{ 380{
376 usb_deregister(&zaurus_driver); 381 usb_deregister(&zaurus_driver);
377} 382}
378module_exit(zaurus_exit); 383module_exit(zaurus_exit);
379 384