[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] 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 <hayesw...@realtek.com> --- 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 f

[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

[PATCH net-next 3/3] r8152: remove cancel_delayed_work_sync in rtl8152_set_speed

2016-07-07 Thread Hayes Wang
There is no conflict between the work_queue function and rtl8152_set_speed(), so we don't have to cancel the delayed work in rtl8152_set_speed(). Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/usb

[PATCH net-next 3/3] r8152: remove cancel_delayed_work_sync in rtl8152_set_speed

2016-07-07 Thread Hayes Wang
There is no conflict between the work_queue function and rtl8152_set_speed(), so we don't have to cancel the delayed work in rtl8152_set_speed(). 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

[PATCH net-next 1/3] r8152: remove rtl_phy_reset function

2016-07-07 Thread Hayes Wang
In rtl_hw_phy_work_func_t(), the flag of PHY_RESET is set in rtl_ops.hw_phy_cfg() and cleared in rtl8152_set_speed(). Therefore, the rtl_phy_reset() is never run and is unnecessary. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 24 -

[PATCH net-next 0/3] r8152: remove the redundant code

2016-07-07 Thread Hayes Wang
Remove the unnacessary code. Hayes Wang (3): r8152: remove rtl_phy_reset function r8152: remove a netif_carrier_off in rtl8152_open function r8152: remove cancel_delayed_work_sync in rtl8152_set_speed drivers/net/usb/r8152.c | 27 --- 1 file changed, 27 deletions

[PATCH net-next 2/3] r8152: remove a netif_carrier_off in rtl8152_open function

2016-07-07 Thread Hayes Wang
en() could be removed. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index e005ee6..f1c5020 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@

[PATCH net-next 1/3] r8152: remove rtl_phy_reset function

2016-07-07 Thread Hayes Wang
In rtl_hw_phy_work_func_t(), the flag of PHY_RESET is set in rtl_ops.hw_phy_cfg() and cleared in rtl8152_set_speed(). Therefore, the rtl_phy_reset() is never run and is unnecessary. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 24 1 file changed, 24 deletions

[PATCH net-next 0/3] r8152: remove the redundant code

2016-07-07 Thread Hayes Wang
Remove the unnacessary code. Hayes Wang (3): r8152: remove rtl_phy_reset function r8152: remove a netif_carrier_off in rtl8152_open function r8152: remove cancel_delayed_work_sync in rtl8152_set_speed drivers/net/usb/r8152.c | 27 --- 1 file changed, 27 deletions

[PATCH net-next 2/3] r8152: remove a netif_carrier_off in rtl8152_open function

2016-07-07 Thread Hayes Wang
en() could be removed. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index e005ee6..f1c5020 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -3111,8 +3111,6 @@

[PATCH net v2] r8152: remove the setting of LAN_WAKE_EN

2016-07-06 Thread Hayes Wang
The LAN_WAKE_EN is not used to determine if the device could support WOL. It is used to signal a GPIO pin when a WOL event occurs. The WOL still works even though it is disabled. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 8 +--- 1 file chan

[PATCH net v2] r8152: remove the setting of LAN_WAKE_EN

2016-07-06 Thread Hayes Wang
The LAN_WAKE_EN is not used to determine if the device could support WOL. It is used to signal a GPIO pin when a WOL event occurs. The WOL still works even though it is disabled. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions

[PATCH net] r8152: remove the setting of LAN_WAKE_EN

2016-07-06 Thread Hayes Wang
The LAN_WAKE_EN is not used to determine if the device could support WOL. It is used to sigal a GPIO pin when a WOL event occurs. The WOL still works even though it is disabled. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 8 +--- 1 file chan

[PATCH net] r8152: remove the setting of LAN_WAKE_EN

2016-07-06 Thread Hayes Wang
The LAN_WAKE_EN is not used to determine if the device could support WOL. It is used to sigal a GPIO pin when a WOL event occurs. The WOL still works even though it is disabled. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions

[PATCH net] r8152: fix runtime function for RTL8152

2016-07-05 Thread Hayes Wang
The RTL8152 doesn't have U1U2 and U2P3 features, so use different runtime functions for RTL812 and RTL8153 by adding autosuspend_en() to rtl_ops. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 24 +--- 1 file changed, 17 insertions

[PATCH net] r8152: fix runtime function for RTL8152

2016-07-05 Thread Hayes Wang
The RTL8152 doesn't have U1U2 and U2P3 features, so use different runtime functions for RTL812 and RTL8153 by adding autosuspend_en() to rtl_ops. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git

[PATCH net] r8152: clear LINK_OFF_WAKE_EN after autoresume

2016-06-30 Thread Hayes Wang
LINK_OFF_WAKE_EN should be cleared after autoresume, otherwise after system suspend, the system would wake up when linking off occurs. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/n

[PATCH net] r8152: clear LINK_OFF_WAKE_EN after autoresume

2016-06-30 Thread Hayes Wang
LINK_OFF_WAKE_EN should be cleared after autoresume, otherwise after system suspend, the system would wake up when linking off occurs. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb

RE: [PATCH net-next v3 0/7] r8152: support new chips

2016-06-28 Thread Hayes Wang
> From: Hayes Wang > Sent: Tuesday, June 28, 2016 8:29 PM > To: net...@vger.kernel.org > Cc: nic_swsd; linux-kernel@vger.kernel.org; linux-...@vger.kernel.org; Hayes > Wang > Subject: [PATCH net-next v3 0/7] r8152: support new chips Excuse me. Please ignore these patches. We wan

RE: [PATCH net-next v3 0/7] r8152: support new chips

2016-06-28 Thread Hayes Wang
> From: Hayes Wang > Sent: Tuesday, June 28, 2016 8:29 PM > To: net...@vger.kernel.org > Cc: nic_swsd; linux-kernel@vger.kernel.org; linux-...@vger.kernel.org; Hayes > Wang > Subject: [PATCH net-next v3 0/7] r8152: support new chips Excuse me. Please ignore these patches. We wan

[PATCH net-next v3 1/7] r8152: add aldps_enable for rtl_ops

2016-06-28 Thread Hayes Wang
Add aldps_enable() for rtl_ops. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 11178f9..b253003 100644 --- a/drive

[PATCH net-next v3 1/7] r8152: add aldps_enable for rtl_ops

2016-06-28 Thread Hayes Wang
Add aldps_enable() for rtl_ops. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 11178f9..b253003 100644 --- a/drivers/net/usb/r8152.c +++ b

[PATCH net-next v3 3/7] r8152: add power_cut_en for rtl_ops

2016-06-28 Thread Hayes Wang
Add power_cut_en() for rtl_ops. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index f51d799..a4f8a01 100644 --- a/drive

[PATCH net-next v3 2/7] r8152: add u1u2_enable for rtl_ops

2016-06-28 Thread Hayes Wang
Add u1u2_enable() for rtl_ops. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index b253003..f51d799 100644 --- a/drivers/n

[PATCH net-next v3 7/7] r8152: add byte_enable for ocp_read_word function

2016-06-28 Thread Hayes Wang
en reading the PHY registers. The new method is supported since RTL8152B, but it doesn't influence the previous chips. The bits of the byte_enable for the previous chips are the reserved bits, and the hw would ignore them. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net

[PATCH net-next v3 3/7] r8152: add power_cut_en for rtl_ops

2016-06-28 Thread Hayes Wang
Add power_cut_en() for rtl_ops. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index f51d799..a4f8a01 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers

[PATCH net-next v3 2/7] r8152: add u1u2_enable for rtl_ops

2016-06-28 Thread Hayes Wang
Add u1u2_enable() for rtl_ops. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index b253003..f51d799 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net

[PATCH net-next v3 7/7] r8152: add byte_enable for ocp_read_word function

2016-06-28 Thread Hayes Wang
en reading the PHY registers. The new method is supported since RTL8152B, but it doesn't influence the previous chips. The bits of the byte_enable for the previous chips are the reserved bits, and the hw would ignore them. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 4 +++- 1 file

[PATCH net-next v3 5/7] r8152: support the new chip 8050

2016-06-28 Thread Hayes Wang
Support a new chip which has the product ID 0x8050. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index df370e5..7227931 100644 --- a/drivers/n

[PATCH net-next v3 5/7] r8152: support the new chip 8050

2016-06-28 Thread Hayes Wang
Support a new chip which has the product ID 0x8050. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index df370e5..7227931 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net

[PATCH net-next v3 0/7] r8152: support new chips

2016-06-28 Thread Hayes Wang
v3: Insert a patch "r8152: add u2p3_enable for rtl_ops". Change the patch "r8152: support RTL8153B". Disable U2P3. v2: Fix the commit message for patch #6. v1: In order to support new chips, adjust some codes. Then, add the settings for the new chips. Hayes Wang (7): r81

[PATCH net-next v3 4/7] r8152: add u2p3_enable for rtl_ops

2016-06-28 Thread Hayes Wang
Add u2p3_enable() for rtl_ops. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index a4f8a01..df370e5 100644 --- a/drivers/net/usb

[PATCH net-next v3 0/7] r8152: support new chips

2016-06-28 Thread Hayes Wang
v3: Insert a patch "r8152: add u2p3_enable for rtl_ops". Change the patch "r8152: support RTL8153B". Disable U2P3. v2: Fix the commit message for patch #6. v1: In order to support new chips, adjust some codes. Then, add the settings for the new chips. Hayes Wang (7): r81

[PATCH net-next v3 4/7] r8152: add u2p3_enable for rtl_ops

2016-06-28 Thread Hayes Wang
Add u2p3_enable() for rtl_ops. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index a4f8a01..df370e5 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net

[PATCH net-next v3 6/7] r8152: support RTL8153B

2016-06-28 Thread Hayes Wang
Support new chip RTL8153B. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 569 +--- 1 file changed, 542 insertions(+), 27 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 7

[PATCH net-next v3 6/7] r8152: support RTL8153B

2016-06-28 Thread Hayes Wang
Support new chip RTL8153B. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 569 +--- 1 file changed, 542 insertions(+), 27 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 7227931..bd74fab 100644 --- a/drivers

[PATCH net-next v2 6/6] r8152: add byte_enable for ocp_read_word function

2016-06-27 Thread Hayes Wang
en reading the PHY registers. The new method is supported since RTL8152B, but it doesn't influence the previous chips. The bits of the byte_enable for the previous chips are the reserved bits, and the hw would ignore them. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r81

[PATCH net-next v2 0/6] r8152: support new chips

2016-06-27 Thread Hayes Wang
v2: Fix the commit message for patch #6. v1: In order to support new chips, adjust some codes. Then, add the settings for the new chips. Hayes Wang (6): r8152: add aldps_enable for rtl_ops r8152: add u1u2_enable for rtl_ops r8152: add power_cut_en for rtl_ops r8152: support the new chip

[PATCH net-next v2 6/6] r8152: add byte_enable for ocp_read_word function

2016-06-27 Thread Hayes Wang
en reading the PHY registers. The new method is supported since RTL8152B, but it doesn't influence the previous chips. The bits of the byte_enable for the previous chips are the reserved bits, and the hw would ignore them. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 4 +++- 1 file

[PATCH net-next v2 0/6] r8152: support new chips

2016-06-27 Thread Hayes Wang
v2: Fix the commit message for patch #6. v1: In order to support new chips, adjust some codes. Then, add the settings for the new chips. Hayes Wang (6): r8152: add aldps_enable for rtl_ops r8152: add u1u2_enable for rtl_ops r8152: add power_cut_en for rtl_ops r8152: support the new chip

[PATCH net-next v2 4/6] r8152: support the new chip 8050

2016-06-27 Thread Hayes Wang
Support a new chip which has the product ID 0x8050. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index a4f8a01..3ccbff0 100644 --- a/drivers/n

[PATCH net-next v2 1/6] r8152: add aldps_enable for rtl_ops

2016-06-27 Thread Hayes Wang
Add aldps_enable() for rtl_ops. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 11178f9..b253003 100644 --- a/drive

[PATCH net-next v2 4/6] r8152: support the new chip 8050

2016-06-27 Thread Hayes Wang
Support a new chip which has the product ID 0x8050. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index a4f8a01..3ccbff0 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net

[PATCH net-next v2 1/6] r8152: add aldps_enable for rtl_ops

2016-06-27 Thread Hayes Wang
Add aldps_enable() for rtl_ops. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 11178f9..b253003 100644 --- a/drivers/net/usb/r8152.c +++ b

[PATCH net-next v2 3/6] r8152: add power_cut_en for rtl_ops

2016-06-27 Thread Hayes Wang
Add power_cut_en() for rtl_ops. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index f51d799..a4f8a01 100644 --- a/drive

[PATCH net-next v2 2/6] r8152: add u1u2_enable for rtl_ops

2016-06-27 Thread Hayes Wang
Add u1u2_enable() for rtl_ops. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index b253003..f51d799 100644 --- a/drivers/n

[PATCH net-next v2 5/6] r8152: support RTL8153B

2016-06-27 Thread Hayes Wang
Support new chip RTL8153B. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 560 +--- 1 file changed, 533 insertions(+), 27 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 3

[PATCH net-next v2 3/6] r8152: add power_cut_en for rtl_ops

2016-06-27 Thread Hayes Wang
Add power_cut_en() for rtl_ops. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index f51d799..a4f8a01 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers

[PATCH net-next v2 2/6] r8152: add u1u2_enable for rtl_ops

2016-06-27 Thread Hayes Wang
Add u1u2_enable() for rtl_ops. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index b253003..f51d799 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net

[PATCH net-next v2 5/6] r8152: support RTL8153B

2016-06-27 Thread Hayes Wang
Support new chip RTL8153B. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 560 +--- 1 file changed, 533 insertions(+), 27 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 3ccbff0..2fd4944 100644 --- a/drivers

[PATCH net-next 5/6] r8152: support RTL8153B

2016-06-27 Thread Hayes Wang
Support new chip RTL8153B. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 560 +--- 1 file changed, 533 insertions(+), 27 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 3

[PATCH net-next 2/6] r8152: add u1u2_enable for rtl_ops

2016-06-27 Thread Hayes Wang
Add u1u2_enable() for rtl_ops. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index b253003..f51d799 100644 --- a/drivers/n

[PATCH net-next 5/6] r8152: support RTL8153B

2016-06-27 Thread Hayes Wang
Support new chip RTL8153B. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 560 +--- 1 file changed, 533 insertions(+), 27 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 3ccbff0..2fd4944 100644 --- a/drivers

[PATCH net-next 2/6] r8152: add u1u2_enable for rtl_ops

2016-06-27 Thread Hayes Wang
Add u1u2_enable() for rtl_ops. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index b253003..f51d799 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net

[PATCH net-next 4/6] r8152: support the new chip 8050

2016-06-27 Thread Hayes Wang
Support a new chip which has the product ID 0x8050. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index a4f8a01..3ccbff0 100644 --- a/drivers/n

[PATCH net-next 4/6] r8152: support the new chip 8050

2016-06-27 Thread Hayes Wang
Support a new chip which has the product ID 0x8050. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index a4f8a01..3ccbff0 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net

[PATCH net-next 0/6] r8152: support new chips

2016-06-27 Thread Hayes Wang
In order to support new chips, adjust some codes. Then, add the settings for the new chips. Hayes Wang (6): r8152: add aldps_enable for rtl_ops r8152: add u1u2_enable for rtl_ops r8152: add power_cut_en for rtl_ops r8152: support the new chip 8050 r8152: support RTL8153B r8152: add

[PATCH net-next 0/6] r8152: support new chips

2016-06-27 Thread Hayes Wang
In order to support new chips, adjust some codes. Then, add the settings for the new chips. Hayes Wang (6): r8152: add aldps_enable for rtl_ops r8152: add u1u2_enable for rtl_ops r8152: add power_cut_en for rtl_ops r8152: support the new chip 8050 r8152: support RTL8153B r8152: add

[PATCH net-next 3/6] r8152: add power_cut_en for rtl_ops

2016-06-27 Thread Hayes Wang
Add power_cut_en() for rtl_ops. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index f51d799..a4f8a01 100644 --- a/drive

[PATCH net-next 3/6] r8152: add power_cut_en for rtl_ops

2016-06-27 Thread Hayes Wang
Add power_cut_en() for rtl_ops. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index f51d799..a4f8a01 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers

[PATCH net-next 6/6] r8152: add byte_enable for ocp_read_word function

2016-06-26 Thread Hayes Wang
is supported since RTL8152B, but it doesn't influence the previous chips. The bits of the byte_enable for the previous chips are the reserved bits, and the hw would ignore them. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 4 +++- 1 file changed, 3 insertions

[PATCH net-next 6/6] r8152: add byte_enable for ocp_read_word function

2016-06-26 Thread Hayes Wang
is supported since RTL8152B, but it doesn't influence the previous chips. The bits of the byte_enable for the previous chips are the reserved bits, and the hw would ignore them. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH net-next 1/6] r8152: add aldps_enable for rtl_ops

2016-06-26 Thread Hayes Wang
Add aldps_enable() for rtl_ops. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 11178f9..b253003 100644 --- a/drive

[PATCH net-next 1/6] r8152: add aldps_enable for rtl_ops

2016-06-26 Thread Hayes Wang
Add aldps_enable() for rtl_ops. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 11178f9..b253003 100644 --- a/drivers/net/usb/r8152.c +++ b

[PATCH net-next] r8152: modify the check of the flag of PHY_RESET in set_speed function

2016-06-16 Thread Hayes Wang
In set_speed(), BMCR_RESET would be set when the flag of PHY_RESET is set. Use BMCR_RESET to replace testing the flag of PHY_RESET. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drive

[PATCH net-next] r8152: modify the check of the flag of PHY_RESET in set_speed function

2016-06-16 Thread Hayes Wang
In set_speed(), BMCR_RESET would be set when the flag of PHY_RESET is set. Use BMCR_RESET to replace testing the flag of PHY_RESET. 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

[PATCH net 3/3] r8152: correct the rx early size

2016-06-15 Thread Hayes Wang
The rx early size should be (agg_buf_sz - packet size) / 8 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 f5bc351..4

[PATCH net 2/3] r8152: reset the bmu

2016-06-15 Thread Hayes Wang
Reset the BMU to clear the rx/tx fifo. This avoids that the unexpected data remains in the hw. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r

[PATCH net 3/3] r8152: correct the rx early size

2016-06-15 Thread Hayes Wang
The rx early size should be (agg_buf_sz - packet size) / 8 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 f5bc351..4e257b8 100644 --- a/drivers/net/usb

[PATCH net 2/3] r8152: reset the bmu

2016-06-15 Thread Hayes Wang
Reset the BMU to clear the rx/tx fifo. This avoids that the unexpected data remains in the hw. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 89dc752..f5bc351

[PATCH net 1/3] r8152: disable MAC clock speed down

2016-06-15 Thread Hayes Wang
Disable MAC clock speed down. It may casue the first control transfer to contain the wrong data, when the power state change from U1 to U0. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-)

[PATCH net 1/3] r8152: disable MAC clock speed down

2016-06-15 Thread Hayes Wang
Disable MAC clock speed down. It may casue the first control transfer to contain the wrong data, when the power state change from U1 to U0. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/net/usb

[PATCH net 0/3] r8152: fix known issues

2016-06-15 Thread Hayes Wang
These patches fix some known issues. Hayes Wang (3): r8152: disable MAC clock speed down r8152: reset the bmu r8152: correct the rx early size drivers/net/usb/r8152.c | 37 ++--- 1 file changed, 26 insertions(+), 11 deletions(-) -- 2.4.11

[PATCH net 0/3] r8152: fix known issues

2016-06-15 Thread Hayes Wang
These patches fix some known issues. Hayes Wang (3): r8152: disable MAC clock speed down r8152: reset the bmu r8152: correct the rx early size drivers/net/usb/r8152.c | 37 ++--- 1 file changed, 26 insertions(+), 11 deletions(-) -- 2.4.11

[PATCH net-next 0/3] r8152: code adjustment for PHY

2016-06-13 Thread Hayes Wang
These patches are for adjusting the code about PHY and setting speed. Hayes Wang (3): r8152: move the settings of PHY to a work queue r8152: move the setting for the default speed r8152: save the speed drivers/net/usb/r8152.c | 53 ++--- 1 file

[PATCH net-next 3/3] r8152: save the speed

2016-06-13 Thread Hayes Wang
The user may change the speed. Use it to replace the default one. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index d

[PATCH net-next 3/3] r8152: save the speed

2016-06-13 Thread Hayes Wang
The user may change the speed. Use it to replace the default one. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index dcdc4fa..69d1bbfd 100644

[PATCH net-next 0/3] r8152: code adjustment for PHY

2016-06-13 Thread Hayes Wang
These patches are for adjusting the code about PHY and setting speed. Hayes Wang (3): r8152: move the settings of PHY to a work queue r8152: move the setting for the default speed r8152: save the speed drivers/net/usb/r8152.c | 53 ++--- 1 file

[PATCH net-next 2/3] r8152: move the setting for the default speed

2016-06-13 Thread Hayes Wang
Move calling set_speed() from open() to rtl_hw_phy_work_func_t(). Then, we would set the default speed only for first initialization or after resuming. Besides, the set_speed() could handle the flag of PHY_RESET which would be set in rtl_ops.hw_phy_cfg(). Signed-off-by: Hayes Wang <hay

[PATCH net-next 1/3] r8152: move the settings of PHY to a work queue

2016-06-13 Thread Hayes Wang
more time than the others. Leave they in probe() or open() may delay the following flows. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 32 +++- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/r81

[PATCH net-next 2/3] r8152: move the setting for the default speed

2016-06-13 Thread Hayes Wang
Move calling set_speed() from open() to rtl_hw_phy_work_func_t(). Then, we would set the default speed only for first initialization or after resuming. Besides, the set_speed() could handle the flag of PHY_RESET which would be set in rtl_ops.hw_phy_cfg(). Signed-off-by: Hayes Wang --- drivers

[PATCH net-next 1/3] r8152: move the settings of PHY to a work queue

2016-06-13 Thread Hayes Wang
more time than the others. Leave they in probe() or open() may delay the following flows. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 32 +++- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c

[PATCH net-next] r8152: replace netdev_alloc_skb_ip_align with napi_alloc_skb

2016-06-08 Thread Hayes Wang
Replace netdev_alloc_skb_ip_align() with napi_alloc_skb() which can save several CPU cycles by avoiding having to disable and re-enable IRQs. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d

[PATCH net-next] r8152: replace netdev_alloc_skb_ip_align with napi_alloc_skb

2016-06-08 Thread Hayes Wang
Replace netdev_alloc_skb_ip_align() with napi_alloc_skb() which can save several CPU cycles by avoiding having to disable and re-enable IRQs. 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

RE: [PATCH v4] r8152: Add support for setting pass through MAC address on RTL8153-AD

2016-06-07 Thread Hayes Wang
Mario Limonciello [mailto:mario_limoncie...@dell.com] [...] > + ret = hex2bin(buf, obj->string.pointer + 9, 6); > + if (ret < 0 || !is_valid_ether_addr(buf)) { > + netif_warn(tp, probe, tp->netdev, "Invalid MAC\n"); > + goto amacout;

RE: [PATCH v4] r8152: Add support for setting pass through MAC address on RTL8153-AD

2016-06-07 Thread Hayes Wang
Mario Limonciello [mailto:mario_limoncie...@dell.com] [...] > + ret = hex2bin(buf, obj->string.pointer + 9, 6); > + if (ret < 0 || !is_valid_ether_addr(buf)) { > + netif_warn(tp, probe, tp->netdev, "Invalid MAC\n"); > + goto amacout;

RE: [PATCH v2] r8152: Add support for setting MAC to system's Auxiliary MAC address

2016-06-03 Thread Hayes Wang
Mario Limonciello [mailto:mario_limoncie...@dell.com] > Sent: Friday, June 03, 2016 12:58 AM [...] > @@ -500,6 +502,7 @@ enum rtl8152_flags { > SELECTIVE_SUSPEND, > PHY_RESET, > SCHEDULE_NAPI, > + MAC_PASSTHRU = 0, I don't think you have to give this a value. > }; > [...]

RE: [PATCH v2] r8152: Add support for setting MAC to system's Auxiliary MAC address

2016-06-03 Thread Hayes Wang
Mario Limonciello [mailto:mario_limoncie...@dell.com] > Sent: Friday, June 03, 2016 12:58 AM [...] > @@ -500,6 +502,7 @@ enum rtl8152_flags { > SELECTIVE_SUSPEND, > PHY_RESET, > SCHEDULE_NAPI, > + MAC_PASSTHRU = 0, I don't think you have to give this a value. > }; > [...]

RE: [PATCH] r8152: Add support for setting MAC to system's Auxiliary MAC address

2016-06-03 Thread Hayes Wang
mario_limoncie...@dell.com [mailto:mario_limoncie...@dell.com] > Sent: Friday, June 03, 2016 12:58 AM [...] > > Why generate a random one and not just use the one that the network > > controler already provides? > > That's how the flow works in r8152 already and I'm not overriding it. > Again,

RE: [PATCH] r8152: Add support for setting MAC to system's Auxiliary MAC address

2016-06-03 Thread Hayes Wang
mario_limoncie...@dell.com [mailto:mario_limoncie...@dell.com] > Sent: Friday, June 03, 2016 12:58 AM [...] > > Why generate a random one and not just use the one that the network > > controler already provides? > > That's how the flow works in r8152 already and I'm not overriding it. > Again,

RE: [PATCH] r8152: Add support for setting MAC to system's Auxiliary MAC address

2016-06-02 Thread Hayes Wang
Mario Limonciello [mailto:mario_limoncie...@dell.com] [...] > static int set_ethernet_addr(struct r8152 *tp) > { > struct net_device *dev = tp->netdev; > @@ -1041,6 +1075,9 @@ static int set_ethernet_addr(struct r8152 *tp) > else > ret = pla_ocp_read(tp, PLA_BACKUP, 8,

RE: [PATCH] r8152: Add support for setting MAC to system's Auxiliary MAC address

2016-06-02 Thread Hayes Wang
Mario Limonciello [mailto:mario_limoncie...@dell.com] [...] > static int set_ethernet_addr(struct r8152 *tp) > { > struct net_device *dev = tp->netdev; > @@ -1041,6 +1075,9 @@ static int set_ethernet_addr(struct r8152 *tp) > else > ret = pla_ocp_read(tp, PLA_BACKUP, 8,

[PATCH net-next 2/2] r8152: adjust ALDPS function

2016-01-07 Thread Hayes Wang
Replace disable_aldps() and enable_aldps() with aldps_en(). Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 72 +++-- 1 file changed, 34 insertions(+), 38 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index

[PATCH net-next 1/2] r8152: use test_and_clear_bit

2016-01-07 Thread Hayes Wang
Replace test_bit() followed by clear_bit() with test_and_clear_bit(). Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 975e917..4f0bb67 100644

[PATCH net-next 0/2] r8152: code adjustment

2016-01-07 Thread Hayes Wang
Adjust test_bit(), clear_bit(), disable_aldps(), and enable_aldps(). Hayes Wang (2): r8152: use test_and_clear_bit r8152: adjust ALDPS function drivers/net/usb/r8152.c | 92 + 1 file changed, 40 insertions(+), 52 deletions(-) -- 2.4.3

[PATCH net] r8152: fix the wake event

2016-01-07 Thread Hayes Wang
When the autosuspend is enabled and occurs before system suspend, we should wake the device before running system syspend. Then, we could change the wake event for system suspend. Otherwise, the device would resume the system when receiving any packet. Signed-off-by: Hayes Wang --- drivers/net

[PATCH net] r8152: fix the wake event

2016-01-07 Thread Hayes Wang
When the autosuspend is enabled and occurs before system suspend, we should wake the device before running system syspend. Then, we could change the wake event for system suspend. Otherwise, the device would resume the system when receiving any packet. Signed-off-by: Hayes Wang <hay

[PATCH net-next 0/2] r8152: code adjustment

2016-01-07 Thread Hayes Wang
Adjust test_bit(), clear_bit(), disable_aldps(), and enable_aldps(). Hayes Wang (2): r8152: use test_and_clear_bit r8152: adjust ALDPS function drivers/net/usb/r8152.c | 92 + 1 file changed, 40 insertions(+), 52 deletions(-) -- 2.4.3

[PATCH net-next 1/2] r8152: use test_and_clear_bit

2016-01-07 Thread Hayes Wang
Replace test_bit() followed by clear_bit() with test_and_clear_bit(). Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c

<    1   2   3   4   5   6   7   8   9   10   >