summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/cadence
diff options
context:
space:
mode:
authorClaudiu Beznea <claudiu.beznea@microchip.com>2018-08-07 12:25:13 +0300
committerDavid S. Miller <davem@davemloft.net>2018-08-07 13:18:49 -0700
commit33729f25a31e84e665b5441181bf98a514740fcf (patch)
treeb667fb5d8be64290869a2be13ad04f21650dbfbd /drivers/net/ethernet/cadence
parentd1c38957aaf3defe029f11761f3a4ae4c83ad690 (diff)
net: macb: move checksum clearing outside of spinlock
Move checksum clearing outside of spinlock. The SKB is protected by networking lock (HARD_TX_LOCK()). Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cadence')
-rw-r--r--drivers/net/ethernet/cadence/macb_main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index bb1d7b8d7dd6..332b19c645b4 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -1662,6 +1662,11 @@ static netdev_tx_t macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
bool is_lso, is_udp = 0;
netdev_tx_t ret = NETDEV_TX_OK;
+ if (macb_clear_csum(skb)) {
+ dev_kfree_skb_any(skb);
+ return ret;
+ }
+
is_lso = (skb_shinfo(skb)->gso_size != 0);
if (is_lso) {
@@ -1717,11 +1722,6 @@ static netdev_tx_t macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
return NETDEV_TX_BUSY;
}
- if (macb_clear_csum(skb)) {
- dev_kfree_skb_any(skb);
- goto unlock;
- }
-
/* Map socket buffer for DMA transfer */
if (!macb_tx_map(bp, queue, skb, hdrlen)) {
dev_kfree_skb_any(skb);