netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yanteng Si <si.yanteng@linux.dev>
To: Huacai Chen <chenhuacai@loongson.cn>,
	Huacai Chen <chenhuacai@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Feiyang Chen <chris.chenfeiyang@gmail.com>,
	loongarch@lists.linux.dev, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	Henry Chen <chenx97@aosc.io>, Biao Dong <dongbiao@loongson.cn>,
	Baoqi Zhang <zhangbaoqi@loongson.cn>
Subject: Re: [PATCH net-next V2 3/3] net: stmmac: dwmac-loongson: Add new GMAC's PCI device ID support
Date: Mon, 21 Apr 2025 10:09:12 +0800	[thread overview]
Message-ID: <ba5bb0ed-54e6-4655-ac52-0594acc3d9ea@linux.dev> (raw)
In-Reply-To: <20250416144132.3857990-4-chenhuacai@loongson.cn>


在 4/16/25 10:41 PM, Huacai Chen 写道:
> Add a new GMAC's PCI device ID (0x7a23) support which is used in
> Loongson-2K3000/Loongson-3B6000M. The new GMAC device use external PHY,
> so it reuses loongson_gmac_data() as the old GMAC device (0x7a03), and
> the new GMAC device still doesn't support flow control now.
>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> Tested-by: Henry Chen <chenx97@aosc.io>
> Tested-by: Biao Dong <dongbiao@loongson.cn>
> Signed-off-by: Baoqi Zhang <zhangbaoqi@loongson.cn>
> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>

Reviewed-by: Yanteng Si <si.yanteng@linux.dev>


Thanks,

Yanteng

> ---
>   drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | 8 +++++---
>   1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
> index 57917f26ab4d..e1591e6217d4 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
> @@ -66,7 +66,8 @@
>   					 DMA_STATUS_TPS | DMA_STATUS_TI  | \
>   					 DMA_STATUS_MSK_COMMON_LOONGSON)
>   
> -#define PCI_DEVICE_ID_LOONGSON_GMAC	0x7a03
> +#define PCI_DEVICE_ID_LOONGSON_GMAC1	0x7a03
> +#define PCI_DEVICE_ID_LOONGSON_GMAC2	0x7a23
>   #define PCI_DEVICE_ID_LOONGSON_GNET	0x7a13
>   #define DWMAC_CORE_MULTICHAN_V1	0x10	/* Loongson custom ID 0x10 */
>   #define DWMAC_CORE_MULTICHAN_V2	0x12	/* Loongson custom ID 0x12 */
> @@ -371,7 +372,7 @@ static struct mac_device_info *loongson_dwmac_setup(void *apriv)
>   	/* Loongson GMAC doesn't support the flow control. Loongson GNET
>   	 * without multi-channel doesn't support the half-duplex link mode.
>   	 */
> -	if (pdev->device == PCI_DEVICE_ID_LOONGSON_GMAC) {
> +	if (pdev->device != PCI_DEVICE_ID_LOONGSON_GNET) {
>   		mac->link.caps = MAC_10 | MAC_100 | MAC_1000;
>   	} else {
>   		if (ld->multichan)
> @@ -659,7 +660,8 @@ static SIMPLE_DEV_PM_OPS(loongson_dwmac_pm_ops, loongson_dwmac_suspend,
>   			 loongson_dwmac_resume);
>   
>   static const struct pci_device_id loongson_dwmac_id_table[] = {
> -	{ PCI_DEVICE_DATA(LOONGSON, GMAC, &loongson_gmac_pci_info) },
> +	{ PCI_DEVICE_DATA(LOONGSON, GMAC1, &loongson_gmac_pci_info) },
> +	{ PCI_DEVICE_DATA(LOONGSON, GMAC2, &loongson_gmac_pci_info) },
>   	{ PCI_DEVICE_DATA(LOONGSON, GNET, &loongson_gnet_pci_info) },
>   	{}
>   };

  reply	other threads:[~2025-04-21  2:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-16 14:41 [PATCH net-next V2 0/3] net: stmmac: dwmac-loongson: Add Loongson-2K3000 support Huacai Chen
2025-04-16 14:41 ` [PATCH net-next V2 1/3] net: stmmac: dwmac-loongson: Move queue number init to common function Huacai Chen
2025-04-21  1:21   ` Yanteng Si
2025-04-16 14:41 ` [PATCH net-next V2 2/3] net: stmmac: dwmac-loongson: Add new multi-chan IP core support Huacai Chen
2025-04-21  2:03   ` Yanteng Si
2025-04-21  4:20     ` Huacai Chen
2025-04-22  2:29       ` Yanteng Si
2025-04-22 13:27         ` Paolo Abeni
2025-04-23  1:01           ` Huacai Chen
2025-04-16 14:41 ` [PATCH net-next V2 3/3] net: stmmac: dwmac-loongson: Add new GMAC's PCI device ID support Huacai Chen
2025-04-21  2:09   ` Yanteng Si [this message]
2025-04-21  2:14 ` [PATCH net-next V2 0/3] net: stmmac: dwmac-loongson: Add Loongson-2K3000 support Yanteng Si

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ba5bb0ed-54e6-4655-ac52-0594acc3d9ea@linux.dev \
    --to=si.yanteng@linux.dev \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=chenhuacai@kernel.org \
    --cc=chenhuacai@loongson.cn \
    --cc=chenx97@aosc.io \
    --cc=chris.chenfeiyang@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dongbiao@loongson.cn \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=zhangbaoqi@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).