dp83640: don't hold spinlock while calling netif_rx_ni
We should not hold a spinlock while pushing the skb into the networking stack, so move the call to netif_rx_ni out of the critical region to where we have dropped the spinlock. Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f379fdf10b
commit
d36b82bcdd
1 changed files with 5 additions and 2 deletions
|
@ -874,7 +874,6 @@ static void decode_rxts(struct dp83640_private *dp83640,
|
||||||
shhwtstamps = skb_hwtstamps(skb);
|
shhwtstamps = skb_hwtstamps(skb);
|
||||||
memset(shhwtstamps, 0, sizeof(*shhwtstamps));
|
memset(shhwtstamps, 0, sizeof(*shhwtstamps));
|
||||||
shhwtstamps->hwtstamp = ns_to_ktime(rxts->ns);
|
shhwtstamps->hwtstamp = ns_to_ktime(rxts->ns);
|
||||||
netif_rx_ni(skb);
|
|
||||||
list_add(&rxts->list, &dp83640->rxpool);
|
list_add(&rxts->list, &dp83640->rxpool);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -885,6 +884,9 @@ static void decode_rxts(struct dp83640_private *dp83640,
|
||||||
list_add_tail(&rxts->list, &dp83640->rxts);
|
list_add_tail(&rxts->list, &dp83640->rxts);
|
||||||
out:
|
out:
|
||||||
spin_unlock_irqrestore(&dp83640->rx_lock, flags);
|
spin_unlock_irqrestore(&dp83640->rx_lock, flags);
|
||||||
|
|
||||||
|
if (shhwtstamps)
|
||||||
|
netif_rx_ni(skb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void decode_txts(struct dp83640_private *dp83640,
|
static void decode_txts(struct dp83640_private *dp83640,
|
||||||
|
@ -1425,7 +1427,6 @@ static bool dp83640_rxtstamp(struct phy_device *phydev,
|
||||||
shhwtstamps = skb_hwtstamps(skb);
|
shhwtstamps = skb_hwtstamps(skb);
|
||||||
memset(shhwtstamps, 0, sizeof(*shhwtstamps));
|
memset(shhwtstamps, 0, sizeof(*shhwtstamps));
|
||||||
shhwtstamps->hwtstamp = ns_to_ktime(rxts->ns);
|
shhwtstamps->hwtstamp = ns_to_ktime(rxts->ns);
|
||||||
netif_rx_ni(skb);
|
|
||||||
list_del_init(&rxts->list);
|
list_del_init(&rxts->list);
|
||||||
list_add(&rxts->list, &dp83640->rxpool);
|
list_add(&rxts->list, &dp83640->rxpool);
|
||||||
break;
|
break;
|
||||||
|
@ -1438,6 +1439,8 @@ static bool dp83640_rxtstamp(struct phy_device *phydev,
|
||||||
skb_info->tmo = jiffies + SKB_TIMESTAMP_TIMEOUT;
|
skb_info->tmo = jiffies + SKB_TIMESTAMP_TIMEOUT;
|
||||||
skb_queue_tail(&dp83640->rx_queue, skb);
|
skb_queue_tail(&dp83640->rx_queue, skb);
|
||||||
schedule_delayed_work(&dp83640->ts_work, SKB_TIMESTAMP_TIMEOUT);
|
schedule_delayed_work(&dp83640->ts_work, SKB_TIMESTAMP_TIMEOUT);
|
||||||
|
} else {
|
||||||
|
netif_rx_ni(skb);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue