aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/bcm63xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/phy/bcm63xx.c')
-rw-r--r--drivers/net/phy/bcm63xx.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/net/phy/bcm63xx.c b/drivers/net/phy/bcm63xx.c
index e741bf614c4e..b0492ef2cdaa 100644
--- a/drivers/net/phy/bcm63xx.c
+++ b/drivers/net/phy/bcm63xx.c
@@ -21,6 +21,23 @@ MODULE_DESCRIPTION("Broadcom 63xx internal PHY driver");
21MODULE_AUTHOR("Maxime Bizon <mbizon@freebox.fr>"); 21MODULE_AUTHOR("Maxime Bizon <mbizon@freebox.fr>");
22MODULE_LICENSE("GPL"); 22MODULE_LICENSE("GPL");
23 23
24static int bcm63xx_config_intr(struct phy_device *phydev)
25{
26 int reg, err;
27
28 reg = phy_read(phydev, MII_BCM63XX_IR);
29 if (reg < 0)
30 return reg;
31
32 if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
33 reg &= ~MII_BCM63XX_IR_GMASK;
34 else
35 reg |= MII_BCM63XX_IR_GMASK;
36
37 err = phy_write(phydev, MII_BCM63XX_IR, reg);
38 return err;
39}
40
24static int bcm63xx_config_init(struct phy_device *phydev) 41static int bcm63xx_config_init(struct phy_device *phydev)
25{ 42{
26 int reg, err; 43 int reg, err;
@@ -55,7 +72,7 @@ static struct phy_driver bcm63xx_driver[] = {
55 .config_aneg = genphy_config_aneg, 72 .config_aneg = genphy_config_aneg,
56 .read_status = genphy_read_status, 73 .read_status = genphy_read_status,
57 .ack_interrupt = bcm_phy_ack_intr, 74 .ack_interrupt = bcm_phy_ack_intr,
58 .config_intr = bcm_phy_config_intr, 75 .config_intr = bcm63xx_config_intr,
59}, { 76}, {
60 /* same phy as above, with just a different OUI */ 77 /* same phy as above, with just a different OUI */
61 .phy_id = 0x002bdc00, 78 .phy_id = 0x002bdc00,
@@ -67,7 +84,7 @@ static struct phy_driver bcm63xx_driver[] = {
67 .config_aneg = genphy_config_aneg, 84 .config_aneg = genphy_config_aneg,
68 .read_status = genphy_read_status, 85 .read_status = genphy_read_status,
69 .ack_interrupt = bcm_phy_ack_intr, 86 .ack_interrupt = bcm_phy_ack_intr,
70 .config_intr = bcm_phy_config_intr, 87 .config_intr = bcm63xx_config_intr,
71} }; 88} };
72 89
73module_phy_driver(bcm63xx_driver); 90module_phy_driver(bcm63xx_driver);