Skip to content

Commit 78e2045

Browse files
Govindarajulu Varadarajandavem330
authored andcommitted
enic: use spin_lock(wq_lock) instead of spin_lock_irqsave(wq_lock)
All the access to wq has been moved out of hardirq context. We no longer need to use spin_lock_irqsave. Signed-off-by: Govindarajulu Varadarajan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent db40b3f commit 78e2045

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/net/ethernet/cisco/enic/enic_main.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,6 @@ static netdev_tx_t enic_hard_start_xmit(struct sk_buff *skb,
529529
{
530530
struct enic *enic = netdev_priv(netdev);
531531
struct vnic_wq *wq;
532-
unsigned long flags;
533532
unsigned int txq_map;
534533
struct netdev_queue *txq;
535534

@@ -554,14 +553,14 @@ static netdev_tx_t enic_hard_start_xmit(struct sk_buff *skb,
554553
return NETDEV_TX_OK;
555554
}
556555

557-
spin_lock_irqsave(&enic->wq_lock[txq_map], flags);
556+
spin_lock(&enic->wq_lock[txq_map]);
558557

559558
if (vnic_wq_desc_avail(wq) <
560559
skb_shinfo(skb)->nr_frags + ENIC_DESC_MAX_SPLITS) {
561560
netif_tx_stop_queue(txq);
562561
/* This is a hard error, log it */
563562
netdev_err(netdev, "BUG! Tx ring full when queue awake!\n");
564-
spin_unlock_irqrestore(&enic->wq_lock[txq_map], flags);
563+
spin_unlock(&enic->wq_lock[txq_map]);
565564
return NETDEV_TX_BUSY;
566565
}
567566

@@ -572,7 +571,7 @@ static netdev_tx_t enic_hard_start_xmit(struct sk_buff *skb,
572571
if (!skb->xmit_more || netif_xmit_stopped(txq))
573572
vnic_wq_doorbell(wq);
574573

575-
spin_unlock_irqrestore(&enic->wq_lock[txq_map], flags);
574+
spin_unlock(&enic->wq_lock[txq_map]);
576575

577576
return NETDEV_TX_OK;
578577
}

0 commit comments

Comments
 (0)