Just a little reminder ... On Sun, 2 Dec 2007 00:34:03 +0300 Anton Vorontsov <[email protected]> wrote: > > static int __init of_add_fixed_phys(void) > { > struct device_node *np; > const u32 *prop; > struct fixed_phy_status status = {}; > > while ((np = of_find_node_by_name(NULL, "ethernet"))) { for_each_node_by_name(np, "ethernet") { (this probably does what you want instead of finding just the first ethernet over and over again. :-)) > data = of_get_property(np, "fixed-link", NULL); > if (!data) > continue; > > status.link = 1; > status.duplex = data[1]; > status.speed = data[2]; > > ret = fixed_phy_add(PHY_POLL, data[0], &status); > if (ret) > return ret; if (ret) { of_put_node(np); retun ret; } > } -- Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/
Attachment:
pgpVW2cjYwxZ8.pgp
Description: PGP signature
- References:
- [PATCH 1/3] [NET] phy/fixed.c: rework to not duplicate PHY layer functionality
- From: Vitaly Bordug <[email protected]>
- Re: [PATCH 1/3] [NET] phy/fixed.c: rework to not duplicate PHY layer functionality
- From: Jochen Friedrich <[email protected]>
- Re: [PATCH 1/3] [NET] phy/fixed.c: rework to not duplicate PHY layer functionality
- From: Anton Vorontsov <[email protected]>
- [PATCH 1/3] [NET] phy/fixed.c: rework to not duplicate PHY layer functionality
- Prev by Date: Re: [PATCH 0/3] cxgb - driver fixes.
- Next by Date: Re: [patch] ata: ahci: Enclosure Management via LED rev2
- Previous by thread: Re: [PATCH 1/3] [NET] phy/fixed.c: rework to not duplicate PHY layer functionality
- Next by thread: RE: [PATCH 1/3] [NET] phy/fixed.c: rework to not duplicate PHYlayer functionality
- Index(es):