summaryrefslogtreecommitdiff
path: root/drivers/scsi/ufs
diff options
context:
space:
mode:
authorZefir Kurtisi <zefir.kurtisi@neratec.com>2017-01-06 14:14:48 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-11 19:08:57 +0300
commita9873711065956556e1ce0ec36706639bd8de10a (patch)
treea3514b64631eecc5a67ff0084be4890b8db4c2b1 /drivers/scsi/ufs
parentdb01878ca5dd13ad51ff776309a6b75fd5867764 (diff)
downloadlinux-a9873711065956556e1ce0ec36706639bd8de10a.tar.xz
phy state machine: failsafe leave invalid RUNNING state
[ Upstream commit 811a919135b980bac8009d042acdccf10dc1ef5e ] While in RUNNING state, phy_state_machine() checks for link changes by comparing phydev->link before and after calling phy_read_status(). This works as long as it is guaranteed that phydev->link is never changed outside the phy_state_machine(). If in some setups this happens, it causes the state machine to miss a link loss and remain RUNNING despite phydev->link being 0. This has been observed running a dsa setup with a process continuously polling the link states over ethtool each second (SNMPD RFC-1213 agent). Disconnecting the link on a phy followed by a ETHTOOL_GSET causes dsa_slave_get_settings() / dsa_slave_get_link_ksettings() to call phy_read_status() and with that modify the link status - and with that bricking the phy state machine. This patch adds a fail-safe check while in RUNNING, which causes to move to CHANGELINK when the link is gone and we are still RUNNING. Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/scsi/ufs')
0 files changed, 0 insertions, 0 deletions