Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: BCM5809S support in bnx(4) and brgphy(4)
On 01.12.2010 11:41, Jean-Yves Migeon wrote:
> On Wed, 1 Dec 2010 18:32:52 +0900, Izumi Tsutsui
> <tsutsui%ceres.dti.ne.jp@localhost> wrote:
>> We should not refer struct bnx_softc in brgphy.c
>> because mii devices can be configured without PCI
>> and bnx_softc contains PCI specific stuff.
>> Your patch might break GENERIC on zaurus, which
>> has mii via on-chip USB but no PCI bus.
>>
>> To pass bnx_foo_flag values from parent bnx(4) to child brgphy(4),
>> we need the following two changes
>>
>> - use device properties (proplib) to pass flag values
>> - split if_bnxreg.h and move PCI specific stuff
>> ("Device State Data", debug macro etc.) into (new) if_bnxvar.h
>>
>> as done on past brgphy(4) changes for bge(4) by msaitoh@:
>> http://mail-index.NetBSD.org/current-users/2009/04/20/msg009101.html
>> http://mail-index.NetBSD.org/source-changes/2009/04/23/msg220278.html
>
> Ok, I will fix that.
Updated [1]. Differences with previous version:
- uses proplib(3) to query phyflags, and store the value in
brgphy_softc, like bge code does. bnx_softc should not be exposed to
brgphy(4) now.
- split if_bnxreg.h in two, with macros, device state, PCI bus stuff in
if_bnxvar.h, and only include if_bnxreg.h in brgphy.c
- set bits in 'mii_capabilities' so mii_phy_add_media() can be used to
attach BCM 5709S PHYs too (maximizes code reuse).
Re-tested, and works.
Unless someone has comments, I will commit in a few days (say: Thursday,
09).
If bnx(4) owners could test it, I would appreciate it, especially on BE
machines, like sparc64. I did my best to avoid breakage, but I can't
really confirm it (I don't own any Broadcom cards for bnx(4))
[1] http://netbsd.org/~jym/bcm5709s.diff
--
Jean-Yves Migeon
jeanyves.migeon%free.fr@localhost
Home |
Main Index |
Thread Index |
Old Index