[PATCH net-next v2 03/13] r8152: remove rtl8152_get_stats

2014-03-04 Thread Hayes Wang
The rtl8152_get_stats() returns the point address of the struct net_device_stats. This could be got from struct net_device directly. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/drivers/net/usb

[PATCH net-next v2 06/13] r8152: up the priority of the transmission

2014-03-04 Thread Hayes Wang
move the tx_bottom() from delayed_work to tasklet. It makes the rx and tx balanced. If the device is in runtime suspend when getting the tx packet, wakeup the device before trasmitting. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 45 +++-- 1

[PATCH net-next v2 02/13] r8152: replace tp->netdev with netdev

2014-03-04 Thread Hayes Wang
Replace some tp->netdev with netdev. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index c8bad62..151398b 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/

[PATCH net-next v2 07/13] r8152: calculate the dropped packets for rx

2014-03-04 Thread Hayes Wang
Continue dealing with the remain rx packets, even though the allocation of the skb fail. This could calculate the correct dropped packets. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b

[PATCH net-next v2 11/13] r8152: reduce the numbers of the bulks

2014-03-04 Thread Hayes Wang
Reduce the numbers of tx and rx aggregation buffers. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 8e208f30..ddb5200 100644 --- a/drivers/net/usb/r8152.c +++ b

[PATCH net-next v2 12/13] r8152: add additional parameter for non x86 platform

2014-03-04 Thread Hayes Wang
Add additional parameter for non x86 platform for better throughput. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index ddb5200..6c0ec37 100644 --- a/drivers/net

[PATCH net-next v2 10/13] r8152: support IPv6

2014-03-04 Thread Hayes Wang
Support hw IPv6 checksum for TCP and UDP packets. Note that the hw has the limitation of the range of the transport offset. Besides, the TCP Pseudo Header of the IPv6 TSO of the hw bases on the Microsoft document which excludes the packet length. Signed-off-by: Hayes Wang --- drivers/net/usb

[PATCH net-next v2 08/13] r8152: support rx checksum

2014-03-04 Thread Hayes Wang
Support hw rx checksum for TCP and UDP packets. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 41 +++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 08f4e870..c76e018 100644

[PATCH net-next v2 13/13] r8152: modify the tx timeout funcfion

2014-03-04 Thread Hayes Wang
Reset and reinitialize the device when the tx timeout occurs. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 41 +++-- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 6c0ec37

[PATCH net-next v2 00/13] r8152: new features

2014-03-04 Thread Hayes Wang
s() for "support TSO". - Fix the issue of reording the packets for "support IPv6". Hayes Wang (13): r8152: deal with the empty line and space r8152: replace tp->netdev with netdev r8152: remove rtl8152_get_stats r8152: replace spin_lock_irqsave and spin_unlock_irqrestore

[PATCH net-next v2 09/13] r8152: support TSO

2014-03-04 Thread Hayes Wang
Support scatter gather and TSO. Adjust the tx checksum function and set the max gso size to fix the size of the tx aggregation buffer. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 117 +++- 1 file changed, 87 insertions(+), 30 deletions

[PATCH net] r8152: disable the ECM mode

2014-03-04 Thread Hayes Wang
the ECM driver. Thus, disable the ECM mode driver, and let r8152 to set the configuration to vendor mode and reset the device automatically. Signed-off-by: Hayes Wang --- drivers/net/usb/Makefile| 2 +- drivers/net/usb/cdc_ether.c | 7 ++ drivers/net/usb/r8152.c | 15 +-- drivers/net

[PATCH net-next 01/12] r8152: deal with the empty line and space

2014-03-04 Thread Hayes Wang
Add or remove some empty lines. Replace the spaces with the tabs. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 0654bd3..c8bad62 100644 --- a/drivers/net

[PATCH net-next 00/12] r8152: new features

2014-03-04 Thread Hayes Wang
Besides the adjustment of the code, support rx checksum, TCP large send, and IPv6. Hayes Wang (12): r8152: deal with the empty line and space r8152: replace tp->netdev with netdev r8152: remove rtl8152_get_stats r8152: replace spin_lock_irqsave and spin_unlock_irqrestore r8152: check

[PATCH net-next 04/12] r8152: replace spin_lock_irqsave and spin_unlock_irqrestore

2014-03-04 Thread Hayes Wang
Use spin_lock and spin_unlock in interrupt context. The ndo_start_xmit would not be called in interrupt context, so replace the relative spin_lock_irqsave and spin_unlock_irqrestore with spin_lock_bh and spin_unlock_bh. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 28

[PATCH net-next 03/12] r8152: remove rtl8152_get_stats

2014-03-04 Thread Hayes Wang
The rtl8152_get_stats() returns the point address of the struct net_device_stats. This could be got from struct net_device directly. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/drivers/net/usb

[PATCH net-next 02/12] r8152: replace tp->netdev with netdev

2014-03-04 Thread Hayes Wang
Replace some tp->netdev with netdev. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index c8bad62..151398b 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/

[PATCH net-next 05/12] r8152: check tx agg list before spin lock

2014-03-04 Thread Hayes Wang
Check tx agg list before spin lock to avoid doing spin lock every times. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 8ecb41b..00b3192 100644 --- a/drivers/net/usb/r8152.c

[PATCH net-next 08/12] r8152: support TSO

2014-03-04 Thread Hayes Wang
Support scatter gather and TSO. Adjust the tx checksum function and set the max gso size to fix the size of the tx aggregation buffer. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 133 +--- 1 file changed, 103 insertions(+), 30 deletions

[PATCH net-next 06/12] r8152: up the priority of the transmission

2014-03-04 Thread Hayes Wang
move the tx_bottom() from delayed_work to tasklet. It makes the rx and tx balanced. If the device is in runtime suspend when getting the tx packet, wakeup the device before trasmitting. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 45 +++-- 1

[PATCH net-next 07/12] r8152: support rx checksum

2014-03-04 Thread Hayes Wang
Support hw rx checksum for TCP and UDP packets. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 53 ++--- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index f1eaa18..5fdf0af

[PATCH net-next 11/12] r8152: add additional parameter for non x86 platform

2014-03-04 Thread Hayes Wang
Add additional parameter for non x86 platform for better throughput. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index b60b3bc..e04fcbd 100644 --- a/drivers/net

[PATCH net-next 12/12] r8152: modify the tx timeout funcfion

2014-03-04 Thread Hayes Wang
Reset and reinitialize the device when the tx timeout occurs. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 41 +++-- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index e04fcbd

[PATCH net-next 09/12] r8152: support IPv6

2014-03-04 Thread Hayes Wang
Support hw IPv6 checksum for TCP and UDP packets. Note that the hw has the limitation of the range of the transport offset. Besides, the TCP Pseudo Header of the IPv6 TSO of the hw bases on the Microsoft document which excludes the packet length. Signed-off-by: Hayes Wang --- drivers/net/usb

[PATCH net-next 10/12] r8152: reduce the numbers of the bulks

2014-03-04 Thread Hayes Wang
Reduce the numbers of tx and rx aggregation buffers. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 72cbab1..b60b3bc 100644 --- a/drivers/net/usb/r8152.c +++ b

[PATCH net-next 10/12] r8152: reduce the numbers of the bulks

2014-03-04 Thread Hayes Wang
Reduce the numbers of tx and rx aggregation buffers. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 72cbab1..b60b3bc 100644 --- a/drivers

[PATCH net-next 12/12] r8152: modify the tx timeout funcfion

2014-03-04 Thread Hayes Wang
Reset and reinitialize the device when the tx timeout occurs. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 41 +++-- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb

[PATCH net-next 09/12] r8152: support IPv6

2014-03-04 Thread Hayes Wang
Support hw IPv6 checksum for TCP and UDP packets. Note that the hw has the limitation of the range of the transport offset. Besides, the TCP Pseudo Header of the IPv6 TSO of the hw bases on the Microsoft document which excludes the packet length. Signed-off-by: Hayes Wang hayesw...@realtek.com

[PATCH net-next 07/12] r8152: support rx checksum

2014-03-04 Thread Hayes Wang
Support hw rx checksum for TCP and UDP packets. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 53 ++--- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c

[PATCH net-next 11/12] r8152: add additional parameter for non x86 platform

2014-03-04 Thread Hayes Wang
Add additional parameter for non x86 platform for better throughput. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index b60b3bc..e04fcbd

[PATCH net-next 02/12] r8152: replace tp-netdev with netdev

2014-03-04 Thread Hayes Wang
Replace some tp-netdev with netdev. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index c8bad62..151398b 100644 --- a/drivers/net/usb/r8152

[PATCH net-next 05/12] r8152: check tx agg list before spin lock

2014-03-04 Thread Hayes Wang
Check tx agg list before spin lock to avoid doing spin lock every times. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 8ecb41b..00b3192 100644

[PATCH net-next 08/12] r8152: support TSO

2014-03-04 Thread Hayes Wang
Support scatter gather and TSO. Adjust the tx checksum function and set the max gso size to fix the size of the tx aggregation buffer. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 133 +--- 1 file changed, 103

[PATCH net-next 06/12] r8152: up the priority of the transmission

2014-03-04 Thread Hayes Wang
move the tx_bottom() from delayed_work to tasklet. It makes the rx and tx balanced. If the device is in runtime suspend when getting the tx packet, wakeup the device before trasmitting. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 45

[PATCH net-next 00/12] r8152: new features

2014-03-04 Thread Hayes Wang
Besides the adjustment of the code, support rx checksum, TCP large send, and IPv6. Hayes Wang (12): r8152: deal with the empty line and space r8152: replace tp-netdev with netdev r8152: remove rtl8152_get_stats r8152: replace spin_lock_irqsave and spin_unlock_irqrestore r8152: check tx

[PATCH net-next 04/12] r8152: replace spin_lock_irqsave and spin_unlock_irqrestore

2014-03-04 Thread Hayes Wang
Use spin_lock and spin_unlock in interrupt context. The ndo_start_xmit would not be called in interrupt context, so replace the relative spin_lock_irqsave and spin_unlock_irqrestore with spin_lock_bh and spin_unlock_bh. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c

[PATCH net-next 03/12] r8152: remove rtl8152_get_stats

2014-03-04 Thread Hayes Wang
The rtl8152_get_stats() returns the point address of the struct net_device_stats. This could be got from struct net_device directly. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff

[PATCH net-next 01/12] r8152: deal with the empty line and space

2014-03-04 Thread Hayes Wang
Add or remove some empty lines. Replace the spaces with the tabs. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 0654bd3..c8bad62

[PATCH net] r8152: disable the ECM mode

2014-03-04 Thread Hayes Wang
the ECM driver. Thus, disable the ECM mode driver, and let r8152 to set the configuration to vendor mode and reset the device automatically. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/Makefile| 2 +- drivers/net/usb/cdc_ether.c | 7 ++ drivers/net/usb/r8152.c

[PATCH net-next v2 00/13] r8152: new features

2014-03-04 Thread Hayes Wang
the issue of reording the packets for support IPv6. Hayes Wang (13): r8152: deal with the empty line and space r8152: replace tp-netdev with netdev r8152: remove rtl8152_get_stats r8152: replace spin_lock_irqsave and spin_unlock_irqrestore r8152: check tx agg list before spin lock r8152

[PATCH net-next v2 09/13] r8152: support TSO

2014-03-04 Thread Hayes Wang
Support scatter gather and TSO. Adjust the tx checksum function and set the max gso size to fix the size of the tx aggregation buffer. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 117 +++- 1 file changed, 87

[PATCH net-next v2 13/13] r8152: modify the tx timeout funcfion

2014-03-04 Thread Hayes Wang
Reset and reinitialize the device when the tx timeout occurs. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 41 +++-- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb

[PATCH net-next v2 10/13] r8152: support IPv6

2014-03-04 Thread Hayes Wang
Support hw IPv6 checksum for TCP and UDP packets. Note that the hw has the limitation of the range of the transport offset. Besides, the TCP Pseudo Header of the IPv6 TSO of the hw bases on the Microsoft document which excludes the packet length. Signed-off-by: Hayes Wang hayesw...@realtek.com

[PATCH net-next v2 12/13] r8152: add additional parameter for non x86 platform

2014-03-04 Thread Hayes Wang
Add additional parameter for non x86 platform for better throughput. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index ddb5200..6c0ec37

[PATCH net-next v2 08/13] r8152: support rx checksum

2014-03-04 Thread Hayes Wang
Support hw rx checksum for TCP and UDP packets. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 41 +++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index

[PATCH net-next v2 07/13] r8152: calculate the dropped packets for rx

2014-03-04 Thread Hayes Wang
Continue dealing with the remain rx packets, even though the allocation of the skb fail. This could calculate the correct dropped packets. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net

[PATCH net-next v2 11/13] r8152: reduce the numbers of the bulks

2014-03-04 Thread Hayes Wang
Reduce the numbers of tx and rx aggregation buffers. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 8e208f30..ddb5200 100644 --- a/drivers

[PATCH net-next v2 02/13] r8152: replace tp-netdev with netdev

2014-03-04 Thread Hayes Wang
Replace some tp-netdev with netdev. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index c8bad62..151398b 100644 --- a/drivers/net/usb/r8152

[PATCH net-next v2 06/13] r8152: up the priority of the transmission

2014-03-04 Thread Hayes Wang
move the tx_bottom() from delayed_work to tasklet. It makes the rx and tx balanced. If the device is in runtime suspend when getting the tx packet, wakeup the device before trasmitting. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 45

[PATCH net-next v2 03/13] r8152: remove rtl8152_get_stats

2014-03-04 Thread Hayes Wang
The rtl8152_get_stats() returns the point address of the struct net_device_stats. This could be got from struct net_device directly. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff

[PATCH net-next v2 01/13] r8152: deal with the empty line and space

2014-03-04 Thread Hayes Wang
Add or remove some empty lines. Replace the spaces with the tabs. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 0654bd3..c8bad62

[PATCH net-next v2 05/13] r8152: check tx agg list before spin lock

2014-03-04 Thread Hayes Wang
Check tx agg list before spin lock to avoid doing spin lock every times. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 8ecb41b..00b3192 100644

[PATCH net-next v2 04/13] r8152: replace spin_lock_irqsave and spin_unlock_irqrestore

2014-03-04 Thread Hayes Wang
Use spin_lock and spin_unlock in interrupt context. The ndo_start_xmit would not be called in interrupt context, so replace the relative spin_lock_irqsave and spin_unlock_irqrestore with spin_lock_bh and spin_unlock_bh. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c

[PATCH net-next 01/14] r8152: move some functions

2014-02-18 Thread Hayes Wang
Move the following functions which is for the further coding. - rtl_clear_bp - r8153_clear_bp - r8153_teredo_off - r8152b_disable_aldps - r8152b_enable_aldps - r8152b_hw_phy_cfg Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 106 1

[PATCH net-next 02/14] r8152: add three functions

2014-02-18 Thread Hayes Wang
Replace some codes with the following three functions. - rtl_drop_queued_tx - rxdy_gated_en - r8152_power_cut_en Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 99 + 1 file changed, 51 insertions(+), 48 deletions(-) diff --git

[PATCH net-next 00/14] r8152: improvement and new features

2014-02-18 Thread Hayes Wang
Change some flows or behavior to improve the efficiency or make the code readable. Besides, support WOL and runtime suspend. Hayes Wang (14): r8152: move some functions r8152: add three functions r8152: replace some types from int to bool r8152: load the default MAC address r8152

[PATCH net-next 10/14] r8152: support runtime suspend

2014-02-18 Thread Hayes Wang
Support runtime suspend for RTL8152 and RTL8153. Move tx_bottom() from tasklet to delayed_work. That avoids to transmit tx packets after calling autosuspend. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 181 ++-- 1 file changed, 158

[PATCH net-next 06/14] r8152: clear BMCR_PDOWN

2014-02-18 Thread Hayes Wang
Modify the method of enabling the PHY to clear BMCR_PDOWN only. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 2a778fa..c7bae39 100644

[PATCH net-next 11/14] r8152: disable teredo for RTL8152

2014-02-18 Thread Hayes Wang
Disable teredo for RTL8152 by default. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index f303549..3ff11ed 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -2021,6

[PATCH net-next 04/14] r8152: load the default MAC address

2014-02-18 Thread Hayes Wang
PLA_IDR for RTL_VER_01. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 4888e4f..3847c35 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb

[PATCH net-next 09/14] r8152: support WOL

2014-02-18 Thread Hayes Wang
Support WOL for RTL8152 and RTL8153. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 118 ++-- 1 file changed, 105 insertions(+), 13 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 828572a..5d520be 100644

[PATCH net-next 08/14] r8152: move some functions from probe to open

2014-02-18 Thread Hayes Wang
Add up method for rtl_ops and asign relative functions. Move clear_bp() and hw_phy_cfg() from init method to up method of rtl_ops. Call rtl_ops.up() for ndo_open() and rtl_ops.down for ndo_stop(). Replace allocating the memory in probe() with in ndo_open(). Signed-off-by: Hayes Wang

[PATCH net-next 13/14] r8152: set disable_hub_initiated_lpm

2014-02-18 Thread Hayes Wang
Set disable_hub_initiated_lpm = 1. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index ff02d5d..db98842 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -3159,6

[PATCH net-next 12/14] r8152: replace netif_rx with netif_receive_skb

2014-02-18 Thread Hayes Wang
Replace netif_rx with netif_receive_skb to avoid disabling irq frequently for increasing the efficiency. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 3ff11ed

[PATCH net-next 14/14] r8152: support get_msglevel and set_msglevel

2014-02-18 Thread Hayes Wang
Support get_msglevel and set_msglevel. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index db98842..0654bd3 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb

[PATCH net-next 07/14] r8152: combine PHY reset with set_speed

2014-02-18 Thread Hayes Wang
PHY reset is necessary after some hw settings. However, it would cause the linking down, and so does the set_speed function. Combine the PHY reset with set_speed function. That could reduce the frequency of linking down and accessing the PHY register. Signed-off-by: Hayes Wang --- drivers/net

[PATCH net-next 05/14] r8152: reduce the frequency of spin_lock

2014-02-18 Thread Hayes Wang
Replace getting one item from a list with getting the whole list one time. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 47 ++- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c

[PATCH net-next 03/14] r8152: replace some types from int to bool

2014-02-18 Thread Hayes Wang
Modify the following functions. - r8153_u1u2en - r8153_u2p3en - r8153_power_cut_en Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 2d5e761

[PATCH net-next 05/14] r8152: reduce the frequency of spin_lock

2014-02-18 Thread Hayes Wang
Replace getting one item from a list with getting the whole list one time. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 47 ++- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/drivers/net/usb/r8152.c b

[PATCH net-next 03/14] r8152: replace some types from int to bool

2014-02-18 Thread Hayes Wang
Modify the following functions. - r8153_u1u2en - r8153_u2p3en - r8153_power_cut_en Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb

[PATCH net-next 14/14] r8152: support get_msglevel and set_msglevel

2014-02-18 Thread Hayes Wang
Support get_msglevel and set_msglevel. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index db98842..0654bd3 100644 --- a/drivers/net/usb/r8152.c

[PATCH net-next 07/14] r8152: combine PHY reset with set_speed

2014-02-18 Thread Hayes Wang
PHY reset is necessary after some hw settings. However, it would cause the linking down, and so does the set_speed function. Combine the PHY reset with set_speed function. That could reduce the frequency of linking down and accessing the PHY register. Signed-off-by: Hayes Wang hayesw

[PATCH net-next 12/14] r8152: replace netif_rx with netif_receive_skb

2014-02-18 Thread Hayes Wang
Replace netif_rx with netif_receive_skb to avoid disabling irq frequently for increasing the efficiency. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152

[PATCH net-next 13/14] r8152: set disable_hub_initiated_lpm

2014-02-18 Thread Hayes Wang
Set disable_hub_initiated_lpm = 1. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index ff02d5d..db98842 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb

[PATCH net-next 09/14] r8152: support WOL

2014-02-18 Thread Hayes Wang
Support WOL for RTL8152 and RTL8153. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 118 ++-- 1 file changed, 105 insertions(+), 13 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index

[PATCH net-next 08/14] r8152: move some functions from probe to open

2014-02-18 Thread Hayes Wang
Add up method for rtl_ops and asign relative functions. Move clear_bp() and hw_phy_cfg() from init method to up method of rtl_ops. Call rtl_ops.up() for ndo_open() and rtl_ops.down for ndo_stop(). Replace allocating the memory in probe() with in ndo_open(). Signed-off-by: Hayes Wang hayesw

[PATCH net-next 10/14] r8152: support runtime suspend

2014-02-18 Thread Hayes Wang
Support runtime suspend for RTL8152 and RTL8153. Move tx_bottom() from tasklet to delayed_work. That avoids to transmit tx packets after calling autosuspend. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 181 ++-- 1

[PATCH net-next 06/14] r8152: clear BMCR_PDOWN

2014-02-18 Thread Hayes Wang
Modify the method of enabling the PHY to clear BMCR_PDOWN only. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 2a778fa

[PATCH net-next 11/14] r8152: disable teredo for RTL8152

2014-02-18 Thread Hayes Wang
Disable teredo for RTL8152 by default. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index f303549..3ff11ed 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net

[PATCH net-next 04/14] r8152: load the default MAC address

2014-02-18 Thread Hayes Wang
PLA_IDR for RTL_VER_01. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 4888e4f..3847c35 100644 --- a/drivers/net/usb/r8152.c

[PATCH net-next 02/14] r8152: add three functions

2014-02-18 Thread Hayes Wang
Replace some codes with the following three functions. - rtl_drop_queued_tx - rxdy_gated_en - r8152_power_cut_en Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 99 + 1 file changed, 51 insertions(+), 48 deletions

[PATCH net-next 00/14] r8152: improvement and new features

2014-02-18 Thread Hayes Wang
Change some flows or behavior to improve the efficiency or make the code readable. Besides, support WOL and runtime suspend. Hayes Wang (14): r8152: move some functions r8152: add three functions r8152: replace some types from int to bool r8152: load the default MAC address r8152

[PATCH net-next 01/14] r8152: move some functions

2014-02-18 Thread Hayes Wang
Move the following functions which is for the further coding. - rtl_clear_bp - r8153_clear_bp - r8153_teredo_off - r8152b_disable_aldps - r8152b_enable_aldps - r8152b_hw_phy_cfg Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 106

[PATCH net] r8152: fix the submission of the interrupt transfer

2014-02-05 Thread Hayes Wang
The submission of the interrupt transfer should be done after setting the bit of WORK_ENABLE, otherwise the callback function would have the opportunity to be returned directly. Clear the bit of WORK_ENABLE before killing the interrupt transfer. Signed-off-by: Hayes Wang --- drivers/net/usb

[PATCH net] r8152: fix the submission of the interrupt transfer

2014-02-05 Thread Hayes Wang
The submission of the interrupt transfer should be done after setting the bit of WORK_ENABLE, otherwise the callback function would have the opportunity to be returned directly. Clear the bit of WORK_ENABLE before killing the interrupt transfer. Signed-off-by: Hayes Wang hayesw...@realtek.com

[PATCH net-next v2 1/3] r8152: change the descriptor

2014-01-14 Thread Hayes Wang
The r8152 could support RTL8153. Update the relative descriptor. Signed-off-by: Hayes Wang --- drivers/net/usb/Kconfig | 5 +++-- drivers/net/usb/r8152.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig index 47b0f73

[PATCH net-next v2 0/3] r8152: remove limitation

2014-01-14 Thread Hayes Wang
Remove the limitation between ecm mode and vendor mode. v2: replace the patch #3 with "ecm and vendor modes coexist". Hayes Wang (3): r8152: change the descriptor r8152: fix the warnings and a error from checkpatch.pl r8152: ecm and vendor modes coexist drivers/net/usb/Kconfi

[PATCH net-next v2 2/3] r8152: fix the warnings and a error from checkpatch.pl

2014-01-14 Thread Hayes Wang
Fix the following warnings and error: - WARNING: usb_free_urb(NULL) is safe this check is probably not required - WARNING: kfree(NULL) is safe this check is probably not required - ERROR: do not use C99 // comments Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 42

[PATCH net-next v2 3/3] r8152: ecm and vendor modes coexist

2014-01-14 Thread Hayes Wang
Remove the limitation that the ecm and r8152 drivers couldn't coexist. - Remove the devices from the blacklist of relative drivers. - Remove usb_driver_set_configuration() from r8152 driver. - Modify the id_table of the r8152 driver for the vendor mode only. Signed-off-by: Hayes Wang

[PATCH net-next v2 2/3] r8152: fix the warnings and a error from checkpatch.pl

2014-01-14 Thread Hayes Wang
Fix the following warnings and error: - WARNING: usb_free_urb(NULL) is safe this check is probably not required - WARNING: kfree(NULL) is safe this check is probably not required - ERROR: do not use C99 // comments Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c

[PATCH net-next v2 3/3] r8152: ecm and vendor modes coexist

2014-01-14 Thread Hayes Wang
Remove the limitation that the ecm and r8152 drivers couldn't coexist. - Remove the devices from the blacklist of relative drivers. - Remove usb_driver_set_configuration() from r8152 driver. - Modify the id_table of the r8152 driver for the vendor mode only. Signed-off-by: Hayes Wang hayesw

[PATCH net-next v2 0/3] r8152: remove limitation

2014-01-14 Thread Hayes Wang
Remove the limitation between ecm mode and vendor mode. v2: replace the patch #3 with ecm and vendor modes coexist. Hayes Wang (3): r8152: change the descriptor r8152: fix the warnings and a error from checkpatch.pl r8152: ecm and vendor modes coexist drivers/net/usb/Kconfig | 5

[PATCH net-next v2 1/3] r8152: change the descriptor

2014-01-14 Thread Hayes Wang
The r8152 could support RTL8153. Update the relative descriptor. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/Kconfig | 5 +++-- drivers/net/usb/r8152.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig

[PATCH net-next 1/3] r8152: change the descriptor

2014-01-08 Thread Hayes Wang
The r8152 could support RTL8153. Update the relative descriptor. Signed-off-by: Hayes Wang --- drivers/net/usb/Kconfig | 5 +++-- drivers/net/usb/r8152.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig index 47b0f73

[PATCH net-next 3/3] r8152: add supporting the vendor mode only

2014-01-08 Thread Hayes Wang
Remove the limitation that the ecm and r8152 drivers couldn't coexist. Besides, add the feature to support the vendor mode only. This let someone who doesn't want to use ecm driver easy to use the vendor driver without creating the udev rule. Signed-off-by: Hayes Wang --- drivers/net/usb

[PATCH net-next 2/3] r8152: fix the warnings and a error from checkpatch.pl

2014-01-08 Thread Hayes Wang
Fix the following warnings and error: - WARNING: usb_free_urb(NULL) is safe this check is probably not required - WARNING: kfree(NULL) is safe this check is probably not required - ERROR: do not use C99 // comments Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 42

[PATCH net-next 0/3] r8152: behavior modification

2014-01-08 Thread Hayes Wang
The purpose is to add a choice for determining whether add the limitation between r8152 and ecm drivers or not. Hayes Wang (3): r8152: change the descriptor r8152: fix the warnings and a error from checkpatch.pl r8152: add supporting the vendor mode only drivers/net/usb/Kconfig | 14

[PATCH net-next 0/3] r8152: behavior modification

2014-01-08 Thread Hayes Wang
The purpose is to add a choice for determining whether add the limitation between r8152 and ecm drivers or not. Hayes Wang (3): r8152: change the descriptor r8152: fix the warnings and a error from checkpatch.pl r8152: add supporting the vendor mode only drivers/net/usb/Kconfig | 14

[PATCH net-next 2/3] r8152: fix the warnings and a error from checkpatch.pl

2014-01-08 Thread Hayes Wang
Fix the following warnings and error: - WARNING: usb_free_urb(NULL) is safe this check is probably not required - WARNING: kfree(NULL) is safe this check is probably not required - ERROR: do not use C99 // comments Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c

[PATCH net-next 1/3] r8152: change the descriptor

2014-01-08 Thread Hayes Wang
The r8152 could support RTL8153. Update the relative descriptor. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/Kconfig | 5 +++-- drivers/net/usb/r8152.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig

<    5   6   7   8   9   10   11   12   13   >