mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kyle Switch <kyle.switch@motor-comm.com>
To: David Yang <mmyangfl@gmail.com>
Cc: andrew@lunn.ch, olteanv@gmail.com, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	horms@kernel.org, linux@armlinux.org.uk, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, ming.xu@motor-comm.com,
	xiaolin.xu@motor-comm.com, jianmin.wang@motor-comm.com,
	wei.zhang@gl-inet.com, sijia.huang@gl-inet.com
Subject: Re: [PATCH net-next v14 5/5] net: dsa: motorcomm: Add support for Motorcomm YT922x
Date: Sun, 18 Oct 2026 11:02:53 +0800	[thread overview]
Message-ID: <b4e5b68e-2ece-4007-bd47-e6432ce70d9a@motor-comm.com> (raw)
In-Reply-To: <CAAXyoMPeOmMZ8u=+S9=W=aJ0riSRbkBX9afrcVdfrE4BreO-Hw@mail.gmail.com>


On 10/17/26 04:15, David Yang wrote:
> On Tue, Oct 13, 2026 at 9:11 AM Kyle Switch <kyle.switch@motor-comm.com> wrote:
>> +/* yt922x register lists */
> The indents below look inconsistent. Please adjust to match the existing macros.
Okay.
>
>> +#define YT92XX_PAGE_SELECT     0x1e
>> +#define YT92XX_PAGE            0x1f
>> +#define YT922X_PORTn_STATUS(port)      (0x80200 + 4 * (port))
>> +#define  YT922X_PORT_LINK_STATE                        BIT(8)
>> +#define  YT922X_PORT_LINK_DUPLEX               BIT(7)
>> +#define  YT922X_PORT_RX_FC_EN                  BIT(6)
>> +#define  YT922X_PORT_TX_FC_EN                  BIT(5)
>> +#define YT922X_PORT_SPEED_10           0
>> +#define YT922X_PORT_SPEED_100          1
>> +#define YT922X_PORT_SPEED_1000         2
>> +#define YT922X_PORT_SPEED_10000                3
>> +#define YT922X_PORT_SPEED_2500         4
>> +#define YT922X_PORT_SPEED_5000         5
> Leftover from yt921x_speed.
will be removed and use the macros defined earlier in 921x.
>
>> +/* ISO */
> The comments here (and below) did not provide much information beyond
> the code itself.
>
okay, will remove meaningless code comments.
>> +#define YT922X_PORTn_ISOLATION(port)   (0x4 * (port) + 0x180d80)
> (0x180d80 + 4 * (port))
Okay.
>
>> diff --git a/drivers/net/dsa/motorcomm/mdio_bus.c b/drivers/net/dsa/motorcomm/mdio_bus.c
>> index 3aa1111efaa4..a4cb74d0fd90 100644
>> --- a/drivers/net/dsa/motorcomm/mdio_bus.c
>> +++ b/drivers/net/dsa/motorcomm/mdio_bus.c
>> @@ -299,3 +299,42 @@ int yt921x_mbus_ext_init(struct yt921x_priv *priv, struct device_node *mnp)
>>
>>          return 0;
>>   }
>> +
>> +/* intif extend register read/write api */
>> +int
>> +yt921x_intif_ext_write(struct yt921x_priv *priv, int port, int reg, u16 val)
>> +{
>> +       int res;
>> +
>> +       if (port > priv->series->max_ports)
>> +               return -ENODEV;
>> +
>> +       res = yt921x_intif_write(priv, port, YT92XX_PAGE_SELECT, reg);
>> +       if (res)
>> +               return res;
>> +
>> +       res = yt921x_intif_write(priv, port, YT92XX_PAGE, val);
>> +       if (res)
>> +               return res;
>> +
>> +       return 0;
>> +}
>> +
>> +int
>> +yt921x_intif_ext_read(struct yt921x_priv *priv, int port, int reg, u16 *valp)
>> +{
>> +       int res;
>> +
>> +       if (port > priv->series->max_ports)
>> +               return -ENODEV;
>> +
>> +       res = yt921x_intif_write(priv, port, YT92XX_PAGE_SELECT, reg);
>> +       if (res)
>> +               return res;
>> +
>> +       res = yt921x_intif_read(priv, port, YT92XX_PAGE, valp);
>> +       if (res)
>> +               return res;
>> +
>> +       return 0;
>> +}
>> diff --git a/drivers/net/dsa/motorcomm/mdio_bus.h b/drivers/net/dsa/motorcomm/mdio_bus.h
>> index e79b725d435b..513a8d2d7618 100644
>> --- a/drivers/net/dsa/motorcomm/mdio_bus.h
>> +++ b/drivers/net/dsa/motorcomm/mdio_bus.h
>> @@ -50,5 +50,7 @@ yt921x_intif_modify(struct yt921x_priv *priv, int port, int reg, u16 mask,
>>
>>   int yt921x_mbus_int_init(struct yt921x_priv *priv, struct device_node *mnp);
>>   int yt921x_mbus_ext_init(struct yt921x_priv *priv, struct device_node *mnp);
>> +int yt921x_intif_ext_write(struct yt921x_priv *priv, int port, int reg, u16 val);
>> +int yt921x_intif_ext_read(struct yt921x_priv *priv, int port, int reg, u16 *valp);
>>
>>   #endif
> intif_ext_* should be placed right after intif_* (if they are still in
> mdio_bus).
okay.

      reply	other threads:[~2026-10-18  3:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-13  1:11 [PATCH net-next v14 0/5] net: dsa: motorcomm: add support yt922x driver Kyle Switch
2026-10-13  1:11 ` [PATCH net-next v14 1/5] net: dsa: motorcomm: initialize dsa_switch based on chipid Kyle Switch
2026-10-14  1:59   ` netdev-bot+sashiko
2026-10-13  1:11 ` [PATCH net-next v14 2/5] net: dsa: motorcomm: use max_ports in series for port bounds checking Kyle Switch
2026-10-13  1:11 ` [PATCH net-next v14 3/5] net: dsa: motorcomm: use fixed-width GENMASK_U*() helpers Kyle Switch
2026-10-14  1:59   ` netdev-bot+sashiko
2026-10-16 19:38   ` David Yang
2026-10-18  3:26     ` Kyle Switch
2026-10-13  1:11 ` [PATCH net-next v14 4/5] net: dsa: tag_yt922x: add support for Motorcomm YT922x tags Kyle Switch
2026-10-14  1:59   ` netdev-bot+sashiko
2026-10-13  1:11 ` [PATCH net-next v14 5/5] net: dsa: motorcomm: Add support for Motorcomm YT922x Kyle Switch
2026-10-13  1:51   ` Andrew Lunn
2026-10-18  3:10     ` Kyle Switch
2026-10-14  1:59   ` netdev-bot+sashiko
2026-10-16 20:15   ` David Yang
2026-10-18  3:02     ` Kyle Switch [this message]

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=b4e5b68e-2ece-4007-bd47-e6432ce70d9a@motor-comm.com \
    --to=kyle.switch@motor-comm.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jianmin.wang@motor-comm.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=ming.xu@motor-comm.com \
    --cc=mmyangfl@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=sijia.huang@gl-inet.com \
    --cc=wei.zhang@gl-inet.com \
    --cc=xiaolin.xu@motor-comm.com \
    /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

all inboxes | Powered by JetHome®