* [PATCH] PHYLIB: Add BCM5482 PHY support
@ 2008-01-29 16:19 Nate Case
2008-01-30 9:51 ` Maciej W. Rozycki
2008-02-01 18:41 ` Jeff Garzik
0 siblings, 2 replies; 4+ messages in thread
From: Nate Case @ 2008-01-29 16:19 UTC (permalink / raw)
To: Andy Fleming; +Cc: netdev
This Broadcom PHY is similar to other bcm54xx devices.
Signed-off-by: Nate Case <ncase@xes-inc.com>
---
drivers/net/phy/broadcom.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c
index 29666c8..5b80358 100644
--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
@@ -141,6 +141,20 @@ static struct phy_driver bcm5461_driver = {
.driver = { .owner = THIS_MODULE },
};
+static struct phy_driver bcm5482_driver = {
+ .phy_id = 0x0143bcb0,
+ .phy_id_mask = 0xfffffff0,
+ .name = "Broadcom BCM5482",
+ .features = PHY_GBIT_FEATURES,
+ .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+ .config_init = bcm54xx_config_init,
+ .config_aneg = genphy_config_aneg,
+ .read_status = genphy_read_status,
+ .ack_interrupt = bcm54xx_ack_interrupt,
+ .config_intr = bcm54xx_config_intr,
+ .driver = { .owner = THIS_MODULE },
+};
+
static int __init broadcom_init(void)
{
int ret;
@@ -154,8 +168,13 @@ static int __init broadcom_init(void)
ret = phy_driver_register(&bcm5461_driver);
if (ret)
goto out_5461;
+ ret = phy_driver_register(&bcm5482_driver);
+ if (ret)
+ goto out_5482;
return ret;
+out_5482:
+ phy_driver_unregister(&bcm5461_driver);
out_5461:
phy_driver_unregister(&bcm5421_driver);
out_5421:
@@ -166,6 +185,7 @@ out_5411:
static void __exit broadcom_exit(void)
{
+ phy_driver_unregister(&bcm5482_driver);
phy_driver_unregister(&bcm5461_driver);
phy_driver_unregister(&bcm5421_driver);
phy_driver_unregister(&bcm5411_driver);
--
1.5.3.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] PHYLIB: Add BCM5482 PHY support
2008-01-29 16:19 [PATCH] PHYLIB: Add BCM5482 PHY support Nate Case
@ 2008-01-30 9:51 ` Maciej W. Rozycki
2008-01-30 23:45 ` Nate Case
2008-02-01 18:41 ` Jeff Garzik
1 sibling, 1 reply; 4+ messages in thread
From: Maciej W. Rozycki @ 2008-01-30 9:51 UTC (permalink / raw)
To: Nate Case; +Cc: Andy Fleming, netdev
On Tue, 29 Jan 2008, Nate Case wrote:
> +static struct phy_driver bcm5482_driver = {
> + .phy_id = 0x0143bcb0,
> + .phy_id_mask = 0xfffffff0,
Please check formatting above and also I am a bit curious as to why the
ID is so different from the other ones -- the number is meant to be based
on the OUI assigned to the manufacturer. Otherwise your addition is fine.
Maciej
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] PHYLIB: Add BCM5482 PHY support
2008-01-30 9:51 ` Maciej W. Rozycki
@ 2008-01-30 23:45 ` Nate Case
0 siblings, 0 replies; 4+ messages in thread
From: Nate Case @ 2008-01-30 23:45 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: Andy Fleming, netdev
On Wed, 2008-01-30 at 09:51 +0000, Maciej W. Rozycki wrote:
> > +static struct phy_driver bcm5482_driver = {
> > + .phy_id = 0x0143bcb0,
> > + .phy_id_mask = 0xfffffff0,
>
> Please check formatting above and also I am a bit curious as to why the
> ID is so different from the other ones -- the number is meant to be based
> on the OUI assigned to the manufacturer. Otherwise your addition is fine.
I'll re-submit with the formatting fixed.
I can't figure out why the ID is so different from the others, but I did
double-check it and test it on real hardware.
For what it's worth, I've found a lot of inconsistency in these ID
values. For example, the chips with ID1 == 0x0020 seem to use the wrong
set of OUI bits (22:7 instead of 21:6), while others (BCM5221) with ID1
== 0x0040 do it properly conforming to the IEEE standard.
I can't figure out how they got the ID values for the BCM5482. If you
extract the OUI from 0x0143bcb0, you get 0x0050ef (which the *BSD guys
list as an alternate "mangled" Broadcom OUI). The BCM5787 and BCM5755
also seem to share this same ID formula with the BCM5482.
- Nate Case <ncase@xes-inc.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PHYLIB: Add BCM5482 PHY support
2008-01-29 16:19 [PATCH] PHYLIB: Add BCM5482 PHY support Nate Case
2008-01-30 9:51 ` Maciej W. Rozycki
@ 2008-02-01 18:41 ` Jeff Garzik
1 sibling, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2008-02-01 18:41 UTC (permalink / raw)
To: Nate Case; +Cc: Andy Fleming, netdev
Nate Case wrote:
> This Broadcom PHY is similar to other bcm54xx devices.
>
> Signed-off-by: Nate Case <ncase@xes-inc.com>
> ---
> drivers/net/phy/broadcom.c | 20 ++++++++++++++++++++
> 1 files changed, 20 insertions(+), 0 deletions(-)
applied
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-01 18:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-29 16:19 [PATCH] PHYLIB: Add BCM5482 PHY support Nate Case
2008-01-30 9:51 ` Maciej W. Rozycki
2008-01-30 23:45 ` Nate Case
2008-02-01 18:41 ` Jeff Garzik
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).