Skip to content

Commit

Permalink
net: bcmgenet: enable NETIF_F_HIGHDMA flag
Browse files Browse the repository at this point in the history
This commit configures the DMA masks for the GENET driver and
sets the NETIF_F_HIGHDMA flag to report support of the feature.

Signed-off-by: Doug Berger <opendmb@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Doug Berger authored and David S. Miller committed Dec 20, 2019
1 parent d63b542 commit 99d5563
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions drivers/net/ethernet/broadcom/genet/bcmgenet.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* Broadcom GENET (Gigabit Ethernet) controller driver
*
* Copyright (c) 2014-2017 Broadcom
* Copyright (c) 2014-2019 Broadcom
*/

#define pr_fmt(fmt) "bcmgenet: " fmt
Expand Down Expand Up @@ -3537,7 +3537,7 @@ static int bcmgenet_probe(struct platform_device *pdev)

/* Set hardware features */
dev->hw_features |= NETIF_F_SG | NETIF_F_IP_CSUM |
NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM;
NETIF_F_IPV6_CSUM | NETIF_F_HIGHDMA | NETIF_F_RXCSUM;

/* Request the WOL interrupt and advertise suspend if available */
priv->wol_irq_disabled = true;
Expand Down Expand Up @@ -3574,6 +3574,14 @@ static int bcmgenet_probe(struct platform_device *pdev)

bcmgenet_set_hw_params(priv);

err = -EIO;
if (priv->hw_params->flags & GENET_HAS_40BITS)
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(40));
if (err)
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
if (err)
goto err;

/* Mii wait queue */
init_waitqueue_head(&priv->wq);
/* Always use RX_BUF_LENGTH (2KB) buffer for all chips */
Expand Down

0 comments on commit 99d5563

Please sign in to comment.