Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 94aa29f2 authored by Neil Horman's avatar Neil Horman Committed by James Bottomley
Browse files

[SCSI] foce: remove bh disable from fcoe sw transport rcv function



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: default avatarNeil Horman <nhorman@tuxdriver.com>
Acked-by: default avatarVasu Dev <vasu.dev@intel.com>
Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 81c11dd2
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -1436,7 +1436,7 @@ static int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev,
		goto err;
		goto err;


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


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


	return 0;
	return 0;
err:
err: