freebsd-dev/sys/dev/etherswitch
Kristof Provost 7647626d33 e6000sw: fix incorrect locking
During attach we release the lock to call e6000sw_attach_miibus(), which
calls mii_attach(). The mii_attach() function calls miibus_readreg() /
miibus_writereg(). However, these are set to be
e6000sw_readphy_locked().

That is, the read/write phy functions do not acquire the lock, but
expect to be called while locked.  Simply do not unlock and relock while
calling mii_attach().

Reviewed by:	Hubert Mazur <hum@semihalf.com>
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D36117
2022-08-19 23:09:11 +02:00
..
ar40xx etherswitch drivers: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:44 -07:00
arswitch etherswitch drivers: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:44 -07:00
e6000sw e6000sw: fix incorrect locking 2022-08-19 23:09:11 +02:00
felix etherswitch drivers: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:44 -07:00
infineon etherswitch drivers: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:44 -07:00
ip17x etherswitch drivers: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:44 -07:00
micrel etherswitch drivers: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:44 -07:00
mtkswitch etherswitch drivers: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:44 -07:00
rtl8366 etherswitch drivers: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:44 -07:00
ukswitch etherswitch drivers: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:44 -07:00
etherswitch_if.m [etherswitch] add the first pass of a simple API to flush and fetch the L2 address table from the ethernet switch. 2018-02-02 02:05:14 +00:00
etherswitch.c Remove unused etherswitch_devclass. 2022-05-09 14:26:43 -07:00
etherswitch.h Remove unused etherswitch_devclass. 2022-05-09 14:26:43 -07:00
miiproxy.c etherswitch drivers: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:44 -07:00
miiproxy.h Remove unused miiproxy_devclass. 2022-05-09 14:26:43 -07:00