mbox series

[v6,0/9] stmmac: Add Loongson platform support

Message ID cover.1702458672.git.siyanteng@loongson.cn (mailing list archive)
Headers show
Series stmmac: Add Loongson platform support | expand

Message

Yanteng Si Dec. 13, 2023, 10:12 a.m. UTC
v6:

* Refer to Serge's suggestion:
  - Add new platform feature flag:
    include/linux/stmmac.h:
    +#define STMMAC_FLAG_HAS_LGMAC			BIT(13)

  - Add the IRQs macros specific to the Loongson Multi-channels GMAC:
     drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h:
     +#define DMA_INTR_ENA_NIE_LOONGSON 0x00060000	/* Normal Loongson Tx/Rx Summary */
     #define DMA_INTR_ENA_NIE 0x00010000	/* Normal Summary */
     ...

  - Drop all of redundant changes that don't require the
    prototypes being converted to accepting the stmmac_priv
    pointer.

* Refer to andrew's suggestion:
  - Drop white space changes.
  - break patch up into lots of smaller parts.
     Some small patches have been put into another series as a preparation
     see <https://lore.kernel.org/loongarch/cover.1702289232.git.siyanteng@loongson.cn/T/#t>
     
     *note* : This series of patches relies on the three small patches above.
* others
  - Drop irq_flags changes.
  - Changed patch order.



v4 -> v5:

* Remove an ugly and useless patch (fix channel number).
* Remove the non-standard dma64 driver code, and also remove
  the HWIF entries, since the associated custom callbacks no
  longer exist.
* Refer to Serge's suggestion: Update the dwmac1000_dma.c to
  support the multi-DMA-channels controller setup.

See:
v4: <https://lore.kernel.org/loongarch/cover.1692696115.git.chenfeiyang@loongson.cn/>
v3: <https://lore.kernel.org/loongarch/cover.1691047285.git.chenfeiyang@loongson.cn/>
v2: <https://lore.kernel.org/loongarch/cover.1690439335.git.chenfeiyang@loongson.cn/>
v1: <https://lore.kernel.org/loongarch/cover.1689215889.git.chenfeiyang@loongson.cn/>

Yanteng Si (9):
  net: stmmac: Pass stmmac_priv and chan in some callbacks
  net: stmmac: dwmac-loongson: Refactor code for loongson_dwmac_probe()
  net: stmmac: dwmac-loongson: Add full PCI support
  net: stmmac: Add multi-channel supports
  net: stmmac: Add Loongson-specific register definitions
  net: stmmac: dwmac-loongson: Add MSI support
  net: stmmac: dwmac-loongson: Add GNET support
  net: stmmac: dwmac-loongson: Disable flow control for GMAC
  net: stmmac: Disable coe for some Loongson GNET

 drivers/net/ethernet/stmicro/stmmac/common.h  |   1 +
 .../ethernet/stmicro/stmmac/dwmac-loongson.c  | 296 ++++++++++++++----
 .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c |   2 +-
 .../ethernet/stmicro/stmmac/dwmac1000_dma.c   |  61 +++-
 .../ethernet/stmicro/stmmac/dwmac100_dma.c    |   2 +-
 .../net/ethernet/stmicro/stmmac/dwmac4_dma.c  |   2 +-
 .../net/ethernet/stmicro/stmmac/dwmac_dma.h   |  47 ++-
 .../net/ethernet/stmicro/stmmac/dwmac_lib.c   |  65 ++--
 .../ethernet/stmicro/stmmac/dwxgmac2_dma.c    |   2 +-
 drivers/net/ethernet/stmicro/stmmac/hwif.c    |   8 +-
 drivers/net/ethernet/stmicro/stmmac/hwif.h    |  11 +-
 .../ethernet/stmicro/stmmac/stmmac_ethtool.c  |   6 +
 .../net/ethernet/stmicro/stmmac/stmmac_main.c |  13 +-
 include/linux/stmmac.h                        |   4 +
 14 files changed, 413 insertions(+), 107 deletions(-)

Comments

Serge Semin Dec. 14, 2023, 3:15 p.m. UTC | #1
Hi Yanteng

On Wed, Dec 13, 2023 at 06:12:22PM +0800, Yanteng Si wrote:
> v6:
> 
> * Refer to Serge's suggestion:
>   - Add new platform feature flag:
>     include/linux/stmmac.h:
>     +#define STMMAC_FLAG_HAS_LGMAC			BIT(13)
> 
>   - Add the IRQs macros specific to the Loongson Multi-channels GMAC:
>      drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h:
>      +#define DMA_INTR_ENA_NIE_LOONGSON 0x00060000	/* Normal Loongson Tx/Rx Summary */
>      #define DMA_INTR_ENA_NIE 0x00010000	/* Normal Summary */
>      ...
> 
>   - Drop all of redundant changes that don't require the
>     prototypes being converted to accepting the stmmac_priv
>     pointer.
> 
> * Refer to andrew's suggestion:
>   - Drop white space changes.
>   - break patch up into lots of smaller parts.
>      Some small patches have been put into another series as a preparation
>      see <https://lore.kernel.org/loongarch/cover.1702289232.git.siyanteng@loongson.cn/T/#t>
>      
>      *note* : This series of patches relies on the three small patches above.
> * others
>   - Drop irq_flags changes.
>   - Changed patch order.

Thanks for submitting the updated series. I'll have a closer look at
it on the next week.

-Serge(y)

> 
> 
> 
> v4 -> v5:
> 
> * Remove an ugly and useless patch (fix channel number).
> * Remove the non-standard dma64 driver code, and also remove
>   the HWIF entries, since the associated custom callbacks no
>   longer exist.
> * Refer to Serge's suggestion: Update the dwmac1000_dma.c to
>   support the multi-DMA-channels controller setup.
> 
> See:
> v4: <https://lore.kernel.org/loongarch/cover.1692696115.git.chenfeiyang@loongson.cn/>
> v3: <https://lore.kernel.org/loongarch/cover.1691047285.git.chenfeiyang@loongson.cn/>
> v2: <https://lore.kernel.org/loongarch/cover.1690439335.git.chenfeiyang@loongson.cn/>
> v1: <https://lore.kernel.org/loongarch/cover.1689215889.git.chenfeiyang@loongson.cn/>
> 
> Yanteng Si (9):
>   net: stmmac: Pass stmmac_priv and chan in some callbacks
>   net: stmmac: dwmac-loongson: Refactor code for loongson_dwmac_probe()
>   net: stmmac: dwmac-loongson: Add full PCI support
>   net: stmmac: Add multi-channel supports
>   net: stmmac: Add Loongson-specific register definitions
>   net: stmmac: dwmac-loongson: Add MSI support
>   net: stmmac: dwmac-loongson: Add GNET support
>   net: stmmac: dwmac-loongson: Disable flow control for GMAC
>   net: stmmac: Disable coe for some Loongson GNET
> 
>  drivers/net/ethernet/stmicro/stmmac/common.h  |   1 +
>  .../ethernet/stmicro/stmmac/dwmac-loongson.c  | 296 ++++++++++++++----
>  .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c |   2 +-
>  .../ethernet/stmicro/stmmac/dwmac1000_dma.c   |  61 +++-
>  .../ethernet/stmicro/stmmac/dwmac100_dma.c    |   2 +-
>  .../net/ethernet/stmicro/stmmac/dwmac4_dma.c  |   2 +-
>  .../net/ethernet/stmicro/stmmac/dwmac_dma.h   |  47 ++-
>  .../net/ethernet/stmicro/stmmac/dwmac_lib.c   |  65 ++--
>  .../ethernet/stmicro/stmmac/dwxgmac2_dma.c    |   2 +-
>  drivers/net/ethernet/stmicro/stmmac/hwif.c    |   8 +-
>  drivers/net/ethernet/stmicro/stmmac/hwif.h    |  11 +-
>  .../ethernet/stmicro/stmmac/stmmac_ethtool.c  |   6 +
>  .../net/ethernet/stmicro/stmmac/stmmac_main.c |  13 +-
>  include/linux/stmmac.h                        |   4 +
>  14 files changed, 413 insertions(+), 107 deletions(-)
> 
> -- 
> 2.31.4
>
Jakub Kicinski Dec. 14, 2023, 7:09 p.m. UTC | #2
On Wed, 13 Dec 2023 18:12:22 +0800 Yanteng Si wrote:
> [PATCH v6 0/9] stmmac: Add Loongson platform support

Please use --subject-prefix="PATCH net-next vN" to indicate that 
the patches are for the networking tree.

Unfortunately they do not apply so you'll have to rebase and resend.
Jakub Kicinski Dec. 14, 2023, 7:09 p.m. UTC | #3
On Thu, 14 Dec 2023 11:09:01 -0800 Jakub Kicinski wrote:
> On Wed, 13 Dec 2023 18:12:22 +0800 Yanteng Si wrote:
> > [PATCH v6 0/9] stmmac: Add Loongson platform support  
> 
> Please use --subject-prefix="PATCH net-next vN" to indicate that 
> the patches are for the networking tree.
> 
> Unfortunately they do not apply so you'll have to rebase and resend.

But perhaps wait for Serge's comments before reposting.
Yanteng Si Dec. 19, 2023, 12:35 p.m. UTC | #4
在 2023/12/14 23:15, Serge Semin 写道:
> Hi Yanteng
>
> On Wed, Dec 13, 2023 at 06:12:22PM +0800, Yanteng Si wrote:
>> v6:
>>
>> * Refer to Serge's suggestion:
>>    - Add new platform feature flag:
>>      include/linux/stmmac.h:
>>      +#define STMMAC_FLAG_HAS_LGMAC			BIT(13)
>>
>>    - Add the IRQs macros specific to the Loongson Multi-channels GMAC:
>>       drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h:
>>       +#define DMA_INTR_ENA_NIE_LOONGSON 0x00060000	/* Normal Loongson Tx/Rx Summary */
>>       #define DMA_INTR_ENA_NIE 0x00010000	/* Normal Summary */
>>       ...
>>
>>    - Drop all of redundant changes that don't require the
>>      prototypes being converted to accepting the stmmac_priv
>>      pointer.
>>
>> * Refer to andrew's suggestion:
>>    - Drop white space changes.
>>    - break patch up into lots of smaller parts.
>>       Some small patches have been put into another series as a preparation
>>       see <https://lore.kernel.org/loongarch/cover.1702289232.git.siyanteng@loongson.cn/T/#t>
>>       
>>       *note* : This series of patches relies on the three small patches above.
>> * others
>>    - Drop irq_flags changes.
>>    - Changed patch order.
> Thanks for submitting the updated series. I'll have a closer look at
> it on the next week.

I have prepared a new patch version and will CC you soon, so you can go 
straight

to the v7.


Thank,

Yanteng

>
> -Serge(y)
>
>>
>>
>> v4 -> v5:
>>
>> * Remove an ugly and useless patch (fix channel number).
>> * Remove the non-standard dma64 driver code, and also remove
>>    the HWIF entries, since the associated custom callbacks no
>>    longer exist.
>> * Refer to Serge's suggestion: Update the dwmac1000_dma.c to
>>    support the multi-DMA-channels controller setup.
>>
>> See:
>> v4: <https://lore.kernel.org/loongarch/cover.1692696115.git.chenfeiyang@loongson.cn/>
>> v3: <https://lore.kernel.org/loongarch/cover.1691047285.git.chenfeiyang@loongson.cn/>
>> v2: <https://lore.kernel.org/loongarch/cover.1690439335.git.chenfeiyang@loongson.cn/>
>> v1: <https://lore.kernel.org/loongarch/cover.1689215889.git.chenfeiyang@loongson.cn/>
>>
>> Yanteng Si (9):
>>    net: stmmac: Pass stmmac_priv and chan in some callbacks
>>    net: stmmac: dwmac-loongson: Refactor code for loongson_dwmac_probe()
>>    net: stmmac: dwmac-loongson: Add full PCI support
>>    net: stmmac: Add multi-channel supports
>>    net: stmmac: Add Loongson-specific register definitions
>>    net: stmmac: dwmac-loongson: Add MSI support
>>    net: stmmac: dwmac-loongson: Add GNET support
>>    net: stmmac: dwmac-loongson: Disable flow control for GMAC
>>    net: stmmac: Disable coe for some Loongson GNET
>>
>>   drivers/net/ethernet/stmicro/stmmac/common.h  |   1 +
>>   .../ethernet/stmicro/stmmac/dwmac-loongson.c  | 296 ++++++++++++++----
>>   .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c |   2 +-
>>   .../ethernet/stmicro/stmmac/dwmac1000_dma.c   |  61 +++-
>>   .../ethernet/stmicro/stmmac/dwmac100_dma.c    |   2 +-
>>   .../net/ethernet/stmicro/stmmac/dwmac4_dma.c  |   2 +-
>>   .../net/ethernet/stmicro/stmmac/dwmac_dma.h   |  47 ++-
>>   .../net/ethernet/stmicro/stmmac/dwmac_lib.c   |  65 ++--
>>   .../ethernet/stmicro/stmmac/dwxgmac2_dma.c    |   2 +-
>>   drivers/net/ethernet/stmicro/stmmac/hwif.c    |   8 +-
>>   drivers/net/ethernet/stmicro/stmmac/hwif.h    |  11 +-
>>   .../ethernet/stmicro/stmmac/stmmac_ethtool.c  |   6 +
>>   .../net/ethernet/stmicro/stmmac/stmmac_main.c |  13 +-
>>   include/linux/stmmac.h                        |   4 +
>>   14 files changed, 413 insertions(+), 107 deletions(-)
>>
>> -- 
>> 2.31.4
>>
Serge Semin Dec. 19, 2023, 12:55 p.m. UTC | #5
On Tue, Dec 19, 2023 at 08:35:17PM +0800, Yanteng Si wrote:
> 
> 在 2023/12/14 23:15, Serge Semin 写道:
> > Hi Yanteng
> > 
> > On Wed, Dec 13, 2023 at 06:12:22PM +0800, Yanteng Si wrote:
> > > v6:
> > > 
> > > * Refer to Serge's suggestion:
> > >    - Add new platform feature flag:
> > >      include/linux/stmmac.h:
> > >      +#define STMMAC_FLAG_HAS_LGMAC			BIT(13)
> > > 
> > >    - Add the IRQs macros specific to the Loongson Multi-channels GMAC:
> > >       drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h:
> > >       +#define DMA_INTR_ENA_NIE_LOONGSON 0x00060000	/* Normal Loongson Tx/Rx Summary */
> > >       #define DMA_INTR_ENA_NIE 0x00010000	/* Normal Summary */
> > >       ...
> > > 
> > >    - Drop all of redundant changes that don't require the
> > >      prototypes being converted to accepting the stmmac_priv
> > >      pointer.
> > > 
> > > * Refer to andrew's suggestion:
> > >    - Drop white space changes.
> > >    - break patch up into lots of smaller parts.
> > >       Some small patches have been put into another series as a preparation
> > >       see <https://lore.kernel.org/loongarch/cover.1702289232.git.siyanteng@loongson.cn/T/#t>
> > >       *note* : This series of patches relies on the three small patches above.
> > > * others
> > >    - Drop irq_flags changes.
> > >    - Changed patch order.
> > Thanks for submitting the updated series. I'll have a closer look at
> > it on the next week.
> 

> I have prepared a new patch version and will CC you soon, so you can go
> straight
> 
> to the v7.

If you think you settled all the Andrew's comment, you can go ahead
and submit v7. I'll look at it tomorrow.

-Serge(y)

> 
> 
> Thank,
> 
> Yanteng
> 
> > 
> > -Serge(y)
> > 
> > > 
> > > 
> > > v4 -> v5:
> > > 
> > > * Remove an ugly and useless patch (fix channel number).
> > > * Remove the non-standard dma64 driver code, and also remove
> > >    the HWIF entries, since the associated custom callbacks no
> > >    longer exist.
> > > * Refer to Serge's suggestion: Update the dwmac1000_dma.c to
> > >    support the multi-DMA-channels controller setup.
> > > 
> > > See:
> > > v4: <https://lore.kernel.org/loongarch/cover.1692696115.git.chenfeiyang@loongson.cn/>
> > > v3: <https://lore.kernel.org/loongarch/cover.1691047285.git.chenfeiyang@loongson.cn/>
> > > v2: <https://lore.kernel.org/loongarch/cover.1690439335.git.chenfeiyang@loongson.cn/>
> > > v1: <https://lore.kernel.org/loongarch/cover.1689215889.git.chenfeiyang@loongson.cn/>
> > > 
> > > Yanteng Si (9):
> > >    net: stmmac: Pass stmmac_priv and chan in some callbacks
> > >    net: stmmac: dwmac-loongson: Refactor code for loongson_dwmac_probe()
> > >    net: stmmac: dwmac-loongson: Add full PCI support
> > >    net: stmmac: Add multi-channel supports
> > >    net: stmmac: Add Loongson-specific register definitions
> > >    net: stmmac: dwmac-loongson: Add MSI support
> > >    net: stmmac: dwmac-loongson: Add GNET support
> > >    net: stmmac: dwmac-loongson: Disable flow control for GMAC
> > >    net: stmmac: Disable coe for some Loongson GNET
> > > 
> > >   drivers/net/ethernet/stmicro/stmmac/common.h  |   1 +
> > >   .../ethernet/stmicro/stmmac/dwmac-loongson.c  | 296 ++++++++++++++----
> > >   .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c |   2 +-
> > >   .../ethernet/stmicro/stmmac/dwmac1000_dma.c   |  61 +++-
> > >   .../ethernet/stmicro/stmmac/dwmac100_dma.c    |   2 +-
> > >   .../net/ethernet/stmicro/stmmac/dwmac4_dma.c  |   2 +-
> > >   .../net/ethernet/stmicro/stmmac/dwmac_dma.h   |  47 ++-
> > >   .../net/ethernet/stmicro/stmmac/dwmac_lib.c   |  65 ++--
> > >   .../ethernet/stmicro/stmmac/dwxgmac2_dma.c    |   2 +-
> > >   drivers/net/ethernet/stmicro/stmmac/hwif.c    |   8 +-
> > >   drivers/net/ethernet/stmicro/stmmac/hwif.h    |  11 +-
> > >   .../ethernet/stmicro/stmmac/stmmac_ethtool.c  |   6 +
> > >   .../net/ethernet/stmicro/stmmac/stmmac_main.c |  13 +-
> > >   include/linux/stmmac.h                        |   4 +
> > >   14 files changed, 413 insertions(+), 107 deletions(-)
> > > 
> > > -- 
> > > 2.31.4
> > > 
>