Re: [PATCH 1/1] AX88179_178A: Add FLAG_HW_IPALIGN to determine whether reserving NET_IP_ALIGN bytes for an SKB.

2013-12-18 Thread Freddy Xin
On 2013年12月16日 18:09, David Laight wrote: I was thinking of something like: skb = netdev_alloc_skb(dev, length + dev->skb_align, gfp); if (NET_IP_ALIGN && skb && !(ev->driver_flags & FLAG_HW_IPALIGN)) skb_reserve(skb, NET_IP_ALIGN); It might even be reasonable to remove the length adjustment

Re: [PATCH 1/1] AX88179_178A: Add FLAG_HW_IPALIGN to determine whether reserving NET_IP_ALIGN bytes for an SKB.

2013-12-18 Thread Freddy Xin
On 2013年12月16日 18:09, David Laight wrote: I was thinking of something like: skb = netdev_alloc_skb(dev, length + dev-skb_align, gfp); if (NET_IP_ALIGN skb !(ev-driver_flags FLAG_HW_IPALIGN)) skb_reserve(skb, NET_IP_ALIGN); It might even be reasonable to remove the length adjustment -

Re: [PATCH 1/1] AX88179_178A: Add FLAG_HW_IPALIGN to determine whether reserving NET_IP_ALIGN bytes for an SKB.

2013-12-15 Thread Freddy Xin
On 2013年12月13日 18:36, David Laight wrote: From: fre...@asix.com.tw ... - skb = __netdev_alloc_skb_ip_align(dev->net, size, flags); + if (dev->driver_info->flags & FLAG_HW_IPALIGN) + skb = __netdev_alloc_skb(dev->net, size, flags); + else + skb =

Re: [PATCH 1/1] AX88179_178A: Add FLAG_HW_IPALIGN to determine whether reserving NET_IP_ALIGN bytes for an SKB.

2013-12-15 Thread Freddy Xin
On 2013年12月13日 18:36, David Laight wrote: From: fre...@asix.com.tw ... - skb = __netdev_alloc_skb_ip_align(dev-net, size, flags); + if (dev-driver_info-flags FLAG_HW_IPALIGN) + skb = __netdev_alloc_skb(dev-net, size, flags); + else + skb =

Re: [PATCH 1/1] AX88179_178A: Enable the hardware pseudo header in case of the NET_IP_ALIGN equals 0

2013-12-10 Thread Freddy Xin
On 2013年12月10日 09:01, David Miller wrote: From: fre...@asix.com.tw Date: Fri, 6 Dec 2013 17:58:18 +0800 From: Freddy Xin The AX88179_178A has a hardware feature that it can insert a 2-bytes pseudo header in front of each received frame by setting the AX_RX_CTL_IPE bit. This feature is used

Re: [PATCH 1/1] AX88179_178A: Enable the hardware pseudo header in case of the NET_IP_ALIGN equals 0

2013-12-10 Thread Freddy Xin
On 2013年12月10日 09:01, David Miller wrote: From: fre...@asix.com.tw Date: Fri, 6 Dec 2013 17:58:18 +0800 From: Freddy Xin fre...@asix.com.tw The AX88179_178A has a hardware feature that it can insert a 2-bytes pseudo header in front of each received frame by setting the AX_RX_CTL_IPE bit

[PATCH resubmit] ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver

2013-03-02 Thread Freddy Xin
From: Freddy Xin This is a resubmission. Added kfree() in ax88179_get_eeprom to prevent memory leakage. Modified "__le16 rxctl" to "u16 rxctl" in "struct ax88179_data" and removed pointless casts. Removed asix_init and asix_exit functions and added "mo

[PATCH resubmit] ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver

2013-03-02 Thread Freddy Xin
From: Freddy Xin fre...@asix.com.tw This is a resubmission. Added kfree() in ax88179_get_eeprom to prevent memory leakage. Modified __le16 rxctl to u16 rxctl in struct ax88179_data and removed pointless casts. Removed asix_init and asix_exit functions and added module_usb_driver

[PATCH resubmit] ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver

2013-02-27 Thread Freddy Xin
From: Freddy Xin This is a resubmission. Fixed endianness issue on big endian systems and verified this driver on iBook G4. Removed steps that change net->features in ax88179_set_features function. Added "const" to ethtool_ops structure and fixed the coding style of AX88179_BULK

[PATCH resubmit] ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver

2013-02-27 Thread Freddy Xin
From: Freddy Xin fre...@asix.com.tw This is a resubmission. Fixed endianness issue on big endian systems and verified this driver on iBook G4. Removed steps that change net-features in ax88179_set_features function. Added const to ethtool_ops structure and fixed the coding style

[PATCH, resubmit] ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver

2013-02-07 Thread Freddy Xin
From: Freddy Xin This is a resubmission. Added "const" to ethtool_ops structure and fixed the coding style of AX88179_BULKIN_SIZE array. Fixed the issue that the default MTU is not 1500. Added ax88179_change_mtu function and enabled the hardware jumbo frame function to support an

[PATCH, resubmit] ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver

2013-02-07 Thread Freddy Xin
From: Freddy Xin fre...@asix.com.tw This is a resubmission. Added const to ethtool_ops structure and fixed the coding style of AX88179_BULKIN_SIZE array. Fixed the issue that the default MTU is not 1500. Added ax88179_change_mtu function and enabled the hardware jumbo frame function to support

[PATCH, resubmit] ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver

2013-02-06 Thread Freddy Xin
From: Freddy Xin This is a resubmission. Fixed the issue that the default MTU is not 1500. Added ax88179_change_mtu function and enabled the hardware jumbo frame function to support an MTU higher than 1500. Fixed indentation and empty line coding style errors. The _nopm version usb functions

[PATCH, resubmit] ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver

2013-02-06 Thread Freddy Xin
From: Freddy Xin fre...@asix.com.tw This is a resubmission. Fixed the issue that the default MTU is not 1500. Added ax88179_change_mtu function and enabled the hardware jumbo frame function to support an MTU higher than 1500. Fixed indentation and empty line coding style errors. The _nopm

[PATCH, resubmit] ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver

2013-01-22 Thread Freddy Xin
From: Freddy Xin This is a resubmission. Fixed coding style errors. The _nopm version usb functions were added to access register in suspend and resume functions. Serveral variables allocted dynamically were removed and replaced by stack variables. ax88179_get_eeprom were modified from

[PATCH, resubmit] ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver

2013-01-22 Thread Freddy Xin
From: Freddy Xin fre...@asix.com.tw This is a resubmission. Fixed coding style errors. The _nopm version usb functions were added to access register in suspend and resume functions. Serveral variables allocted dynamically were removed and replaced by stack variables. ax88179_get_eeprom were

[PATCH, resubmit] ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver

2013-01-17 Thread Freddy Xin
-off-by: Freddy Xin --- drivers/net/usb/Kconfig| 18 + drivers/net/usb/Makefile |1 + drivers/net/usb/ax88179_178a.c | 1424 3 files changed, 1443 insertions(+) create mode 100644 drivers/net/usb/ax88179_178a.c diff --git a/drivers/net

[PATCH, resubmit] ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver

2013-01-17 Thread Freddy Xin
-off-by: Freddy Xin fre...@asix.com.tw --- drivers/net/usb/Kconfig| 18 + drivers/net/usb/Makefile |1 + drivers/net/usb/ax88179_178a.c | 1424 3 files changed, 1443 insertions(+) create mode 100644 drivers/net/usb/ax88179_178a.c diff