diff mbox

[net-next,v3,2/2] net: ethernet: mediatek: modify GDM to send packets to the PDMA for RX

Message ID 1472091991-1814-3-git-send-email-nelson.chang@mediatek.com (mailing list archive)
State New, archived
Headers show

Commit Message

Nelson Chang Aug. 25, 2016, 2:26 a.m. UTC
Because we change to use the PDMA as the Ethernet RX DMA engine,
the patch modifies to set GDM to send packets to PDMA for RX.

Signed-off-by: Nelson Chang <nelson.chang@mediatek.com>
---
 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ++--
 drivers/net/ethernet/mediatek/mtk_eth_soc.h | 0
 2 files changed, 2 insertions(+), 2 deletions(-)
 mode change 100755 => 100644 drivers/net/ethernet/mediatek/mtk_eth_soc.c
 mode change 100755 => 100644 drivers/net/ethernet/mediatek/mtk_eth_soc.h

diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
old mode 100755
new mode 100644

Comments

John Crispin Aug. 25, 2016, 12:10 p.m. UTC | #1
On 25/08/2016 04:26, Nelson Chang wrote:
> Because we change to use the PDMA as the Ethernet RX DMA engine,
> the patch modifies to set GDM to send packets to PDMA for RX.
> 
> Signed-off-by: Nelson Chang <nelson.chang@mediatek.com>
> ---
>  drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ++--
>  drivers/net/ethernet/mediatek/mtk_eth_soc.h | 0
>  2 files changed, 2 insertions(+), 2 deletions(-)
>  mode change 100755 => 100644 drivers/net/ethernet/mediatek/mtk_eth_soc.c
>  mode change 100755 => 100644 drivers/net/ethernet/mediatek/mtk_eth_soc.h
> 
> diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> old mode 100755
> new mode 100644
> index cbeb793..c47fef4
> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> @@ -1473,9 +1473,9 @@ static int __init mtk_hw_init(struct mtk_eth *eth)
>  	for (i = 0; i < 2; i++) {
>  		u32 val = mtk_r32(eth, MTK_GDMA_FWD_CFG(i));
>  
> -		/* setup the forward port to send frame to QDMA */
> +		/* setup the forward port to send frame to PDMA */
>  		val &= ~0xffff;
> -		val |= 0x5555;
> +		val |= 0x0000;

masking it and then setting it to 0 makes no sense. simply remove the
2nd line.

	John

>  
>  		/* Enable RX checksum */
>  		val |= MTK_GDMA_ICS_EN | MTK_GDMA_TCS_EN | MTK_GDMA_UCS_EN;
> diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
> old mode 100755
> new mode 100644
>
diff mbox

Patch

diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
old mode 100755
new mode 100644
index cbeb793..c47fef4
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1473,9 +1473,9 @@  static int __init mtk_hw_init(struct mtk_eth *eth)
 	for (i = 0; i < 2; i++) {
 		u32 val = mtk_r32(eth, MTK_GDMA_FWD_CFG(i));
 
-		/* setup the forward port to send frame to QDMA */
+		/* setup the forward port to send frame to PDMA */
 		val &= ~0xffff;
-		val |= 0x5555;
+		val |= 0x0000;
 
 		/* Enable RX checksum */
 		val |= MTK_GDMA_ICS_EN | MTK_GDMA_TCS_EN | MTK_GDMA_UCS_EN;