summaryrefslogtreecommitdiff
path: root/drivers/net/usb/net1080.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd.bergmann@linaro.org>2011-04-02 07:12:02 +0400
committerDavid S. Miller <davem@davemloft.net>2011-04-02 07:12:02 +0400
commitc261344d3ce3edac781f9d3c7eabe2e96d8e8fe8 (patch)
treea0f71fa65dc9b6536a5e03e7621889d6ecf48f79 /drivers/net/usb/net1080.c
parent1591cb60838603c8cc2c540192c8244962436539 (diff)
downloadlinux-c261344d3ce3edac781f9d3c7eabe2e96d8e8fe8.tar.xz
usbnet: use eth%d name for known ethernet devices
The documentation for the USB ethernet devices suggests that only some devices are supposed to use usb0 as the network interface name instead of eth0. The logic used there, and documented in Kconfig for CDC is that eth0 will be used when the mac address is a globally assigned one, but usb0 is used for the locally managed range that is typically used on point-to-point links. Unfortunately, this has caused a lot of pain on the smsc95xx device that is used on the popular pandaboard without an EEPROM to store the MAC address, which causes the driver to call random_ether_address(). Obviously, there should be a proper MAC addressed assigned to the device, and discussions are ongoing about how to solve this, but this patch at least makes sure that the default interface naming gets a little saner and matches what the user can expect based on the documentation, including for new devices. The approach taken here is to flag whether a device might be a point-to-point link with the new FLAG_POINTTOPOINT setting in the usbnet driver_info. A driver can set both FLAG_POINTTOPOINT and FLAG_ETHER if it is not sure (e.g. cdc_ether), or just one of the two. The usbnet framework only looks at the MAC address for device naming if both flags are set, otherwise it trusts the flag. Signed-off-by: Arnd Bergmann <arnd.bergmann@linaro.org> Tested-by: Andy Green <andy.green@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/net1080.c')
-rw-r--r--drivers/net/usb/net1080.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/net1080.c b/drivers/net/usb/net1080.c
index ba72a7281cb0..01db4602a39e 100644
--- a/drivers/net/usb/net1080.c
+++ b/drivers/net/usb/net1080.c
@@ -560,7 +560,7 @@ static int net1080_bind(struct usbnet *dev, struct usb_interface *intf)
static const struct driver_info net1080_info = {
.description = "NetChip TurboCONNECT",
- .flags = FLAG_FRAMING_NC,
+ .flags = FLAG_POINTTOPOINT | FLAG_FRAMING_NC,
.bind = net1080_bind,
.reset = net1080_reset,
.check_connect = net1080_check_connect,