Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932652Ab1CWSrI (ORCPT ); Wed, 23 Mar 2011 14:47:08 -0400 Received: from kroah.org ([198.145.64.141]:35353 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932284Ab1CWSrF (ORCPT ); Wed, 23 Mar 2011 14:47:05 -0400 Date: Wed, 23 Mar 2011 11:46:50 -0700 From: Greg KH To: Arnd Bergmann Cc: andy.green@linaro.org, Alan Cox , Benjamin Herrenschmidt , Nicolas Pitre , Jaswinder Singh , Linux USB list , lkml , broonie@opensource.wolfsonmicro.com, roger.quadros@nokia.com, grant.likely@secretlab.ca, netdev@vger.kernel.org, David Brownell Subject: Re: [RFC] usbnet: use eth%d name for known ethernet devices Message-ID: <20110323184650.GB21728@kroah.com> References: <4D79F068.2080009@linaro.org> <201103231712.06184.arnd@arndb.de> <20110323162251.GA9367@kroah.com> <201103231756.39849.arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201103231756.39849.arnd@arndb.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2196 Lines: 55 On Wed, Mar 23, 2011 at 05:56:39PM +0100, Arnd Bergmann wrote: > 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_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. > > Signed-off-by: Arnd Bergmann > Cc: Andy Green Looks good to me, but some questions: > drivers/usb/serial/usb_wwan.c | 2 +- You don't modify this file in the diff, what caused this to show up in the diffstat? > --- a/include/linux/usb/usbnet.h > +++ b/include/linux/usb/usbnet.h > @@ -97,6 +97,8 @@ struct driver_info { > > #define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */ > > +#define FLAG_PTP 0x1000 /* maybe use "usb%d" names */ "PTP"? What does that stand for? curious, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/