From: Segher Boessenkool <segher@kernel.crashing.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Alexandre Bounine <Alexandre.Bounine@tundra.com>,
David Gibson <david@gibson.dropbear.id.au>,
linuxppc-dev list <linuxppc-dev@ozlabs.org>
Subject: Re: TSI ethernet PHY question
Date: Fri, 25 May 2007 16:24:10 +0200 [thread overview]
Message-ID: <7507d41be286f5a08a8a00538aab314d@kernel.crashing.org> (raw)
In-Reply-To: <1180058031.32247.1091.camel@localhost.localdomain>
>> However in this case you could put a property in the
>> PHY node, similar things have been done before. It's
>> ugly and doesn't solve any problem (it is just as much
>> work to parse the board model as to find this magic
>> property), and you *still* should pass in the flag
>> from the platform layer, and not have the phylib try
>> to handle it by itself.
>
> I disagree, it's not ugly and nicely solves the problem.
It doesn't solve the conceived problem that making this
a board-dependent workaround would be "too hard".
> For example, imagine you have 2 PHYs on a board and only one needs the
> workaround ? Really, the PHY node is the best place for it.
Then the board code will know that.
>> The ethernet driver is a powerpc-specific driver, that's
>> one thing. Also, the workaround should be initiated by
>> the platform code, so has to go through the ethernet driver
>> (since it instantiates the phylib driver).
>
> Still... it can be done via generic calls in powerpc ethernet drivers
> that set flags in phylib based on things in the device-tree.
Yes, exactly.
>> For many similar workarounds, the ethernet driver _does_ have
>> to cooperate in the workaround. For some other such workarounds,
>> the soc code has to be involved. Etc. etc.
>
>> You can do a quick "fix" now by doing this magic property
>> thing, and it sure is a *quick* fix; but later on you'll
>> have to do some other workarounds the proper way. And
>> you'll be stuck with the property forever. Not such a
>> big deal, sure; hey, I already _did_ say I'm okay with it,
>> right? It's just the "wrong" thing to do ;-)
>
> I have no bloody idea what you consider "the proper way"
Make board-specific workarounds triggered by the board code.
> I think it's the right thing to do.
And I don't :-) But I already said I'm okay with it, it's
only one property and it won't hurt anything else.
Segher
next prev parent reply other threads:[~2007-05-25 14:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-23 7:03 TSI ethernet PHY question Benjamin Herrenschmidt
2007-05-23 13:43 ` Alexandre Bounine
2007-05-23 15:55 ` Segher Boessenkool
2007-05-23 22:52 ` Benjamin Herrenschmidt
2007-05-24 18:53 ` Andy Fleming
2007-05-24 22:51 ` Benjamin Herrenschmidt
2007-05-24 23:54 ` Segher Boessenkool
2007-05-25 0:01 ` Benjamin Herrenschmidt
2007-05-25 0:57 ` Segher Boessenkool
2007-05-25 1:53 ` Benjamin Herrenschmidt
2007-05-25 14:24 ` Segher Boessenkool [this message]
2007-05-25 6:02 ` Paul Mackerras
2007-05-25 14:25 ` Segher Boessenkool
2007-05-25 2:00 ` David Gibson
2007-05-25 7:35 ` Zang Roy-r61911
2007-05-25 14:17 ` Segher Boessenkool
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=7507d41be286f5a08a8a00538aab314d@kernel.crashing.org \
--to=segher@kernel.crashing.org \
--cc=Alexandre.Bounine@tundra.com \
--cc=benh@kernel.crashing.org \
--cc=david@gibson.dropbear.id.au \
--cc=linuxppc-dev@ozlabs.org \
/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).