]> git.baikalelectronics.ru Git - kernel.git/commit
net: ll_temac: Prepare indirect register access for multicast support
authorEsben Haabendal <esben@geanix.com>
Thu, 23 May 2019 12:02:20 +0000 (14:02 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 May 2019 16:33:57 +0000 (09:33 -0700)
commit9de49ac9329a0a6ad44ae409aaa2581163851ae7
tree1a5e9f58c4d08510a24af48a51aa4174974d0c57
parentfc9e696af10aaf57dd8612c24101d76de26cbc8c
net: ll_temac: Prepare indirect register access for multicast support

With .ndo_set_rx_mode/temac_set_multicast_list() being called in atomic
context (holding addr_list_lock), and temac_set_multicast_list() needing
to access temac indirect registers, the mutex used to synchronize indirect
register is a no-no.

Replace it with a spinlock, and avoid sleeping in
temac_indirect_busywait().

To avoid excessive holding of the lock, which is now a spinlock, the
temac_device_reset() function is changed to only hold the lock for short
periods.  With timeouts, it could be holding the spinlock for more than
2 seconds.

Signed-off-by: Esben Haabendal <esben@geanix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/xilinx/ll_temac.h
drivers/net/ethernet/xilinx/ll_temac_main.c
drivers/net/ethernet/xilinx/ll_temac_mdio.c
include/linux/platform_data/xilinx-ll-temac.h