From: Justin Lai <justinlai0215@realtek.com>
To: Andrew Lunn <andrew@lunn.ch>
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>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Ping-Ke Shih <pkshih@realtek.com>,
Larry Chiu <larry.chiu@realtek.com>
Subject: RE: [PATCH net-next v10 10/13] net:ethernet:realtek:rtase: Implement ethtool function
Date: Wed, 15 Nov 2023 06:25:34 +0000 [thread overview]
Message-ID: <3d5775e1163845698e0b911f6a591eb6@realtek.com> (raw)
In-Reply-To: <726ce350-b2df-4dfb-8401-dc9c70dd8cd6@lunn.ch>
> > +static int rtase_get_settings(struct net_device *dev,
> > + struct ethtool_link_ksettings *cmd) {
> > + u32 supported = SUPPORTED_MII | SUPPORTED_Pause;
> > +
> > +
> ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,
> > + supported);
> > + cmd->base.speed = SPEED_5000;
> > + cmd->base.duplex = DUPLEX_FULL;
> > + cmd->base.port = PORT_MII;
> > + cmd->base.autoneg = AUTONEG_DISABLE;
> > +
> > + return 0;
> > +}
> > +
>
> > +static int rtase_set_pauseparam(struct net_device *dev,
> > + struct ethtool_pauseparam *pause) {
> > + const struct rtase_private *tp = netdev_priv(dev);
> > + u16 value = rtase_r16(tp, RTASE_CPLUS_CMD);
> > +
> > + if (pause->autoneg)
> > + return -EOPNOTSUPP;
> > +
> > + value &= ~(FORCE_TXFLOW_EN | FORCE_RXFLOW_EN);
> > +
> > + if (pause->tx_pause)
> > + value |= FORCE_TXFLOW_EN;
> > +
> > + if (pause->rx_pause)
> > + value |= FORCE_RXFLOW_EN;
>
> It appears the hardware supports asymmetric pause? So i think your
> rtase_get_settings() is wrong.
>
> Andrew
Thank you for your review, I will confirm this part again and make corresponding corrections.
next prev parent reply other threads:[~2023-11-15 6:26 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 15:44 [PATCH net-next v10 00/13] Add Realtek automotive PCIe driver Justin Lai
2023-11-02 15:44 ` [PATCH net-next v10 01/13] net:ethernet:realtek:rtase: Add pci table supported in this module Justin Lai
2023-11-02 15:44 ` [PATCH net-next v10 02/13] net:ethernet:realtek:rtase: Implement the .ndo_open function Justin Lai
2023-11-02 15:44 ` [PATCH net-next v10 03/13] net:ethernet:realtek:rtase: Implement the rtase_down function Justin Lai
2023-11-02 15:44 ` [PATCH net-next v10 04/13] net:ethernet:realtek:rtase: Implement the interrupt routine and rtase_poll Justin Lai
2023-11-02 15:44 ` [PATCH net-next v10 05/13] net:ethernet:realtek:rtase: Implement hardware configuration function Justin Lai
2023-11-02 15:44 ` [PATCH net-next v10 06/13] net:ethernet:realtek:rtase: Implement .ndo_start_xmit function Justin Lai
2023-11-02 15:44 ` [PATCH net-next v10 07/13] net:ethernet:realtek:rtase: Implement a function to receive packets Justin Lai
2023-11-02 15:45 ` [PATCH net-next v10 08/13] net:ethernet:realtek:rtase: Implement net_device_ops Justin Lai
2023-11-02 15:45 ` [PATCH net-next v10 09/13] net:ethernet:realtek:rtase: Implement pci_driver suspend and resume function Justin Lai
2023-11-04 19:52 ` Andrew Lunn
2023-11-15 6:22 ` Justin Lai
2023-11-02 15:45 ` [PATCH net-next v10 10/13] net:ethernet:realtek:rtase: Implement ethtool function Justin Lai
2023-11-04 19:48 ` Andrew Lunn
2023-11-15 6:25 ` Justin Lai [this message]
2023-11-02 15:45 ` [PATCH net-next v10 11/13] net:ethernet:realtek:rtase: Add a Makefile in the rtase folder Justin Lai
2023-11-02 15:45 ` [PATCH net-next v10 12/13] net:ethernet:realtek: Update the Makefile and Kconfig in the realtek folder Justin Lai
2023-11-04 18:39 ` Simon Horman
2023-11-15 6:20 ` Justin Lai
2023-11-05 22:57 ` kernel test robot
2023-11-06 2:26 ` kernel test robot
2023-11-02 15:45 ` [PATCH net-next v10 13/13] MAINTAINERS: Add the rtase ethernet driver entry 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=3d5775e1163845698e0b911f6a591eb6@realtek.com \
--to=justinlai0215@realtek.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=larry.chiu@realtek.com \
--cc=linux-kernel@vger.kernel.org \
--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
Powered by JetHome