sfp: fix RX_LOS signal handling
authorRussell King <rmk+kernel@armlinux.org.uk>
Thu, 30 Nov 2017 13:59:11 +0000 (13:59 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:07:57 +0000 (11:07 +0100)
commit778e7124f71dc42e0863c21aefd99b7c2155a4b8
treebdf4453b8fe0238e33ab034f25f1b6eb73e723d1
parent7a7bcee6d73cb8c1c22b18c709496af767d8dc46
sfp: fix RX_LOS signal handling

[ Upstream commit acf1c02f023926b8b04672a9e81b1711ae681619 ]

The options word is a be16 quantity, so we need to test the flags
having converted the endian-ness.  Convert the flag bits to be16,
which can be optimised by the compiler, rather than converting a
variable at runtime.

Reported-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
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>
drivers/net/phy/sfp.c