Jakub Kicinski
> Sent: Saturday, April 17, 2021 5:50 AM
> > + switch (tp->version) {
> > + case RTL_VER_10:
> > + data = ocp_reg_read(tp, 0xad40);
> > + data &= ~0x3ff;
> > + data |= BIT(7) | BIT(2);
> > + ocp_reg_write(tp, 0xad40, data);
> > +
> > +
Support RTL8153C, RTL8153D, RTL8156A, and RTL8156B. The RTL8156A
and RTL8156B are the 2.5G ethernet.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 2634 +++
1 file changed, 2359 insertions(+), 275 deletions(-)
diff --git a/drivers/net/usb/r8152.c b
Support new firmware type and method for RTL8156 series.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 563 +++-
1 file changed, 561 insertions(+), 2 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 72b8ef0ad5a1
Use bits operations to record and check the firmware.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 51 +++--
1 file changed, 29 insertions(+), 22 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 10db48f4ed77
The vendor mode is not always at config #1, so it is necessary to
set the correct configuration number.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 39 +++
1 file changed, 35 insertions(+), 4 deletions(-)
diff --git a/drivers/net/usb/r8152.c b
ation effectively,
because the transfer would be completed fastly. Therefore, use the
maximum value to improve the effect of the aggregation. However, you
may not feel the improvement for fast CPUs, because they compensate
for the effect of the aggregation.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8
The different chips may have different requests when changing mtu.
Therefore, add a new help function of rtl_ops to change mtu. Besides,
reset the tx/rx after changing mtu.
Additionally, add mtu_to_size() and size_to_mtu() macros to simplify
the code.
Signed-off-by: Hayes Wang
---
drivers/net
Support new RTL8153 and RTL8156 series.
Hayes Wang (6):
r8152: set inter fram gap time depending on speed
r8152: adjust rtl8152_check_firmware function
r8152: add help function to change mtu
r8152: support new chips
r8152: support PHY firmware for RTL8156 series
r8152: search the
by: Robert Davies
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 90f1c0200042..20fb5638ac65 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
The (0xBAF7 & 0x00FFF000) << 6 should be (0xf70 << 18).
Fixes: 561535b0f239 ("r8169: fix OCP access on RTL8117")
Signed-off-by: Hayes Wang
---
drivers/net/ethernet/realtek/r8169_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dr
-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 35 ++-
1 file changed, 6 insertions(+), 29 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index b246817f3405..90f1c0200042 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb
Jakub Kicinski
> Sent: Saturday, February 20, 2021 2:23 AM
[...]
> Any word on what user-visible misbehavior this causes?
I think it influences the power saving for suspending.
I am checking it with our engineers.
> Can you provide a Fixes tag?
Yes. I will add it when I updating this patch.
Bes
: Hayes Wang
---
drivers/net/usb/r8152.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 67cd6986634f..ec29878db566 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -4678,7 +4678,6 @@ static void
These patches are used to adjust the code.
Hayes Wang (4):
r8152: enable U1/U2 for USB_SPEED_SUPER
r8152: check if the pointer of the function exists
r8152: replace netif_err with dev_err
r8152: spilt rtl_set_eee_plus and r8153b_green_en
drivers/net/usb/r8152.c | 67
Add rtl_eee_plus_en() and rtl_green_en().
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 43 ++---
1 file changed, 27 insertions(+), 16 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 82a129264e31..b246817f3405
Some messages are before calling register_netdev(), so replace
netif_err() with dev_err().
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 baa63ea2590a
Return error code if autosuspend_en, eee_get, or eee_set don't exist.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 4bfee289aa6f..baa63ea2590a 100644
--- a/dr
U1/U2 shoued be enabled for USB 3.0 or later. The USB 2.0 doesn't
support it.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 2d7cc63bef89..4bfee28
. When the PHY is resumed from
the state of power cut, the PHY is at a safe mode and the
OCP_PHY_PATCH_STAT wouldn't be updated. For this situation, it is
safe to set patch request command without waiting OCP_PHY_PATCH_STAT.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c
().
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 68 -
1 file changed, 40 insertions(+), 28 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index e792c1c69f14..d0048ebc114a 100644
--- a/drivers/net/usb/r8152.c
+++ b
The two patches are used to adjust the flow about resuming from
the state of power cut. For the purpose, some functions have to
be updated first.
Hayes Wang (2):
r8152: replace several functions about phy patch request
r8152: adjust the flow of power cut for RTL8153B
drivers/net/usb/r8152.c
t; connected
> [786139.761108] cdc_ncm 2-1:2.0 enx002427880815: 2500 mbit/s downlink
> 2500 mbit/s uplink
> ...
>
> Chrome OS cannot support RTL8156 until this is fixed.
>
> Signed-off-by: Grant Grundler
Reviewed-by: Hayes Wang
Best Regards,
Hayes
k connection:
> connected
> > [786139.697100] cdc_ncm 2-1:2.0 enx002427880815: 2500 mbit/s downlink
> 2500 mbit/s uplink
> > [786139.729094] cdc_ncm 2-1:2.0 enx002427880815: network connection:
> connected
> > [786139.761108] cdc_ncm 2-1:2.0 enx002427880815: 2500 mbit/s downlink
> 2500 mbit/s uplink
> > ...
> >
> > Chrome OS cannot support RTL8156 until this is fixed.
> >
> > Signed-off-by: Grant Grundler
Reviewed-by: Hayes Wang
Best Regards,
Hayes
Avoid r8153_ecm is compiled as built-in, if r8152 driver is compiled
as modules. Otherwise, the r8153_ecm would be used, even though the
device is supported by r8152 driver.
Fixes: c1aedf015ebd ("net/usb/r8153_ecm: support ECM mode for RTL8153")
Reported-by: Marek Szyprowski
Signed-off
Jakub Kicinski
> Sent: Wednesday, November 18, 2020 12:12 AM
[...]
> Something like this?
>
> config USB_RTL8153_ECM
> tristate
> select MII
> select USB_NET_CDCETHER
> depends on USB_RTL8152 || USB_RTL8152=n
> help
>
>
>
> select clauses will pull
Jakub Kicinski
> Sent: Tuesday, November 17, 2020 1:03 AM
[...]
> > Yes, this fixes this issue, although I would prefer a separate Kconfig
> > entry for r8153_ecm with proper dependencies instead of this ifdefs in
> > Makefile.
>
> Agreed, this is what dependency resolution is for.
>
> Let's jus
Avoid r8153_ecm is compiled as built-in, if r8152 driver is compiled
as modules. Otherwise, the r8153_ecm would be used, even though the
device is supported by r8152 driver.
Fixes: c1aedf015ebd ("net/usb/r8153_ecm: support ECM mode for RTL8153")
Reported-by: Marek Szyprowski
Signed-off
r8152 is used for the device
with vendor mode. Otherwise, the r8153_ecm is used for the
device with ECM mode.
Signed-off-by: Hayes Wang
---
drivers/net/usb/Makefile| 2 +-
drivers/net/usb/r8152.c | 30 +--
drivers/net/usb/r8153_ecm.c | 162
include
Jakub Kicinski
> Sent: Wednesday, November 4, 2020 12:16 AM
[...]
> > So no, please do not create such a common file, it is not needed or a
> > good idea.
>
> I wouldn't go that far, PCI subsystem just doesn't want everyone to add
> IDs to the shared file unless there is a reason.
>
> *Do n
Greg Kroah-Hartman
> Sent: Tuesday, November 3, 2020 5:33 PM
[...]
> There is a reason, it's a nightmare to maintain and handle merges for,
> just don't do it.
>
> Read the comments at the top of the pci_ids.h file if you are curious
> why we don't even do this for PCI device ids anymore for the
Add a new header file usb_vendor_id.h to consolidate the definitions
of the vendor ID of USB devices which may be used by cdc_ether and
r8152 driver.
Signed-off-by: Hayes Wang
---
drivers/net/usb/cdc_ether.c | 139 +-
drivers/net/usb/r8152.c | 48
v3:
Move original patch to #2. And add a new patch #1 to consolidate vendor ID
of USB devices.
v2:
Add include/linux/usb/r8152.h to avoid the warning about
no previous prototype for rtl8152_get_version.
Hayes Wang (2):
include/linux/usb: new header file for the vendor ID of USB devices
net
r8152 is used for the device
with vendor mode. Otherwise, the r8153_ecm is used for the
device with ECM mode.
Signed-off-by: Hayes Wang
---
drivers/net/usb/Makefile| 2 +-
drivers/net/usb/r8152.c | 22 +
drivers/net/usb/r8153_ecm.c | 162
include
Jakub Kicinski
[...]
> Can you describe the use case in more detail?
>
> AFAICT r8152 defines a match for the exact same device.
> Does it not mean that which driver is used will be somewhat random
> if both are built?
I export rtl_get_version() from r8152. It would return none zero
value if r81
Support ECM mode based on cdc_ether with relative mii functions,
when CONFIG_USB_RTL8152 is not set, or the device is not supported
by r8152 driver.
Signed-off-by: Hayes Wang
---
v2:
Add include/linux/usb/r8152.h to avoid the warning about
no previous prototype for rtl8152_get_version.
drivers
Support ECM mode based on cdc_ether with relative mii functions,
when CONFIG_USB_RTL8152 is not set, or the device is not supported
by r8152 driver.
Signed-off-by: Hayes Wang
---
drivers/net/usb/Makefile| 2 +-
drivers/net/usb/r8152.c | 5 +-
drivers/net/usb/r8153_ecm.c | 174
Marek Szyprowski [mailto:m.szyprow...@samsung.com]
> Sent: Wednesday, October 23, 2019 6:23 PM
[...]
> >> This patch (which landed in linux-next last days) causes a following
> >> kernel oops on the ARM 32bit Exynos5422 SoC based Odroid XU4 board:
> > Please try the following patch.
>
> Yes, this
Marek Szyprowski [mailto:m.szyprow...@samsung.com]
> Sent: Wednesday, October 23, 2019 5:17 PM
> Subject: Re: [PATCH net-next] r8152: support request_firmware for RTL8153
>
> Hi Hayes,
>
> On 16.10.2019 05:02, Hayes Wang wrote:
> > This patch supports loading addition
Jakub Kicinski [mailto:jakub.kicin...@netronome.com]
> Sent: Tuesday, October 22, 2019 11:36 AM
> To: Hayes Wang
> Cc: net...@vger.kernel.org; nic_swsd; linux-kernel@vger.kernel.org;
> pmal...@chromium.org; grund...@chromium.org
> Subject: Re: [PATCH net-next 4/4] r8152: support fir
The struct fw_type_1 is used by MAC only, so rename it to a meaningful one.
Besides, adjust two messages. Replace "load xxx fail" with "check xxx fail"
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 82 -
1 file changed,
Support loading the firmware of the PHY with the type of RTL_FW_PHY_NC.
Hayes Wang (4):
r8152: rename fw_type_1 with fw_mac
r8152: add checking fw_offset field of struct fw_mac
r8152: move r8153_patch_request forward
r8152: support firmware of PHY NC for RTL8153A
drivers/net/usb/r8152.c
Move r8153_patch_request() forward for later patch.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 54 -
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 090ddd5fb973
used to lock/unlock the PHY,
and set/clear the patch key from the firmware file.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 284 +++-
1 file changed, 282 insertions(+), 2 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
Make sure @fw_offset field of struct fw_mac is more than the size
of struct fw_mac.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 55a7674a0c06
compatible or hardware issues. For
example, the device couldn't be found after rebooting several times.
The supported chips are
RTL_VER_04 (rtl8153a-2.fw)
RTL_VER_05 (rtl8153a-3.fw)
RTL_VER_06 (rtl8153a-4.fw)
RTL_VER_09 (rtl8153b-2.fw)
Signed-off-by: Hayes
feature of UPS. Then, some functions could be
combined.
Signed-off-by: Hayes Wang
---
v2:
Fix the conflicts after commit 771efeda3936 ("r8152: modify
rtl8152_set_speed function") is applied.
---
drivers/net/usb/r8152.c | 208 +++-
1 file changed, 120
feature of UPS. Then, some functions could be
combined.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 215 +++-
1 file changed, 125 insertions(+), 90 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 778d27d1fb15
Heiner Kallweit [mailto:hkallwe...@gmail.com]
> Sent: Tuesday, September 03, 2019 3:13 PM
[...]
> > Some of our chips support the feature of UPS. When satisfying certain
> > condition, the hw would recover the settings of speed. Therefore, I have
> > to record the settings of the speed, and set the
Heiner Kallweit [mailto:hkallwe...@gmail.com]
> Sent: Tuesday, September 03, 2019 2:45 PM
[...]
> > Besides, I have a question. I think I don't need rtl8152_set_speed()
> > if I implement phylib. However, I need to record some information
> > according to the settings of speed. For now, I do it in
Heiner Kallweit [mailto:hkallwe...@gmail.com]
> Sent: Tuesday, September 03, 2019 2:14 PM
[...]
> >> Seeing all this code it might be a good idea to switch this driver
> >> to phylib, similar to what I did with r8169 some time ago.
> >
> > It is too complex to be completed for me at the moment.
> >
Heiner Kallweit [mailto:hkallwe...@gmail.com]
> Sent: Tuesday, September 03, 2019 2:37 AM
[...]
> Seeing all this code it might be a good idea to switch this driver
> to phylib, similar to what I did with r8169 some time ago.
It is too complex to be completed for me at the moment.
If this patch is
First, for AUTONEG_DISABLE, we only need to modify MII_BMCR.
Second, add advertising parameter for rtl8152_set_speed(). Add
RTL_ADVERTISED_xxx for advertising parameter of rtl8152_set_speed().
Then, the advertising settings from ethtool could be saved.
Signed-off-by: Hayes Wang
---
drivers/net
Eric Dumazet [mailto:eric.duma...@gmail.com]
> Sent: Friday, August 30, 2019 12:32 AM
> To: Hayes Wang; net...@vger.kernel.org
> Cc: nic_swsd; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH net-next] r8152: fix accessing skb after napi_gro_receive
>
> On 8/19/19 5:15 AM
David Miller [mailto:da...@davemloft.net]
> Sent: Thursday, August 29, 2019 7:18 AM
[...]
> > v4:
> > Add Fixes tag for both patch #1 and #2.
>
> I applied v3, sorry.
>
> I think it is OK as I will backport things to v5.2 -stable anyways.
Thanks.
Best Regards,
Hayes
ngup fix after disconnect"), first. And submit
another patch to fix it.
Fixes: ffa9fec30ca0 ("r8152: set RTL8152_UNPLUG only for real disconnection")
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/n
Remove unnecessary use of netif_napi_del. This also avoids to call
napi_disable() after netif_napi_del().
Fixes: ffa9fec30ca0 ("r8152: set RTL8152_UNPLUG only for real disconnection")
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 2 --
1 file changed, 2 deletions(-)
di
if_napi_del. However,
the commit ffa9fec30ca0 ("r8152: set RTL8152_UNPLUG only for real
disconnection") let the check useless.
Therefore, I revert commit 0ee1f4734967 ("r8152: napi hangup fix
after disconnect") first, and add another patch to fix it.
Hayes Wang (2):
Revert
Remove unnecessary use of netif_napi_del. This also avoids to call
napi_disable() after netif_napi_del().
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 ad3abe26b51b..04137ac373b0
ngup fix after disconnect"), first. And submit
another patch to fix it.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index eee0f5007ee3..ad3abe26b51b 100644
--- a
ec30ca0 ("r8152: set RTL8152_UNPLUG only for real
disconnection") let the check useless.
Therefore, I revert commit 0ee1f4734967 ("r8152: napi hangup fix
after disconnect") first, and add another patch to fix it.
Hayes Wang (2):
Revert "r8152: napi hangup fix after disco
Jiri Slaby [mailto:jsl...@suse.cz]
> Sent: Monday, August 26, 2019 4:55 PM
[...]
> Could you clarify *why* it conflicts? And how is the problem fixed by
> 0ee1f473496 avoided now?
In rtl8152_disconnect(), the flow would be as following.
static void rtl8152_disconnect(struct usb_interface *intf)
{
This reverts commit 0ee1f4734967af8321ecebaf9c74221ace34f2d5.
This conflicts with commit ffa9fec30ca0 ("r8152: set
RTL8152_UNPLUG only for real disconnection").
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
Remove unnecessary use of netif_napi_del. This also avoids to call
napi_disable() after netif_napi_del().
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 ad3abe26b51b..04137ac373b0
real
disconnection") let the check useless.
Therefore, I revert commit 0ee1f4734967 ("r8152: napi hangup fix
after disconnect") first, and add another patch to fix it.
Hayes Wang (2):
Revert "r8152: napi hangup fix after disconnect"
r8152: remove calling netif_napi_del
Andrew Lunn [mailto:and...@lunn.ch]
> Sent: Friday, August 23, 2019 10:37 PM
[...]
> Hi Hayes
>
> That was 3 revisions of the patches in less than 30 minutes. Slow
> down, take your time, review your work yourself before posting it,
> etc.
>
> Aim for no more than one revision, posted to the list
This reverts commit 0ee1f4734967af8321ecebaf9c74221ace34f2d5.
This conflicts with commit ffa9fec30ca0 ("r8152: set
RTL8152_UNPLUG only for real disconnection").
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
734967 ("r8152: napi hangup fix
after disconnect") first, and add another patch to fix it.
Hayes Wang (2):
Revert "r8152: napi hangup fix after disconnect"
r8152: avoid using napi_disable after netif_napi_del.
drivers/net/usb/r8152.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--
2.21.0
Exchange netif_napi_del() and unregister_netdev() in rtl8152_disconnect()
to avoid using napi_disable() after netif_napi_del().
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb
Add a helper function "rtl_eee_enable" for setting EEE. Besides, I
move r8153_eee_en() and r8153b_eee_en(). And, I remove r8152b_enable_eee(),
r8153_set_eee(), and r8153b_set_eee().
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 168 ++
cessary to enable EEE.
Add the patch #2 for the helper function.
v1:
Saving the settings of EEE to avoid they become the default settings
after reset_resume().
Hayes Wang (2):
r8152: saving the settings of EEE
r8152: add a helper function about setting EEE
drivers/net/usb/r81
Saving the settings of EEE to avoid they become the default settings
after reset_resume().
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 80 +
1 file changed, 50 insertions(+), 30 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net
Add a helper funtion "rtl_eee_enable" for setting EEE. Besides, I
move r8153_eee_en() and r8153b_eee_en(). And, I remove r8152b_enable_eee(),
r8153_set_eee(), and r8153b_set_eee().
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 166 +++---
Saving the settings of EEE to avoid they become the default settings
after reset_resume().
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 80 +
1 file changed, 50 insertions(+), 30 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net
EEE to avoid they become the default settings
after reset_resume().
Hayes Wang (2):
r8152: saving the settings of EEE
r8152: add a helper function about setting EEE
drivers/net/usb/r8152.c | 182 +---
1 file changed, 95 insertions(+), 87 deletions
Add a helper funtcion "rtl_eee_enable" for setting EEE. Besides, I
move r8153_eee_en() and r8153b_eee_en(). And, I remove r8152b_enable_eee(),
r8153_set_eee(), and r8153b_set_eee().
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 166 +++---
Saving the settings of EEE to avoid they become the default settings
after reset_resume().
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 80 +
1 file changed, 50 insertions(+), 30 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net
().
Hayes Wang (2):
r8152: saving the settings of EEE
r8152: add a helper function about setting EEE
drivers/net/usb/r8152.c | 182 +---
1 file changed, 95 insertions(+), 87 deletions(-)
--
2.21.0
Saving the settings of EEE to avoid they become the default settings
after reset_resume().
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 86 +++--
1 file changed, 56 insertions(+), 30 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net
33/933.
Signed-off-by: Hayes Wang
---
v2: add the performance number in the commit message.
---
drivers/net/usb/r8152.c | 39 ++-
1 file changed, 26 insertions(+), 13 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 40d18e
Fix accessing skb after napi_gro_receive which is caused by
commit 47922fcde536 ("r8152: support skb_add_rx_frag").
Fixes: 47922fcde536 ("r8152: support skb_add_rx_frag")
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 2 +-
1 file changed, 1 insertion(+), 1 delet
Eric Dumazet [mailto:eric.duma...@gmail.com]
> Sent: Friday, August 16, 2019 5:27 PM
[...]
> Maybe you would avoid messing with a tasklet (we really try to get rid
> of tasklets in general) using two NAPI, one for TX, one for RX.
>
> Some drivers already use two NAPI, it is fine.
>
> This might a
Eric Dumazet [mailto:eric.duma...@gmail.com]
> Sent: Friday, August 16, 2019 4:20 PM
[...]
> Which callback ?
The USB device has two endpoints for Tx and Rx.
If I submit tx or rx URB to the USB host controller,
the relative callback functions would be called, when
they are finished. For rx, it is
Eric Dumazet [mailto:eric.duma...@gmail.com]
> Sent: Friday, August 16, 2019 2:40 PM
[...]
> tasklet and NAPI are scheduled on the same core (the current
> cpu calling napi_schedule() or tasklet_schedule())
>
> I would rather not add this dubious tasklet, and instead try to understand
> what is wr
David Miller [mailto:da...@davemloft.net]
> Sent: Friday, August 16, 2019 4:59 AM
[...]
> Theoretically, yes.
>
> But do you have actual performance numbers showing this to be worth
> the change?
>
> Always provide performance numbers with changes that are supposed to
> improve performance.
On x
Move the tx bottom function from NAPI to a new tasklet. Then, for
multi-cores, the bottom functions of tx and rx may be run at same
time with different cores. This is used to improve performance.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 39
ay at incorrect
state.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 27 ---
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index e887ac86fbef..39e0768d734d 100644
--- a/drivers/net/usb/r8152.c
+++ b/dr
RX to let the setting work.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 36 ++--
1 file changed, 26 insertions(+), 10 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 101d1325f3f1..e887ac86fbef 100644
--- a/drivers/ne
1. Rename r8153b_queue_wake() to r8153_queue_wake().
2. Correct the setting. The enable bit should be 0xd38c bit 0. Besides,
the 0xd38a bit 0 and 0xd398 bit 8 have to be cleared for both enabled
and disabled.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 38
> Use skb_to_sgvec() to set scatter list, and sometime we would get a
> sg->offset which is more than PAGE_SIZE. Call sg_pcopy_to_buffer()
> with this scatter list would get wrong data.
>
> In sg_miter_get_next_page(), you would get wrong miter->__remaining,
> when the sg->offset is more than PAGE
Use skb_to_sgvec() to set scatter list, and sometime we would get a
sg->offset which is more than PAGE_SIZE. Call sg_pcopy_to_buffer()
with this scatter list would get wrong data.
In sg_miter_get_next_page(), you would get wrong miter->__remaining,
when the sg->offset is more than PAGE_SIZE.
stat
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
The two patched are used to fix rx issues.
Hayes Wang (2):
r8152: fix wrong checksum status for received IPv4 packets
r8152: set rx mode early when linking on
drivers/net/usb/r8152.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
--
2.13.6
, the packets of
response would be missed.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 756de9ea8d2e..958b2e8b90f6 100644
--- a/drivers/net/usb/r8152.c
+++ b
-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 0657203ffb91..756de9ea8d2e 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -1848,11 +1848,9
[...]
> > 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
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
David Miller [mailto:da...@davemloft.net]
> Sent: Wednesday, June 14, 2017 1:02 AM
> > v2:
> > For #1, replace GFP_KERNEL with GFP_NOIO for usb_submit_urb().
> >
> > v1:
> > Improve the flow about runtime suspend/resume and make the code
> > easy to read.
>
> Series applied.
Excuse me. I don't se
These patches are used to support new chips.
Hayes Wang (3):
r8152: support new chip 8050
r8152: support RTL8153B
r8152: add byte_enable for ocp_read_word function
drivers/net/usb/r8152.c | 687 ++--
1 file changed, 671 insertions(+), 16
The settings of the new chip are the same with RTL8152, except that
its product ID is 0x8050.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 5a02053..2744405 100644
eading the PHY registers.
The new method is supported since RTL8153B, 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
1 - 100 of 672 matches
Mail list logo