lkml.org 
[lkml]   [2015]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] net: phy: workaround for buggy cable detection by LAN8700 after cable plugging
    Dear Joe,

    > On Thu, 2015-08-13 at 16:12 +0300, Igor Plyatov wrote:
    >> * Due to HW bug, LAN8700 sometimes does not detect presence of energy in the
    >> Ethernet cable in Energy Detect Power-Down mode (e.g while EDPWRDOWN bit is
    >> set, the ENERGYON bit does not asserted sometimes). This is a common bug of
    >> LAN87xx family of PHY chips.
    >> * The lan87xx_read_status() was improved to acquire ENERGYON bit. Its previous
    >> algorythm still not reliable on 100 % and sometimes skip cable plugging.
    > []
    >> diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
    > []
    >> @@ -104,10 +104,12 @@ static int lan911x_config_init(struct phy_device *phydev)
    >> static int lan87xx_read_status(struct phy_device *phydev)
    >> {
    >> int err = genphy_read_status(phydev);
    >> + int rc;
    > Is there a reason to move this declaration?

    There is no strict requirement to move declaration of the rc.
    It was made just to have all declarations easily visible.

    >> + int i;
    >>
    >> if (!phydev->link) {
    >> /* Disable EDPD to wake up PHY */
    >> - int rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS);
    >> + rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS);
    >> if (rc < 0)
    >> return rc;
    >>
    >

    Best wishes
    --
    Igor Plyatov


    \
     
     \ /
      Last update: 2015-08-13 19:41    [W:3.145 / U:0.176 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site