]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
net: dsa: mv88e6xxx: add delay in direct SMI wait
authorVivien Didelot <vivien.didelot@gmail.com>
Fri, 9 Aug 2019 22:47:59 +0000 (18:47 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Aug 2019 04:27:15 +0000 (21:27 -0700)
The mv88e6xxx_smi_direct_wait routine is used to wait on indirect
registers access. It is of no exception and must delay between read
attempts, like other wait routines.

Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/smi.c

index 18e87a5a20a35c8e2c8f8fb2ff30d0535073691a..282fe08db05053b02f3ca7748f01f94af5e4d4ec 100644 (file)
@@ -66,6 +66,8 @@ static int mv88e6xxx_smi_direct_wait(struct mv88e6xxx_chip *chip,
 
                if (!!(data & BIT(bit)) == !!val)
                        return 0;
+
+               usleep_range(1000, 2000);
        }
 
        return -ETIMEDOUT;