Re: [PATCH net-next v5 04/13] ax88179_178a: Add HW support for AX179A-based chips

Birger Koblitz <[email protected]> Thu, 6 Aug 2026 21:34:22 +0200
Newsgroups org.kernel.vger.linux-usb,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <[email protected]>
On 02/08/2026 23:36, Andrew Lunn wrote:
>> +static void ax88179a_bulkin_config(struct usbnet *dev, u8 link_sts)
>> +{
>> +	struct ax88179_data *ax179_data = dev->driver_priv;
>> +	const struct ax_bulkin_settings *bulkin_data;
>> +	int index = 0;
>> +
>> +	switch (ax179_data->speed) {
> 
> What is setting ->speed?
A leftover from before refactoring, sorry!
Fixed in v6.

> 
>> +static void ax88179a_mac_link_up(struct phylink_config *config,
>> +				 struct phy_device *phy,
>> +				 unsigned int phy_mode, phy_interface_t interface,
>> +				 int speed, int duplex,
>> +				 bool tx_pause, bool rx_pause)
>> +{
> 
> It should be coming from there, but i don't see any code setting it.
> 
>> +	ax88179_read_cmd(dev, AX_ACCESS_MAC, PHYSICAL_LINK_STATUS, 1, 1, &link_sts);
>> +	ax88179a_bulkin_config(dev, link_sts);
> 
> It might be better to pass speed as a parameter.
> 
> I would probably play with ethtool and set the advertised speeds to
> only include slower speeds, like 10Half, and make sure the link works
> correctly.
Indeed. The speed now comes now from phylink. I tested all speeds (including
unsupported ones) and the mac_link_up() implementationn now works
as expected, including after suspend/resume.

Birger