linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Green <andy@warmcat.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Nicolas Pitre <nicolas.pitre@linaro.org>,
	Jaswinder Singh <jaswinder.singh@linaro.org>,
	Linux USB list <linux-usb@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	broonie@opensource.wolfsonmicro.com, roger.quadros@nokia.com,
	greg@kroah.com, grant.likely@secretlab.ca
Subject: Re: RFC: Platform data for onboard USB assets
Date: Wed, 23 Mar 2011 11:13:47 +0000	[thread overview]
Message-ID: <4D89D5EB.50803@linaro.org> (raw)
In-Reply-To: <20110323105607.50697c65@lxorguk.ukuu.org.uk>

On 03/23/2011 10:56 AM, Somebody in the thread at some point said:
>>> rules for the default device name that usbnet assigns. Simply letting
>>> a device driver flag "this is always an external ethernet, not
>>> a point-to-point connection" would be enough to solve this problem,
>>> and take some of the heat out of the discussion for how to solve
>>> the MAC address assignment.
>>
>> Completely agree, I have a happy feeling being able to say that too.
>> But I already see there's no path through Greg let alone Alan, so it'll
>> have to be dealt with a less good way.
>
> Having a USB net driver flag the fact it knows from its vid/did that it
> is probably P2P rather than net (or vice versa) isn't something I see a
> problem with, it's probably quite helpful for various network
> autoconfigurator guesses. What we don't want however is the kernel
> deciding the naming scheme should change. Name tweaks are really policy,
> knowing if an interface vid/did say its P2P or net is merely information
> that can guide a policy in user space.
>
> Now if your user space uses that flag to issue ifrenames fine, that's
> your choice. It's probably sufficient just to set IFF_POINTOPOINT
> appropriately on the net interface flags to make all that work ?

The problem is "[my] user space" in this case is generic Ubuntu 
basically.  It'd be a new thing to that, that it had to understand it 
woke up on specifically a Panda and do Panda quirks like clear 
IFF_POINTTOPOINT on a magic interface.  From a userland perspective, I 
would fairly I think term it "stinking it up" with board-specific 
quirks, so far generic distro userlands are AFAIK able to avoid that 
whole class of hack.  I mean there's nothing in Fedora that snoops 
/proc/cpuinfo to see what it is running on and then do some special 
scripts at init AFAIK, that is in fact what you are suggesting unless I 
badly misunderstand you.

The issue is Panda has smsc95xx USB <-> Ethernet bridge chip soldered on 
the board wired up to a fixed USB Host port.  This is indistinguishable 
from an smsc95xx you can buy in a pluggable USB / Ethernet dongle, and 
since there's no MAC address EEPROM on the board it could use, to the 
point they can report the same vid:pid; but you'd expect the dongle to 
come as usb%d as udev would already have it perfectly correctly.  So 
vid:pid alone is not a basis for distinguishing what to do here.

That is why I characterize the issue as being one of board-specific 
physical knowledge that should live in the kernel's board definition 
file (Arnd would characterize it similarly but involving Device Tree, 
but the same basic deal).  The board definition file knows, not that all 
device of that vid:pid should choose eth%d not usb%d which is not its 
business to know, but that the usb device on the specific wired-up USB 
port to the RJ45 soldered on the board should be guided a particular way 
when the interface name is registered.  That can only be done properly 
in-kernel by passing in a flag to usbnet specific to the device instance 
to guide its choice.

-Andy

  reply	other threads:[~2011-03-23 11:13 UTC|newest]

Thread overview: 156+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-11  9:50 RFC: Platform data for onboard USB assets Andy Green
2011-03-11 12:31 ` Arnd Bergmann
2011-03-11 12:44   ` Andy Green
2011-03-11 14:42     ` Roger Quadros
2011-03-11 15:12       ` Roger Quadros
2011-03-11 15:22       ` Arnd Bergmann
2011-03-11 15:50         ` Roger Quadros
2011-03-11 15:55           ` Arnd Bergmann
2011-03-11 15:29   ` Mark Brown
2011-03-11 15:54     ` Arnd Bergmann
2011-03-11 16:03       ` Mark Brown
2011-03-11 16:14         ` Greg KH
2011-03-11 16:27           ` Mark Brown
2011-03-11 16:35             ` Greg KH
2011-03-11 16:48               ` Mark Brown
2011-03-11 16:56                 ` Greg KH
2011-03-11 17:08                   ` Mark Brown
2011-03-11 17:23                     ` Greg KH
2011-03-11 17:41                       ` Mark Brown
2011-03-17  2:14                       ` Nicolas Pitre
2011-03-17 20:13                         ` Greg KH
2011-03-17 20:18                           ` Mark Brown
2011-03-17 20:26                             ` Greg KH
2011-03-17 21:24                               ` Mark Brown
2011-03-17 21:31                                 ` Greg KH
2011-03-17 21:40                                   ` Mark Brown
2011-03-17 21:47                                     ` Greg KH
2011-03-17 22:33                                       ` Arnd Bergmann
2011-03-17 22:53                                         ` Greg KH
2011-03-17 23:18                                           ` Andy Green
2011-03-17 23:25                                             ` Greg KH
2011-03-18  7:42                                               ` Andy Green
2011-03-18 22:54                                                 ` Benjamin Herrenschmidt
2011-03-18 22:57                                                   ` Andy Green
2011-03-18  4:54                                             ` Grant Likely
2011-03-18  8:19                                               ` Arnd Bergmann
2011-03-17 23:22                                         ` Andy Green
2011-03-18 15:00                                           ` Arnd Bergmann
2011-03-18 15:15                                             ` Mark Brown
2011-03-18 17:52                                             ` Andy Green
2011-03-18 18:20                                               ` David Anders
2011-03-18 18:25                                                 ` Mark Brown
2011-03-18 20:02                                                   ` Andy Green
2011-03-18 21:11                                                     ` Arnd Bergmann
2011-03-18 21:17                                                       ` Andy Green
2011-03-18 20:06                                               ` Arnd Bergmann
2011-03-18 21:33                                                 ` Andy Green
2011-03-18 23:25                                                   ` Mark Brown
2011-03-18 23:33                                                     ` Andy Green
2011-03-18 21:36                                                 ` Grant Likely
2011-03-18 22:47                                                 ` Benjamin Herrenschmidt
2011-03-18 21:28                                               ` Grant Likely
2011-03-18 23:04                                                 ` Andy Green
2011-03-18 22:37                                           ` Benjamin Herrenschmidt
2011-03-18 22:39                                             ` Andy Green
2011-03-17 23:27                                         ` Grant Likely
2011-03-18  7:49                                           ` Andy Green
2011-03-18  8:25                                             ` Arnd Bergmann
2011-03-18  8:38                                               ` Andy Green
2011-03-17 22:11                               ` Arnd Bergmann
2011-03-17 22:20                                 ` Greg KH
2011-03-18  8:42                                 ` Roger Quadros
2011-03-18  9:01                                   ` Arnd Bergmann
2011-03-18  9:55                                     ` Roger Quadros
2011-03-18 10:09                                       ` Andy Green
2011-03-17 21:03                           ` Nicolas Pitre
2011-03-17 21:32                             ` Greg KH
2011-03-11 16:26         ` Andy Green
2011-03-11 16:45           ` Alan Stern
2011-03-11 16:51             ` Andy Green
2011-03-11 17:08               ` Greg KH
2011-03-11 18:09                 ` Andy Green
2011-03-11 19:12                   ` Alan Stern
2011-03-11 20:05                     ` Andy Green
2011-03-11 20:21                       ` Greg KH
2011-03-11 21:07                         ` Andy Green
2011-03-11 21:44                           ` Greg KH
2011-03-11 22:24                             ` Andy Green
2011-03-12 16:00                             ` Alan Stern
2011-03-12 23:02                               ` Andy Green
2011-03-11 19:37                   ` Greg KH
2011-03-11 16:53             ` Mark Brown
2011-03-11 16:08 ` Greg KH
2011-03-11 16:20   ` Andy Green
2011-03-11 16:36     ` Greg KH
2011-03-11 16:41       ` Andy Green
2011-03-11 22:07         ` Benjamin Herrenschmidt
2011-03-11 21:52 ` Benjamin Herrenschmidt
2011-03-11 22:45 ` Grant Likely
2011-03-11 22:47   ` Andy Green
2011-03-11 23:39     ` Grant Likely
2011-03-14 14:54   ` Arnd Bergmann
2011-03-22 15:05 ` Jaswinder Singh
2011-03-22 16:04   ` Andy Green
2011-03-22 18:19     ` Jaswinder Singh
2011-03-22 18:37       ` Andy Green
2011-03-22 18:59         ` Jaswinder Singh
2011-03-22 19:35           ` Andy Green
     [not found] ` <AANLkTim=ezye=1fQP_1a2SWbPnbENP9B+k27Z3AkS=zf@mail.gmail.com>
2011-03-22 15:12   ` Mark Brown
2011-03-22 15:23     ` Jaswinder Singh
2011-03-24 18:56     ` Grant Likely
2011-03-22 21:08   ` Benjamin Herrenschmidt
2011-03-22 22:37     ` Andy Green
2011-03-23  1:03       ` Benjamin Herrenschmidt
2011-03-23  2:26         ` Nicolas Pitre
2011-03-23  3:23           ` Benjamin Herrenschmidt
2011-03-23  4:21             ` Nicolas Pitre
2011-03-23  4:56               ` Greg KH
2011-03-23  5:44               ` Benjamin Herrenschmidt
2011-03-23  9:38               ` Alan Cox
2011-03-23 10:53                 ` Mark Brown
2011-03-23 15:04                   ` Greg KH
2011-03-23 15:10                     ` Mark Brown
2011-03-23 15:24                     ` Andy Green
2011-03-23 15:45                       ` Arnd Bergmann
2011-03-23 15:38                     ` Nicolas Pitre
2011-03-23  9:31             ` Andy Green
2011-03-23  9:47               ` Alan Cox
2011-03-23 10:06                 ` Andy Green
2011-03-23 10:32                   ` Arnd Bergmann
2011-03-23 10:39                     ` Andy Green
2011-03-23 10:56                       ` Alan Cox
2011-03-23 11:13                         ` Andy Green [this message]
2011-03-23 11:34                           ` Alan Cox
2011-03-23 12:02                             ` Andy Green
2011-03-23 15:08                     ` Greg KH
2011-03-23 16:12                       ` Arnd Bergmann
2011-03-23 16:22                         ` Greg KH
2011-03-23 16:34                           ` Andy Green
2011-03-23 16:56                           ` [RFC] usbnet: use eth%d name for known ethernet devices Arnd Bergmann
2011-03-23 17:04                             ` Andy Green
2011-03-23 17:11                               ` Arnd Bergmann
2011-03-24 10:45                                 ` Andy Green
2011-03-23 17:13                             ` Arnd Bergmann
2011-03-23 17:54                               ` David Anders
2011-03-23 18:46                             ` Greg KH
2011-03-23 19:35                               ` Arnd Bergmann
     [not found]                                 ` <AANLkTim7hPfTv3gDYnh+jGxHBg0OvX=r1FKYoHnH7H_o@mail.gmail.com>
2011-03-23 19:57                                   ` Arnd Bergmann
2011-03-23 19:59                                     ` Randy Dunlap
2011-03-23 23:17                                       ` Michal Nazarewicz
2011-03-23 23:19                                         ` Randy Dunlap
2011-03-23 23:38                                         ` Steve Calfee
2011-03-24  0:01                                           ` Ben Hutchings
2011-03-24 13:13                                             ` Arnd Bergmann
2011-03-24 13:15                                               ` Arnd Bergmann
2011-03-24 13:44                                                 ` Andy Green
2011-03-24 13:56                                                 ` Alan Stern
2011-03-24 17:20                                                 ` Alexey Orishko
2011-03-25 11:57                                                   ` Arnd Bergmann
2011-03-25 16:26                                                     ` Alexey Orishko
2011-03-25 16:43                                                       ` Arnd Bergmann
2011-03-24 19:17                   ` RFC: Platform data for onboard USB assets Grant Likely
2011-03-24 20:10                     ` Andy Green
2011-03-23 14:55                 ` Nicolas Pitre
2011-03-23 10:22               ` Benjamin Herrenschmidt
2011-03-23 15:11                 ` Nicolas Pitre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D89D5EB.50803@linaro.org \
    --to=andy@warmcat.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andy.green@linaro.org \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=grant.likely@secretlab.ca \
    --cc=greg@kroah.com \
    --cc=jaswinder.singh@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nicolas.pitre@linaro.org \
    --cc=roger.quadros@nokia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).