Skip to content

Commit

Permalink
[SCSI] foce: remove bh disable from fcoe sw transport rcv function
Browse files Browse the repository at this point in the history
The fcoe sw recive packet function (fcoe_rcv) only ever executes in softirq
context.  Given that, and the fact that no use of the fcoe_rx_list is made in
irq context, its not necessecary to disable bottom halves while actually
receiving the frame.  Convert spin_*_bh calls in that function to their
lock-only equivalents

Signed-off-by: Neil Horman <[email protected]>
Acked-by: Vasu Dev <[email protected]>
Signed-off-by: Robert Love <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
  • Loading branch information
nhorman authored and James Bottomley committed Mar 28, 2012
1 parent 81c11dd commit 94aa29f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/scsi/fcoe/fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,7 @@ static int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev,
goto err;

fps = &per_cpu(fcoe_percpu, cpu);
spin_lock_bh(&fps->fcoe_rx_list.lock);
spin_lock(&fps->fcoe_rx_list.lock);
if (unlikely(!fps->thread)) {
/*
* The targeted CPU is not ready, let's target
Expand All @@ -1447,12 +1447,12 @@ static int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev,
"ready for incoming skb- using first online "
"CPU.\n");

spin_unlock_bh(&fps->fcoe_rx_list.lock);
spin_unlock(&fps->fcoe_rx_list.lock);
cpu = cpumask_first(cpu_online_mask);
fps = &per_cpu(fcoe_percpu, cpu);
spin_lock_bh(&fps->fcoe_rx_list.lock);
spin_lock(&fps->fcoe_rx_list.lock);
if (!fps->thread) {
spin_unlock_bh(&fps->fcoe_rx_list.lock);
spin_unlock(&fps->fcoe_rx_list.lock);
goto err;
}
}
Expand All @@ -1473,7 +1473,7 @@ static int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev,
__skb_queue_tail(&fps->fcoe_rx_list, skb);
if (fps->fcoe_rx_list.qlen == 1)
wake_up_process(fps->thread);
spin_unlock_bh(&fps->fcoe_rx_list.lock);
spin_unlock(&fps->fcoe_rx_list.lock);

return 0;
err:
Expand Down

0 comments on commit 94aa29f

Please sign in to comment.