[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 <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 72 +++-- 1 file changed, 34 insertions(+), 38 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drive

[PATCH net] r8152: add reset_resume function

2016-01-03 Thread Hayes Wang
state and the reinitialization is necessary. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 2e32c41..2fb637a 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers

[PATCH net] r8152: add reset_resume function

2016-01-03 Thread Hayes Wang
state and the reinitialization is necessary. Signed-off-by: Hayes Wang <hayesw...@realtek.com> --- drivers/net/usb/r8152.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 2e32c41..2fb637a 100644 --- a/drivers/n

RE: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-23 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] > Sent: Wednesday, December 23, 2015 6:46 PM [...] > That is indeed a problem and I need to think a bit about finding > a good solution. If you are happy with an inelegant solution, you can > use a pm_notifier, which will tell you that the system is going >

RE: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-23 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.de] > Sent: Wednesday, December 23, 2015 4:20 PM [...] > No, step (2) does not exist. Calls to suspend() and [reset_]resume() > always balance. Usually a driver shouldn't care about system suspend. > The way the driver is currently coded will also fail for

RE: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-23 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] > Sent: Wednesday, December 23, 2015 6:46 PM [...] > That is indeed a problem and I need to think a bit about finding > a good solution. If you are happy with an inelegant solution, you can > use a pm_notifier, which will tell you that the system is going >

RE: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-23 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.de] > Sent: Wednesday, December 23, 2015 4:20 PM [...] > No, step (2) does not exist. Calls to suspend() and [reset_]resume() > always balance. Usually a driver shouldn't care about system suspend. > The way the driver is currently coded will also fail for

RE: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-22 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] [...] > It is clear to me that you cannot get away with using the same operation > for resume() and reset_resume() in your driver. It is fundamentally > impossible. Firmware cannot fix it. I would think how to fix it. > Sorry for the length of the

RE: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-22 Thread Hayes Wang
Peter Wu [mailto:pe...@lekensteyn.nl] > Sent: Tuesday, December 08, 2015 10:33 PM [...] > I found another problem with runtime PM. When a device is suspended via > autosuspend and a system suspend takes place, there is no network I/O > after resume. Triggering a renegotiation (ethtool -r eth1)

RE: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-22 Thread Hayes Wang
Peter Wu [mailto:pe...@lekensteyn.nl] > Sent: Tuesday, December 08, 2015 10:33 PM [...] > I found another problem with runtime PM. When a device is suspended via > autosuspend and a system suspend takes place, there is no network I/O > after resume. Triggering a renegotiation (ethtool -r eth1)

RE: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-22 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] [...] > It is clear to me that you cannot get away with using the same operation > for resume() and reset_resume() in your driver. It is fundamentally > impossible. Firmware cannot fix it. I would think how to fix it. > Sorry for the length of the

RE: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-08 Thread Hayes Wang
cf285 ("r8152: don't enable napi before rx ready") > Link: https://lkml.kernel.org/r/20151205105912.GA1766@al > Signed-off-by: Peter Wu > --- > v2: moved rtl_runtime_suspend_enable from close to rtl8152_suspend Acked-by: Hayes Wang Best Regards, Hayes -- To unsubscribe fr

RE: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-08 Thread Hayes Wang
cf285 ("r8152: don't enable napi before rx ready") > Link: https://lkml.kernel.org/r/20151205105912.GA1766@al > Signed-off-by: Peter Wu <pe...@lekensteyn.nl> > --- > v2: moved rtl_runtime_suspend_enable from close to rtl8152_suspend Acked-by: Hayes Wang <haye

RE: [PATCH] r8152: fix lockup when runtime PM is enabled

2015-12-07 Thread Hayes Wang
Peter Wu [mailto:pe...@lekensteyn.nl] > Sent: Tuesday, December 08, 2015 12:59 AM [...] > + if (tp->netdev->flags & IFF_UP) { Maybe you could just replace the checking of netif_running(tp->netdev) with this. Excuse me. I have a question. Before the open() is finished, the

RE: [PATCH] r8152: fix lockup when runtime PM is enabled

2015-12-07 Thread Hayes Wang
Peter Wu [mailto:pe...@lekensteyn.nl] > Sent: Tuesday, December 08, 2015 12:59 AM [...] > + if (tp->netdev->flags & IFF_UP) { Maybe you could just replace the checking of netif_running(tp->netdev) with this. Excuse me. I have a question. Before the open() is finished, the

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

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

[PATCH net 1/2] r8152: split DRIVER_VERSION

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

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

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

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

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

[PATCH net 1/2] r8152: split DRIVER_VERSION

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

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

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

[PATCH net-next] r8152: disable the capability of zero length

2015-07-30 Thread Hayes Wang
The UEFI driver would enable zero length, and the Linux driver doesn't need it. Zero length let the hw complete the transfer with length 0, when there is no received packet. It would add the load of USB host controller and reduce the performance. Signed-off-by: Hayes Wang --- drivers/net/usb

[PATCH net-next] r8152: disable the capability of zero length

2015-07-30 Thread Hayes Wang
The UEFI driver would enable zero length, and the Linux driver doesn't need it. Zero length let the hw complete the transfer with length 0, when there is no received packet. It would add the load of USB host controller and reduce the performance. Signed-off-by: Hayes Wang hayesw...@realtek.com

[PATCH net v3 2/2] r8152: reset device when tx timeout

2015-07-29 Thread Hayes Wang
The device reset is necessary if the hw becomes abnormal and stops transmitting packets. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index e1b6d6d..ad8cbc6

[PATCH net v3 0/2] r8152: device reset

2015-07-29 Thread Hayes Wang
rks normally, we find the device may get all 0xff data when transmitting packets on certain platforms. It would break the device and no packet could be transmitted. The reset is necessary to recover the hw for this situation. Hayes Wang (2): r8152: add pre_reset and post_reset r8152: reset dev

[PATCH net v3 1/2] r8152: add pre_reset and post_reset

2015-07-29 Thread Hayes Wang
Add rtl8152_pre_reset() and rtl8152_post_reset() which are used when calling usb_reset_device(). The two functions could reduce the time of reset when calling usb_reset_device() after probe(). Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 54

RE: [PATCH net v2 2/2] r8152: reset device when tx timeout

2015-07-29 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] > Sent: Wednesday, July 29, 2015 3:22 PM [...] > Now, I think I got the reason for the confusion. > > You are using cancel_delayed_work(>schedule); after you queue a reset. > Therefore the order in which the work and the reset will be executed is >

RE: [PATCH net v2 2/2] r8152: reset device when tx timeout

2015-07-29 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] Sent: Wednesday, July 29, 2015 3:22 PM [...] Now, I think I got the reason for the confusion. You are using cancel_delayed_work(tp-schedule); after you queue a reset. Therefore the order in which the work and the reset will be executed is undefined.

[PATCH net v3 0/2] r8152: device reset

2015-07-29 Thread Hayes Wang
normally, we find the device may get all 0xff data when transmitting packets on certain platforms. It would break the device and no packet could be transmitted. The reset is necessary to recover the hw for this situation. Hayes Wang (2): r8152: add pre_reset and post_reset r8152: reset device when

[PATCH net v3 1/2] r8152: add pre_reset and post_reset

2015-07-29 Thread Hayes Wang
Add rtl8152_pre_reset() and rtl8152_post_reset() which are used when calling usb_reset_device(). The two functions could reduce the time of reset when calling usb_reset_device() after probe(). Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 54

[PATCH net v3 2/2] r8152: reset device when tx timeout

2015-07-29 Thread Hayes Wang
The device reset is necessary if the hw becomes abnormal and stops transmitting packets. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index

RE: [PATCH net v2 2/2] r8152: reset device when tx timeout

2015-07-28 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] > Sent: Tuesday, July 28, 2015 8:59 PM [...] > > > > static void rtl8152_tx_timeout(struct net_device *netdev) { > > > > struct r8152 *tp = netdev_priv(netdev); > > > > - int i; > > > > > > > > netif_warn(tp, tx_err, netdev, "Tx

RE: [PATCH net v2 2/2] r8152: reset device when tx timeout

2015-07-28 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] > Sent: Tuesday, July 28, 2015 8:14 PM [...] > > static void rtl8152_tx_timeout(struct net_device *netdev) { > > struct r8152 *tp = netdev_priv(netdev); > > - int i; > > > > netif_warn(tp, tx_err, netdev, "Tx timeout\n"); > > -

[PATCH net v2 2/2] r8152: reset device when tx timeout

2015-07-28 Thread Hayes Wang
The device reset is necessary if the hw becomes abnormal and stops transmitting packets. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index e1b6d6d..6af299f

[PATCH net v2 0/2] r8152: device reset

2015-07-28 Thread Hayes Wang
ata when transmitting packets on certain platforms. It would break the device and no packet could be transmitted. The reset is necessary to recover the hw for this situation. Hayes Wang (2): r8152: add pre_reset and post_reset r8152: reset device when tx timeout drivers/net/usb/r8152.c |

[PATCH net v2 1/2] r8152: add pre_reset and post_reset

2015-07-28 Thread Hayes Wang
Add rtl8152_pre_reset() and rtl8152_post_reset() which are used when calling usb_reset_device(). The two functions could reduce the time of reset when calling usb_reset_device() after probe(). Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 54

RE: [PATCH net 1/2] r8152: add pre_reset and post_reset

2015-07-28 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] > Sent: Tuesday, July 28, 2015 4:53 PM [...] > > + return 0; > > + > > + netdev = tp->netdev; > > + if (!netif_running(netdev)) > > + return 0; > > + > > + ret = usb_autopm_get_interface(intf); > > + if (ret < 0) > > +

RE: [PATCH net 2/2] r8152: reset device when tx timeout

2015-07-28 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] > Sent: Tuesday, July 28, 2015 4:57 PM [...] > * usb_queue_reset_device - Reset a USB device from an atomic context > * @iface: USB interface belonging to the device to reset > * > * This function can be used to reset a USB device from an atomic > *

[PATCH net 0/2] r8152: device reset

2015-07-28 Thread Hayes Wang
Although the driver works normally, we find the device may get all 0xff data when tranmitting packets on certain platforms. It would break the device and no packet could be transmitted. The reset is necessary to recover the hw for this situation. Hayes Wang (2): r8152: add pre_reset

[PATCH net 1/2] r8152: add pre_reset and post_reset

2015-07-28 Thread Hayes Wang
Add rtl8152_pre_reset() and rtl8152_post_reset() which are used when calling usb_reset_device(). The two functions could reduce the time of reset when calling usb_reset_device() after probe(). Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 68

[PATCH net 2/2] r8152: reset device when tx timeout

2015-07-28 Thread Hayes Wang
The device reset is necessary if the hw becomes abnormal and stops transmitting packets. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index

[PATCH net 2/2] r8152: reset device when tx timeout

2015-07-28 Thread Hayes Wang
The device reset is necessary if the hw becomes abnormal and stops transmitting packets. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net

RE: [PATCH net 2/2] r8152: reset device when tx timeout

2015-07-28 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] Sent: Tuesday, July 28, 2015 4:57 PM [...] * usb_queue_reset_device - Reset a USB device from an atomic context * @iface: USB interface belonging to the device to reset * * This function can be used to reset a USB device from an atomic * context,

[PATCH net 0/2] r8152: device reset

2015-07-28 Thread Hayes Wang
Although the driver works normally, we find the device may get all 0xff data when tranmitting packets on certain platforms. It would break the device and no packet could be transmitted. The reset is necessary to recover the hw for this situation. Hayes Wang (2): r8152: add pre_reset

[PATCH net 1/2] r8152: add pre_reset and post_reset

2015-07-28 Thread Hayes Wang
Add rtl8152_pre_reset() and rtl8152_post_reset() which are used when calling usb_reset_device(). The two functions could reduce the time of reset when calling usb_reset_device() after probe(). Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 68

RE: [PATCH net v2 2/2] r8152: reset device when tx timeout

2015-07-28 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] Sent: Tuesday, July 28, 2015 8:59 PM [...] static void rtl8152_tx_timeout(struct net_device *netdev) { struct r8152 *tp = netdev_priv(netdev); - int i; netif_warn(tp, tx_err, netdev, Tx timeout\n); -

RE: [PATCH net v2 2/2] r8152: reset device when tx timeout

2015-07-28 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] Sent: Tuesday, July 28, 2015 8:14 PM [...] static void rtl8152_tx_timeout(struct net_device *netdev) { struct r8152 *tp = netdev_priv(netdev); - int i; netif_warn(tp, tx_err, netdev, Tx timeout\n); - for (i = 0; i

RE: [PATCH net 1/2] r8152: add pre_reset and post_reset

2015-07-28 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] Sent: Tuesday, July 28, 2015 4:53 PM [...] + return 0; + + netdev = tp-netdev; + if (!netif_running(netdev)) + return 0; + + ret = usb_autopm_get_interface(intf); + if (ret 0) + return ret; What

[PATCH net v2 0/2] r8152: device reset

2015-07-28 Thread Hayes Wang
when transmitting packets on certain platforms. It would break the device and no packet could be transmitted. The reset is necessary to recover the hw for this situation. Hayes Wang (2): r8152: add pre_reset and post_reset r8152: reset device when tx timeout drivers/net/usb/r8152.c | 90

[PATCH net v2 1/2] r8152: add pre_reset and post_reset

2015-07-28 Thread Hayes Wang
Add rtl8152_pre_reset() and rtl8152_post_reset() which are used when calling usb_reset_device(). The two functions could reduce the time of reset when calling usb_reset_device() after probe(). Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 54

[PATCH net v2 2/2] r8152: reset device when tx timeout

2015-07-28 Thread Hayes Wang
The device reset is necessary if the hw becomes abnormal and stops transmitting packets. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index

[PATCH net v2 2/3] r8152: fix wakeup settings

2015-07-23 Thread Hayes Wang
Avoid the driver to enable WOL if the device doesn't support it. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index e3a0110..d537c30

[PATCH net v2 1/3] r8152: fix the issue about U1/U2

2015-07-23 Thread Hayes Wang
-by: Hayes Wang --- drivers/net/usb/r8152.c | 94 - 1 file changed, 54 insertions(+), 40 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 7f6419e..e3a0110 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c

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

2015-07-23 Thread Hayes Wang
v2: Replace patch #2 with "r8152: fix wakeup settings". v1: These patches are used to fix issues. Hayes Wang (3): r8152: fix the issue about U1/U2 - r8152: fix remote wakeup + r8152: fix wakeup settings r8152: don't enable napi before rx ready drivers/net/usb/r81

[PATCH net v2 3/3] r8152: don't enable napi before rx ready

2015-07-23 Thread Hayes Wang
Adjust napi_disable() and napi_enable() to avoid r8152_poll() start working before rx ready. Otherwise, it may have race condition for rx_agg. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c

RE: [PATCH net 2/3] r8152: fix remote wakeup

2015-07-23 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] [...] > If the device does not support remote wakeup and the driver enables it, > runtime > power management will be switched off. > That is the current state and it means that devices which don't support remote > wakeup cannot do runtime power management

RE: [PATCH net 2/3] r8152: fix remote wakeup

2015-07-23 Thread Hayes Wang
> Hi, > > this is most likely wrong. Usbcore does check for a device's ability to > do remote wakeup and will block a runtime suspend if it detects that > a remote wakeup would be required but the device cannot deliver. > (static int autosuspend_check()) > > So by removing the flag in the

[PATCH net 2/3] r8152: fix remote wakeup

2015-07-23 Thread Hayes Wang
Set needs_remote_wakeup only when the device supports it. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index e3a0110..eff1f25 100644 --- a/drivers/net/usb/r8152.c

[PATCH net 0/3] r8152: issues fix

2015-07-23 Thread Hayes Wang
These patches are used to fix issues. Hayes Wang (3): r8152: fix the issue about U1/U2 r8152: fix remote wakeup r8152: don't enable napi before rx ready drivers/net/usb/r8152.c | 103 1 file changed, 60 insertions(+), 43 deletions

[PATCH net 3/3] r8152: don't enable napi before rx ready

2015-07-23 Thread Hayes Wang
Adjust napi_disable() and napi_enable() to avoid r8152_poll() start working before rx ready. Otherwise, it may have race condition for rx_agg. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c

[PATCH net 1/3] r8152: fix the issue about U1/U2

2015-07-23 Thread Hayes Wang
-by: Hayes Wang --- drivers/net/usb/r8152.c | 94 - 1 file changed, 54 insertions(+), 40 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 7f6419e..e3a0110 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c

[PATCH net v2 2/3] r8152: fix wakeup settings

2015-07-23 Thread Hayes Wang
Avoid the driver to enable WOL if the device doesn't support it. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index

[PATCH net v2 1/3] r8152: fix the issue about U1/U2

2015-07-23 Thread Hayes Wang
-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 94 - 1 file changed, 54 insertions(+), 40 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 7f6419e..e3a0110 100644 --- a/drivers/net/usb/r8152.c +++ b

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

2015-07-23 Thread Hayes Wang
v2: Replace patch #2 with r8152: fix wakeup settings. v1: These patches are used to fix issues. Hayes Wang (3): r8152: fix the issue about U1/U2 - r8152: fix remote wakeup + r8152: fix wakeup settings r8152: don't enable napi before rx ready drivers/net/usb/r8152.c | 103

[PATCH net v2 3/3] r8152: don't enable napi before rx ready

2015-07-23 Thread Hayes Wang
Adjust napi_disable() and napi_enable() to avoid r8152_poll() start working before rx ready. Otherwise, it may have race condition for rx_agg. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

RE: [PATCH net 2/3] r8152: fix remote wakeup

2015-07-23 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] [...] If the device does not support remote wakeup and the driver enables it, runtime power management will be switched off. That is the current state and it means that devices which don't support remote wakeup cannot do runtime power management at

[PATCH net 1/3] r8152: fix the issue about U1/U2

2015-07-23 Thread Hayes Wang
-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 94 - 1 file changed, 54 insertions(+), 40 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 7f6419e..e3a0110 100644 --- a/drivers/net/usb/r8152.c +++ b

[PATCH net 0/3] r8152: issues fix

2015-07-23 Thread Hayes Wang
These patches are used to fix issues. Hayes Wang (3): r8152: fix the issue about U1/U2 r8152: fix remote wakeup r8152: don't enable napi before rx ready drivers/net/usb/r8152.c | 103 1 file changed, 60 insertions(+), 43 deletions

[PATCH net 2/3] r8152: fix remote wakeup

2015-07-23 Thread Hayes Wang
Set needs_remote_wakeup only when the device supports it. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index e3a0110..eff1f25 100644

[PATCH net 3/3] r8152: don't enable napi before rx ready

2015-07-23 Thread Hayes Wang
Adjust napi_disable() and napi_enable() to avoid r8152_poll() start working before rx ready. Otherwise, it may have race condition for rx_agg. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

RE: [PATCH net 2/3] r8152: fix remote wakeup

2015-07-23 Thread Hayes Wang
Hi, this is most likely wrong. Usbcore does check for a device's ability to do remote wakeup and will block a runtime suspend if it detects that a remote wakeup would be required but the device cannot deliver. (static int autosuspend_check()) So by removing the flag in the probe() method

[PATCH net-next] r8152: support the new RTL8153 chip

2015-07-22 Thread Hayes Wang
Support the new USB gigabit ethernet. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 7f6419e..57b72ec 100644 --- a/drivers/net/usb/r8152.c +++ b

[PATCH net-next] r8152: support the new RTL8153 chip

2015-07-22 Thread Hayes Wang
Support the new USB gigabit ethernet. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 7f6419e..57b72ec 100644 --- a/drivers

[PATCH firmware] rtl_nic: update firmware for RTL8168H and RTL8107E

2015-02-26 Thread Hayes Wang
File: rtl_nic/rtl8168h-1.fw Version: 0.0.2 File: rtl_nic/rtl8168h-2.fw Version: 0.0.2 File: rtl_nic/rtl8107e-1.fw Version: 0.0.2 File: rtl_nic/rtl8107e-2.fw Version: 0.0.2 Signed-off-by: Hayes Wang --- WHENCE| 8 rtl_nic/rtl8107e-1.fw | Bin 2496 -> 992 by

[PATCH firmware] rtl_nic: update firmware for RTL8168H and RTL8107E

2015-02-26 Thread Hayes Wang
File: rtl_nic/rtl8168h-1.fw Version: 0.0.2 File: rtl_nic/rtl8168h-2.fw Version: 0.0.2 File: rtl_nic/rtl8107e-1.fw Version: 0.0.2 File: rtl_nic/rtl8107e-2.fw Version: 0.0.2 Signed-off-by: Hayes Wang hayesw...@realtek.com --- WHENCE| 8 rtl_nic/rtl8107e-1.fw | Bin

RE: [PATCH] drivers, realtek: Fix trivial typo in rtl_check_firmware

2015-02-24 Thread Hayes Wang
Yannick Guerrini [mailto:yguerr...@tomshardware.fr] > Sent: Tuesday, February 24, 2015 3:49 PM > To: nic_swsd > Cc: triv...@kernel.org; linux-kernel@vger.kernel.org; Yannick Guerrini > Subject: [PATCH] drivers, realtek: Fix trivial typo in rtl_check_firmware > > Change 'firwmare' to 'firmware' >

RE: [PATCH] drivers, realtek: Fix trivial typo in rtl_check_firmware

2015-02-24 Thread Hayes Wang
Yannick Guerrini [mailto:yguerr...@tomshardware.fr] Sent: Tuesday, February 24, 2015 3:49 PM To: nic_swsd Cc: triv...@kernel.org; linux-kernel@vger.kernel.org; Yannick Guerrini Subject: [PATCH] drivers, realtek: Fix trivial typo in rtl_check_firmware Change 'firwmare' to 'firmware'

[PATCH net] r8152: restore hw settings

2015-02-12 Thread Hayes Wang
. - set fifo empty boundary to 32448 bytes. - enable the function of exiting LPM when Rx OK occurs. - set the connect timer to 1. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 59 +++-- 1 file changed, 57 insertions(+), 2 deletions(-) diff

[PATCH net] r8152: restore hw settings

2015-02-12 Thread Hayes Wang
. - set fifo empty boundary to 32448 bytes. - enable the function of exiting LPM when Rx OK occurs. - set the connect timer to 1. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 59 +++-- 1 file changed, 57 insertions(+), 2

[PATCH net-next v2 0/3] Adjust the settings about USB_RX_EARLY_AGG

2015-02-11 Thread Hayes Wang
the ethtool could be used to change the timeout according to situation of the platform. Hayes Wang (3): r8152: separate USB_RX_EARLY_AGG r8152: change rx early size when the mtu is changed r8152: support setting rx coalesce drivers/net/usb/r8152.c | 128 ++

[PATCH net-next v2 2/3] r8152: change rx early size when the mtu is changed

2015-02-11 Thread Hayes Wang
The rx early size is calculated with the mtu, so it has to be re-calculated when the mtu is changed. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index

[PATCH net-next v2 3/3] r8152: support setting rx coalesce

2015-02-11 Thread Hayes Wang
Support setting the rx coalesce. Then someone could change the rx agg timeout value through ethtool. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 57 + 1 file changed, 57 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net

[PATCH net-next v2 1/3] r8152: separate USB_RX_EARLY_AGG

2015-02-11 Thread Hayes Wang
Separate USB_RX_EARLY_AGG into USB_RX_EARLY_TIMEOUT and USB_RX_EARLY_SIZE. Replace r8153_set_rx_agg() with r8153_set_rx_early_timeout() and r8153_set_rx_early_size(). Set the default timeout value according to the USB speed. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 58

RE: [PATCH net-next 1/3] r8152: separate USB_RX_EARLY_AGG

2015-02-11 Thread Hayes Wang
Sergei Shtylyov; net...@vger.kernel.org [...] > > > + ocp_data = tp->coalesce / 8; > > > > Why not do it in the initializer? > > This is for patch #3. The patch #3 would use this function. > The unit of the relative setting from the ethtool is 1 us. > However, the unit for the hw is 8 us.

RE: [PATCH net-next 1/3] r8152: separate USB_RX_EARLY_AGG

2015-02-11 Thread Hayes Wang
Sergei Shtylyov [mailto:sergei.shtyl...@cogentembedded.com] [...] > > + ocp_data = tp->coalesce / 8; > > Why not do it in the initializer? This is for patch #3. The patch #3 would use this function. The unit of the relative setting from the ethtool is 1 us. However, the unit for the hw is

RE: [PATCH net-next 1/3] r8152: separate USB_RX_EARLY_AGG

2015-02-11 Thread Hayes Wang
Sergei Shtylyov [mailto:sergei.shtyl...@cogentembedded.com] [...] + ocp_data = tp-coalesce / 8; Why not do it in the initializer? This is for patch #3. The patch #3 would use this function. The unit of the relative setting from the ethtool is 1 us. However, the unit for the hw is 8

RE: [PATCH net-next 1/3] r8152: separate USB_RX_EARLY_AGG

2015-02-11 Thread Hayes Wang
Sergei Shtylyov; net...@vger.kernel.org [...] + ocp_data = tp-coalesce / 8; Why not do it in the initializer? This is for patch #3. The patch #3 would use this function. The unit of the relative setting from the ethtool is 1 us. However, the unit for the hw is 8 us. Therefore, I

[PATCH net-next v2 3/3] r8152: support setting rx coalesce

2015-02-11 Thread Hayes Wang
Support setting the rx coalesce. Then someone could change the rx agg timeout value through ethtool. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 57 + 1 file changed, 57 insertions(+) diff --git a/drivers/net/usb

[PATCH net-next v2 1/3] r8152: separate USB_RX_EARLY_AGG

2015-02-11 Thread Hayes Wang
Separate USB_RX_EARLY_AGG into USB_RX_EARLY_TIMEOUT and USB_RX_EARLY_SIZE. Replace r8153_set_rx_agg() with r8153_set_rx_early_timeout() and r8153_set_rx_early_size(). Set the default timeout value according to the USB speed. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb

[PATCH net-next v2 2/3] r8152: change rx early size when the mtu is changed

2015-02-11 Thread Hayes Wang
The rx early size is calculated with the mtu, so it has to be re-calculated when the mtu is changed. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers

[PATCH net-next v2 0/3] Adjust the settings about USB_RX_EARLY_AGG

2015-02-11 Thread Hayes Wang
to change the timeout according to situation of the platform. Hayes Wang (3): r8152: separate USB_RX_EARLY_AGG r8152: change rx early size when the mtu is changed r8152: support setting rx coalesce drivers/net/usb/r8152.c | 128 ++-- 1 file changed

[PATCH net-next 2/3] r8152: change rx early size when the mtu is changed

2015-02-10 Thread Hayes Wang
The rx early size is calculated with the mtu, so it has to be re-calculated when the mtu is changed. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index

[PATCH net-next 1/3] r8152: separate USB_RX_EARLY_AGG

2015-02-10 Thread Hayes Wang
Separate USB_RX_EARLY_AGG into USB_RX_EARLY_TIMEOUT and USB_RX_EARLY_SIZE. Replace r8153_set_rx_agg() with r8153_set_rx_early_timeout() and r8153_set_rx_early_size(). Set the default timeout value according to the USB speed. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 55

[PATCH net-next 3/3] r8152: support setting rx coalesce

2015-02-10 Thread Hayes Wang
Support setting the rx coalesce. Then someone could change the rx agg timeout value through ethtool. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 57 + 1 file changed, 57 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net

[PATCH net-next 0/3] Adjust the settings about USB_RX_EARLY_AGG

2015-02-10 Thread Hayes Wang
The USB_RX_EARLY_AGG contains timeout and size. Separate them, and they could be set independently. Then, the ethtool could be used to change the timeout according to situation of the platform. Hayes Wang (3): r8152: separate USB_RX_EARLY_AGG r8152: change rx early size when the mtu

[PATCH net-next 2/3] r8152: change rx early size when the mtu is changed

2015-02-10 Thread Hayes Wang
The rx early size is calculated with the mtu, so it has to be re-calculated when the mtu is changed. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers

[PATCH net-next 1/3] r8152: separate USB_RX_EARLY_AGG

2015-02-10 Thread Hayes Wang
Separate USB_RX_EARLY_AGG into USB_RX_EARLY_TIMEOUT and USB_RX_EARLY_SIZE. Replace r8153_set_rx_agg() with r8153_set_rx_early_timeout() and r8153_set_rx_early_size(). Set the default timeout value according to the USB speed. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb

[PATCH net-next 3/3] r8152: support setting rx coalesce

2015-02-10 Thread Hayes Wang
Support setting the rx coalesce. Then someone could change the rx agg timeout value through ethtool. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 57 + 1 file changed, 57 insertions(+) diff --git a/drivers/net/usb

[PATCH net-next 0/3] Adjust the settings about USB_RX_EARLY_AGG

2015-02-10 Thread Hayes Wang
The USB_RX_EARLY_AGG contains timeout and size. Separate them, and they could be set independently. Then, the ethtool could be used to change the timeout according to situation of the platform. Hayes Wang (3): r8152: separate USB_RX_EARLY_AGG r8152: change rx early size when the mtu

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

2015-02-05 Thread Hayes Wang
If a error occurs when submitting rx, skip the remaining submissions and try to submit them again next time. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152

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