[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50EEF695.9060001@openwrt.org>
Date: Thu, 10 Jan 2013 18:12:53 +0100
From: Florian Fainelli <florian@...nwrt.org>
To: Kosta Zertsekel <konszert@...vell.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"zertsekel@...il.com" <zertsekel@...il.com>,
"andrew@...n.ch" <andrew@...n.ch>,
Eran Ben-Avi <benavi@...vell.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Lior Amsalem <alior@...vell.com>
Subject: Re: [PATCH 2/2] Fix phy_attach - forward dev_flags for phy_attach
Le 01/10/13 16:57, Kosta Zertsekel a écrit :
>> By the way, most, if not all of the phy_connect() users in drivers/net/ethernet/ also do not ensure they pass the phy device flags, so you might
> want to fix this globally and not just for Marvell driver.
> Indeed, phy_connect() mostly just pass zero intead of phy_dev->dev_flags.
> But, I think, the guy that calls phy_connect() in its driver should know what he does, and,
> probably, we should rely on him knowing his stuff.
> The only evidence of the bug is when phy_dev->dev_flags was actually changed by PHY fixup callback
> (see dns323-setup.c for example) and was *not* propagated to phy_connect() or phy_attach() as in pxa168_eth.c phy_init().
> The code conforming to the former should be fixed IMHO.
Actually, I wonder if we should not rather remove entirely the flags
argument, let the phy_connect() or phy_attach() callers modify the phy
device dev_flags like it does today (e.g: tg3) and modify phy_connect()
and phy_attach() to pass phy->dev_flags to phy_attach_direct().
--
Florian
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists