diff options
-rw-r--r-- | drivers/net/usb/asix.c | 12 | ||||
-rw-r--r-- | drivers/net/usb/cdc_ether.c | 2 | ||||
-rw-r--r-- | drivers/net/usb/dm9601.c | 2 | ||||
-rw-r--r-- | drivers/net/usb/usbnet.c | 4 | ||||
-rw-r--r-- | include/linux/usb/usbnet.h | 1 |
5 files changed, 12 insertions, 9 deletions
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c index 6ce7f775bb74..1bef39a60a62 100644 --- a/drivers/net/usb/asix.c +++ b/drivers/net/usb/asix.c | |||
@@ -1327,7 +1327,7 @@ static const struct driver_info ax8817x_info = { | |||
1327 | .status = asix_status, | 1327 | .status = asix_status, |
1328 | .link_reset = ax88172_link_reset, | 1328 | .link_reset = ax88172_link_reset, |
1329 | .reset = ax88172_link_reset, | 1329 | .reset = ax88172_link_reset, |
1330 | .flags = FLAG_ETHER, | 1330 | .flags = FLAG_ETHER | FLAG_LINK_INTR, |
1331 | .data = 0x00130103, | 1331 | .data = 0x00130103, |
1332 | }; | 1332 | }; |
1333 | 1333 | ||
@@ -1337,7 +1337,7 @@ static const struct driver_info dlink_dub_e100_info = { | |||
1337 | .status = asix_status, | 1337 | .status = asix_status, |
1338 | .link_reset = ax88172_link_reset, | 1338 | .link_reset = ax88172_link_reset, |
1339 | .reset = ax88172_link_reset, | 1339 | .reset = ax88172_link_reset, |
1340 | .flags = FLAG_ETHER, | 1340 | .flags = FLAG_ETHER | FLAG_LINK_INTR, |
1341 | .data = 0x009f9d9f, | 1341 | .data = 0x009f9d9f, |
1342 | }; | 1342 | }; |
1343 | 1343 | ||
@@ -1347,7 +1347,7 @@ static const struct driver_info netgear_fa120_info = { | |||
1347 | .status = asix_status, | 1347 | .status = asix_status, |
1348 | .link_reset = ax88172_link_reset, | 1348 | .link_reset = ax88172_link_reset, |
1349 | .reset = ax88172_link_reset, | 1349 | .reset = ax88172_link_reset, |
1350 | .flags = FLAG_ETHER, | 1350 | .flags = FLAG_ETHER | FLAG_LINK_INTR, |
1351 | .data = 0x00130103, | 1351 | .data = 0x00130103, |
1352 | }; | 1352 | }; |
1353 | 1353 | ||
@@ -1357,7 +1357,7 @@ static const struct driver_info hawking_uf200_info = { | |||
1357 | .status = asix_status, | 1357 | .status = asix_status, |
1358 | .link_reset = ax88172_link_reset, | 1358 | .link_reset = ax88172_link_reset, |
1359 | .reset = ax88172_link_reset, | 1359 | .reset = ax88172_link_reset, |
1360 | .flags = FLAG_ETHER, | 1360 | .flags = FLAG_ETHER | FLAG_LINK_INTR, |
1361 | .data = 0x001f1d1f, | 1361 | .data = 0x001f1d1f, |
1362 | }; | 1362 | }; |
1363 | 1363 | ||
@@ -1367,7 +1367,7 @@ static const struct driver_info ax88772_info = { | |||
1367 | .status = asix_status, | 1367 | .status = asix_status, |
1368 | .link_reset = ax88772_link_reset, | 1368 | .link_reset = ax88772_link_reset, |
1369 | .reset = ax88772_link_reset, | 1369 | .reset = ax88772_link_reset, |
1370 | .flags = FLAG_ETHER | FLAG_FRAMING_AX, | 1370 | .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR, |
1371 | .rx_fixup = asix_rx_fixup, | 1371 | .rx_fixup = asix_rx_fixup, |
1372 | .tx_fixup = asix_tx_fixup, | 1372 | .tx_fixup = asix_tx_fixup, |
1373 | }; | 1373 | }; |
@@ -1378,7 +1378,7 @@ static const struct driver_info ax88178_info = { | |||
1378 | .status = asix_status, | 1378 | .status = asix_status, |
1379 | .link_reset = ax88178_link_reset, | 1379 | .link_reset = ax88178_link_reset, |
1380 | .reset = ax88178_link_reset, | 1380 | .reset = ax88178_link_reset, |
1381 | .flags = FLAG_ETHER | FLAG_FRAMING_AX, | 1381 | .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR, |
1382 | .rx_fixup = asix_rx_fixup, | 1382 | .rx_fixup = asix_rx_fixup, |
1383 | .tx_fixup = asix_tx_fixup, | 1383 | .tx_fixup = asix_tx_fixup, |
1384 | }; | 1384 | }; |
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 71d7ff3de99f..7ec24c9b2535 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c | |||
@@ -413,7 +413,7 @@ static int cdc_bind(struct usbnet *dev, struct usb_interface *intf) | |||
413 | 413 | ||
414 | static const struct driver_info cdc_info = { | 414 | static const struct driver_info cdc_info = { |
415 | .description = "CDC Ethernet Device", | 415 | .description = "CDC Ethernet Device", |
416 | .flags = FLAG_ETHER, | 416 | .flags = FLAG_ETHER | FLAG_LINK_INTR, |
417 | // .check_connect = cdc_check_connect, | 417 | // .check_connect = cdc_check_connect, |
418 | .bind = cdc_bind, | 418 | .bind = cdc_bind, |
419 | .unbind = usbnet_cdc_unbind, | 419 | .unbind = usbnet_cdc_unbind, |
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index a2b30a10064f..3d406f9b2f29 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c | |||
@@ -611,7 +611,7 @@ static int dm9601_link_reset(struct usbnet *dev) | |||
611 | 611 | ||
612 | static const struct driver_info dm9601_info = { | 612 | static const struct driver_info dm9601_info = { |
613 | .description = "Davicom DM9601 USB Ethernet", | 613 | .description = "Davicom DM9601 USB Ethernet", |
614 | .flags = FLAG_ETHER, | 614 | .flags = FLAG_ETHER | FLAG_LINK_INTR, |
615 | .bind = dm9601_bind, | 615 | .bind = dm9601_bind, |
616 | .rx_fixup = dm9601_rx_fixup, | 616 | .rx_fixup = dm9601_rx_fixup, |
617 | .tx_fixup = dm9601_tx_fixup, | 617 | .tx_fixup = dm9601_tx_fixup, |
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 378da8c938fe..04f3f289e87c 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -1352,9 +1352,11 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) | |||
1352 | // ok, it's ready to go. | 1352 | // ok, it's ready to go. |
1353 | usb_set_intfdata (udev, dev); | 1353 | usb_set_intfdata (udev, dev); |
1354 | 1354 | ||
1355 | // start as if the link is up | ||
1356 | netif_device_attach (net); | 1355 | netif_device_attach (net); |
1357 | 1356 | ||
1357 | if (dev->driver_info->flags & FLAG_LINK_INTR) | ||
1358 | netif_carrier_off(net); | ||
1359 | |||
1358 | return 0; | 1360 | return 0; |
1359 | 1361 | ||
1360 | out3: | 1362 | out3: |
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 86c31b753266..8c84881f8478 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -92,6 +92,7 @@ struct driver_info { | |||
92 | #define FLAG_SEND_ZLP 0x0200 /* hw requires ZLPs are sent */ | 92 | #define FLAG_SEND_ZLP 0x0200 /* hw requires ZLPs are sent */ |
93 | #define FLAG_WWAN 0x0400 /* use "wwan%d" names */ | 93 | #define FLAG_WWAN 0x0400 /* use "wwan%d" names */ |
94 | 94 | ||
95 | #define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */ | ||
95 | 96 | ||
96 | /* init device ... can sleep, or cause probe() failure */ | 97 | /* init device ... can sleep, or cause probe() failure */ |
97 | int (*bind)(struct usbnet *, struct usb_interface *); | 98 | int (*bind)(struct usbnet *, struct usb_interface *); |