lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 2 Jul 2024 01:57:28 +0300
From: Serge Semin <fancer.lancer@...il.com>
To: Yanteng Si <siyanteng@...ngson.cn>
Cc: andrew@...n.ch, hkallweit1@...il.com, peppe.cavallaro@...com, 
	alexandre.torgue@...s.st.com, joabreu@...opsys.com, Jose.Abreu@...opsys.com, 
	chenhuacai@...nel.org, linux@...linux.org.uk, guyinggang@...ngson.cn, 
	netdev@...r.kernel.org, chris.chenfeiyang@...il.com, si.yanteng@...ux.dev
Subject: Re: [PATCH net-next v13 06/15] net: stmmac: dwmac-loongson: Detach
 GMAC-specific platform data init

On Tue, Jun 25, 2024 at 08:31:32PM +0800, Yanteng Si wrote:
> 
> 在 2024/6/24 09:47, Serge Semin 写道:
> > On Mon, Jun 17, 2024 at 06:00:19PM +0800, Yanteng Si wrote:
> > > Hi Serge,
> > > 
> > > 在 2024/6/15 00:19, Serge Semin 写道:
> > > > On Wed, May 29, 2024 at 06:19:03PM +0800, Yanteng Si wrote:
> > > > > Loongson delivers two types of the network devices: Loongson GMAC and
> > > > > Loongson GNET in the framework of four CPU/Chipsets revisions:
> > > > > 
> > > > >      Chip             Network  PCI Dev ID   Synopys Version   DMA-channel
> > > > > LS2K1000 CPU         GMAC      0x7a03       v3.50a/v3.73a        1
> > > > > LS7A1000 Chipset     GMAC      0x7a03       v3.50a/v3.73a        1
> > > > > LS2K2000 CPU         GNET      0x7a13          v3.73a            8
> > > > > LS7A2000 Chipset     GNET      0x7a13          v3.73a            1
> > > > You mentioned in the cover-letter
> > > > https://lore.kernel.org/netdev/cover.1716973237.git.siyanteng@loongson.cn/
> > > > that LS2K now have GMAC NICs too:
> > > > " 1. The current LS2K2000 also have a GMAC(and two GNET) that supports 8
> > > >       channels, so we have to reconsider the initialization of
> > > >       tx/rx_queues_to_use into probe();"
> > > > 
> > > > But I don't see much changes in the series which would indicate that
> > > > new data. Please clarify what does it mean:
> > > > 
> > > > Does it mean LS2K2000 has two types of the DW GMACs, right?
> > > Yes!
> > > > Are both of them based on the DW GMAC v3.73a IP-core with AV-feature
> > > > enabled and 8 DMA-channels?
> > > Yes!
> > > > Seeing you called the new device as GMAC it doesn't have an
> > > > integrated PHY as GNETs do, does it? If so, then neither
> > > > STMMAC_FLAG_DISABLE_FORCE_1000 nor loongson_gnet_fix_speed() relevant
> > > > for the new device, right?
> > > YES!
> > > > Why haven't you changed the sheet in the commit log? Shall the sheet
> > > > be updated like this:
> > > > 
> > > >       Chip             Network  PCI Dev ID   Synopys Version   DMA-channel
> > > >    LS2K1000 CPU         GMAC      0x7a03       v3.50a/v3.73a        1
> > > >    LS7A1000 Chipset     GMAC      0x7a03       v3.50a/v3.73a        1
> > > > +LS2K2000 CPU         GMAC      0x7a13          v3.73a            8
> > > >    LS2K2000 CPU         GNET      0x7a13          v3.73a            8
> > > >    LS7A2000 Chipset     GNET      0x7a13          v3.73a            1
> > > > 
> > > > ?
> > > No! PCI Dev ID of GMAC is 0x7a03. So:
> > > 
> > >   LS2K1000 CPU         GMAC      0x7a03       v3.50a/v3.73a 1
> > >   LS7A1000 Chipset     GMAC      0x7a03       v3.50a/v3.73a 1
> > > +LS2K2000 CPU         GMAC      0x7a03          v3.73a 8
> > >   LS2K2000 CPU         GNET      0x7a13          v3.73a 8
> > >   LS7A2000 Chipset     GNET      0x7a13          v3.73a 1
> > > 
> > > > I'll continue reviewing the series after the questions above are
> > > > clarified.
> > > OK, If anything else is unclear, please let me know.
> > Got it. Thanks for clarifying. I'll get back to reviewing the series
> > tomorrow. Sorry for the timebreak.
> 
> OK. No worries.

Seeing Loongson GMAC can be also found with the 8-channels AV feature 
enabled, we'll need to reconsider the patches logic and thus the 
commit logs too. I'll try to thoroughly describe the changes in the
respective parts of the series. But in general, if what I've come up
with is implemented, the patchset will turn to look as follows:

[PATCH net-next v14 01/15] net: stmmac: Move the atds flag to the stmmac_dma_cfg structure
[PATCH net-next v14 02/15] net: stmmac: Add multi-channel support
[PATCH net-next v14 03/15] net: stmmac: Export dwmac1000_dma_ops
[PATCH net-next v14 04/15] net: stmmac: dwmac-loongson: Drop duplicated hash-based filter size init
[PATCH net-next v14 05/15] net: stmmac: dwmac-loongson: Drop pci_enable/disable_msi calls
[PATCH net-next v14 06/15] net: stmmac: dwmac-loongson: Use PCI_DEVICE_DATA() macro for device identification

[PATCH net-next v14 07/15] net: stmmac: dwmac-loongson: Detach GMAC-specific platform data init
+-> Init the plat_stmmacenet_data::{tx_queues_to_use,rx_queues_to_use}
    in the loongson_gmac_data() method.

[PATCH net-next v14 08/15] net: stmmac: dwmac-loongson: Init ref and PTP clocks rate
[PATCH net-next v14 09/15] net: stmmac: dwmac-loongson: Add phy_interface for Loongson GMAC

[PATCH net-next v14 10/15] net: stmmac: dwmac-loongson: Introduce PCI device info data
+-> Make sure the setup() method is called after the pci_enable_device()
    invocation.

[PATCH net-next v14 11/15] net: stmmac: dwmac-loongson: Add DT-less GMAC PCI-device support
+-> Introduce the loongson_dwmac_dt_config() method here instead of
    doing that in a separate patch.
+-> Add loongson_dwmac_acpi_config() which would just get the IRQ from
    the pdev->irq field and make sure it is valid.

[PATCH net-next v14 12/15] net: stmmac: Fixed failure to set network speed to 1000.
+-> ... not sure what to do with this ...

[PATCH net-next v14 13/15] net: stmmac: dwmac-loongson: Add Loongson Multi-channels GMAC support
+-> This is former "net: stmmac: dwmac-loongson: Add Loongson GNET
    support" patch, but which adds the support of the Loongson GMAC with the
    8-channels AV-feature available.
+-> loongson_dwmac_intx_config() shall be dropped due to the
    loongson_dwmac_acpi_config() method added in the PATCH 11/15.
+-> Make sure loongson_data::loongson_id is initialized before the
    stmmac_pci_info::setup() is called.
+-> Move the rx_queues_to_use/tx_queues_to_use and coe_unsupported
    fields initialization to the loongson_gmac_data() method.
+-> As before, call the loongson_dwmac_msi_config() method if the multi-channels
    Loongson MAC has been detected.
+-> Move everything GNET-specific to the next patch.

[PATCH net-next v14 14/15] net: stmmac: dwmac-loongson: Add Loongson GNET support
+-> Everything Loonsgson GNET-specific is supposed to be added in the
    framework of this patch:
    + PCI_DEVICE_ID_LOONGSON_GNET macro
    + loongson_gnet_fix_speed() method
    + loongson_gnet_data() method
    + loongson_gnet_pci_info data
    + The GNET-specific part of the loongson_dwmac_setup() method.
    + ...

[PATCH net-next v14 15/15] net: stmmac: dwmac-loongson: Add loongson module author

Hopefully I didn't forget anything. I'll give more details in the
comments to the respective patches.

-Serge(y)

> 
> 
> Thanks,
> 
> Yanteng
> 
> 
> > 
> > -Serge(y)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ