net: sonic: return NETDEV_TX_OK if failed to map buffer
authorMao Wenan <maowenan@huawei.com>
Thu, 5 Sep 2019 01:57:12 +0000 (09:57 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Sep 2019 13:04:57 +0000 (15:04 +0200)
commit6e1cdedcf0362fed3aedfe051d46bd7ee2a85fe1
tree03a79bfefc7b054b3777efeb404a653fd8fad85c
parent7bdf4de1267780aa194b3a28c85a6c4d617b0bdb
net: sonic: return NETDEV_TX_OK if failed to map buffer

NETDEV_TX_BUSY really should only be used by drivers that call
netif_tx_stop_queue() at the wrong moment. If dma_map_single() is
failed to map tx DMA buffer, it might trigger an infinite loop.
This patch use NETDEV_TX_OK instead of NETDEV_TX_BUSY, and change
printk to pr_err_ratelimited.

Fixes: d9fb9f384292 ("*sonic/natsemi/ns83829: Move the National Semi-conductor drivers")
Signed-off-by: Mao Wenan <maowenan@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/natsemi/sonic.c