public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Green <andy@warmcat.com>
To: Greg KH <greg@kroah.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	patches@linaro.org
Subject: Re: [RFC PATCH 3/4] PLATFORM: Introduce async platform_data attach api
Date: Mon, 14 Mar 2011 21:59:05 +0000	[thread overview]
Message-ID: <4D7E8FA9.6000203@linaro.org> (raw)
In-Reply-To: <20110314205432.GA1856@kroah.com>

On 03/14/2011 08:54 PM, Somebody in the thread at some point said:

>> The first issue for usbnet is right now, it has no real insight into
>> what the appropriate interface name is because it is out of its view
>> if the USB Ethernet bridge is soldered onboard or not.  You know, it
>> is also not in a generic userspace's view what is soldered on that
>> board either, so I can only read your pushing of that 'solution' as
>> "get this out of my hair".  The one place that can properly know it
>> right now is the board definition file in the kernel, maybe Device
>> Tree too in the future.
>
> It's not up to the driver to "know" this at all.

Right, it's a matter for the board definition file to know about the 
board.  Not sure how many times I wrote that on this thread, but 
evidently not enough.  It can then send specific functional 
configuration information to the subsystems on the board so they can 
adapt automatically to that environment without stinking up everything 
with private quirk information per-board in the drivers.  That is the 
idea of platform_data and it works really successfully.

It's pointless for you to talk about Device Tree when we'll allegedly 
have the capability to deliver functional configuration data to USB 
devices from board support files, but you claim it's forever evil to use 
it, so what's the point of discussing it?  I dunno why you're bothering 
and it's getting less interesting the more distorted your argumentation 
is becoming trying to hold the line against fixing the drivers.

>> To do it what you are calling the "correct" way in userland, you are
>> okay with the driver selecting the wrong interface name, condemning
>> userland to regenerate board-specific knowledge from grepping
>> /proc/cpuinfo, inferring in userland what can easily and justly be
>> known in the board definition file in kernel, and overriding the
>> wrong interface name.  In all that, Caesar's hands are clean
>> alright, but don't tell me this is a good job and the correct
>> solution.
>
> It really is.  How do you know that I don't want to name this device
> something else than you feel you should?  Do you really want to tell me
> to recompile my kernel just to change the name of the network device?

You know by default if it's going to do it, it ought to try to be 
correct if it's possible, it sounds strange how lassaiz-faire you are 
about these drivers doing the wrong thing.  As Alan pointed out that you 
should either do it well or not bother to do it and have all network 
devices called xxxN until your "wonderful" and "simple" userland rename 
is mandated.  Never mind userland will have to hold a board quirk 
database and query the driver to find out which is WLAN or whatever: 
simplicity.

Nobody said about removing network interface naming, what we're talking 
about is making the driver a touch better so it does the right thing 
first time, adaptively to its platform.

Hey, did you see the smsc95xx driver is configuring its mac address from 
an EEPROM if it's connected instead of letting userland do it, holy 
crap.  I bet those guys who get their MAC address automagically are 
super upset the kernel is cheating userland of some simple wonderfulness.

Ha ha no, just kidding.

Thanks to the other guys for giving their opinions frankly -- I am 
particularly appreciate Mark got the idea immediately -- and I hope 
everyone has a nice evening.

-Andy

  parent reply	other threads:[~2011-03-14 21:59 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-12 22:32 [RFC PATCH 0/4] PLATFORM: Support for async platform_data Andy Green
2011-03-12 22:32 ` [RFC PATCH 1/4] PLATFORM: introduce structure to bind async platform data to a dev path name Andy Green
2011-03-12 23:29   ` Rafael J. Wysocki
2011-03-12 23:39     ` Andy Green
2011-03-13  1:03       ` Greg KH
2011-03-13 11:22         ` Andy Green
2011-03-13 12:51           ` Rafael J. Wysocki
2011-03-13 13:53             ` Andy Green
2011-03-13 16:58               ` Rafael J. Wysocki
2011-03-13 17:21                 ` Andy Green
2011-03-13 20:45                   ` Rafael J. Wysocki
2011-03-13 16:14           ` Greg KH
2011-03-13 17:26             ` Andy Green
2011-03-12 22:32 ` [RFC PATCH 2/4] PLATFORM: Introduce registration function for async platform data maps Andy Green
2011-03-12 22:32 ` [RFC PATCH 3/4] PLATFORM: Introduce async platform_data attach api Andy Green
2011-03-13  1:01   ` Greg KH
2011-03-13 10:41     ` Rafael J. Wysocki
2011-03-13 11:58       ` Andy Green
2011-03-13 12:53         ` Rafael J. Wysocki
2011-03-13 13:21           ` Andy Green
2011-03-13 16:15             ` Greg KH
2011-03-13 17:13               ` Andy Green
2011-03-13 17:48                 ` Greg KH
2011-03-13 18:13                   ` Andy Green
2011-03-13 23:26                     ` Greg KH
2011-03-14  8:38                       ` Andy Green
2011-03-14 20:54                         ` Greg KH
2011-03-14 21:03                           ` Alan Stern
2011-03-14 21:13                             ` Greg KH
2011-03-14 21:10                           ` Mark Brown
2011-03-14 21:59                           ` Andy Green [this message]
2011-03-12 22:32 ` [RFC PATCH 4/4] PLATFORM: Add some documentation to platform docs about async platform_data Andy Green

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=4D7E8FA9.6000203@linaro.org \
    --to=andy@warmcat.com \
    --cc=andy.green@linaro.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=rjw@sisk.pl \
    /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