diff options
author | Andrew Lunn <andrew@lunn.ch> | 2016-04-11 21:40:05 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-11 21:15:48 -0400 |
commit | 9a6f2b0113c8fce815db7c9d23754bdea4b428a0 (patch) | |
tree | 05e5b4205fb6aebdcf105fa8866cfeceeec93ff9 /include/linux/mdio.h | |
parent | 7c3da7d0d4f3506ef70d9cf148a22400477854d0 (diff) | |
download | lwn-9a6f2b0113c8fce815db7c9d23754bdea4b428a0.tar.gz lwn-9a6f2b0113c8fce815db7c9d23754bdea4b428a0.zip |
net: mdio: Fix lockdep falls positive splat
MDIO devices can be stacked upon each other. The current code supports
two levels, which until recently has been enough for a DSA mdio bus on
top of another bus. Now we have hardware which has an MDIO mux in the
middle.
Define an MDIO MUTEX class with three levels.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mdio.h')
-rw-r--r-- | include/linux/mdio.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/mdio.h b/include/linux/mdio.h index 5bfd99d1a40a..bf9d1d750693 100644 --- a/include/linux/mdio.h +++ b/include/linux/mdio.h @@ -13,6 +13,17 @@ struct mii_bus; +/* Multiple levels of nesting are possible. However typically this is + * limited to nested DSA like layer, a MUX layer, and the normal + * user. Instead of trying to handle the general case, just define + * these cases. + */ +enum mdio_mutex_lock_class { + MDIO_MUTEX_NORMAL, + MDIO_MUTEX_MUX, + MDIO_MUTEX_NESTED, +}; + struct mdio_device { struct device dev; |