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
WARNING: multiple messages have this Message-ID (diff)
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: Re: [PATCH 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)
In-Reply-To: <d1c116dba2a3362efccb56d402f03618fb961706.1542119058.git.igor.russkikh@aquantia.com>
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: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-13 20:50 Andrew Lunn [this message]
2018-11-13 20:50 ` [PATCH v2 net-next 18/21] net: usb: aqc111: Implement get/set_link_ksettings callbacks Andrew Lunn
-- strict thread matches above, loose matches on Subject: below --
2018-11-16 18:33 [v2,net-next,06/21] net: usb: aqc111: Introduce link management Andrew Lunn
2018-11-16 18:33 ` [PATCH v2 net-next 06/21] " Andrew Lunn
2018-11-16 9:53 [v2,net-next,06/21] " Igor Russkikh
2018-11-16 9:53 ` [PATCH v2 net-next 06/21] " Igor Russkikh
2018-11-14 22:53 [v2,net-next,06/21] " Florian Fainelli
2018-11-14 22:53 ` [PATCH v2 net-next 06/21] " Florian Fainelli
2018-11-14 21:30 [v2,net-next,19/21] net: usb: aqc111: Add support for wake on LAN by MAGIC packet Andrew Lunn
2018-11-14 21:30 ` [PATCH v2 net-next 19/21] " Andrew Lunn
2018-11-14 21:16 [v2,net-next,06/21] net: usb: aqc111: Introduce link management Andrew Lunn
2018-11-14 21:16 ` [PATCH v2 net-next 06/21] " Andrew Lunn
2018-11-14 7:56 [v2,net-next,19/21] net: usb: aqc111: Add support for wake on LAN by MAGIC packet Igor Russkikh
2018-11-14 7:56 ` [PATCH v2 net-next 19/21] " Igor Russkikh
2018-11-14 7:46 [v2,net-next,18/21] net: usb: aqc111: Implement get/set_link_ksettings callbacks Igor Russkikh
2018-11-14 7:46 ` [PATCH v2 net-next 18/21] " Igor Russkikh
2018-11-14 7:44 [v2,net-next,06/21] net: usb: aqc111: Introduce link management Igor Russkikh
2018-11-14 7:44 ` [PATCH v2 net-next 06/21] " Igor Russkikh
2018-11-13 21:02 [v2,net-next,19/21] net: usb: aqc111: Add support for wake on LAN by MAGIC packet Andrew Lunn
2018-11-13 21:02 ` [PATCH v2 net-next 19/21] " Andrew Lunn
2018-11-13 20:58 [v2,net-next,06/21] net: usb: aqc111: Introduce link management Andrew Lunn
2018-11-13 20:58 ` [PATCH v2 net-next 06/21] " Andrew Lunn
2018-11-13 14:45 [v2,net-next,21/21] net: usb: aqc111: Extend cdc_ether blacklist Igor Russkikh
2018-11-13 14:45 ` [PATCH v2 net-next 21/21] " Igor Russkikh
2018-11-13 14:45 [v2,net-next,20/21] net: usb: aqc111: Add ASIX's HW ids Igor Russkikh
2018-11-13 14:45 ` [PATCH v2 net-next 20/21] " Igor Russkikh
2018-11-13 14:45 [v2,net-next,19/21] net: usb: aqc111: Add support for wake on LAN by MAGIC packet Igor Russkikh
2018-11-13 14:45 ` [PATCH v2 net-next 19/21] " Igor Russkikh
2018-11-13 14:45 [v2,net-next,18/21] net: usb: aqc111: Implement get/set_link_ksettings callbacks Igor Russkikh
2018-11-13 14:45 ` [PATCH v2 net-next 18/21] " Igor Russkikh
2018-11-13 14:45 [v2,net-next,17/21] net: usb: aqc111: Initialize ethtool_ops structure Igor Russkikh
2018-11-13 14:45 ` [PATCH v2 net-next 17/21] " Igor Russkikh
2018-11-13 14:45 [v2,net-next,16/21] net: usb: aqc111: Add RX VLAN filtering support Igor Russkikh
2018-11-13 14:45 ` [PATCH v2 net-next 16/21] " Igor Russkikh
2018-11-13 14:45 [v2,net-next,15/21] net: usb: aqc111: Add support for VLAN_CTAG_TX/RX offload Igor Russkikh
2018-11-13 14:45 ` [PATCH v2 net-next 15/21] " Igor Russkikh
2018-11-13 14:45 [v2,net-next,14/21] net: usb: aqc111: Implement set_rx_mode callback Igor Russkikh
2018-11-13 14:45 ` [PATCH v2 net-next 14/21] " Igor Russkikh
2018-11-13 14:45 [v2,net-next,13/21] net: usb: aqc111: Add support for TSO Igor Russkikh
2018-11-13 14:45 ` [PATCH v2 net-next 13/21] " Igor Russkikh
2018-11-13 14:44 [v2,net-next,12/21] net: usb: aqc111: Add support for enable/disable checksum offload Igor Russkikh
2018-11-13 14:44 ` [PATCH v2 net-next 12/21] " Igor Russkikh
2018-11-13 14:44 [v2,net-next,11/21] net: usb: aqc111: Add support for changing MTU Igor Russkikh
2018-11-13 14:44 ` [PATCH v2 net-next 11/21] " Igor Russkikh
2018-11-13 14:44 [v2,net-next,10/21] net: usb: aqc111: Add checksum offload support Igor Russkikh
2018-11-13 14:44 ` [PATCH v2 net-next 10/21] " Igor Russkikh
2018-11-13 14:44 [v2,net-next,09/21] net: usb: aqc111: Implement RX data path Igor Russkikh
2018-11-13 14:44 ` [PATCH v2 net-next 09/21] " Igor Russkikh
2018-11-13 14:44 [v2,net-next,08/21] net: usb: aqc111: Implement TX " Igor Russkikh
2018-11-13 14:44 ` [PATCH v2 net-next 08/21] " Igor Russkikh
2018-11-13 14:44 [v2,net-next,07/21] net: usb: aqc111: Add support for getting and setting of MAC address Igor Russkikh
2018-11-13 14:44 ` [PATCH v2 net-next 07/21] " Igor Russkikh
2018-11-13 14:44 [v2,net-next,06/21] net: usb: aqc111: Introduce link management Igor Russkikh
2018-11-13 14:44 ` [PATCH v2 net-next 06/21] " Igor Russkikh
2018-11-13 14:44 [v2,net-next,05/21] net: usb: aqc111: Introduce PHY access Igor Russkikh
2018-11-13 14:44 ` [PATCH v2 net-next 05/21] " Igor Russkikh
2018-11-13 14:44 [v2,net-next,04/21] net: usb: aqc111: Various callbacks implementation Igor Russkikh
2018-11-13 14:44 ` [PATCH v2 net-next 04/21] " Igor Russkikh
2018-11-13 14:44 [v2,net-next,03/21] net: usb: aqc111: Add implementation of read and write commands Igor Russkikh
2018-11-13 14:44 ` [PATCH v2 net-next 03/21] " Igor Russkikh
2018-11-13 14:44 [v2,net-next,02/21] net: usb: aqc111: Add bind and empty unbind callbacks Igor Russkikh
2018-11-13 14:44 ` [PATCH v2 net-next 02/21] " Igor Russkikh
2018-11-13 14:44 [v2,net-next,01/21] net: usb: aqc111: Driver skeleton for Aquantia AQtion USB to 5GbE Igor Russkikh
2018-11-13 14:44 ` [PATCH v2 net-next 01/21] " Igor Russkikh
2018-11-13 14:44 [PATCH v2 net-next 00/21] Add support for Aquantia AQtion USB to 5/2.5GbE devices 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.