[PATCH 3/5] r8169: Modify the method for setting firmware

2013-02-06 Thread Hayes Wang
Remove useless action PHY_READ_EFUSE, and define the new action PHY_MDIO_CHG. PHY_MDIO_CHG is used to modify the mdio operation. By the way, the firmware could support setting mac ocp. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 36

[PATCH 4/5] r8169: Update the RTL8111G parameters

2013-02-06 Thread Hayes Wang
- replace rtl8168g-1.fw with rtl8168g-2.fw which support new method. - fix PHY power down is useless. - disable rx early which causes the rx abnormal. - fix the conflict between jumbo frame and flow control. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 18

[PATCH 5/5] r8169: fix could not dump registers

2013-02-06 Thread Hayes Wang
For new version of Fedora and Ubuntu, we see all 0xff when dumping the hw regs through ethtool. Using a loop to read registers could fix it. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net

[PATCH 2/5] r8169: Update PHY settings of RTL8111G

2013-02-06 Thread Hayes Wang
- Replace the current settings with rtl_writephy and rtl_readphy. For the hardware, the settings are same with previous ones. This make the setting method like the previous chips. - Add new PHY settings. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 72

[PATCH 1/5] r8169: Remove firmware code

2013-02-06 Thread Hayes Wang
Some codes are belong to binary codes and should be removed. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 26 -- 1 file changed, 26 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index

[PATCH firmware] rtl_nic: update firmware for RTL8168G

2013-02-06 Thread Hayes Wang
File: rtl_nic/rtl8168g-2.fw Version: 0.0.1 This firmware supports new fw setting mothod for linux kernel. Add MAC OCP settings for: -phy reset -PXE in ALDPS -pwron sequence -OBFF Signed-off-by: Hayes Wang --- WHENCE| 3 +++ rtl_nic/rtl8168g-2.fw | Bin 0 -> 4896 bytes

[PATCH v2 net-next 1/8] r8169: Remove firmware code

2013-04-02 Thread Hayes Wang
Some codes are belong to binary codes and should be removed. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 26 -- 1 file changed, 26 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index

[PATCH v2 net-next 6/8] r8169: add a new chip for RTL8111G

2013-04-02 Thread Hayes Wang
Add a new chip for RTL8111G series. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 45 1 file changed, 45 insertions(+) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 0211836..573b693

[PATCH v2 net-next 5/8] r8169: Update the RTL8111G parameters

2013-04-02 Thread Hayes Wang
- replace rtl8168g-1.fw with rtl8168g-2.fw which support new method. - fix PHY power down is useless. - disable rx early which causes the rx abnormal. - enable auto fifo. - set 10M IFG to default value. - fix the conflict between jumbo frame and flow control. Signed-off-by: Hayes Wang

[PATCH v2 net-next 8/8] r8169: add a new chip for RTL8106E

2013-04-02 Thread Hayes Wang
Add a new chip for RTL8106E series. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 85536bf..e392dd0 100644 --- a

[PATCH v2 net-next 7/8] r8169: adjust the flow of hw_start

2013-04-02 Thread Hayes Wang
The suggestion as following: - initial settings or default settings - rtl_hw_start_xxx. rtl_hw_start_xxx may change some default settings. - enable tx/rx. This has to be after the above two steps. - rtl_set_rx_mode. AcceptXXXs have to be enabled after enabling tx/rx. Signed-off-by: Hayes Wang

[PATCH v2 net-next 3/8] r8169: Update PHY settings of RTL8111G

2013-04-02 Thread Hayes Wang
Add the new settings and correct the wrong settings. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c

[PATCH v2 net-next 4/8] r8169: Modify the method for setting firmware

2013-04-02 Thread Hayes Wang
Remove useless action PHY_READ_EFUSE, PHY_READ_MAC_BYTE, PHY_WRITE_MAC_BYTE, PHY_WRITE_ERI_WORD. And define the new action PHY_MDIO_CHG. PHY_MDIO_CHG is used to modify the mdio operation. By the way, the firmware could support setting mac ocp. Signed-off-by: Hayes Wang --- drivers/net/ethernet

[PATCH v2 net-next 2/8] r8169: Modify the mothod for PHY settings of RTL8111G

2013-04-02 Thread Hayes Wang
Replace the current settings with rtl_writephy and rtl_readphy. For the hardware, the settings are same with previous ones. This make the setting method like the previous chips. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 52 +--- 1 file

[PATCH v2 net-next 2/2] r8169: update the settings for RTL8111G

2012-10-22 Thread Hayes Wang
Update the parameters of RTL8111G Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 118 ++- 1 file changed, 101 insertions(+), 17 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index

[PATCH v2 net-next 1/2] r8169: enable ALDPS for power saving

2012-10-22 Thread Hayes Wang
Enable ALDPS function to save power when link down. Note that the feature should be set after the other PHY settings. And the firmware is necessary. Don't enable it without loading the firmware. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c

[PATCH firmware] rtl_nic: update firmware for RTL8168G

2012-10-22 Thread Hayes Wang
File: rtl_nic/rtl8168g-1.fw Version: 0.0.3 Signed-off-by: Hayes Wang --- WHENCE| 2 +- rtl_nic/rtl8168g-1.fw | Bin 4272 -> 4304 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/WHENCE b/WHENCE index 6bc7417..2565fa2 100644 --- a/WHENCE +++ b/WHE

[PATCH v3 net-next] r8169: enable ALDPS for power saving

2012-10-23 Thread Hayes Wang
eries, make sure the ALDPS is disabled before loading the firmware. For 8168 series, the ALDPS would be disabled automatically when loading firmware. You must not disable it directly. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 56 +--- 1

[PATCH net-next] r8169: enable internal ASPM and clock request settings

2012-11-01 Thread Hayes Wang
The following chips need to enable internal settings to let ASPM and clock request work. RTL8111E-VL, RTL8111F, RTL8411, RTL8111G RTL8105, RTL8402, RTL8106 Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 29 + 1 file changed, 21 insertions(+), 8

[PATCH v2 net-next] r8169: enable internal ASPM and clock request settings

2012-11-01 Thread Hayes Wang
The following chips need to enable internal settings to let ASPM and clock request work. RTL8111E-VL, RTL8111F, RTL8411, RTL8111G RTL8105, RTL8402, RTL8106 Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 30 +- 1 file changed, 21 insertions

[PATCH net-next] r8169: add a new chip for RTL8411

2013-07-08 Thread Hayes Wang
Add a new chip for RTL8411 series. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 67 1 file changed, 67 insertions(+) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 393f961..4106a74

[PATCH firmware] rtl_nic: add firmware rtl8411-2

2013-07-08 Thread Hayes Wang
File: rtl_nic/rtl8411-2.fw Version: 0.0.1 Signed-off-by: Hayes Wang --- WHENCE | 3 +++ rtl_nic/rtl8411-2.fw | Bin 0 -> 1040 bytes 2 files changed, 3 insertions(+) create mode 100644 rtl_nic/rtl8411-2.fw diff --git a/WHENCE b/WHENCE index d7fba9d..39f11af 100644 --- a/WHE

[PATCH net 1/2] usb/net/r8152: fix integer overflow in expression

2013-07-12 Thread Hayes Wang
| TX_LS); 957 tp->tx_skb = skb; Signed-off-by: Hayes Wang Spotted-by: kbuild test robot --- drivers/net/usb/r8152.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index d02bac8..ee13f9e 100644 --- a/drivers/net/usb/r8

[PATCH net 2/2] usb/net/r815x: fix cast to restricted __le32

2013-07-12 Thread Hayes Wang
expected unsigned int [unsigned] [addressable] [assigned] [usertype] tmp drivers/net/usb/r815x.c:69:13:got restricted __le32 [usertype] Signed-off-by: Hayes Wang Spotted-by: kbuild test robot --- drivers/net/usb/r815x.c | 21 - 1 file changed, 12 insertions(+), 9 de

[PATCH net-next 1/2] r8169: enable ALDPS for power saving

2012-10-22 Thread Hayes Wang
Enable ALDPS function to save power when link down. Note that the feature should be set after the other PHY settings. And the firmware is necessary. Don't enable it without loading the firmware. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c

[PATCH firmware 2/2] rtl_nic: add firmware rtl8106e-2

2013-04-23 Thread Hayes Wang
File: rtl_nic/rtl8106e-2.fw Version: 0.0.1 Signed-off-by: Hayes Wang --- WHENCE| 3 +++ rtl_nic/rtl8106e-2.fw | Bin 0 -> 832 bytes 2 files changed, 3 insertions(+) create mode 100644 rtl_nic/rtl8106e-2.fw diff --git a/WHENCE b/WHENCE index 54f6388..fedf031 100644 --

[PATCH firmware 1/2] rtl_nic: Add firmware rtl8168g-3

2013-04-23 Thread Hayes Wang
File: rtl_nic/rtl8168g-3.fw Version: 0.0.1 Signed-off-by: Hayes Wang --- WHENCE| 5 - rtl_nic/rtl8168g-3.fw | Bin 0 -> 832 bytes 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 rtl_nic/rtl8168g-3.fw diff --git a/WHENCE b/WHENCE index 013f810..54f6

[PATCH net-next] net/usb: add relative mii functions for r815x

2013-07-07 Thread Hayes Wang
Base on cdc_ether, add the mii functions for RTL8152 and RTL8153. The RTL8152 and RTL8153 support ECM mode which use the driver of cdc_ether. Add the mii functions. Then, the basic PHY access is possible. Signed-off-by: Hayes Wang --- drivers/net/usb/Makefile| 2 +- drivers/net/usb

[PATCH net-next v2 3/3] net/usb/r8152: enable interrupt transfer

2013-08-14 Thread Hayes Wang
Use the interrupt transfer to replace polling link status. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 140 ++-- 1 file changed, 113 insertions(+), 27 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index

[PATCH net-next v2 2/3] net/usb/r8152: enable tx checksum

2013-08-14 Thread Hayes Wang
Enable tx checksum. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 64 + 1 file changed, 59 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index abb0b9f..4d938a7 100644 --- a/drivers/net/usb

[PATCH net-next v2 1/3] net/usb/r8152: support aggregation

2013-08-14 Thread Hayes Wang
aligned. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 647 1 file changed, 486 insertions(+), 161 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 11c51f2..abb0b9f 100644 --- a/drivers/net/usb/r8152.c

[PATCH net-next 2/7] r8152: replace void * with struct r8152 *

2013-08-16 Thread Hayes Wang
Change the type of contex of tx_agg and rx_agg from void * to staruc r8152 *. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index c13662b..a18f02d 100644 --- a

[PATCH net-next 1/7] r8152: remove clearing the memory to zero for netdev priv

2013-08-16 Thread Hayes Wang
Remove memset(tp, 0, sizeof(*tp)); Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index ef2498c..c13662b 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -2105,7

[PATCH net-next 3/7] r8152: replace lockflags with flags

2013-08-16 Thread Hayes Wang
Replace lockflags with flags. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index a18f02d..41b99ce 100644 --- a

[PATCH net-next 5/7] r8152: move some declearation of variables

2013-08-16 Thread Hayes Wang
Move some declearation of variables in rx_bottom(). Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 4dee76b..0a88f64 100644 --- a

[PATCH net-next 6/7] r8152: adjust tx_bottom function

2013-08-16 Thread Hayes Wang
Split some parts of code into another function to simplify tx_bottom(). Use while loop to replace the goto loop. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 134 1 file changed, 68 insertions(+), 66 deletions(-) diff --git a/drivers

[PATCH net-next 7/7] r8152: add comments

2013-08-16 Thread Hayes Wang
Add comments. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 825edfe..f3fce41 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -790,6 +790,9 @@ static

[PATCH net-next 4/7] r8152: adjust some duplicated code

2013-08-16 Thread Hayes Wang
- Use r8152_get_tx_agg for getting tx agg list - Replace submit rx with goto submit Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 55 + 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net

[PATCH v3 3/3] net/usb/r8152: adjust relative ocp function

2013-07-30 Thread Hayes Wang
- fix the conversion between cpu and __le32 - replace some pla_ocp and usb_ocp functions with generic_ocp function Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 66 + 1 file changed, 23 insertions(+), 43 deletions(-) diff --git a

[PATCH v3 1/3] net/usb/r815x: replace USB buffer from stack to DMA-able

2013-07-30 Thread Hayes Wang
Allocate the transfer buffer in probe(), and use the buffer for usb control transfer. Signed-off-by: Hayes Wang --- drivers/net/usb/r815x.c | 117 +--- 1 file changed, 90 insertions(+), 27 deletions(-) diff --git a/drivers/net/usb/r815x.c b/drivers

[PATCH v3 2/3] net/usb/r8152: replace USB buffer from stack to DMA-able

2013-07-30 Thread Hayes Wang
Allocate the required transfer buffer for usb_control_msg. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 91 +++-- 1 file changed, 66 insertions(+), 25 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index

[PATCH v4 3/5] net/usb/r815x: change the return value for bind functions

2013-07-31 Thread Hayes Wang
Replace 0 with the result from usbnet_cdc_bind(). Signed-off-by: Hayes Wang --- drivers/net/usb/r815x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r815x.c b/drivers/net/usb/r815x.c index 1a80e76..2df2f4f 100644 --- a/drivers/net/usb/r815x.c +++ b

[PATCH v4 1/5] net/usb/r815x: replace USB buffer from stack to DMA-able

2013-07-31 Thread Hayes Wang
Some USB buffers use stack which may not be DMA-able. Use the buffers from kmalloc to replace those one. Signed-off-by: Hayes Wang --- drivers/net/usb/r815x.c | 44 +++- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/drivers/net/usb

[PATCH v4 2/5] net/usb/r815x: avoid to call mdio functions for runtime-suspended device

2013-07-31 Thread Hayes Wang
Don't replace the usb_control_msg() with usbnet_{read,write}_cmd() which couldn't be called inside suspend/resume callback. Keep the basic functions unlimited. Instead, using usb_autopm_get_interface() and usb_autopm_put_interface() in r815x_mdio_{read,write}(). Signed-off-by:

[PATCH v4 5/5] net/usb/r8152: adjust relative ocp function

2013-07-31 Thread Hayes Wang
- fix the conversion between cpu and __le32 - replace some pla_ocp and usb_ocp functions with generic_ocp function Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 66 + 1 file changed, 23 insertions(+), 43 deletions(-) diff --git a

[PATCH v4 4/5] net/usb/r8152: make sure the USB buffer is DMA-able

2013-07-31 Thread Hayes Wang
Allocate the required memory before calling usb_control_msg. And the additional memory copy is necessary. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 60 - 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/drivers/net/usb

[PATCH v2 1/3] net/usb/r815x: replace USB buffer from stack to DMA-able

2013-07-25 Thread Hayes Wang
Some USB buffers use stack which may not be DMA-able. Use the buffers from kmalloc to replace those one. Signed-off-by: Hayes Wang --- drivers/net/usb/r815x.c | 44 +++- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/drivers/net/usb

[PATCH v2 2/3] net/usb/r8152: make sure the USB buffer is DMA-able

2013-07-25 Thread Hayes Wang
Allocate the required memory before calling usb_control_msg. And the additional memory copy is necessary. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 60 - 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/drivers/net/usb

[PATCH v2 3/3] net/usb/r8152: adjust relative ocp function

2013-07-25 Thread Hayes Wang
- fix the conversion between cpu and __le32 - replace some pla_ocp and usb_ocp functions with generic_ocp function Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 66 + 1 file changed, 23 insertions(+), 43 deletions(-) diff --git a

[PATCH net-next 3/3] net/usb/r8152: enable interrupt transfer

2013-08-13 Thread Hayes Wang
Use the interrupt transfer to replace polling link status. Delay to update the link down status, because some of them result from the change of speed. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 134 ++-- 1 file changed, 107 insertions

[PATCH net-next 2/3] net/usb/r8152: enable tx checksum

2013-08-13 Thread Hayes Wang
Enable tx checksum. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 63 + 1 file changed, 58 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index c6c5aa2..5d9d949 100644 --- a/drivers/net/usb

[PATCH net-next 1/3] net/usb/r8152: support aggregation

2013-08-13 Thread Hayes Wang
aligned. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 627 +++- 1 file changed, 466 insertions(+), 161 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 11c51f2..c6c5aa2 100644 --- a/drivers/net/usb/r8152.c

[PATCH v2 net-next] net/usb: new driver for RTL8152

2013-05-02 Thread Hayes Wang
Add new driver for supporting Realtek RTL8152 Based USB 2.0 Ethernet Adapters Signed-off-by: Hayes Wang Cc: Realtek linux nic maintainers --- drivers/net/usb/Kconfig | 11 + drivers/net/usb/Makefile|1 + drivers/net/usb/cdc_ether.c | 10 + drivers/net/usb/r8152.c | 1773

[PATCH v3 net-next] net/usb: new driver for RTL8152

2013-05-02 Thread Hayes Wang
Add new driver for supporting Realtek RTL8152 Based USB 2.0 Ethernet Adapters Signed-off-by: Hayes Wang Cc: Realtek linux nic maintainers --- drivers/net/usb/Kconfig | 11 + drivers/net/usb/Makefile|1 + drivers/net/usb/cdc_ether.c | 10 + drivers/net/usb/r8152.c | 1767

[PATCH net-next] net/usb: new driver for RTL8152

2013-04-26 Thread Hayes Wang
Add new driver for supporting Realtek RTL8152 Based USB 2.0 Ethernet Adapters Signed-off-by: Hayes Wang Cc: Realtek linux nic maintainers --- drivers/net/usb/Kconfig | 11 + drivers/net/usb/Makefile|1 + drivers/net/usb/cdc_ether.c | 10 + drivers/net/usb/r8152.c | 1751

[PATCH] r8169: fix auto speed down issue

2013-03-29 Thread Hayes Wang
giga for power saving. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 28fb50a..a9eedf7 100644 --- a

[PATCH v2] r8169: fix auto speed down issue

2013-03-31 Thread Hayes Wang
It would cause no link after suspending or shutdowning when the nic changes the speed to 10M and connects to a link partner which forces the speed to 100M. Check the link partner ability to determine which speed to set. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 28

[PATCH net-next 1/7] r8169: Remove firmware code

2013-04-01 Thread Hayes Wang
Some codes are belong to binary codes and should be removed. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 26 -- 1 file changed, 26 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index

[PATCH net-next 2/7] r8169: Update PHY settings of RTL8111G

2013-04-01 Thread Hayes Wang
- Replace the current settings with rtl_writephy and rtl_readphy. For the hardware, the settings are same with previous ones. This make the setting method like the previous chips. - Add new PHY settings. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 72

[PATCH net-next 6/7] r8169: add a new chip for RTL8106E

2013-04-01 Thread Hayes Wang
- add a new chip for RTL8106E series. - move rtl_set_rx_tx_desc_registers to avoid the tx/rx are enabled before setting desc registers. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff

[PATCH net-next 7/7] r8169: fix could not dump registers

2013-04-01 Thread Hayes Wang
For new version of Fedora and Ubuntu, we see all 0xff when dumping the hw regs through ethtool. Using a loop to read registers could fix it. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net

[PATCH net-next 3/7] r8169: Modify the method for setting firmware

2013-04-01 Thread Hayes Wang
Remove useless action PHY_READ_EFUSE, PHY_READ_MAC_BYTE, PHY_WRITE_MAC_BYTE, PHY_WRITE_ERI_WORD. And define the new action PHY_MDIO_CHG. PHY_MDIO_CHG is used to modify the mdio operation. By the way, the firmware could support setting mac ocp. Signed-off-by: Hayes Wang --- drivers/net/ethernet

[PATCH net-next 4/7] r8169: Update the RTL8111G parameters

2013-04-01 Thread Hayes Wang
- replace rtl8168g-1.fw with rtl8168g-2.fw which support new method. - fix PHY power down is useless. - disable rx early which causes the rx abnormal. - enable auto fifo. - set 10M IFG to default value. - fix the conflict between jumbo frame and flow control. Signed-off-by: Hayes Wang

[PATCH net-next 5/7] r8169: add a new chip for RTL8111G

2013-04-01 Thread Hayes Wang
Add a new chip for RTL8111G series. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 115 +++ 1 file changed, 115 insertions(+) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 0211836..8d41508

Re: [PATCH net-next 6/6] r8169: support RTL8168G

2012-07-09 Thread Hayes Wang
fix incorrct argument in rtl_hw_init_8168g. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 7ff3423..c29c5fb 100644

Re: [PATCH net-next 6/6] r8169: support RTL8168G

2012-07-10 Thread Hayes Wang
1. Remove rtl_ocpdr_cond. No waiting is needed for mac_ocp_{write / read}. 2. Set ocp_base to OCP_STD_PHY_BASE after rtl8168g_1_hw_phy_config. --- drivers/net/ethernet/realtek/r8169.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/realtek

[PATCH firmware] rtl_nic: update firmware for RTL8168G

2012-07-11 Thread Hayes Wang
File: rtl_nic/rtl8168g-1.fw Version: 0.0.2 Change the ocp_base of linux driver to OCP_STD_PHY_BASE after setting firmware. The firmware would modify the ocp_base, and that results the driver uses the wrong ocp_base to access standard phy after setting firmware. Signed-off-by: Hayes Wang

[PATCH net-next] r8169: Remove rtl_ocpdr_cond

2012-07-11 Thread Hayes Wang
No waiting is needed for mac_ocp_{write / read}. And the bit 31 of OCPDR would not change, so rtl_udelay_loop_wait_high always return false. That is, the r8168_mac_ocp_read always retuen ~0. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 12 +--- 1 file changed

[PATCH firmware 1/4] rtl_nic: update firmware for RTL8168F

2012-07-08 Thread Hayes Wang
File: rtl_nic/rtl8168f-1.fw Version: 0.0.5 Signed-off-by: Hayes Wang --- WHENCE|2 +- rtl_nic/rtl8168f-1.fw | Bin 3136 -> 3424 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/WHENCE b/WHENCE index 13cbcab..676ebb1 100644 --- a/WHENCE +++ b/WHE

[PATCH firmware 2/4] rtl_nic: update firmware for RTL8411

2012-07-08 Thread Hayes Wang
File: rtl_nic/rtl8411-1.fw Version: 0.0.3 Signed-off-by: Hayes Wang --- WHENCE |2 +- rtl_nic/rtl8411-1.fw | Bin 1840 -> 2112 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/WHENCE b/WHENCE index 676ebb1..c7a3e98 100644 --- a/WHENCE +++ b/WHENCE @@ -180

[PATCH firmware 4/4] rtl_nic: add new firmware for RTL8168G

2012-07-08 Thread Hayes Wang
File: rtl_nic/rtl8168g-1.fw Version: 0.0.1 Signed-off-by: Hayes Wang --- WHENCE|3 +++ rtl_nic/rtl8168g-1.fw | Bin 0 -> 4272 bytes 2 files changed, 3 insertions(+) create mode 100644 rtl_nic/rtl8168g-1.fw diff --git a/WHENCE b/WHENCE index 8f2b610..1fb7951 100644 --

[PATCH firmware 3/4] rtl_nic: add new firmware for RTL8106E

2012-07-08 Thread Hayes Wang
File: rtl_nic/rtl8106e-1.fw Version: 0.0.1 Signed-off-by: Hayes Wang --- WHENCE|3 +++ rtl_nic/rtl8106e-1.fw | Bin 0 -> 1856 bytes 2 files changed, 3 insertions(+) create mode 100644 rtl_nic/rtl8106e-1.fw diff --git a/WHENCE b/WHENCE index c7a3e98..8f2b610 100644 --

[PATCH net 3/5] r8152: move PHY settings to hw_phy_cfg

2016-09-20 Thread Hayes Wang
Move the PHY relative settings together to hw_phy_cfg(). Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index dbf11ba..9ce5bd5 100644 --- a/drivers/net/usb

[PATCH net 5/5] r8152: disable ALDPS and EEE before setting PHY

2016-09-20 Thread Hayes Wang
Disable ALDPS and EEE to avoid the possible failure when setting the PHY. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index e7a05dd..3c3cdb4 100644 --- a

[PATCH net 2/5] r8152: move enabling PHY

2016-09-20 Thread Hayes Wang
Move enabling PHY to init(), otherwise some other settings may fail. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 43 +-- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index

[PATCH net 4/5] r8152: remove r8153_enable_eee

2016-09-20 Thread Hayes Wang
Remove r8153_enable_eee(). Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 9ce5bd5..e7a05dd 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb

[PATCH net 1/5] r8152: move some functions

2016-09-20 Thread Hayes Wang
Move the following functions forward. r8152_mmd_indirect() r8152_mmd_read() r8152_mmd_write() r8152_eee_en() r8152b_enable_eee() r8153_eee_en() r8153_enable_eee() r8152b_enable_fc() r8153_aldps_en() Signed-off-by: Hayes Wang

[PATCH net 0/5] r8152: correct the flow of PHY

2016-09-20 Thread Hayes Wang
First, to enable the PHY as early as possible. Some settings may fail if the PHY is power down. Move the other PHY settings to hw_phy_cfg() to make sure the order is correct. Finally, disable ALDPS and EEE before updating the PHY for RTL8153. Hayes Wang (5): r8152: move some functions r8152

[PATCH net-next 0/3] r8152: configuration setting

2016-09-07 Thread Hayes Wang
Some people prefer to use ECM mode rather than vendor mode. Therefore, I add CONFIG_RTL8152_CONFIG_VALUE in Kconfig. Then, the users could choose the USB configuration value which they want. The default is to support vendor mode only. Hayes Wang (3): r8152: check hw version first r8152

[PATCH net-next 2/3] r8152: support ECM mode

2016-09-07 Thread Hayes Wang
If CONFIG_USB_NET_CDCETHER is enabled, support ECM mode through cdc_ether driver. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 255 ++-- 1 file changed, 247 insertions(+), 8 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net

[PATCH net-next 1/3] r8152: check hw version first

2016-09-07 Thread Hayes Wang
Check hw version first in probe(). Do nothing if the driver doesn't support the chips. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 102 ++-- 1 file changed, 63 insertions(+), 39 deletions(-) diff --git a/drivers/net/usb/r8152.c b/dr

[PATCH net-next 3/3] r8152: add CONFIG_RTL8152_CONFIG_VALUE

2016-09-07 Thread Hayes Wang
According to CONFIG_RTL8152_CONFIG_VALUE, to determine which mode the driver supports. The value 0 means to support both vendor mode and ECM mode. The value 1 means to support vendor mode only. The value 2 means to support ECM mode only. Signed-off-by: Hayes Wang --- drivers/net/usb/Kconfig

RE: [PATCH net-next 0/3] r8152: configuration setting

2016-09-07 Thread Hayes Wang
Bjørn Mork [mailto:bj...@mork.no] > Sent: Wednesday, September 07, 2016 9:51 PM [...] > So this adds a lot of code to work around the issues you introduced by > unnecessarily blacklisting the CDC ECM configuration earlier, and still > makes the r8152 driver handle the device even in ECM mode. I su

RE: [PATCH net-next 0/3] r8152: configuration setting

2016-09-07 Thread Hayes Wang
David Miller [mailto:da...@davemloft.net] > Sent: Thursday, September 08, 2016 8:38 AM [...] > By forcing a certain mode via a Kconfig value, you are basically making it > impossible for distributions to do something reasonable here. The request is always from some manufacturers, not end users. Th

RE: [PATCH net-next 0/3] r8152: configuration setting

2016-09-08 Thread Hayes Wang
Bjørn Mork [mailto:bj...@mork.no] > Sent: Thursday, September 08, 2016 3:55 PM [...] > Yes, I see that. But is that strictly necessary? Couldn't you just say: > "CDC ECM is supported by cdc_ether and therefore limited to the features > implemented by cdc_ether. If you want feature X, then please

[PATCH net-next] r8152: fix the coding style with checkpatch.pl

2016-09-01 Thread Hayes Wang
check the coding style with checkpatch.pl and fix the warnings and errors. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index f41a8ad..8915848 100644 --- a

[PATCH net-next] r8152: correct the definition

2017-06-20 Thread Hayes Wang
Replace VLAN_HLEN and CRC_SIZE with ETH_FCS_LEN. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 8bc4573..6cfffef 100644 --- a/drivers/net

[PATCH net 0/2] fix the autoresume may fail

2015-09-06 Thread Hayes Wang
Fix the autosuspend issues which occur about linking change. Hayes Wang (2): r8152: split DRIVER_VERSION r8152: fix the runtime suspend issues drivers/net/usb/r8152.c | 66 ++--- 1 file changed, 63 insertions(+), 3 deletions(-) -- 2.4.3 -- To

[PATCH net 2/2] r8152: fix the runtime suspend issues

2015-09-06 Thread Hayes Wang
wn. b) autosuspend occurs. c) device suspends. d) device may not wake up when linking up. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 59 +++-- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/

[PATCH net 1/2] r8152: split DRIVER_VERSION

2015-09-06 Thread Hayes Wang
Split DRIVER_VERSION into NETNEXT_VERSION and NET_VERSION. Then, according to the value of DRIVER_VERSION, we could know which patches are used generally without comparing the source code. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 9 +++-- 1 file changed, 7 insertions(+), 2

RE: [PATCH v2] r8152: disable RX aggregation on Dell TB16 dock

2018-01-17 Thread Hayes Wang
[...] > > r8153 on Dell TB15/16 dock corrupts rx packets. > > > > This change is suggested by Realtek. They guess that the XHCI > > controller doesn't have enough buffer, and their guesswork is correct, > > once the RX aggregation gets disabled, the issue is gone. > > > > ASMedia is currently worki

RE: r8152: data corruption in various scenarios

2019-01-06 Thread Hayes Wang
Monday, January 07, 2019 5:17 AM [...] >> This is probably an xHC bug. A similar issue is fixed by commit 9da5a1092b13 >> ("xhci: Bad Ethernet performance plugged in ASM1042A host”). >> >>> I just got that exact message above, with the r8152 in my 1-day old WD15 >>> dock, >>> with the TB16 "worka

[PATCH net] r8152: support ndo_features_check

2015-01-06 Thread Hayes Wang
Support ndo_features_check to avoid: - the transport offset is more than the hw limitation when using hw checksum. - the skb->len of a GSO packet is more than the limitation. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 17 + 1 file changed, 17 insertions(+) d

RE: [PATCH net-next 1/7] r8152: adjust rx_bottom

2015-01-25 Thread Hayes Wang
David Miller [mailto:da...@davemloft.net] > Sent: Sunday, January 25, 2015 2:44 PM [...] > What keeps rtl_start_rx() from running in parallel with > r8152_submit_rx(), or any other accessor of the RX agg->list? Forgive my poor English. I would try to describe them clearly. The steps about the rx

[PATCH net-next v2 0/2 RESEND] r8152: adjust r8152_submit_rx

2015-01-08 Thread Hayes Wang
;speed should be updated early. Then, the patch #2 could use it to check the current linking status. Hayes Wang (2): r8152: call rtl_start_rx after netif_carrier_on r8152: check the status before submitting rx drivers/net/usb/r8152.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-)

[PATCH net-next v2 1/2 RESEND] r8152: call rtl_start_rx after netif_carrier_on

2015-01-08 Thread Hayes Wang
Remove rtl_start_rx() from rtl_enable() and put it after calling netif_carrier_on(). 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/drivers/net/usb/r8152.c index 57ec23e..cd93388 100644 --- a

[PATCH net-next v2 2/2 RESEND] r8152: check the status before submitting rx

2015-01-08 Thread Hayes Wang
Don't submit the rx if the device is unplugged, stopped, or linking down. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index cd93388..b23426e 100644 --- a/drivers/net/usb/r8

[PATCH net-next] r8152: replace tasklet with NAPI

2015-01-13 Thread Hayes Wang
Replace tasklet with NAPI. Add rx_queue to queue the remaining rx packets if the number of the rx packets is more than the request from poll(). Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 120 ++-- 1 file changed, 85 insertions(+), 35

[PATCH net-next 6/7] r8152: replace get_protocol with vlan_get_protocol

2015-01-18 Thread Hayes Wang
vlan_get_protocol() has been defined and use it to replace get_protocol(). Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index f66ffbd..46440ed 100644

[PATCH net-next 7/7] r8152: use BIT macro

2015-01-18 Thread Hayes Wang
Use BIT macro to replace (1 << bits). Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 46440ed..c3a0224 100644 --- a/drive

  1   2   3   4   5   6   7   >