Subject: Re: [PATCH] net, fixed phy: make BUSID configurable

From: Heiko Schocher <[email-masked]>
Date: Mon, 05 Dec 2011 11:21:09 +0100

Hello David,

David Miller wrote:
> From: Heiko Schocher <[email-masked]>
> Date: Sun,  4 Dec 2011 10:37:24 +0100
> 
>> Signed-off-by: Heiko Schocher <[email-masked]>
> 
> Give me a break.
> 
> You can't submit a change like this with essentially an
> empty commit message.

Uh, yes, sorry!

> Why in the world does this ever need to be configurable?
> Are there alternative (and much better) ways to deal with
> whatever problem this patch solves?
> 
> You've presented no information about why you need to make this
> change, and more importantly why no viable alternatives exist
> to solve your problem.

On a am1808 based board porting to current kernel, I have connected
a KSZ8864RMN switch and using the drivers/net/ethernet/ti/davinci_emac.c
driver. To the switch I have always 100/FULL connection and so
I decided to use the fixed PHY driver. But the busid 0 is used
from the drivers/net/ethernet/ti/davinci_emac.c driver, and the
fixed PHY driver is fix at busid 0 ...

Looking in the drivers/net/ethernet/ti/davinci_emac.c in emac_dev_open()
there is the possibility if no priv->phy_id is defined through
plattform code, to use a fixed 100/FULL speed and duplex settings ...
which would fix my needs ...

But code did not reach this, because first a:

        if (!priv->phy_id) {
                struct device *phy;

                phy = bus_find_device(&mdio_bus_type, NULL, NULL,
                                      match_first_device);
                if (phy)
                        priv->phy_id = dev_name(phy);
        }

is checked ... maybe it is better to fix this here by removing this
"if (!priv->phy_id) {" and do not use the fixed PHY driver?

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany