mbox series

[net-next,v2,0/5] net: dsa: realtek: rtl8365mb: improve handling of PHY modes

Message ID 20220610153829.446516-1-alvin@pqrs.dk (mailing list archive)
Headers show
Series net: dsa: realtek: rtl8365mb: improve handling of PHY modes | expand

Message

Alvin Šipraga June 10, 2022, 3:38 p.m. UTC
From: Alvin Šipraga <alsi@bang-olufsen.dk>

This series introduces some minor cleanup of the driver and improves the
handling of PHY interface modes to break the assumption that CPU ports
are always over an external interface, and the assumption that user
ports are always using an internal PHY.

Changes v1 -> v2:

 - patches 1-4: no code change

 - add Luiz' reviewed-by to some of the patches

 - patch 5: put the chip_infos into a static array and get rid of the
   switch in the detect function; also remove the macros for various
   chip ID/versions and embed them directly into the array

 - patch 5: use array of size 3 rather than flexible array for extints
   in the chip_info struct; gcc complained about initialization of
   flexible array members in a nested context, and anyway, we know that
   the max number of external interfaces is 3

Alvin Šipraga (5):
  net: dsa: realtek: rtl8365mb: rename macro RTL8367RB -> RTL8367RB_VB
  net: dsa: realtek: rtl8365mb: remove port_mask private data member
  net: dsa: realtek: rtl8365mb: correct the max number of ports
  net: dsa: realtek: rtl8365mb: remove learn_limit_max private data
    member
  net: dsa: realtek: rtl8365mb: handle PHY interface modes correctly

 drivers/net/dsa/realtek/rtl8365mb.c | 299 ++++++++++++++++------------
 1 file changed, 177 insertions(+), 122 deletions(-)

Comments

Alvin Šipraga June 15, 2022, 4:55 p.m. UTC | #1
David, Jakub, this series is marked Changes Requested on patchwork, but I have
addressed all the comments. Do you want me to resend?

Kind regards,
Alvin

On Fri, Jun 10, 2022 at 05:38:24PM +0200, Alvin Šipraga wrote:
> From: Alvin Šipraga <alsi@bang-olufsen.dk>
> 
> This series introduces some minor cleanup of the driver and improves the
> handling of PHY interface modes to break the assumption that CPU ports
> are always over an external interface, and the assumption that user
> ports are always using an internal PHY.
> 
> Changes v1 -> v2:
> 
>  - patches 1-4: no code change
> 
>  - add Luiz' reviewed-by to some of the patches
> 
>  - patch 5: put the chip_infos into a static array and get rid of the
>    switch in the detect function; also remove the macros for various
>    chip ID/versions and embed them directly into the array
> 
>  - patch 5: use array of size 3 rather than flexible array for extints
>    in the chip_info struct; gcc complained about initialization of
>    flexible array members in a nested context, and anyway, we know that
>    the max number of external interfaces is 3
> 
> Alvin Šipraga (5):
>   net: dsa: realtek: rtl8365mb: rename macro RTL8367RB -> RTL8367RB_VB
>   net: dsa: realtek: rtl8365mb: remove port_mask private data member
>   net: dsa: realtek: rtl8365mb: correct the max number of ports
>   net: dsa: realtek: rtl8365mb: remove learn_limit_max private data
>     member
>   net: dsa: realtek: rtl8365mb: handle PHY interface modes correctly
> 
>  drivers/net/dsa/realtek/rtl8365mb.c | 299 ++++++++++++++++------------
>  1 file changed, 177 insertions(+), 122 deletions(-)
> 
> -- 
> 2.36.1
>
Jakub Kicinski June 15, 2022, 10:21 p.m. UTC | #2
On Wed, 15 Jun 2022 16:55:29 +0000 Alvin Šipraga wrote:
> David, Jakub, this series is marked Changes Requested on patchwork, but I have
> addressed all the comments. Do you want me to resend?

Oh, that was me. I was hoping you'd respin to at least clarify 
the commit message on patch 5, based on Russell's questions.
Perhaps that's not as important these days given we add Links
to the original discussion but should be useful to person reading 
just the git history. Sorry for not making that clear, folks sending
comments and still acking the patch in general gives me low signal.
Alvin Šipraga June 15, 2022, 10:32 p.m. UTC | #3
On Wed, Jun 15, 2022 at 03:21:27PM -0700, Jakub Kicinski wrote:
> On Wed, 15 Jun 2022 16:55:29 +0000 Alvin Šipraga wrote:
> > David, Jakub, this series is marked Changes Requested on patchwork, but I have
> > addressed all the comments. Do you want me to resend?
> 
> Oh, that was me. I was hoping you'd respin to at least clarify 
> the commit message on patch 5, based on Russell's questions.
> Perhaps that's not as important these days given we add Links
> to the original discussion but should be useful to person reading 
> just the git history. Sorry for not making that clear, folks sending
> comments and still acking the patch in general gives me low signal.

Ah sorry, I had actually forgotten about that. Let me send a v3 then and
I will fix it up. Thanks for clarifying!