netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Justin Lai <justinlai0215@realtek.com>
To: Michal Kubiak <michal.kubiak@intel.com>
Cc: "kuba@kernel.org" <kuba@kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"horms@kernel.org" <horms@kernel.org>,
	Ping-Ke Shih <pkshih@realtek.com>,
	Larry Chiu <larry.chiu@realtek.com>
Subject: RE: [PATCH net v3 2/4] rtase: Correct the speed for RTL907XD-V1
Date: Tue, 19 Nov 2024 07:23:12 +0000	[thread overview]
Message-ID: <5011ae11bd9b48c5bf8e1bf400aa5d13@realtek.com> (raw)
In-Reply-To: <ZzsugTPBgp9a70/F@localhost.localdomain>

> 
> On Mon, Nov 18, 2024 at 12:08:26PM +0800, Justin Lai wrote:
> > Correct the speed for RTL907XD-V1.
> >
> 
> Please add more details about the problem the patch is fixing.

Ok, I will make the necessary changes to the commit message.
> 
> > Fixes: dd7f17c40fd1 ("rtase: Implement ethtool function")
> > Signed-off-by: Justin Lai <justinlai0215@realtek.com>
> > ---
> >  drivers/net/ethernet/realtek/rtase/rtase_main.c | 13 ++++++++++++-
> >  1 file changed, 12 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/realtek/rtase/rtase_main.c
> > b/drivers/net/ethernet/realtek/rtase/rtase_main.c
> > index 0c19c5645d53..5b8012987ea6 100644
> > --- a/drivers/net/ethernet/realtek/rtase/rtase_main.c
> > +++ b/drivers/net/ethernet/realtek/rtase/rtase_main.c
> > @@ -1714,10 +1714,21 @@ static int rtase_get_settings(struct net_device
> *dev,
> >                             struct ethtool_link_ksettings *cmd)  {
> >       u32 supported = SUPPORTED_MII | SUPPORTED_Pause |
> > SUPPORTED_Asym_Pause;
> > +     const struct rtase_private *tp = netdev_priv(dev);
> >
> >
> ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,
> >                                               supported);
> > -     cmd->base.speed = SPEED_5000;
> > +
> > +     switch (tp->hw_ver) {
> > +     case 0x00800000:
> > +     case 0x04000000:
> > +             cmd->base.speed = SPEED_5000;
> > +             break;
> > +     case 0x04800000:
> > +             cmd->base.speed = SPEED_10000;
> > +             break;
> > +     }
> > +
> 
> Above you are adding the code introducing some magic numbers and in your
> last patch you are refactoring that newly added code.
> Would it be possible to avoid those intermediate results and prepare the final
> version of the fix in the series?

We would still prefer to follow the "single patch, single purpose"
approach for this part. Other reviewers have also provided similar
feedback, so we would like to maintain the current approach.
> 
> >       cmd->base.duplex = DUPLEX_FULL;
> >       cmd->base.port = PORT_MII;
> >       cmd->base.autoneg = AUTONEG_DISABLE;
> > --
> > 2.34.1
> >
> >
> 
> Thanks,
> Michal

  reply	other threads:[~2024-11-19  7:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-18  4:08 [PATCH net v3 0/4] Correcting switch hardware versions and reported speeds Justin Lai
2024-11-18  4:08 ` [PATCH net v3 1/4] rtase: Refactor the rtase_check_mac_version_valid() function Justin Lai
2024-11-18 11:59   ` Michal Kubiak
2024-11-19  7:23     ` Justin Lai
2024-11-18  4:08 ` [PATCH net v3 2/4] rtase: Correct the speed for RTL907XD-V1 Justin Lai
2024-11-18 12:09   ` Michal Kubiak
2024-11-19  7:23     ` Justin Lai [this message]
2024-11-19 11:42       ` Michal Kubiak
2024-11-20  6:40         ` Justin Lai
2024-11-18  4:08 ` [PATCH net v3 3/4] rtase: Corrects error handling of the rtase_check_mac_version_valid() Justin Lai
2024-11-18  4:08 ` [PATCH net v3 4/4] rtase: Add defines for hardware version id Justin Lai
2024-11-18 11:15   ` Michal Kubiak
2024-11-19  7:22     ` Justin Lai
2024-11-19 11:28       ` Michal Kubiak
2024-11-20  6:40         ` Justin Lai

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=5011ae11bd9b48c5bf8e1bf400aa5d13@realtek.com \
    --to=justinlai0215@realtek.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=larry.chiu@realtek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.kubiak@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pkshih@realtek.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;
as well as URLs for NNTP newsgroup(s).