]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: et131x: Remove spinlock fbr_lock
authorMark Einon <mark.einon@gmail.com>
Wed, 3 Sep 2014 21:40:55 +0000 (22:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Sep 2014 20:47:01 +0000 (13:47 -0700)
The spinlock fbr_lock is only used in a single call sequence staring
from et131x_poll. As this call is already locked by napi->poll_lock,
we can remove it.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/et131x/et131x.c

index 7a1df8a3016ed5b0755aff2608d0d11363e87396..9819e0e778ab83c3b98fe363bf3c307c48418b79 100644 (file)
@@ -490,7 +490,6 @@ struct et131x_adapter {
        spinlock_t send_hw_lock;
 
        spinlock_t rcv_lock;
-       spinlock_t fbr_lock;
 
        /* Packet Filter and look ahead size */
        u32 packet_filter;
@@ -2325,8 +2324,6 @@ static void nic_return_rfd(struct et131x_adapter *adapter, struct rfd *rfd)
                u32 __iomem *offset;
                struct fbr_desc *next;
 
-               spin_lock_irqsave(&adapter->fbr_lock, flags);
-
                if (ring_index == 0)
                        offset = &rx_dma->fbr0_full_offset;
                else
@@ -2346,8 +2343,6 @@ static void nic_return_rfd(struct et131x_adapter *adapter, struct rfd *rfd)
                free_buff_ring = bump_free_buff_ring(&fbr->local_full,
                                                     fbr->num_entries - 1);
                writel(free_buff_ring, offset);
-
-               spin_unlock_irqrestore(&adapter->fbr_lock, flags);
        } else {
                dev_err(&adapter->pdev->dev,
                          "%s illegal Buffer Index returned\n", __func__);
@@ -3691,7 +3686,6 @@ static struct et131x_adapter *et131x_adapter_init(struct net_device *netdev,
        spin_lock_init(&adapter->tcb_ready_qlock);
        spin_lock_init(&adapter->send_hw_lock);
        spin_lock_init(&adapter->rcv_lock);
-       spin_lock_init(&adapter->fbr_lock);
 
        adapter->registry_jumbo_packet = 1514;  /* 1514-9216 */