Netdev List
 help / color / mirror / Atom feed
From: Birger Koblitz <mail@birger-koblitz.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Russell King <linux@armlinux.org.uk>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	linux-usb@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, Jianhui Xu <neuromoments@gmail.com>
Subject: Re: [PATCH net-next v4 03/12] ax88179_178a: Add HW support for AX179A-based chips
Date: Sun, 2 Aug 2026 18:19:50 +0200	[thread overview]
Message-ID: <f473a12c-bfae-4006-9287-040b840a6e4f@birger-koblitz.de> (raw)
In-Reply-To: <3eb5691a-4a84-487e-8d5e-f91a646c03c1@lunn.ch>

On 31/07/2026 21:37, Andrew Lunn wrote:
>> +static int ax88179_mdiobus_write(struct mii_bus *bus, int phy_id, int regnum, u16 val)
>> +{
>> +	struct usbnet *dev = bus->priv;
>> +	u16 res = (u16)val;
> 
> val already is a u16, so the cast is not needed.
Will fix in v5, this was code from the original driver.

> 
>> +
>> +	return ax88179_write_cmd(dev, AX_ACCESS_PHY, phy_id, (__u16)regnum, 2, &res);
> 
> Does ax88179_write_cmd actually modify the res value? I'm just
> wondering why you need the local copy.
The local copy is not needed. This was also C&P from the original driver.
Fixed in v5.

> 
>> +static void ax88179a_get_pauseparam(struct net_device *net, struct ethtool_pauseparam *pause)
>> +{
>> +	struct usbnet *dev = netdev_priv(net);
>> +	struct ax88179_data *data;
>> +
>> +	data = dev->driver_priv;
> 
> This pattern happens enough that it is worth adding a helper,
> netdev2data() or something like that.
Will introduce ntdev2data() in v5.

>> +
>> +	netdev_info(dev->net, "ax88179a - Link status is: 1, Link speed: %d, Duplex: %d\n",
>> +		    speed, duplex);
>> +}
> 
> Maybe not needed? Does phylink print something?
Removed in v5, phylink prints the same information.

> 
>> +static int ax88179a_init_mdio(struct usbnet *dev)
>> +	netdev_err(dev->net, "Registering MDIO bus\n");
> 
> Left over debug.
Removed in v5.

> 
>> +	/* Initialize MII structure */
>> +	dev->mii.dev = dev->net;
>> +	dev->mii.mdio_read = ax88179_mdio_read;
>> +	dev->mii.mdio_write = ax88179_mdio_write;
>> +	dev->mii.phy_id_mask = 0xff;
>> +	dev->mii.reg_num_mask = 0xff;
>> +	dev->mii.phy_id = AX88179_PHY_ID;
> 
> So the aim is this is removed. Do the follow up patches remove it?
Ooops, forgot to remove this. Removed in v5.

> 
>> +static int ax88179a_reset(struct usbnet *dev)
>> +	if (ax179_data->chip_version == AX_VERSION_AX88279) {
>> +		*tmp16 = ax88179_mdio_read(dev->net, dev->mii.phy_id, MII_ADVERTISE);
>> +		*tmp16 &= ~(ADVERTISE_10FULL | ADVERTISE_10HALF);
>> +		*tmp16 |= AX_ADVERTISE_2500;
>> +		ax88179_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE, *tmp16);
>> +	}
> 
> If the PHY driver is doing the correct thing, this is not needed.  So
> long as you tell phylink that 10Mbps is not supported by the MAC, it
> should disable the advertisement of 10Mps link modes.
Fixed in v5.

> 
>> +	ax179_data->eee_enabled = 0;
>> +	ax179_data->eee_active = 0;
> 
> Are these used anywhere? Phylink should be tracking the EEE state, not
> the MAC driver.
Removed in v5.


  parent reply	other threads:[~2026-08-02 16:20 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-31 16:19 [PATCH net-next v4 00/12] ax88179_178a: Add support for AX88179A-based chips Birger Koblitz
2026-07-31 16:19 ` [PATCH net-next v4 01/12] ax88179_178a: Fix endianness of pause watermark register Birger Koblitz
2026-07-31 16:19 ` [PATCH net-next v4 02/12] ax88179_178a: Split driver into library and device specific code Birger Koblitz
2026-07-31 16:19 ` [PATCH net-next v4 03/12] ax88179_178a: Add HW support for AX179A-based chips Birger Koblitz
2026-07-31 19:37   ` Andrew Lunn
2026-08-01  6:42     ` Birger Koblitz
2026-08-02 16:19     ` Birger Koblitz [this message]
2026-07-31 16:19 ` [PATCH net-next v4 04/12] ax88179_178a: Add EEE configuration support for AX88179A MACs Birger Koblitz
2026-08-02 15:27   ` Andrew Lunn
2026-07-31 16:19 ` [PATCH net-next v4 05/12] ax88179_178a: Add EEE configuration support for AX88179A PHYs Birger Koblitz
2026-07-31 19:41   ` Andrew Lunn
2026-08-02 16:20     ` Birger Koblitz
2026-08-02 15:27   ` Andrew Lunn
2026-07-31 16:19 ` [PATCH net-next v4 06/12] ax88179_178a: Add VLAN offload support for AX88179A Birger Koblitz
2026-08-02 15:25   ` Andrew Lunn
2026-08-02 16:22     ` Birger Koblitz
2026-07-31 16:19 ` [PATCH net-next v4 07/12] ax88179_178a: Add AX179A/AX279 multicast configuration Birger Koblitz
2026-08-02 15:26   ` Andrew Lunn
2026-07-31 16:19 ` [PATCH net-next v4 08/12] ax88179_178a: Add Suspend/resume support for AX88179A/772D/279 Birger Koblitz
2026-07-31 16:19 ` [PATCH net-next v4 09/12] ax88179_178a: Add ethtool get_drvinfo Birger Koblitz
2026-07-31 19:42   ` Andrew Lunn
2026-07-31 16:19 ` [PATCH net-next v4 10/12] ax88179_178a: update driver information Birger Koblitz
2026-07-31 19:45   ` Andrew Lunn
2026-08-02 16:21     ` Birger Koblitz
2026-07-31 16:19 ` [PATCH net-next v4 11/12] ax88179_178a: Add support for AX88179A/772D/279 EEPROM access Birger Koblitz
2026-08-02 15:29   ` Andrew Lunn
2026-07-31 16:19 ` [PATCH net-next v4 12/12] ax88796b: Add support for AX88772D, AX88179A and AX88279 Birger Koblitz
2026-08-01  3:59 ` [PATCH net-next v4 00/12] ax88179_178a: Add support for AX88179A-based chips Jianhui Xu
2026-08-01  5:42   ` Birger Koblitz

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=f473a12c-bfae-4006-9287-040b840a6e4f@birger-koblitz.de \
    --to=mail@birger-koblitz.de \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=neuromoments@gmail.com \
    --cc=pabeni@redhat.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