diff options
author | Thierry Reding <treding@nvidia.com> | 2018-05-24 17:09:07 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-29 05:54:15 +0300 |
commit | 29555fa3de865630570b5f53c847b953413daf1a (patch) | |
tree | b606485765c902b397eca1897496a62a4966140f /drivers/net/ethernet/stmicro/stmmac/stmmac.h | |
parent | 1b40428c04b1f89aa71db0310638d26e6eaaac07 (diff) | |
download | linux-29555fa3de865630570b5f53c847b953413daf1a.tar.xz |
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: e6ea2d16fc61 ("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>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac.h')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h index 4d425b1a0c59..fbfe5dcefa87 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h @@ -122,7 +122,7 @@ struct stmmac_priv { struct net_device *dev; struct device *device; struct mac_device_info *hw; - spinlock_t lock; + struct mutex lock; /* RX Queue */ struct stmmac_rx_queue rx_queue[MTL_MAX_RX_QUEUES]; |