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>
This commit is contained in:
Andrew Lunn
2016-04-11 21:40:05 +02:00
committed by David S. Miller
parent 7c3da7d0d4
commit 9a6f2b0113
3 changed files with 15 additions and 10 deletions

View File

@@ -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;