source: trunk/target/linux/generic-2.6/patches-2.6.33/601-phy-add-aneg-done-function.patch @ 21784

Last change on this file since 21784 was 21784, checked in by florian, 6 years ago

[kernel] refresh 2.6.33 patches

File size: 1.2 KB
  • include/linux/phy.h

    a b struct phy_driver { 
    379379         */ 
    380380        int (*config_aneg)(struct phy_device *phydev); 
    381381 
     382        /* Determine if autonegotiation is done */ 
     383        int (*aneg_done)(struct phy_device *phydev); 
     384 
    382385        /* Determines the negotiated speed and duplex */ 
    383386        int (*read_status)(struct phy_device *phydev); 
    384387 
     388        /*  
     389         * Update the value in phydev->link to reflect the  
     390         * current link value 
     391         */ 
     392        int (*update_link)(struct phy_device *phydev); 
     393 
    385394        /* Clears any pending interrupts */ 
    386395        int (*ack_interrupt)(struct phy_device *phydev); 
    387396 
  • drivers/net/phy/phy_device.c

    a b int genphy_update_link(struct phy_device 
    682682{ 
    683683        int status; 
    684684 
     685        if (phydev->drv->update_link) 
     686                return phydev->drv->update_link(phydev); 
     687 
    685688        /* Do a fake read */ 
    686689        status = phy_read(phydev, MII_BMSR); 
    687690 
  • drivers/net/phy/phy.c

    a b static inline int phy_aneg_done(struct p 
    107107{ 
    108108        int retval; 
    109109 
     110        if (phydev->drv->aneg_done) 
     111                return phydev->drv->aneg_done(phydev); 
     112 
    110113        retval = phy_read(phydev, MII_BMSR); 
    111114 
    112115        return (retval < 0) ? retval : (retval & BMSR_ANEGCOMPLETE); 
Note: See TracBrowser for help on using the repository browser.