summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/tx_common.c
diff options
context:
space:
mode:
authorEdward Cree <ecree@solarflare.com>2020-07-02 19:30:23 +0300
committerDavid S. Miller <davem@davemloft.net>2020-07-03 00:47:40 +0300
commit79de6e7cb8ac9bd0c98be663d414f85ef90c1196 (patch)
tree000ddee2a8378cb7edff707acac3a13f8267ec09 /drivers/net/ethernet/sfc/tx_common.c
parenta81dcd85a7c1bc548ce8fb635623970fdee5887d (diff)
downloadlinux-79de6e7cb8ac9bd0c98be663d414f85ef90c1196.tar.xz
sfc: don't call tx_limit_len if NIC type doesn't have one
EF100 doesn't need to split up large DMAs. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/tx_common.c')
-rw-r--r--drivers/net/ethernet/sfc/tx_common.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/tx_common.c b/drivers/net/ethernet/sfc/tx_common.c
index 2a058b76d1f0..11b64c609550 100644
--- a/drivers/net/ethernet/sfc/tx_common.c
+++ b/drivers/net/ethernet/sfc/tx_common.c
@@ -298,7 +298,11 @@ struct efx_tx_buffer *efx_tx_map_chunk(struct efx_tx_queue *tx_queue,
/* Map the fragment taking account of NIC-dependent DMA limits. */
do {
buffer = efx_tx_queue_get_insert_buffer(tx_queue);
- dma_len = nic_type->tx_limit_len(tx_queue, dma_addr, len);
+
+ if (nic_type->tx_limit_len)
+ dma_len = nic_type->tx_limit_len(tx_queue, dma_addr, len);
+ else
+ dma_len = len;
buffer->len = dma_len;
buffer->dma_addr = dma_addr;