diff options
author | Mark Einon <mark.einon@gmail.com> | 2014-09-14 19:59:00 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-20 03:04:52 +0400 |
commit | bacb71edb48050b46244a66ec8d49c55a89eec34 (patch) | |
tree | 36dd2f142585f3103e5a03e6f4e210ef9069fc9b /drivers/staging/et131x/et131x.c | |
parent | 82d95799d89b0cb3ad4c15c60e2c19862cb3a459 (diff) | |
download | linux-bacb71edb48050b46244a66ec8d49c55a89eec34.tar.xz |
staging: et131x: Remove send_hw_lock spinlock
We don't need to use this lock - the tx path is protected by the
networking subsystem xmit_lock, so we don't also need it in
nic_send_packet().
The other use of this spinlock in et1310_enable_phy_coma() to protect
a low power flag makes no sense, so can just be removed.
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/et131x/et131x.c')
-rw-r--r-- | drivers/staging/et131x/et131x.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index c8f54264865f..8726754b737c 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging/et131x/et131x.c @@ -477,8 +477,6 @@ struct et131x_adapter { /* Spinlocks */ spinlock_t tcb_send_qlock; spinlock_t tcb_ready_qlock; - spinlock_t send_hw_lock; - spinlock_t rcv_lock; /* Packet Filter and look ahead size */ @@ -1929,19 +1927,14 @@ static void et131x_init_send(struct et131x_adapter *adapter) */ static void et1310_enable_phy_coma(struct et131x_adapter *adapter) { - unsigned long flags; - u32 pmcsr; - - pmcsr = readl(&adapter->regs->global.pm_csr); + u32 pmcsr = readl(&adapter->regs->global.pm_csr); /* Save the GbE PHY speed and duplex modes. Need to restore this * when cable is plugged back in */ /* Stop sending packets. */ - spin_lock_irqsave(&adapter->send_hw_lock, flags); adapter->flags |= FMP_ADAPTER_LOWER_POWER; - spin_unlock_irqrestore(&adapter->send_hw_lock, flags); /* Wait for outstanding Receive packets */ et131x_disable_txrx(adapter->netdev); @@ -2621,7 +2614,6 @@ static int nic_send_packet(struct et131x_adapter *adapter, struct tcb *tcb) struct sk_buff *skb = tcb->skb; u32 nr_frags = skb_shinfo(skb)->nr_frags + 1; struct skb_frag_struct *frags = &skb_shinfo(skb)->frags[0]; - unsigned long flags; struct phy_device *phydev = adapter->phydev; dma_addr_t dma_addr; struct tx_ring *tx_ring = &adapter->tx_ring; @@ -2717,8 +2709,6 @@ static int nic_send_packet(struct et131x_adapter *adapter, struct tcb *tcb) tcb->index_start = tx_ring->send_idx; tcb->stale = 0; - spin_lock_irqsave(&adapter->send_hw_lock, flags); - thiscopy = NUM_DESC_PER_RING_TX - INDEX10(tx_ring->send_idx); if (thiscopy >= frag) { @@ -2781,8 +2771,6 @@ static int nic_send_packet(struct et131x_adapter *adapter, struct tcb *tcb) writel(PARM_TX_TIME_INT_DEF * NANO_IN_A_MICRO, &adapter->regs->global.watchdog_timer); } - spin_unlock_irqrestore(&adapter->send_hw_lock, flags); - return 0; } @@ -3553,7 +3541,6 @@ static struct et131x_adapter *et131x_adapter_init(struct net_device *netdev, /* Initialize spinlocks here */ spin_lock_init(&adapter->tcb_send_qlock); spin_lock_init(&adapter->tcb_ready_qlock); - spin_lock_init(&adapter->send_hw_lock); spin_lock_init(&adapter->rcv_lock); adapter->registry_jumbo_packet = 1514; /* 1514-9216 */ |