]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: Use mutex instead of spinlock
authorThierry Reding <treding@nvidia.com>
Thu, 24 May 2018 14:09:07 +0000 (16:09 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 May 2018 02:54:15 +0000 (22:54 -0400)
commitba03450f6b015143bbe317cd8b5a6dd8636e82c1
treeb606485765c902b397eca1897496a62a4966140f
parentd82869a523ac6f00e97cd28b1fb31faac9b3be1e
net: stmmac: Use mutex instead of spinlock

Some drivers, such as DWC EQOS on Tegra, need to perform operations that
can sleep under this lock (clk_set_rate() in tegra_eqos_fix_speed()) for
proper operation. Since there is no need for this lock to be a spinlock,
convert it to a mutex instead.

Fixes: 7d2dee5ea607 ("net: stmmac: dwc-qos: Add Tegra186 support")
Reported-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Tested-by: Bhadram Varka <vbhadram@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac.h
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c