. Then, the packets of
response would be missed.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
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/d
-off-by: Hayes Wang <hayesw...@realtek.com>
---
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/r
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
--
To unsubscribe from
[...]
> > 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
Cameron Seader [mailto:csea...@suse.com]
> Sent: Thursday, November 30, 2017 11:40 PM
[...]
> I have experienced with kernel 4.14 and the driver 1.09.9 that when a
> system goes into sleep mode and then comes out of sleep that the network
> interface gets set to speed 100 in half duplex. I then
Cameron Seader [mailto:csea...@suse.com]
> Sent: Wednesday, November 29, 2017 10:51 AM
[...]
> The upstream kernel seems to be outdated with version 1.09.9 of the
> drivers/net/usb/r8152.c driver. There is newer hardware now which
> requires the newer version where running with the old one becomes
Replace VLAN_HLEN and CRC_SIZE with ETH_FCS_LEN.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
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..6
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
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 <hayesw...@realtek.com>
---
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
en reading 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 <hayesw...@realtek.com>
---
drivers/net
This patch supports two new chips for RTL8153B.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 673 ++--
1 file changed, 658 insertions(+), 15 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r
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.
Hayes Wang (2):
r8152: split rtl8152_resume function
r8152: move calling delay_autosuspend function
drivers/net/usb/r8152.c | 107
Split rtl8152_resume() into rtl8152_runtime_resume() and
rtl8152_system_resume().
Besides, replace GFP_KERNEL with GFP_NOIO for usb_submit_urb().
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 99 ++---
1 file c
miss it. Besides,
to avoid the runtime resume occurs after runtime suspend immediately, move the
checking to the end of rtl8152_runtime_suspend().
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
Oliver Neukum [mailto:oneu...@suse.com]
> Sent: Monday, June 12, 2017 8:33 PM
[...]
> > + usb_submit_urb(tp->intr_urb, GFP_KERNEL);
>
> If you ever built a device with included storage, this can deadlock,
> as you may want to wake up a device for memory that is needed to wake
> up a
Improve the flow about runtime suspend/resume and make the code
easy to read.
Hayes Wang (2):
r8152: split rtl8152_resume function
r8152: move calling delay_autosuspend function
drivers/net/usb/r8152.c | 107
1 file changed, 62 insertions
miss it. Besides,
to avoid the runtime resume occurs after runtime suspend immediately, move the
checking to the end of rtl8152_runtime_suspend().
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
Split rtl8152_resume() into rtl8152_runtime_resume() and
rtl8152_system_resume().
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 99 ++---
1 file changed, 61 insertions(+), 38 deletions(-)
diff --git a/drivers/n
Adjust some code to make it reasonable or satisfy the suggestion from
the engineers.
Hayes Wang (11):
r8152: add r8153_phy_status function
r8152: adjust lpm settings for RTL8153
r8152: adjust the settings about MAC clock speed down for RTL8153
r8152: move the setting of rx aggregation
Use r8153_phy_status() to check phy status of RTL8153.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 37 +
1 file changed, 25 insertions(+), 12 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
Enable lpm after r8153_init() and remove other enable/disable lpm.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 9239dfb..b8c904f
Move the setting from r8153_first_init() to r8153_init(). It only needs to
be set once.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r
Use another way to keep disabling the U2P3 for both RTL_VER_03 and
RTL_VER_04.
Move enabling U2P3 from r8153_init() to r8153_hw_phy_cfg(). The
engineer ask the setting should be done after PHY settings.
Disable U2P3 first in rtl8153_up().
Signed-off-by: Hayes Wang <hayesw...@realtek.
Adjust the order of rtl8153_runtime_enable() according to the
suggestion from the engineer.
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/r
Only RTL8153 could set coalesce, so move the default setting for
rtl8152_probe() to r8153_init().
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 26 +-
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/net/usb/r
Move tp->rtl_ops.init() from rtl8152_resume() to rtl8152_reset_resume().
The initialization is only necessary for reset_resume().
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/dr
Use PLA 0xe000 bit 8 to check if disabling ALDPS is finished.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index f43b7a8..204f4b2
Stop queuing rx packets if it is more than 1000.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 204f4b2..fa29583 100644
--- a/drivers/net/usb/r
Change from using napi_complete to napi_complete_done to allow for the
use of gro_flush_timeout in tuning network processing.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/usb
The MAC clock speed down could be enabled if the U1/U2 is disabled.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 34 +-
1 file changed, 29 insertions(+), 5 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/n
jake Briggs [mailto:nexus...@gmail.com]
> Sent: Wednesday, May 03, 2017 7:21 AM
[...]
> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
> index 07f788c49d57..2a55459fdfac 100644
> --- a/drivers/net/usb/r8152.c
> +++ b/drivers/net/usb/r8152.c
> @@ -4277,6 +4277,7 @@ static void
similar case is
1. unplug the cable.
2. interrupt transfer queue a work_queue for linking change.
3. device enters the ALDPS mode.
4. a tx occurs before the work_queue is called.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 18 --
The RMS and the rx early size should base on the same rx size. However,
the RMS is set to 9K bytes now and the rx early depends on mtu. For using
the rx buffer effectively, sync the two settings according to the mtu.
Hayes Wang (2):
r8152: set the RMS of RTL8153 according to the mtu
r8152
Set the received maximum size (RMS) according to the mtu size. It is
unnecessary to receive a packet which is more than the size we could
transmit. Besides, this could let the rx buffer be used effectively.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.
revert commit a59e6d815226 ("r8152: correct the rx early size") and
fix the rx early size as
(rx buffer size - rx packet size - rx desc size - alignment) / 4
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 7 ---
1 file changed, 4
David Laight [mailto:david.lai...@aculab.com]
> Sent: Thursday, March 16, 2017 10:28 PM
[...]
> If you are really lucky the compiler will optimise it away.
> Otherwise it will generate another local variable and possibly
> a register spill to stack.
However, I could reduce the time for
Check hw version first in probe(). Do nothing if the driver doesn't
support the chip.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 102 ++--
1 file changed, 63 insertions(+), 39 deletions(-)
diff --git a/drive
Replace >napi with napi and tp->netdev with netdev.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 43 ++-
1 file changed, 26 insertions(+), 17 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net
Replace >napi with napi and tp->netdev with netdev.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 44 +++-
1 file changed, 27 insertions(+), 17 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net
[r8152]
PGD 0
Oops: 0002 [#1] SMP
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 986243c..bb3eedd 100644
--- a/drivers/net/usb/r8152.c
+++ b/d
> As I don't have the hardware, I'd be very pleased if
> someone may test this patch.
>
> Signed-off-by: Philippe Reynes <trem...@gmail.com>
> ---
> drivers/net/usb/r8152.c | 21 -
> 1 files changed, 12 insertions(+), 9 deletions(-)
David Miller [mailto:da...@davemloft.net]
> Sent: Thursday, January 26, 2017 11:48 AM
[...]
> Series applied.
Thank you very much. I would try to find better way, too.
Best Regards,
Hayes
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to
David Miller [mailto:da...@davemloft.net]
> Sent: Thursday, January 26, 2017 3:31 AM
[...]
> I think the fundamental issue is that since you can't stop URBs from
> queueing up, you cannot properly synchronize NAPI and schedule polling
> properly.
>
> From my perspective what happened here is you
Eric Dumazet [mailto:eric.duma...@gmail.com]
> Sent: Wednesday, January 25, 2017 10:13 PM
[...]
> You also could use napi_complete_done() instead of napi_complete(), as
> it allows users to tune the performance vs latency for GRO.
>
> Looking at this driver, I do not see any limitation on the
Adjust the setting of the flag of SELECTIVE_SUSPEND to prevent start_xmit()
from calling napi_schedule() directly during runtime suspend.
After calling napi_disable() or clearing the flag of WORK_ENABLE,
scheduling the napi is useless.
Signed-off-by: Hayes Wang <hayesw...@realtek.
Re-schedule napi after napi_complete() for tx, if it is necessay.
In r8152_poll(), if the tx is completed after tx_bottom() and before
napi_complete(), the scheduling of napi would be lost. Then, no
one handles the next tx until the next napi_schedule() is called.
Signed-off-by: Hayes Wang
Schedule the napi after napi_enable() for rx, if it is necessary.
If the rx is completed when napi is disabled, the sheduling of napi
would be lost. Then, no one handles the rx packet until next napi
is scheduled.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152
ule() during runtime suspend
or after napi_disable().
2. re-schedule the napi for tx if it is necessary.
3. check if any rx is finished or not after napi_enable().
Hayes Wang (4):
r8152: avoid start_xmit to call napi_schedule during autosuspend
r8152: avoid start_xmit to schedule napi when n
Stop the tx when the napi is disabled to prevent napi_schedule() is
called.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 2
Eric Dumazet [mailto:eric.duma...@gmail.com]
> Sent: Wednesday, January 25, 2017 9:57 PM
[...]
> > napi_complete(napi);
> > if (!list_empty(>rx_done))
> > napi_schedule(napi);
> > + else if (!skb_queue_empty(>tx_queue) &&
> > +
Oliver Neukum [mailto:oneu...@suse.com]
> Sent: Wednesday, January 25, 2017 5:35 PM
[...]
> looking at r8152 I noticed that it uses NAPI. I never considered
> this for the generic USB networking code as you cannot disable
> interrupts for USB. Is it still worth it? What are the benefits?
You
the napi for tx if it is necessary.
3. check if any rx is finished or not after napi_enable().
Hayes Wang (4):
r8152: avoid start_xmit to call napi_schedule during autosuspend
r8152: avoid start_xmit to schedule napi when napi is disabled
r8152: re-schedule napi for tx
r8152: check rx
Stop the tx when the napi is disabled to prevent napi_schedule() is
called.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 2
Schedule the napi after napi_enable() for rx, if it is necessary.
If the rx is completed when napi is disabled, the sheduling of napi
would be lost. Then, no one handles the rx packet until next napi
is scheduled.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152
Adjust the setting of the flag of SELECTIVE_SUSPEND to prevent start_xmit()
from calling napi_schedule() directly during runtime suspend.
After calling napi_disable() or clearing the flag of WORK_ENABLE,
scheduling the napi is useless.
Signed-off-by: Hayes Wang <hayesw...@realtek.
Re-schedule napi after napi_complete() for tx, if it is necessay.
In r8152_poll(), if the tx is completed after tx_bottom() and before
napi_complete(), the scheduling of napi would be lost. Then, no
one handles the next tx until the next napi_schedule() is called.
Signed-off-by: Hayes Wang
Replace rumtime with runtime.
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 f3b48ad..d59d773 100644
--- a/drivers/net/usb/r8152.c
Adjust the setting of the flag of SELECTIVE_SUSPEND to prevent start_xmit()
from calling napi_schedule() directly during runtime suspend.
After calling napi_disable() or clearing the flag of WORK_ENABLE,
scheduling the napi is useless.
Signed-off-by: Hayes Wang <hayesw...@realtek.
if any rx is finished or not after napi_enable().
Hayes Wang (4):
r8152: avoid start_xmit to call napi_schedule during autosuspend
r8152: avoid start_xmit to schedule napi when napi is disabled
r8152: re-schedule napi for tx
r8152: check rx after napi is enabled
drivers/net/usb/r8152.c | 26
Schedule the napi after napi_enable() for rx, if it is necessary.
If the rx is completed when napi is disabled, the sheduling of napi
would be lost. Then, no one handles the rx packet until next napi
is scheduled.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152
Re-schedule napi after napi_complete() for tx, if it is necessay.
In r8152_poll(), if the tx is completed after tx_bottom() and before
napi_complete(), the scheduling of napi would be lost. Then, no
one handles the next tx until the next napi_schedule() is called.
Signed-off-by: Hayes Wang
Stop the tx when the napi is disabled to prevent napi_schedule() is
called.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 2
Runtime suspend shouldn't be executed if the tx queue is not empty,
because the device is not idle.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb
The rtl8152_post_reset() should sumbit rx urb and interrupt transfer,
otherwise the rx wouldn't work and the linking change couldn't be
detected.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/n
> Subject: [PATCH net] r8152: fix the rx doesn't work
>
> The rtl8152_post_reset() doesn't submit the rx urb, so the rx wouldn't work.
>
> Signed-off-by: Hayes Wang <hayesw...@realtek.com>
Excuse me. Please ignore this patch. I would submit another one.
--
To unsubscribe
The rtl8152_post_reset() doesn't submit the rx urb, so the rx wouldn't work.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index f3b48ad..e8f4f88
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index be41856..f3b48ad 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@
Avoid rx is split into two parts when runtime suspend occurs.
Hayes Wang (2):
r8152: split rtl8152_suspend function
r8152: fix rx issue for runtime suspend
drivers/net/usb/r8152.c | 80 +++--
1 file changed, 64 insertions(+), 16 deletions
different urb buffers. That let the driver take the
data as a rx descriptor, and unexpected behavior happens.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 31 ---
1 file changed, 28 insertions(+), 3 deletions(-)
diff --git a/d
Split rtl8152_suspend() into rtl8152_system_suspend() and
rtl8152_rumtime_suspend().
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 57 ++---
1 file changed, 40 insertions(+), 17 deletions(-)
diff --git a/drive
Ansis Atteka [mailto:aatt...@nicira.com]
> Sent: Tuesday, January 03, 2017 8:41 AM
[...]
> Hayes, in your iperf reproduction environment did you
> 1) connect sender and receiver directly with an Ethernet cable?
> 2) use iperf's TCP mode instead of UDP mode, because I believe that
> with UDP mode
Mark Lord
I find an issue about autosuspend, and it may result in the same
problem with you. I don't sure if this is helpful to you, because
it only occurs when enabling the autosuspend.
Best Regards,
Hayes
/*
* Copyright (c) 2014 Realtek Semiconductor Corp. All rights
Mark Lord
[...]
> > Not sure why, because there really is no other way for the data to
> > appear where it does at the beginning of that URB buffer.
> >
> > This does seem a rather unexpected burden to place upon someone
> > reporting a regression in a USB network driver that
Mark Lord [mailto:ml...@pobox.com]
> Sent: Friday, November 25, 2016 3:11 AM
[...]
> On 16-11-24 02:00 PM, Greg KH wrote:
> > On Thu, Nov 24, 2016 at 01:34:08PM -0500, Mark Lord wrote:
> >> One thought: bulk data streams are byte streams, not packets.
> >> Scheduling on the USB bus can break up
> Mark Lord [mailto:ml...@pobox.com]
> > Sent: Friday, November 25, 2016 12:44 AM
> [...]
> > The bad data in this case is ASCII:
> >
> > "SRC=m3400:/ TARGET=/m340"
> >
> > This data is what is seen in /run/mount/utab, a file that is read/written
> > over NFS
> on
> > each boot.
> >
> >
Mark Lord [mailto:ml...@pobox.com]
> Sent: Friday, November 25, 2016 12:44 AM
[...]
> The bad data in this case is ASCII:
>
> "SRC=m3400:/ TARGET=/m340"
>
> This data is what is seen in /run/mount/utab, a file that is read/written
> over NFS on
> each boot.
>
> "SRC=m3400:/
Mark Lord [mailto:ml...@pobox.com]
> Sent: Thursday, November 24, 2016 11:25 PM
[...]
> x86 has near fully-coherent memory, so it is the "easy" platform
> to get things working on. But Linux supports a very diverse number
> of platforms, with varying degrees of cache/memory coherency,
> and it
Mark Lord [mailto:ml...@pobox.com]
> Sent: Thursday, November 24, 2016 8:31 PM
[...]
> Nope. Guard zones did not fix it, so it's probably not a prefetch issue.
> Oddly, adding a couple of memory barriers to specific places in the driver
> does help, A LOT. Still not 100%, but it did pass 1800
Mark Lord [mailto:ml...@pobox.com]
> Sent: Wednesday, November 23, 2016 9:41 PM
[...]
> >static void r8153_set_rx_early_size(struct r8152 *tp)
> >{
> >u32 mtu = tp->netdev->mtu;
> >u32 ocp_data = (agg_buf_sz - mtu - VLAN_ETH_HLEN - VLAN_HLEN) / 4;
> >
> >ocp_write_word(tp,
Mark Lord [mailto:ml...@pobox.com]
> Sent: Thursday, November 24, 2016 3:30 AM
[...]
> Worth repeating: other dongles we have tried, eg. those using the asix driver,
> do not cause us any troubles here. Only the r8152 dongles do.
I couldn't tell you why you would see the problem. I have tested
Mark Lord [ml...@pobox.com]
[...]
> What does this code do:
> >static void r8153_set_rx_early_size(struct r8152 *tp)
> >{
> >u32 mtu = tp->netdev->mtu;
> >u32 ocp_data = (agg_buf_sz - mtu - VLAN_ETH_HLEN - VLAN_HLEN) / 4;
> >
> >ocp_write_word(tp, MCU_TYPE_USB,
Mark Lord [mailto:ml...@pobox.com]
> Sent: Friday, November 18, 2016 8:03 PM
[..]
> How does the RTL8152 know that the limit is 16KB,
> rather than some other number? Is this a hardwired number
> in the hardware, or is it a parameter that the software
> sends to the chip during initialization?
Mark Lord [mailto:ml...@pobox.com]
> Sent: Thursday, November 17, 2016 9:42 PM
[...]
> What the above sample shows, is the URB transfer buffer ran out of space in
> the
> middle
> of a packet, and the hardware then tried to just continue that same packet in
> the
> next URB,
> without an rx_desc
[...]
> Fix the hw rx checksum is always enabled, and the user couldn't switch
> it to sw rx checksum.
>
> Note that the RTL_VER_01 only supports sw rx checksum only. Besides,
> the hw rx checksum for RTL_VER_02 is disabled after
> commit b9a321b48af4 ("r8152: Fix broken RX checksums.").
Francois Romieu [mailto:rom...@fr.zoreil.com]
> Sent: Tuesday, November 15, 2016 9:11 AM
[...]
> If it was possible to get it wrong once, it should be possible to
> get it wrong twice, especially if some part of the hardware design
> is recycled. I don't mean anything else.
I agree with you.
Mark Lord [mailto:ml...@pobox.com]
> Sent: Monday, November 14, 2016 4:34 AM
[...]
> Perhaps the driver
> is somehow accessing the buffer space again after doing usb_submit_urb()?
> That would certainly produce this kind of behaviour.
I don't think so. First, the driver only read the received
David Miller [mailto:da...@davemloft.net]
> Sent: Monday, November 14, 2016 1:40 AM
[...]
> If you add this patch now, there is a much smaller likelyhood that you
> will work with a high priority to figure out _why_ this is happening.
>
> For all we know this could be a platform bug in the DMA
Francois Romieu [mailto:rom...@fr.zoreil.com]
> Sent: Friday, November 11, 2016 8:13 PM
[...]
> Invalid packet size corrupted receive descriptors in Realtek's device
> reminds of CVE-2009-4537.
Do you mean that the driver would get a packet exceed the size
which is set to RxMaxSize? I check it
Let the rx sw checksum available and add some checks for rx desc.
Hayes Wang (2):
r8152: fix the sw rx checksum is unavailable
r8152: rx descriptor check
drivers/net/usb/r8152.c | 46 +-
1 file changed, 45 insertions(+), 1 deletion(-)
--
2.7.4
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 75c5168..0e42a78 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@
For some platforms, the data in memory is not the same with the one
from the device. That is, the data of memory is unbelievable. The
check is used to find out this situation.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.
Add the following four products of Lenovo and sort the order of the list.
VID PID
0x17ef 0x3062
0x17ef 0x3069
0x17ef 0x720c
0x17ef 0x7214
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/n
Move the PHY relative settings together to hw_phy_cfg().
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
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..9
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
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
Remove r8153_enable_eee().
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
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/r
Disable ALDPS and EEE to avoid the possible failure when setting the PHY.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
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 e
Move enabling PHY to init(), otherwise some other settings may fail.
Signed-off-by: Hayes Wang <hayesw...@realtek.com>
---
drivers/net/usb/r8152.c | 43 +--
1 file changed, 25 insertions(+), 18 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/d
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
1 - 100 of 501 matches
Mail list logo