Re: [RFC] usbnet: use eth%d name for known ethernet devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/23/2011 04:56 PM, Somebody in the thread at some point said:

The approach taken here is to flag whether a device might be a
point-to-point link with the new FLAG_PTP setting in the usbnet
driver_info. A driver can set both FLAG_PTP 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.

diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index bc86f4b..c98d3a7 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -1231,7 +1231,7 @@ static const struct driver_info smsc95xx_info = {

-	.flags		= FLAG_ETHER | FLAG_SEND_ZLP,
+	.flags		= FLAG_ETHER | FLAG_SEND_ZLP | FLAG_REALLY_ETHER,

  		if ((dev->driver_info->flags&  FLAG_ETHER) != 0&&
+		    ((dev->driver_info->flags&  FLAG_PTP) == 0 ||
+		     (net->dev_addr [0]&  0x02) == 0))
  			strcpy (net->name, "eth%d");

So it just takes the approach that all smsc95xx are going to be eth%d? Sounds good to me.

-Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux