OSDN Git Service

net: sfp: add A2h presence flag
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 9 Mar 2023 15:57:11 +0000 (15:57 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 11 Mar 2023 02:12:48 +0000 (18:12 -0800)
commitf94b9bed12e8244717512941494fe83c94773a58
treeae3be3e9209a5f82d15c4f5a51eb8527f43a7337
parentc568a8de6bb1cdf86badf01a1645e2efb433db21
net: sfp: add A2h presence flag

The hwmon code wants to know when it is safe to access the A2h data
stored in a separate address. We indicate that this is present when
we have SFF-8472 compliance and the lack of an address-change
sequence.,

The same conditions are also true if we want to access other controls
and status in the A2h address. So let's make a flag to indicate whether
we can access it, instead of repeating the conditions throughout the
code.

For now, only convert the hwmon code.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/sfp.c