Re: [PATCH] PHY: add BCM5464 support to broadcom PHY driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In message: [PATCH] PHY: add BCM5464 support to broadcom PHY driver
on 09/04/2008 Paul Gortmaker wrote:

> @@ -175,6 +192,8 @@ static int __init broadcom_init(void)
>  
>  out_5482:
>  	phy_driver_unregister(&bcm5461_driver);
> +out_5464:
> +	phy_driver_unregister(&bcm5464_driver);
>  out_5461:
>  	phy_driver_unregister(&bcm5421_driver);
>  out_5421:

Arrgh.  Resending with the right unwind order this time...

--------

>From f3a3b7e15adc7e8cbb9d62ae2b07fae030e45d86 Mon Sep 17 00:00:00 2001
From: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>
Date: Mon, 7 Apr 2008 14:09:00 -0400
Subject: [PATCH] PHY: add BCM5464 support to broadcom PHY driver

The BCM5464 can be used with the current broadcom PHY driver
by just adding the appropriate chip ID and using the existing
support within.  I also fixed the bad whitespace in the recently
added 5482 support that lie within the context of this patch.

Signed-off-by: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>
---
 drivers/net/phy/broadcom.c |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c
index 5b80358..3c742de 100644
--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
@@ -141,8 +141,22 @@ static struct phy_driver bcm5461_driver = {
 	.driver 	= { .owner = THIS_MODULE },
 };
 
+static struct phy_driver bcm5464_driver = {
+	.phy_id		= 0x002060b0,
+	.phy_id_mask	= 0xfffffff0,
+	.name		= "Broadcom BCM5464",
+	.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 struct phy_driver bcm5482_driver = {
-    .phy_id		= 0x0143bcb0,
+	.phy_id		= 0x0143bcb0,
 	.phy_id_mask	= 0xfffffff0,
 	.name		= "Broadcom BCM5482",
 	.features	= PHY_GBIT_FEATURES,
@@ -168,12 +182,17 @@ static int __init broadcom_init(void)
 	ret = phy_driver_register(&bcm5461_driver);
 	if (ret)
 		goto out_5461;
+	ret = phy_driver_register(&bcm5464_driver);
+	if (ret)
+		goto out_5464;
 	ret = phy_driver_register(&bcm5482_driver);
 	if (ret)
 		goto out_5482;
 	return ret;
 
 out_5482:
+	phy_driver_unregister(&bcm5464_driver);
+out_5464:
 	phy_driver_unregister(&bcm5461_driver);
 out_5461:
 	phy_driver_unregister(&bcm5421_driver);
@@ -186,6 +205,7 @@ out_5411:
 static void __exit broadcom_exit(void)
 {
 	phy_driver_unregister(&bcm5482_driver);
+	phy_driver_unregister(&bcm5464_driver);
 	phy_driver_unregister(&bcm5461_driver);
 	phy_driver_unregister(&bcm5421_driver);
 	phy_driver_unregister(&bcm5411_driver);
-- 
1.5.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux