summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2019-03-20 17:02:00 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-04 10:15:20 +0300
commitb6ca8ec8bb742625e8b2e19e1fcbb3936a543cef (patch)
tree3da768bbbac2c11834b0a61d1e42b3b2cac9fe37 /drivers/staging
parent64e8347986d0962dfbb335c5a6754bb261c69aa9 (diff)
downloadlinux-b6ca8ec8bb742625e8b2e19e1fcbb3936a543cef.tar.xz
net: ks8851: Set initial carrier state to down
[ Upstream commit 9624bafa5f6418b9ca5b3f66d1f6a6a2e8bf6d4c ] The ks8851 chip's initial carrier state is down. A Link Change Interrupt is signaled once interrupts are enabled if the carrier is up. The ks8851 driver has it backwards by assuming that the initial carrier state is up. The state is therefore misrepresented if the interface is opened with no cable attached. Fix it. The Link Change interrupt is sometimes not signaled unless the P1MBSR register (which contains the Link Status bit) is read on ->ndo_open(). This might be a hardware erratum. Read the register by calling mii_check_link(), which has the desirable side effect of setting the carrier state to down if the cable was detached while the interface was closed. Signed-off-by: Lukas Wunner <lukas@wunner.de> Cc: Frank Pavlic <f.pavlic@kunbus.de> Cc: Ben Dooks <ben.dooks@codethink.co.uk> Cc: Tristram Ha <Tristram.Ha@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin (Microsoft) <sashal@kernel.org>
Diffstat (limited to 'drivers/staging')
0 files changed, 0 insertions, 0 deletions