Commit 47975cd1 authored by Florian Westphal's avatar Florian Westphal Committed by David S. Miller

RDMA/nes: remove use of NETDEV_TX_LOCKED

ndo_start_xmit never returns it to stack, but nes_nic_send helper used it if
skb could not be queued to hardware.  Switch to bool instead.

Cc: <linux-rdma@vger.kernel.org>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c971c0e5
...@@ -356,7 +356,7 @@ static int nes_netdev_stop(struct net_device *netdev) ...@@ -356,7 +356,7 @@ static int nes_netdev_stop(struct net_device *netdev)
/** /**
* nes_nic_send * nes_nic_send
*/ */
static int nes_nic_send(struct sk_buff *skb, struct net_device *netdev) static bool nes_nic_send(struct sk_buff *skb, struct net_device *netdev)
{ {
struct nes_vnic *nesvnic = netdev_priv(netdev); struct nes_vnic *nesvnic = netdev_priv(netdev);
struct nes_device *nesdev = nesvnic->nesdev; struct nes_device *nesdev = nesvnic->nesdev;
...@@ -413,7 +413,7 @@ static int nes_nic_send(struct sk_buff *skb, struct net_device *netdev) ...@@ -413,7 +413,7 @@ static int nes_nic_send(struct sk_buff *skb, struct net_device *netdev)
netdev->name, skb_shinfo(skb)->nr_frags + 2, skb_headlen(skb)); netdev->name, skb_shinfo(skb)->nr_frags + 2, skb_headlen(skb));
kfree_skb(skb); kfree_skb(skb);
nesvnic->tx_sw_dropped++; nesvnic->tx_sw_dropped++;
return NETDEV_TX_LOCKED; return false;
} }
set_bit(nesnic->sq_head, nesnic->first_frag_overflow); set_bit(nesnic->sq_head, nesnic->first_frag_overflow);
bus_address = pci_map_single(nesdev->pcidev, skb->data + NES_FIRST_FRAG_SIZE, bus_address = pci_map_single(nesdev->pcidev, skb->data + NES_FIRST_FRAG_SIZE,
...@@ -454,8 +454,7 @@ static int nes_nic_send(struct sk_buff *skb, struct net_device *netdev) ...@@ -454,8 +454,7 @@ static int nes_nic_send(struct sk_buff *skb, struct net_device *netdev)
set_wqe_32bit_value(nic_sqe->wqe_words, NES_NIC_SQ_WQE_MISC_IDX, wqe_misc); set_wqe_32bit_value(nic_sqe->wqe_words, NES_NIC_SQ_WQE_MISC_IDX, wqe_misc);
nesnic->sq_head++; nesnic->sq_head++;
nesnic->sq_head &= nesnic->sq_size - 1; nesnic->sq_head &= nesnic->sq_size - 1;
return true;
return NETDEV_TX_OK;
} }
...@@ -673,13 +672,11 @@ static int nes_netdev_start_xmit(struct sk_buff *skb, struct net_device *netdev) ...@@ -673,13 +672,11 @@ static int nes_netdev_start_xmit(struct sk_buff *skb, struct net_device *netdev)
skb_linearize(skb); skb_linearize(skb);
skb_set_transport_header(skb, hoffset); skb_set_transport_header(skb, hoffset);
skb_set_network_header(skb, nhoffset); skb_set_network_header(skb, nhoffset);
send_rc = nes_nic_send(skb, netdev); if (!nes_nic_send(skb, netdev))
if (send_rc != NETDEV_TX_OK)
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
} else { } else {
send_rc = nes_nic_send(skb, netdev); if (!nes_nic_send(skb, netdev))
if (send_rc != NETDEV_TX_OK)
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment