Subject: Re: [PATCH net-next 06/19] net: usb: aqc111: Introduce link management

From: Andrew Lunn <[email-masked]>
Date: Sat, 6 Oct 2018 19:35:10 +0200

> @@ -202,6 +319,9 @@ static int aqc111_bind(struct usbnet *dev, struct usb_interface *intf)
>  	dev->net->netdev_ops = &aqc111_netdev_ops;
>  
>  	aqc111_read_fw_version(dev, aqc111_data);
> +	aqc111_data->autoneg = AUTONEG_ENABLE;
> +	aqc111_data->advertised_speed = (usb_speed == USB_SPEED_SUPER) ?
> +					 SPEED_5000 : SPEED_1000;

Hi Igor

I'd be interested in knowing the reasoning behind this.

USB 3 has a raw bandwidth of 5Gbps. But it is a shared bus. So you
have no guaranteed you are actually going to get the needed bandwidth
to support line rate.

USB 2.0 only gives you 480Mbps. So it won't even give you the full
1G. So using the same reasoning for USB3, maybe you should limit it to
100Mbps?

I personally would not apply restrictions on the PHY depending on what
USB is being used.

This becomes more important when using SFPs. If i have an SFP peer
which is expecting 2500Base-X, but because the device is plugged into
USB 2 port it is forced to use 1000Base-X, it is not going to get
link.

	Andrew