drivers: net: remove NETDEV_TX_LOCKED
replace the trylock by a full spin_lock and remove TX_LOCKED return value. Followup patch will remove TX_LOCKED from the kernel. Cc: Jon Mason <jdmason@kudzu.us> Cc: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
926f273001
commit
a6086a8937
@@ -1610,7 +1610,6 @@ static inline int bdx_tx_space(struct bdx_priv *priv)
|
||||
* o NETDEV_TX_BUSY Cannot transmit packet, try later
|
||||
* Usually a bug, means queue start/stop flow control is broken in
|
||||
* the driver. Note: the driver must NOT put the skb in its DMA ring.
|
||||
* o NETDEV_TX_LOCKED Locking failed, please retry quickly.
|
||||
*/
|
||||
static netdev_tx_t bdx_tx_transmit(struct sk_buff *skb,
|
||||
struct net_device *ndev)
|
||||
@@ -1630,12 +1629,7 @@ static netdev_tx_t bdx_tx_transmit(struct sk_buff *skb,
|
||||
|
||||
ENTER;
|
||||
local_irq_save(flags);
|
||||
if (!spin_trylock(&priv->tx_lock)) {
|
||||
local_irq_restore(flags);
|
||||
DBG("%s[%s]: TX locked, returning NETDEV_TX_LOCKED\n",
|
||||
BDX_DRV_NAME, ndev->name);
|
||||
return NETDEV_TX_LOCKED;
|
||||
}
|
||||
spin_lock(&priv->tx_lock);
|
||||
|
||||
/* build tx descriptor */
|
||||
BDX_ASSERT(f->m.wptr >= f->m.memsz); /* started with valid wptr */
|
||||
|
Reference in New Issue
Block a user