Message ID | 7235e4af89c169e79f0404a3dc953f1756bab196.1714046812.git.siyanteng@loongson.cn (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | stmmac: Add Loongson platform support | expand |
On Thu, Apr 25, 2024 at 09:11:37PM +0800, Yanteng Si wrote: > We've already introduced loongson_gnet_data(), so the > STMMAC_FLAG_DISABLE_FORCE_1000 should be take away from > loongson_dwmac_probe(). > > Signed-off-by: Feiyang Chen <chenfeiyang@loongson.cn> > Signed-off-by: Yinggang Gu <guyinggang@loongson.cn> > Signed-off-by: Yanteng Si <siyanteng@loongson.cn> > --- > .../net/ethernet/stmicro/stmmac/dwmac-loongson.c | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c > index 68de90c44feb..dea02de030e6 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c > @@ -286,6 +286,12 @@ static int loongson_gnet_data(struct pci_dev *pdev, > plat->mdio_bus_data->phy_mask = ~(u32)BIT(2); > plat->fix_mac_speed = loongson_gnet_fix_speed; > > + /* GNET devices with dev revision 0x00 do not support manually > + * setting the speed to 1000. > + */ > + if (pdev->revision == 0x00) > + plat->flags |= STMMAC_FLAG_DISABLE_FORCE_1000; > + Just introduce the change above in the framework of the patch [PATCH net-next v12 13/15] net: stmmac: dwmac-loongson: Add Loongson GNET support and ... > return 0; > } > > @@ -540,13 +546,6 @@ static int loongson_dwmac_probe(struct pci_dev *pdev, const struct pci_device_id > break; > } > > - /* GNET devices with dev revision 0x00 do not support manually > - * setting the speed to 1000. > - */ > - if (pdev->device == PCI_DEVICE_ID_LOONGSON_GNET && > - pdev->revision == 0x00) > - plat->flags |= STMMAC_FLAG_DISABLE_FORCE_1000; > - ... you won't to have this being undone. So this patch won't be even needed to be introduced. See my comment sent to [PATCH net-next v12 12/15] net: stmmac: dwmac-loongson: Fixed failure to set network speed to 1000. -Serge(y) > ret = stmmac_dvr_probe(&pdev->dev, plat, &res); > if (ret) > goto err_disable_device; > -- > 2.31.4 >
在 2024/5/6 05:53, Serge Semin 写道: > On Thu, Apr 25, 2024 at 09:11:37PM +0800, Yanteng Si wrote: >> We've already introduced loongson_gnet_data(), so the >> STMMAC_FLAG_DISABLE_FORCE_1000 should be take away from >> loongson_dwmac_probe(). >> >> Signed-off-by: Feiyang Chen <chenfeiyang@loongson.cn> >> Signed-off-by: Yinggang Gu <guyinggang@loongson.cn> >> Signed-off-by: Yanteng Si <siyanteng@loongson.cn> >> --- >> .../net/ethernet/stmicro/stmmac/dwmac-loongson.c | 13 ++++++------- >> 1 file changed, 6 insertions(+), 7 deletions(-) >> >> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c >> index 68de90c44feb..dea02de030e6 100644 >> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c >> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c >> @@ -286,6 +286,12 @@ static int loongson_gnet_data(struct pci_dev *pdev, >> plat->mdio_bus_data->phy_mask = ~(u32)BIT(2); >> plat->fix_mac_speed = loongson_gnet_fix_speed; >> >> + /* GNET devices with dev revision 0x00 do not support manually >> + * setting the speed to 1000. >> + */ >> + if (pdev->revision == 0x00) >> + plat->flags |= STMMAC_FLAG_DISABLE_FORCE_1000; >> + > Just introduce the change above in the framework of the patch > [PATCH net-next v12 13/15] net: stmmac: dwmac-loongson: Add Loongson GNET support > and ... OK. > >> return 0; >> } >> >> @@ -540,13 +546,6 @@ static int loongson_dwmac_probe(struct pci_dev *pdev, const struct pci_device_id >> break; >> } >> >> - /* GNET devices with dev revision 0x00 do not support manually >> - * setting the speed to 1000. >> - */ >> - if (pdev->device == PCI_DEVICE_ID_LOONGSON_GNET && >> - pdev->revision == 0x00) >> - plat->flags |= STMMAC_FLAG_DISABLE_FORCE_1000; >> - > ... you won't to have this being undone. So this patch won't be even > needed to be introduced. > > See my comment sent to > [PATCH net-next v12 12/15] net: stmmac: dwmac-loongson: Fixed failure to set network speed to 1000. > OK. Thanks, Yanteng
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c index 68de90c44feb..dea02de030e6 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c @@ -286,6 +286,12 @@ static int loongson_gnet_data(struct pci_dev *pdev, plat->mdio_bus_data->phy_mask = ~(u32)BIT(2); plat->fix_mac_speed = loongson_gnet_fix_speed; + /* GNET devices with dev revision 0x00 do not support manually + * setting the speed to 1000. + */ + if (pdev->revision == 0x00) + plat->flags |= STMMAC_FLAG_DISABLE_FORCE_1000; + return 0; } @@ -540,13 +546,6 @@ static int loongson_dwmac_probe(struct pci_dev *pdev, const struct pci_device_id break; } - /* GNET devices with dev revision 0x00 do not support manually - * setting the speed to 1000. - */ - if (pdev->device == PCI_DEVICE_ID_LOONGSON_GNET && - pdev->revision == 0x00) - plat->flags |= STMMAC_FLAG_DISABLE_FORCE_1000; - ret = stmmac_dvr_probe(&pdev->dev, plat, &res); if (ret) goto err_disable_device;