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
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
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
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
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
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 -
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
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
@@
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
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
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 @@
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
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
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
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
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
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
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
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
> 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
> 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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(-)
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
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
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
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
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
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
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
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
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
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
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
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
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
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;
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;
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.
> };
>
[...]
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.
> };
>
[...]
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,
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,
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,
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,
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
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
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
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
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
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
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
301 - 400 of 1253 matches
Mail list logo