Skip to content
  • Christian Riesch's avatar
    davinci_mdio: Fix MDIO timeout check · 5b76d060
    Christian Riesch authored
    
    
    Under heavy load (flood ping) it is possible for the MDIO timeout to
    expire before the loop checks the GO bit again. This patch adds an
    additional check whether the operation was done before actually
    returning -ETIMEDOUT.
    
    To reproduce this bug, flood ping the device, e.g., ping -f -l 1000
    After some time, a "timed out waiting for user access" warning
    may appear. And even worse, link may go down since the PHY reported a
    timeout.
    
    Signed-off-by: default avatarChristian Riesch <christian.riesch@omicron.at>
    Cc: <stable@vger.kernel.org>
    Cc: Cyril Chemparathy <cyril@ti.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5b76d060