From: Andrew Lunn <andrew@lunn.ch>
To: Igor Russkikh <Igor.Russkikh@aquantia.com>
Cc: "David S . Miller" <davem@davemloft.net>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Dmitry Bezrukov <Dmitry.Bezrukov@aquantia.com>
Subject: [v2,net-next,18/21] net: usb: aqc111: Implement get/set_link_ksettings callbacks
Date: Tue, 13 Nov 2018 21:50:41 +0100 [thread overview]
Message-ID: <20181113205041.GA9828@lunn.ch> (raw)
On Tue, Nov 13, 2018 at 02:45:13PM +0000, Igor Russkikh wrote:
> +static int aqc111_get_link_ksettings(struct net_device *net,
> + struct ethtool_link_ksettings *elk)
> +{
> + struct usbnet *dev = netdev_priv(net);
> + struct aqc111_data *aqc111_data = dev->driver_priv;
> + enum usb_device_speed usb_speed = dev->udev->speed;
> + u32 speed = SPEED_UNKNOWN;
> +
> + ethtool_link_ksettings_zero_link_mode(elk, supported);
> + ethtool_link_ksettings_add_link_mode(elk, supported,
> + 100baseT_Full);
> + ethtool_link_ksettings_add_link_mode(elk, supported,
> + 1000baseT_Full);
> + if (usb_speed == USB_SPEED_SUPER) {
> + ethtool_link_ksettings_add_link_mode(elk, supported,
> + 2500baseT_Full);
> + ethtool_link_ksettings_add_link_mode(elk, supported,
> + 5000baseT_Full);
> + }
Hi Igor
We discussed this with the first version of the patches. I think you
should add a comment explaining why 2.5G and 5G is disabled unless
Super speed is available.
> + if (aqc111_data->autoneg)
> + bitmap_copy(elk->link_modes.advertising,
> + elk->link_modes.supported,
> + __ETHTOOL_LINK_MODE_MASK_NBITS);
linkmode_copy(). It is quite new, so you probably don't know about it.
Andrew
next reply other threads:[~2018-11-13 20:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-13 20:50 Andrew Lunn [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-11-14 7:46 [v2,net-next,18/21] net: usb: aqc111: Implement get/set_link_ksettings callbacks Igor Russkikh
2018-11-13 14:45 Igor Russkikh
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=20181113205041.GA9828@lunn.ch \
--to=andrew@lunn.ch \
--cc=Dmitry.Bezrukov@aquantia.com \
--cc=Igor.Russkikh@aquantia.com \
--cc=davem@davemloft.net \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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).