net: usb: asix88179_178a: use new api ethtool_{get|set}_link_ksettings
Subsystems (3)
PATCH 1/1 net: usb: asix88179_178a: use new api ethtool_{get|set}_link_ksettings
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings.
As I don't have the hardware, I'd be very pleased if someone may test this patch.
--- drivers/net/usb/ax88179_178a.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)
drivers/net/usb/ax88179_178a.c +8 -6
@@ -620,16 +620,18 @@ static int ax88179_get_eeprom_len(struct net_device *net)return 0 ; } -static int ax88179_get_settings (struct net_device *net,struct ethtool_cmd *cmd) +static int ax88179_get_link_ksettings (struct net_device *net, +struct ethtool_link_ksettings *cmd) {struct usbnet *dev =netdev_priv (net); -return mii_ethtool_gset (&dev->mii, cmd); +return mii_ethtool_get_link_ksettings (&dev->mii, cmd); } -static int ax88179_set_settings (struct net_device *net,struct ethtool_cmd *cmd) +static int ax88179_set_link_ksettings (struct net_device *net, +const struct ethtool_link_ksettings *cmd) {struct usbnet *dev =netdev_priv (net); -return mii_ethtool_sset (&dev->mii, cmd); +return mii_ethtool_set_link_ksettings (&dev->mii, cmd); } static int
@@ -826,11 +828,11 @@ static int ax88179_ioctl(struct net_device *net, struct ifreq *rq, int cmd) .set_wol = ax88179_set_wol, .get_eeprom_len = ax88179_get_eeprom_len, .get_eeprom = ax88179_get_eeprom, - .get_settings = ax88179_get_settings, - .set_settings = ax88179_set_settings, .get_eee = ax88179_get_eee, .set_eee = ax88179_set_eee, .nway_reset = usbnet_nway_reset, + .get_link_ksettings = ax88179_get_link_ksettings, + .set_link_ksettings = ax88179_set_link_ksettings, };static void ax88179_set_multicast (struct net_device *net)
Signature · 1 line
1.7.4.4
I can test it tomorrow. I'll pull a clean copy of 4.10.2, or do you suggest a different version than that?
Chris
Quoted 42 lines · Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings.
As I don't have the hardware, I'd be very pleased if someone may test this patch.
Signed-off-by Philippe Reynes <[email protected]>--- drivers/net/usb/ax88179_178a.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)drivers/net/usb/ax88179_178a.c +6
-4@@ -620,16 +620,18 @@ static int ax88179_get_eeprom_len(struct net_device *net)return 0 ; } -static int ax88179_get_settings (struct net_device *net,struct ethtool_cmd *cmd) +static int ax88179_get_link_ksettings (struct net_device *net, +struct ethtool_link_ksettings *cmd) {struct usbnet *dev =netdev_priv (net); -return mii_ethtool_gset (&dev->mii, cmd); +return mii_ethtool_get_link_ksettings (&dev->mii, cmd); } -static int ax88179_set_settings (struct net_device *net,struct ethtool_cmd *cmd) +static int ax88179_set_link_ksettings (struct net_device *net, +const struct ethtool_link_ksettings *cmd) {struct usbnet *dev =netdev_priv (net); -return mii_ethtool_sset (&dev->mii, cmd); +return mii_ethtool_set_link_ksettings (&dev->mii, cmd); } static int@@ -826,11 +828,11 @@ static int ax88179_ioctl(struct net_device *net, struct ifreq *rq, int cmd) .set_wol = ax88179_set_wol, .get_eeprom_len = ax88179_get_eeprom_len, .get_eeprom = ax88179_get_eeprom,
drivers/net/usb/ax88179_178a.c static int ax88179_ioctl(struct net_device *net, struct ifreq *rq, int cmd) · line 838
Quoted 10 lines
drivers/net/usb/ax88179_178a.c +2
-2- .get_settings = ax88179_get_settings, - .set_settings = ax88179_set_settings, .get_eee = ax88179_get_eee, .set_eee = ax88179_set_eee, .nway_reset = usbnet_nway_reset, + .get_link_ksettings = ax88179_get_link_ksettings, + .set_link_ksettings = ax88179_set_link_ksettings, };static void ax88179_set_multicast (struct net_device *net)
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Chris,
Quoted 2 lines · Chris Roth
I can test it tomorrow. I'll pull a clean copy of 4.10.2, or do you suggest a different version than that?
I think that 4.10.2 is fine, there are no change on this driver between 4.10 and git (net-next).
Thanks a lot for the test.
Quoted 1 line
Chris
Philippe
Quoted 60 lines · Philippe Reynes
Quoted 57 lines
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings.
As I don't have the hardware, I'd be very pleased if someone may test this patch.
Signed-off-by Philippe Reynes <[email protected]>--- drivers/net/usb/ax88179_178a.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)drivers/net/usb/ax88179_178a.c +6
-4@@ -620,16 +620,18 @@ static int ax88179_get_eeprom_len(struct net_device *net)return 0 ; } -static int ax88179_get_settings (struct net_device *net,struct ethtool_cmd *cmd) +static int ax88179_get_link_ksettings (struct net_device *net, +struct ethtool_link_ksettings *cmd) {struct usbnet *dev =netdev_priv (net); -return mii_ethtool_gset (&dev->mii, cmd); +return mii_ethtool_get_link_ksettings (&dev->mii, cmd); } -static int ax88179_set_settings (struct net_device *net,struct ethtool_cmd *cmd) +static int ax88179_set_link_ksettings (struct net_device *net, +const struct ethtool_link_ksettings *cmd) {struct usbnet *dev =netdev_priv (net); -return mii_ethtool_sset (&dev->mii, cmd); +return mii_ethtool_set_link_ksettings (&dev->mii, cmd);}
static int
drivers/net/usb/ax88179_178a.c +2
-2@@ -826,11 +828,11 @@ static int ax88179_ioctl(struct net_device *net, struct ifreq *rq, int cmd) .set_wol = ax88179_set_wol, .get_eeprom_len = ax88179_get_eeprom_len, .get_eeprom = ax88179_get_eeprom, - .get_settings = ax88179_get_settings, - .set_settings = ax88179_set_settings, .get_eee = ax88179_get_eee, .set_eee = ax88179_set_eee, .nway_reset = usbnet_nway_reset, + .get_link_ksettings = ax88179_get_link_ksettings, + .set_link_ksettings = ax88179_set_link_ksettings, };static void
ax88179_set_multicast(struct net_device *net)
I have tested this patch on the Cypress GX3 SuperSpeed to Gigabit Ethernet Bridge Controller (Vendor=04b4 ProdID=3610) and the device still functions properly with the patch applied.
Feel free to add my name / email to the tested-by portion of the patch.
Chris
Quoted 42 lines · Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings.
As I don't have the hardware, I'd be very pleased if someone may test this patch.
Signed-off-by Philippe Reynes <[email protected]>--- drivers/net/usb/ax88179_178a.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)drivers/net/usb/ax88179_178a.c +6
-4@@ -620,16 +620,18 @@ static int ax88179_get_eeprom_len(struct net_device *net)return 0 ; } -static int ax88179_get_settings (struct net_device *net,struct ethtool_cmd *cmd) +static int ax88179_get_link_ksettings (struct net_device *net, +struct ethtool_link_ksettings *cmd) {struct usbnet *dev =netdev_priv (net); -return mii_ethtool_gset (&dev->mii, cmd); +return mii_ethtool_get_link_ksettings (&dev->mii, cmd); } -static int ax88179_set_settings (struct net_device *net,struct ethtool_cmd *cmd) +static int ax88179_set_link_ksettings (struct net_device *net, +const struct ethtool_link_ksettings *cmd) {struct usbnet *dev =netdev_priv (net); -return mii_ethtool_sset (&dev->mii, cmd); +return mii_ethtool_set_link_ksettings (&dev->mii, cmd); } static int@@ -826,11 +828,11 @@ static int ax88179_ioctl(struct net_device *net, struct ifreq *rq, int cmd) .set_wol = ax88179_set_wol, .get_eeprom_len = ax88179_get_eeprom_len, .get_eeprom = ax88179_get_eeprom,
drivers/net/usb/ax88179_178a.c static int ax88179_ioctl(struct net_device *net, struct ifreq *rq, int cmd) · line 838
Quoted 10 lines
drivers/net/usb/ax88179_178a.c +2
-2- .get_settings = ax88179_get_settings, - .set_settings = ax88179_set_settings, .get_eee = ax88179_get_eee, .set_eee = ax88179_set_eee, .nway_reset = usbnet_nway_reset, + .get_link_ksettings = ax88179_get_link_ksettings, + .set_link_ksettings = ax88179_set_link_ksettings, };static void ax88179_set_multicast (struct net_device *net)
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Philippe Reynes <[email protected]>
Date: Sun, 12 Mar 2017 18:02:36 +0100
Quoted 7 lines
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings.
As I don't have the hardware, I'd be very pleased if someone may test this patch.
Signed-off-by Philippe Reynes <[email protected]>
Applied.