Re: [PATCH] net: usb: asix88179_178a: use new api ethtool_{get|set}_link_ksettings

2017-03-13 Thread Chris Roth
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


On 2017-03-12 11:02 AM, Philippe Reynes wrote:
> 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 
> ---
>  drivers/net/usb/ax88179_178a.c |   14 --
>  1 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
> index a3a7db0..4a0ae7c 100644
> --- a/drivers/net/usb/ax88179_178a.c
> +++ b/drivers/net/usb/ax88179_178a.c
> @@ -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(>mii, cmd);
> + return mii_ethtool_get_link_ksettings(>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(>mii, cmd);
> + return mii_ethtool_set_link_ksettings(>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)

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] net: usb: asix88179_178a: use new api ethtool_{get|set}_link_ksettings

2017-03-12 Thread 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?

Chris

On 2017-03-12 11:02 AM, Philippe Reynes wrote:
> 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 
> ---
>  drivers/net/usb/ax88179_178a.c |   14 --
>  1 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
> index a3a7db0..4a0ae7c 100644
> --- a/drivers/net/usb/ax88179_178a.c
> +++ b/drivers/net/usb/ax88179_178a.c
> @@ -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(>mii, cmd);
> + return mii_ethtool_get_link_ksettings(>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(>mii, cmd);
> + return mii_ethtool_set_link_ksettings(>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)

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v4] Net Driver: Add Cypress GX3 VID=04b4 PID=3610.

2016-11-07 Thread Chris Roth
From: Allan Chou <al...@asix.com.tw>

Add support for Cypress GX3 SuperSpeed to Gigabit Ethernet
Bridge Controller (Vendor=04b4 ProdID=3610).

Patch verified on x64 linux kernel 4.7.4, 4.8.6, 4.9-rc4 systems
with the Kensington SD4600P USB-C Universal Dock with Power,
which uses the Cypress GX3 SuperSpeed to Gigabit Ethernet Bridge
Controller.

A similar patch was signed-off and tested-by Allan Chou
<al...@asix.com.tw> on 2015-12-01.

Allan verified his similar patch on x86 Linux kernel 4.1.6 system
with Cypress GX3 SuperSpeed to Gigabit Ethernet Bridge Controller.

Tested-by: Allan Chou <al...@asix.com.tw>
Tested-by: Chris Roth <chris.r...@usask.ca>
Tested-by: Artjom Simon <artjom.si...@gmail.com>

Signed-off-by: Allan Chou <al...@asix.com.tw>
Signed-off-by: Chris Roth <chris.r...@usask.ca>
---
 drivers/net/usb/ax88179_178a.c | 17 +
 1 file changed, 17 insertions(+)

diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
index e6338c1..8a6675d 100644
--- a/drivers/net/usb/ax88179_178a.c
+++ b/drivers/net/usb/ax88179_178a.c
@@ -1656,6 +1656,19 @@ static const struct driver_info ax88178a_info = {
 .tx_fixup = ax88179_tx_fixup,
 };

+static const struct driver_info cypress_GX3_info = {
+.description = "Cypress GX3 SuperSpeed to Gigabit Ethernet Controller",
+.bind = ax88179_bind,
+.unbind = ax88179_unbind,
+.status = ax88179_status,
+.link_reset = ax88179_link_reset,
+.reset = ax88179_reset,
+.stop = ax88179_stop,
+.flags = FLAG_ETHER | FLAG_FRAMING_AX,
+.rx_fixup = ax88179_rx_fixup,
+.tx_fixup = ax88179_tx_fixup,
+};
+
 static const struct driver_info dlink_dub1312_info = {
 .description = "D-Link DUB-1312 USB 3.0 to Gigabit Ethernet Adapter",
 .bind = ax88179_bind,
@@ -1718,6 +1731,10 @@ static const struct usb_device_id products[] = {
 , USB_DEVICE(0x0b95, 0x178a),
 .driver_info = (unsigned long)_info,
 }, {
+/* Cypress GX3 SuperSpeed to Gigabit Ethernet Bridge Controller */
+USB_DEVICE(0x04b4, 0x3610),
+.driver_info = (unsigned long)_GX3_info,
+}, {
 /* D-Link DUB-1312 USB 3.0 to Gigabit Ethernet Adapter */
 USB_DEVICE(0x2001, 0x4a00),
 .driver_info = (unsigned long)_dub1312_info,
-- 
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] Net Driver: Add Cypress GX3 VID=04b4 PID=3610.

2016-09-26 Thread Chris Roth
I'm not sure what I'm doing wrong:

I'm trying to get the from statement to read original author (Allan
Chou) first, and then me (Chris Roth) second. I've used the following
two commands:

git format-patch -o /tmp/ --subject-prefix="PATCH v2" --from="Allan
Chou <al...@asix.com.tw>" HEAD^

and

git send-email --to linux-usb@vger.kernel.org --to
net...@vger.kernel.org --to linux-ker...@vger.kernel.org --from="Allan
Chou <al...@asix.com.tw>"
/tmp/0001-Net-Driver-Add-Cypress-GX3-VID-04b4-PID-3610.patch

I thought that adding the --from portions to the git format-patch and
git send-email commands would force the addition of Allan to the top
of the patch, but it hasn't. Can anyone tell me specifically how I
need to change these commands in order to get the desired result? Then
I'll submit a PATCH v3.

Regards,
Chris

On Mon, Sep 26, 2016 at 3:48 PM, Allan Chou <al...@asix.com.tw> wrote:
> From: Chris Roth <chris.r...@usask.ca>
>
> Add support for Cypress GX3 SuperSpeed to Gigabit Ethernet
> Bridge Controller (Vendor=04b4 ProdID=3610).
>
> Patch verified on x64 linux kernel 4.7.4 system with the
> Kensington SD4600P USB-C Universal Dock with Power, which uses the
> Cypress GX3 SuperSpeed to Gigabit Ethernet Bridge Controller.
>
> A similar patch was signed-off and tested-by Allan Chou
> <al...@asix.com.tw> on 2015-12-01.
>
> Allan verified his similar patch on x86 Linux kernel 4.1.6 system
> with Cypress GX3 SuperSpeed to Gigabit Ethernet Bridge Controller.
>
> Tested-by: Allan Chou <al...@asix.com.tw>
> Tested-by: Chris Roth <chris.r...@usask.ca>
>
> Signed-off-by: Allan Chou <al...@asix.com.tw>
> Signed-off-by: Chris Roth <chris.r...@usask.ca>
> ---
>  drivers/net/usb/ax88179_178a.c | 17 +
>  1 file changed, 17 insertions(+)
>
> diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
> index e6338c1..8a6675d 100644
> --- a/drivers/net/usb/ax88179_178a.c
> +++ b/drivers/net/usb/ax88179_178a.c
> @@ -1656,6 +1656,19 @@ static const struct driver_info ax88178a_info = {
> .tx_fixup = ax88179_tx_fixup,
>  };
>
> +static const struct driver_info cypress_GX3_info = {
> +   .description = "Cypress GX3 SuperSpeed to Gigabit Ethernet 
> Controller",
> +   .bind = ax88179_bind,
> +   .unbind = ax88179_unbind,
> +   .status = ax88179_status,
> +   .link_reset = ax88179_link_reset,
> +   .reset = ax88179_reset,
> +   .stop = ax88179_stop,
> +   .flags = FLAG_ETHER | FLAG_FRAMING_AX,
> +   .rx_fixup = ax88179_rx_fixup,
> +   .tx_fixup = ax88179_tx_fixup,
> +};
> +
>  static const struct driver_info dlink_dub1312_info = {
> .description = "D-Link DUB-1312 USB 3.0 to Gigabit Ethernet Adapter",
> .bind = ax88179_bind,
> @@ -1718,6 +1731,10 @@ static const struct usb_device_id products[] = {
> USB_DEVICE(0x0b95, 0x178a),
> .driver_info = (unsigned long)_info,
>  }, {
> +   /* Cypress GX3 SuperSpeed to Gigabit Ethernet Bridge Controller */
> +   USB_DEVICE(0x04b4, 0x3610),
> +   .driver_info = (unsigned long)_GX3_info,
> +}, {
> /* D-Link DUB-1312 USB 3.0 to Gigabit Ethernet Adapter */
> USB_DEVICE(0x2001, 0x4a00),
> .driver_info = (unsigned long)_dub1312_info,
> --
> 2.7.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Net Driver: Add Cypress GX3 VID=04b4 PID=3610.

2016-09-24 Thread Chris Roth
Due to my lack of familiarity with the how git send-email works, I've
unintentionally had my name listed as the first 'from' whereas I
intended Allan Chou to be listed as the first 'from' in the patch. If
anyone can correct this on my behalf, I would appreciate it.

Regards,
Chris

On Sat, Sep 24, 2016 at 10:57 AM, Chris Roth <chris.r...@usask.ca> wrote:
>
> Due to my lack of familiarity with the how git send-email works, I've 
> unintentionally had my name listed as the first 'from' whereas I intended 
> Allan Chou to be listed as the first 'from' in the patch. If anyone can 
> correct this on my behalf, I would appreciate it.
>
> Regards,
> Chris
>
> On Fri, Sep 23, 2016 at 4:24 PM, <chris.r...@usask.ca> wrote:
>>
>> From: Chris Roth <chris.r...@usask.ca>
>>
>> From: Allan Chou <al...@asix.com.tw>
>>
>> Add support for Cypress GX3 SuperSpeed to Gigabit Ethernet
>> Bridge Controller (Vendor=04b4 ProdID=3610).
>>
>> Patch verified on x64 linux kernel 4.7.4 system with the
>> Kensington SD4600P USB-C Universal Dock with Power, which uses the
>> Cypress GX3 SuperSpeed to Gigabit Ethernet Bridge Controller.
>>
>> A similar patch was signed-off and tested-by Allan Chou
>> <al...@asix.com.tw> on 2015-12-01.
>>
>> Allan verified his similar patch on x86 Linux kernel 4.1.6 system
>> with Cypress GX3 SuperSpeed to Gigabit Ethernet Bridge Controller.
>>
>> Tested-by: Allan Chou <al...@asix.com.tw>
>> Tested-by: Chris Roth <chris.r...@usask.ca>
>>
>> Signed-off-by: Allan Chou <al...@asix.com.tw>
>> Signed-off-by: Chris Roth <chris.r...@usask.ca>
>> ---
>>  drivers/net/usb/ax88179_178a.c | 17 +
>>  1 file changed, 17 insertions(+)
>>
>> diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
>> index e6338c1..8a6675d 100644
>> --- a/drivers/net/usb/ax88179_178a.c
>> +++ b/drivers/net/usb/ax88179_178a.c
>> @@ -1656,6 +1656,19 @@ static const struct driver_info ax88178a_info = {
>> .tx_fixup = ax88179_tx_fixup,
>>  };
>>
>> +static const struct driver_info cypress_GX3_info = {
>> +   .description = "Cypress GX3 SuperSpeed to Gigabit Ethernet 
>> Controller",
>> +   .bind = ax88179_bind,
>> +   .unbind = ax88179_unbind,
>> +   .status = ax88179_status,
>> +   .link_reset = ax88179_link_reset,
>> +   .reset = ax88179_reset,
>> +   .stop = ax88179_stop,
>> +   .flags = FLAG_ETHER | FLAG_FRAMING_AX,
>> +   .rx_fixup = ax88179_rx_fixup,
>> +   .tx_fixup = ax88179_tx_fixup,
>> +};
>> +
>>  static const struct driver_info dlink_dub1312_info = {
>> .description = "D-Link DUB-1312 USB 3.0 to Gigabit Ethernet Adapter",
>> .bind = ax88179_bind,
>> @@ -1718,6 +1731,10 @@ static const struct usb_device_id products[] = {
>> USB_DEVICE(0x0b95, 0x178a),
>> .driver_info = (unsigned long)_info,
>>  }, {
>> +   /* Cypress GX3 SuperSpeed to Gigabit Ethernet Bridge Controller */
>> +   USB_DEVICE(0x04b4, 0x3610),
>> +   .driver_info = (unsigned long)_GX3_info,
>> +}, {
>> /* D-Link DUB-1312 USB 3.0 to Gigabit Ethernet Adapter */
>> USB_DEVICE(0x2001, 0x4a00),
>> .driver_info = (unsigned long)_dub1312_info,
>> --
>> 2.7.4
>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html