RE: [PATCH net-next] r8152: use mutex for hw settings

2014-10-09 Thread Hayes Wang
David Miller [mailto:da...@davemloft.net] Sent: Thursday, October 09, 2014 3:45 AM [..] I think a much simpler fix is to take rtnl_lock() in the workqueue function and suspend/resume ops. Every other place you are adding the mutex already holds the RTNL mutex. If I use the rtnl_lock(), I

[PATCH net-next v2 0/3] r8152: use mutex for hw settings

2014-10-09 Thread Hayes Wang
the driver more safe. Hayes Wang (3): r8152: autoresume before setting feature r8152: adjust usb_autopm_xxx r8152: add mutex for hw settings drivers/net/usb/r8152.c | 98 + 1 file changed, 83 insertions(+), 15 deletions(-) -- 1.9.3

[PATCH net-next v2 1/3] r8152: autoresume before setting feature

2014-10-09 Thread Hayes Wang
Resume the device before setting the feature. 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 5cfd414..c5afe8c 100644 --- a/drivers

[PATCH net-next v2 3/3] r8152: add mutex for hw settings

2014-10-09 Thread Hayes Wang
Use the mutex to avoid the settings are interrupted by other ones. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 64 - 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers

[PATCH net-next v2 2/3] r8152: adjust usb_autopm_xxx

2014-10-09 Thread Hayes Wang
Add usb_autopm_xxx for rtl8152_get_settings() ,and remove usb_autopm_xxx from read_mii_word() and write_mii_word(). Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/drivers

[PATCH net-next] r8152: use mutex for hw settings

2014-10-06 Thread Hayes Wang
Use mutex to avoid that the serial hw settings would be interrupted by other settings. Although there is no problem now, it makes the driver more safe. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 69 +++-- 1 file changed, 67 insertions

[PATCH net-next] r8152: use mutex for hw settings

2014-10-06 Thread Hayes Wang
Use mutex to avoid that the serial hw settings would be interrupted by other settings. Although there is no problem now, it makes the driver more safe. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 69 +++-- 1 file

[PATCH net-next v2] r8152: nway reset after setting eee

2014-10-05 Thread Hayes Wang
Restart autonegotiation is necessary after setting EEE. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index b9a9815..6532620 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb

[PATCH net-next v2] r8152: nway reset after setting eee

2014-10-05 Thread Hayes Wang
Restart autonegotiation is necessary after setting EEE. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index b9a9815..6532620 100644 --- a/drivers/net/usb/r8152.c

[PATCH net v2] r8152: autoresume before setting MAC address

2014-10-02 Thread Hayes Wang
Resume the device before setting the MAC address. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 604ef21..5ee7582 100644 --- a/drivers/net/usb/r8152.c

[PATCH net] r8152: autoresume before setting MAC address

2014-10-02 Thread Hayes Wang
Resume the device before setting the MAC address. 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 604ef21..e823358 100644 --- a/drivers/net/usb

[PATCH net-next] r8152: nway reset after setting eee

2014-10-02 Thread Hayes Wang
Restart autonegotiation is necessary after setting EEE. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index a4d4c4a..e4dcfc1 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net

[PATCH net-next] r8152: nway reset after setting eee

2014-10-02 Thread Hayes Wang
Restart autonegotiation is necessary after setting EEE. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index a4d4c4a..e4dcfc1 100644 --- a/drivers/net/usb/r8152.c

[PATCH net] r8152: autoresume before setting MAC address

2014-10-02 Thread Hayes Wang
Resume the device before setting the MAC address. 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 604ef21..e823358 100644

[PATCH net v2] r8152: autoresume before setting MAC address

2014-10-02 Thread Hayes Wang
Resume the device before setting the MAC address. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 604ef21..5ee7582 100644

[PATCH net 2/2] r8152: disable power cut for RTL8153

2014-09-30 Thread Hayes Wang
The firmware would be clear when the power cut is enabled for RTL8153. 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/r8152.c index 18b9e0d..604ef21 100644 --- a/drivers/net/usb

[PATCH net 1/2] r8152: remove clearing bp

2014-09-30 Thread Hayes Wang
by the firmware would occur. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 28 +--- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index f68a4e6..18b9e0d 100644 --- a/drivers/net/usb/r8152.c +++ b

[PATCH net 0/2] r8152: patches about firmware

2014-09-30 Thread Hayes Wang
The patches fix the issues when the firmware exists. For the multiple OS, the firmware may be loaded by the driver of the other OS. And the Linux driver has influences on it. Hayes Wang (2): r8152: remove clearing bp r8152: disable power cut for RTL8153 drivers/net/usb/r8152.c | 30

[PATCH net] r8152: fix setting RTL8152_UNPLUG

2014-09-30 Thread Hayes Wang
The flag of RTL8152_UNPLUG should only be set when the device is unplugged, not each time the rtl8152_disconnect() is called. Otherwise, the device wouldn't be stopped normally. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion

[PATCH net] r8152: fix setting RTL8152_UNPLUG

2014-09-30 Thread Hayes Wang
The flag of RTL8152_UNPLUG should only be set when the device is unplugged, not each time the rtl8152_disconnect() is called. Otherwise, the device wouldn't be stopped normally. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 6 +- 1 file changed, 5 insertions

[PATCH net 0/2] r8152: patches about firmware

2014-09-30 Thread Hayes Wang
The patches fix the issues when the firmware exists. For the multiple OS, the firmware may be loaded by the driver of the other OS. And the Linux driver has influences on it. Hayes Wang (2): r8152: remove clearing bp r8152: disable power cut for RTL8153 drivers/net/usb/r8152.c | 30

[PATCH net 1/2] r8152: remove clearing bp

2014-09-30 Thread Hayes Wang
by the firmware would occur. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 28 +--- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index f68a4e6..18b9e0d 100644 --- a/drivers

[PATCH net 2/2] r8152: disable power cut for RTL8153

2014-09-30 Thread Hayes Wang
The firmware would be clear when the power cut is enabled for RTL8153. Signed-off-by: Hayes Wang hayesw...@realtek.com --- 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/r8152.c index 18b9e0d..604ef21 100644

[PATCH net-next 1/3] r8152: change the EEE definition

2014-09-25 Thread Hayes Wang
Replace the EEE definitions with the ones which is declared in "mdio.h". Chage some definitions to make them readable. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 35 ++- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/drive

[PATCH net-next 2/3] r8152: add functions to set EEE

2014-09-25 Thread Hayes Wang
Add functions to enable EEE and set EEE advertisement. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 101 1 file changed, 76 insertions(+), 25 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index d225aa1

[PATCH net-next 3/3] r8152: support ethtool eee

2014-09-25 Thread Hayes Wang
Support get_eee() and set_eee() of ethtool_ops. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 128 1 file changed, 128 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 887b6a2..a4d4c4a 100644

[PATCH net-next 0/3] r8152: support setting eee by ethtool

2014-09-25 Thread Hayes Wang
Modify some definitions about EEE, and add the support of setting the EEE through ethtool. Hayes Wang (3): r8152: change the EEE definition r8152: add functions to set EEE r8152: support ethtool eee drivers/net/usb/r8152.c | 246 1 file

[PATCH net-next 0/3] r8152: support setting eee by ethtool

2014-09-25 Thread Hayes Wang
Modify some definitions about EEE, and add the support of setting the EEE through ethtool. Hayes Wang (3): r8152: change the EEE definition r8152: add functions to set EEE r8152: support ethtool eee drivers/net/usb/r8152.c | 246 1 file

[PATCH net-next 3/3] r8152: support ethtool eee

2014-09-25 Thread Hayes Wang
Support get_eee() and set_eee() of ethtool_ops. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 128 1 file changed, 128 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 887b6a2

[PATCH net-next 2/3] r8152: add functions to set EEE

2014-09-25 Thread Hayes Wang
Add functions to enable EEE and set EEE advertisement. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 101 1 file changed, 76 insertions(+), 25 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb

[PATCH net-next 1/3] r8152: change the EEE definition

2014-09-25 Thread Hayes Wang
Replace the EEE definitions with the ones which is declared in mdio.h. Chage some definitions to make them readable. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 35 ++- 1 file changed, 14 insertions(+), 21 deletions(-) diff

[PATCH net] r8152: fix the carrier off when autoresuming

2014-09-23 Thread Hayes Wang
netif_carrier_off would be called when autoresuming, even though the cable is plugged. This causes some applications do relative actions when detecting the carrier off. Keep the status of the carrier, and let it be modified when the linking change occurs. Signed-off-by: Hayes Wang --- drivers

[PATCH net] r8152: fix the carrier off when autoresuming

2014-09-23 Thread Hayes Wang
netif_carrier_off would be called when autoresuming, even though the cable is plugged. This causes some applications do relative actions when detecting the carrier off. Keep the status of the carrier, and let it be modified when the linking change occurs. Signed-off-by: Hayes Wang hayesw

[PATCH net] r8152: disable ALDPS

2014-09-19 Thread Hayes Wang
when linking on. The hw would enter the ALDPS mode after several seconds when link down occurs and the ALDPS is enabled. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 62 +++-- 1 file changed, 45 insertions(+), 17 deletions(-) diff --git

[PATCH net] r8152: disable ALDPS

2014-09-19 Thread Hayes Wang
when linking on. The hw would enter the ALDPS mode after several seconds when link down occurs and the ALDPS is enabled. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 62 +++-- 1 file changed, 45 insertions(+), 17

[PATCH firmware RESEND] rtl_nic: add firmware for RTL8168H and RTL8107E

2014-09-15 Thread Hayes Wang
File: rtl_nic/rtl8168h-1.fw Version: 0.0.1 File: rtl_nic/rtl8168h-2.fw Version: 0.0.1 File: rtl_nic/rtl8107e-1.fw Version: 0.0.1 File: rtl_nic/rtl8107e-2.fw Version: 0.0.1 Signed-off-by: Hayes Wang --- WHENCE| 12 rtl_nic/rtl8107e-1.fw | Bin 0 -> 2496 by

[PATCH net] r8169: adjust __rtl8169_set_features

2014-09-15 Thread Hayes Wang
Remove the "changed" test in __rtl8169_set_features(). Instead, do simple test in rtl8169_set_features(). Set the RxChkSum and RxVlan through __rtl8169_set_features() in rtl_open(). Signed-off-by: Francois Romieu Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8

RE: [PATCH net 1/2] r8169: fix the default setting of rx vlan

2014-09-15 Thread Hayes Wang
From: Francois Romieu [mailto:rom...@fr.zoreil.com] > Sent: Tuesday, September 16, 2014 8:03 AM [...] > However it's getting messy and the code stomps CPlusCmd in > rtl_open right > before it's given a chance to be read in hw_start. Something like the > untested patch below should avoid it and

RE: [PATCH net 1/2] r8169: fix the default setting of rx vlan

2014-09-15 Thread Hayes Wang
From: Francois Romieu [mailto:rom...@fr.zoreil.com] Sent: Tuesday, September 16, 2014 8:03 AM [...] However it's getting messy and the code stomps CPlusCmd in rtl_open right before it's given a chance to be read in hw_start. Something like the untested patch below should avoid it and keep

[PATCH net] r8169: adjust __rtl8169_set_features

2014-09-15 Thread Hayes Wang
Remove the changed test in __rtl8169_set_features(). Instead, do simple test in rtl8169_set_features(). Set the RxChkSum and RxVlan through __rtl8169_set_features() in rtl_open(). Signed-off-by: Francois Romieu rom...@fr.zoreil.com Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net

[PATCH firmware RESEND] rtl_nic: add firmware for RTL8168H and RTL8107E

2014-09-15 Thread Hayes Wang
File: rtl_nic/rtl8168h-1.fw Version: 0.0.1 File: rtl_nic/rtl8168h-2.fw Version: 0.0.1 File: rtl_nic/rtl8107e-1.fw Version: 0.0.1 File: rtl_nic/rtl8107e-2.fw Version: 0.0.1 Signed-off-by: Hayes Wang hayesw...@realtek.com --- WHENCE| 12 rtl_nic/rtl8107e-1.fw | Bin

RE: [PATCH net 1/2] r8169: fix the default setting of rx vlan

2014-09-14 Thread Hayes Wang
Francois Romieu [mailto:rom...@fr.zoreil.com] > Sent: Saturday, September 13, 2014 3:40 AM [...] > The same fix should be relevant for NETIF_F_RXCSUM. You may thus as > well remove the "changed" test in __rtl8169_set_features and keep > everything there. In the probe function (rtl_init_one),

RE: [PATCH net 1/2] r8169: fix the default setting of rx vlan

2014-09-14 Thread Hayes Wang
Francois Romieu [mailto:rom...@fr.zoreil.com] Sent: Saturday, September 13, 2014 3:40 AM [...] The same fix should be relevant for NETIF_F_RXCSUM. You may thus as well remove the changed test in __rtl8169_set_features and keep everything there. In the probe function (rtl_init_one), RxChkSum

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

2014-09-12 Thread Hayes Wang
File: rtl_nic/rtl8168h-1.fw Version: 0.0.1 File: rtl_nic/rtl8168h-2.fw Version: 0.0.1 File: rtl_nic/rtl8107e-1.fw Version: 0.0.1 File: rtl_nic/rtl8107e-2.fw Version: 0.0.1 Signed-off-by: Hayes Wang --- WHENCE| 12 rtl_nic/rtl8107e-1.fw | Bin 0 -> 2496 by

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

2014-09-12 Thread Hayes Wang
File: rtl_nic/rtl8168h-1.fw Version: 0.0.1 File: rtl_nic/rtl8168h-2.fw Version: 0.0.1 File: rtl_nic/rtl8107e-1.fw Version: 0.0.1 File: rtl_nic/rtl8107e-2.fw Version: 0.0.1 Signed-off-by: Hayes Wang hayesw...@realtek.com --- WHENCE| 12 rtl_nic/rtl8107e-1.fw | Bin

[PATCH net 2/2] r8169: fix setting rx vlan

2014-09-11 Thread Hayes Wang
The setting should depend on the new features not the current one. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index f3ce284

[PATCH net 0/2] r8169: fix rx vlan

2014-09-11 Thread Hayes Wang
There are two issues for hw rx vlan. The patches are used to fix them. Hayes Wang (2): r8169: fix the default setting of rx vlan r8169: fix setting rx vlan drivers/net/ethernet/realtek/r8169.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) -- 1.9.3 -- To unsubscribe from

[PATCH net 1/2] r8169: fix the default setting of rx vlan

2014-09-11 Thread Hayes Wang
If the parameter "features" of __rtl8169_set_features() is equal to dev->features, the variable "changed" is alwayes 0, and nothing would be changed. Signed-off-by: Hayes Wang --- drivers/net/ethernet/realtek/r8169.c | 7 ++- 1 file changed, 6 insertions(+), 1

[PATCH net-next v2] r8152: support VLAN

2014-09-11 Thread Hayes Wang
Support hw VLAN for tx and rx. And enable them by default. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 79 - 1 file changed, 65 insertions(+), 14 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index

[PATCH net-next] r8152: support VLAN

2014-09-11 Thread Hayes Wang
Support hw VLAN for tx and rx. And enable them by default. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 85 + 1 file changed, 71 insertions(+), 14 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index

[PATCH net-next v2] r8152: support VLAN

2014-09-11 Thread Hayes Wang
Support hw VLAN for tx and rx. And enable them by default. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 79 - 1 file changed, 65 insertions(+), 14 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb

[PATCH net 1/2] r8169: fix the default setting of rx vlan

2014-09-11 Thread Hayes Wang
If the parameter features of __rtl8169_set_features() is equal to dev-features, the variable changed is alwayes 0, and nothing would be changed. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/ethernet/realtek/r8169.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion

[PATCH net 0/2] r8169: fix rx vlan

2014-09-11 Thread Hayes Wang
There are two issues for hw rx vlan. The patches are used to fix them. Hayes Wang (2): r8169: fix the default setting of rx vlan r8169: fix setting rx vlan drivers/net/ethernet/realtek/r8169.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) -- 1.9.3 -- To unsubscribe from

[PATCH net 2/2] r8169: fix setting rx vlan

2014-09-11 Thread Hayes Wang
The setting should depend on the new features not the current one. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/ethernet/realtek/r8169.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek

[PATCH net-next] r8152: support VLAN

2014-09-11 Thread Hayes Wang
Support hw VLAN for tx and rx. And enable them by default. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 85 + 1 file changed, 71 insertions(+), 14 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb

RE: [PATCH net-next v2] r8169:add support for RTL8168H and RTL8107E

2014-09-10 Thread Hayes Wang
From: Ivan Vecera [mailto:ivec...@redhat.com] > Sent: Tuesday, September 09, 2014 8:19 PM [...] > Thanks Hayes, > have you got any idea when do you update them? If all are fine, I would release them this week. Best Regards, Hayes -- To unsubscribe from this list: send the line "unsubscribe

RE: [PATCH net-next v2] r8169:add support for RTL8168H and RTL8107E

2014-09-10 Thread Hayes Wang
From: Ivan Vecera [mailto:ivec...@redhat.com] Sent: Tuesday, September 09, 2014 8:19 PM [...] Thanks Hayes, have you got any idea when do you update them? If all are fine, I would release them this week. Best Regards, Hayes -- To unsubscribe from this list: send the line unsubscribe

RE: [PATCH net-next v2] r8169:add support for RTL8168H and RTL8107E

2014-09-08 Thread Hayes Wang
From: Ivan Vecera [mailto:ivec...@redhat.com] > Sent: Monday, September 08, 2014 9:01 PM > To: Hau; net...@vger.kernel.org > Cc: nic_swsd; linux-kernel@vger.kernel.org; rom...@fr.zoreil.com > Subject: Re: [PATCH net-next v2] r8169:add support for > RTL8168H and RTL8107E [...] > Where are these

[PATCH net-next] r8152: use usleep_range

2014-09-08 Thread Hayes Wang
Replace mdelay with usleep_range to avoid busy loop. 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 f95e678..2130c75 100644 --- a/drivers

[PATCH net-next] r8152: use usleep_range

2014-09-08 Thread Hayes Wang
Replace mdelay with usleep_range to avoid busy loop. 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 f95e678..2130c75

RE: [PATCH net-next v2] r8169:add support for RTL8168H and RTL8107E

2014-09-08 Thread Hayes Wang
From: Ivan Vecera [mailto:ivec...@redhat.com] Sent: Monday, September 08, 2014 9:01 PM To: Hau; net...@vger.kernel.org Cc: nic_swsd; linux-kernel@vger.kernel.org; rom...@fr.zoreil.com Subject: Re: [PATCH net-next v2] r8169:add support for RTL8168H and RTL8107E [...] Where are these new

[PATCH net-next v3 0/2] r8152: random MAC address

2014-09-04 Thread Hayes Wang
If the interface has invalid MAC address, it couldn't be used. In order to let it work normally, give a random one. v3: Remove ether_addr_copy(dev->perm_addr, dev->dev_addr); v2: Use "%pM" format specifier for printing a MAC address. Hayes Wang (2): r8152: cha

[PATCH net-next v3 2/2] r8152: use eth_hw_addr_random

2014-09-04 Thread Hayes Wang
If the hw doesn't have a valid MAC address, give a random one and set it to the hw. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 35 +++ 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c

[PATCH net-next v3 1/2] r8152: change the location of rtl8152_set_mac_address

2014-09-04 Thread Hayes Wang
Exchange the location of rtl8152_set_mac_address() and set_ethernet_addr(). Then, the set_ethernet_addr() could set the MAC address by calling rtl8152_set_mac_address() later. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 34 +- 1 file changed, 17

[PATCH net-next v3 1/2] r8152: change the location of rtl8152_set_mac_address

2014-09-04 Thread Hayes Wang
Exchange the location of rtl8152_set_mac_address() and set_ethernet_addr(). Then, the set_ethernet_addr() could set the MAC address by calling rtl8152_set_mac_address() later. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 34 +- 1

[PATCH net-next v3 2/2] r8152: use eth_hw_addr_random

2014-09-04 Thread Hayes Wang
If the hw doesn't have a valid MAC address, give a random one and set it to the hw. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 35 +++ 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/drivers/net/usb/r8152.c b

[PATCH net-next v3 0/2] r8152: random MAC address

2014-09-04 Thread Hayes Wang
If the interface has invalid MAC address, it couldn't be used. In order to let it work normally, give a random one. v3: Remove ether_addr_copy(dev-perm_addr, dev-dev_addr); v2: Use %pM format specifier for printing a MAC address. Hayes Wang (2): r8152: change the location

[PATCH net-next v2 2/2] r8152: use eth_hw_addr_random

2014-09-02 Thread Hayes Wang
If the hw doesn't have a valid MAC address, give a random one and set it to the hw. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 35 --- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c

[PATCH net-next v2 0/2] r8152: random MAC address

2014-09-02 Thread Hayes Wang
If the interface has invalid MAC address, it couldn't be used. In order to let it work normally, give a random one. v2: Use "%pM" format specifier for printing a MAC address. Hayes Wang (2): r8152: change the location of rtl8152_set_mac_address r8152: use eth_hw_addr_random d

[PATCH net-next v2 1/2] r8152: change the location of rtl8152_set_mac_address

2014-09-02 Thread Hayes Wang
Exchange the location of rtl8152_set_mac_address() and set_ethernet_addr(). Then, the set_ethernet_addr() could set the MAC address by calling rtl8152_set_mac_address() later. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 34 +- 1 file changed, 17

[PATCH net-next 2/2] r8152: use eth_hw_addr_random

2014-09-02 Thread Hayes Wang
If the hw doesn't have a valid MAC address, give a random one and set it to the hw. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 39 --- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152

[PATCH net-next 1/2] r8152: change the location of rtl8152_set_mac_address

2014-09-02 Thread Hayes Wang
Exchange the location of rtl8152_set_mac_address() and set_ethernet_addr(). Then, the set_ethernet_addr() could set the MAC address by calling rtl8152_set_mac_address() later. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 34 +- 1 file changed, 17

[PATCH net-next 0/2] r8152: random MAC address

2014-09-02 Thread Hayes Wang
If the interface has invalid MAC address, it couldn't be used. In order to let it work normally, give a random one. Hayes Wang (2): r8152: change the location of rtl8152_set_mac_address r8152: use eth_hw_addr_random drivers/net/usb/r8152.c | 65

[PATCH net-next 1/2] r8152: change the location of rtl8152_set_mac_address

2014-09-02 Thread Hayes Wang
Exchange the location of rtl8152_set_mac_address() and set_ethernet_addr(). Then, the set_ethernet_addr() could set the MAC address by calling rtl8152_set_mac_address() later. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 34 +- 1

[PATCH net-next 0/2] r8152: random MAC address

2014-09-02 Thread Hayes Wang
If the interface has invalid MAC address, it couldn't be used. In order to let it work normally, give a random one. Hayes Wang (2): r8152: change the location of rtl8152_set_mac_address r8152: use eth_hw_addr_random drivers/net/usb/r8152.c | 65

[PATCH net-next 2/2] r8152: use eth_hw_addr_random

2014-09-02 Thread Hayes Wang
If the hw doesn't have a valid MAC address, give a random one and set it to the hw. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 39 --- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/drivers/net/usb/r8152.c b

[PATCH net-next v2 1/2] r8152: change the location of rtl8152_set_mac_address

2014-09-02 Thread Hayes Wang
Exchange the location of rtl8152_set_mac_address() and set_ethernet_addr(). Then, the set_ethernet_addr() could set the MAC address by calling rtl8152_set_mac_address() later. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 34 +- 1

[PATCH net-next v2 0/2] r8152: random MAC address

2014-09-02 Thread Hayes Wang
If the interface has invalid MAC address, it couldn't be used. In order to let it work normally, give a random one. v2: Use %pM format specifier for printing a MAC address. Hayes Wang (2): r8152: change the location of rtl8152_set_mac_address r8152: use eth_hw_addr_random drivers/net/usb

[PATCH net-next v2 2/2] r8152: use eth_hw_addr_random

2014-09-02 Thread Hayes Wang
If the hw doesn't have a valid MAC address, give a random one and set it to the hw. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 35 --- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/drivers/net/usb/r8152.c b

RE: Regression: Wake up from Suspend to RAM crashes ToshibaSatellitelaptop to black screen

2014-09-01 Thread Hayes Wang
> From: Zhang Rui [mailto:rui.zh...@intel.com] > Sent: Monday, September 01, 2014 4:09 PM [...] > Hi, Hayes, > > We got a regression report complaining that wakeup from Suspend to RAM > crashes, please refer to > https://bugzilla.kernel.org/show_bug.cgi?id=82741 > > and it seems that it is

[PATCH net-next] r8152: rename rx_buf_sz

2014-09-01 Thread Hayes Wang
The variable "rx_buf_sz" is used by both tx and rx buffers. Replace it with "agg_buf_sz". 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/n

[PATCH net-next] r8152: rename rx_buf_sz

2014-09-01 Thread Hayes Wang
The variable rx_buf_sz is used by both tx and rx buffers. Replace it with agg_buf_sz. 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

RE: Regression: Wake up from Suspend to RAM crashes ToshibaSatellitelaptop to black screen

2014-09-01 Thread Hayes Wang
From: Zhang Rui [mailto:rui.zh...@intel.com] Sent: Monday, September 01, 2014 4:09 PM [...] Hi, Hayes, We got a regression report complaining that wakeup from Suspend to RAM crashes, please refer to https://bugzilla.kernel.org/show_bug.cgi?id=82741 and it seems that it is introduced by

RE: [PATCH net-next v2] r8152: reduce the number of Tx

2014-08-31 Thread Hayes Wang
From: David Miller [mailto:da...@davemloft.net] [...] > This driver has a loop that iterates MAX_TX times to initialize both > the RX and TX buffers. > > So if they are not equal, it can't possibly work. Excuse me. I don't find that the "RTL8152_MAX_TX" is used by rx buffer. The rx buffer only

RE: [PATCH net-next v2] r8152: reduce the number of Tx

2014-08-31 Thread Hayes Wang
From: David Miller [mailto:da...@davemloft.net] [...] This driver has a loop that iterates MAX_TX times to initialize both the RX and TX buffers. So if they are not equal, it can't possibly work. Excuse me. I don't find that the RTL8152_MAX_TX is used by rx buffer. The rx buffer only use

[PATCH net-next v2] r8152: reduce the number of Tx

2014-08-27 Thread Hayes Wang
Because the Tx has the features of stopping queue and aggregation, We don't need many tx buffers. Change the tx number from 10 to 4 to reduce the usage of the memory. This could save 16K * 6 bytes memory. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 2 +- 1 file changed, 1 insertion

[PATCH net-next] r8152: reduce the number of Tx

2014-08-27 Thread Hayes Wang
Because the Tx has the features of stopping queue and aggregation, We don't need many tx buffers. Change the tx number from 10 to 4 to reduce the usage of the memory. This could save 16K * 10 bytes memory. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 2 +- 1 file changed, 1 insertion

[PATCH net-next] r8152: reduce the number of Tx

2014-08-27 Thread Hayes Wang
Because the Tx has the features of stopping queue and aggregation, We don't need many tx buffers. Change the tx number from 10 to 4 to reduce the usage of the memory. This could save 16K * 10 bytes memory. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 2 +- 1 file

[PATCH net-next v2] r8152: reduce the number of Tx

2014-08-27 Thread Hayes Wang
Because the Tx has the features of stopping queue and aggregation, We don't need many tx buffers. Change the tx number from 10 to 4 to reduce the usage of the memory. This could save 16K * 6 bytes memory. Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 2 +- 1 file

[PATCH net-next] r8152: replace strncpy with strlcpy

2014-08-25 Thread Hayes Wang
Replace the strncpy with strlcpy, and use sizeof to determine the length. 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 2470d9c..33dcc97 100644 --- a/drivers

[PATCH net-next] r8152: check code with checkpatch.pl

2014-08-25 Thread Hayes Wang
: CHECK: Alignment should match open parenthesis total: 0 errors, 5 warnings, 16 checks, 3567 lines checked Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 66 ++--- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/drivers/net/usb

RE: [PATCH net-next 0/4] r8152: firmware support

2014-08-25 Thread Hayes Wang
From: David Miller [mailto:da...@davemloft.net] [...] > That still doesn't convince me. > > The functions I see you removing are just programming a set of > registers in some way. That is to clear the break point of the firmware. If a firmware exists, you should clear it before updating a new

RE: [PATCH net-next 0/4] r8152: firmware support

2014-08-25 Thread Hayes Wang
From: David Miller [mailto:da...@davemloft.net] [...] That still doesn't convince me. The functions I see you removing are just programming a set of registers in some way. That is to clear the break point of the firmware. If a firmware exists, you should clear it before updating a new one.

[PATCH net-next] r8152: check code with checkpatch.pl

2014-08-25 Thread Hayes Wang
: CHECK: Alignment should match open parenthesis total: 0 errors, 5 warnings, 16 checks, 3567 lines checked Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 66 ++--- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git

[PATCH net-next] r8152: replace strncpy with strlcpy

2014-08-25 Thread Hayes Wang
Replace the strncpy with strlcpy, and use sizeof to determine the length. 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 2470d9c..33dcc97

RE: [PATCH net-next 0/4] r8152: firmware support

2014-08-24 Thread Hayes Wang
From: David Miller [mailto:da...@davemloft.net] [...] > You haven't told us why you need to do this. > > These are just programming registers in the chip, and I see no reason > to not keep these in the driver with real code. > > I'm not applying this series, you haven't explained what is

RE: [PATCH net-next 4/4] r8152: support firmware files

2014-08-24 Thread Hayes Wang
Francois Romieu [mailto:rom...@fr.zoreil.com] [...] > > +static void rtl_request_firmware(struct r8152 *tp) > > +{ > > + char *fw_name = NULL; > > + > > + if (tp->rtl_fw.fw) > > + goto out_request; > > + > > + switch (tp->version) { > > + case RTL_VER_01: > > + fw_name

RE: [PATCH net-next 4/4] r8152: support firmware files

2014-08-24 Thread Hayes Wang
Francois Romieu [mailto:rom...@fr.zoreil.com] [...] +static void rtl_request_firmware(struct r8152 *tp) +{ + char *fw_name = NULL; + + if (tp-rtl_fw.fw) + goto out_request; + + switch (tp-version) { + case RTL_VER_01: + fw_name =

RE: [PATCH net-next 0/4] r8152: firmware support

2014-08-24 Thread Hayes Wang
From: David Miller [mailto:da...@davemloft.net] [...] You haven't told us why you need to do this. These are just programming registers in the chip, and I see no reason to not keep these in the driver with real code. I'm not applying this series, you haven't explained what is happening

RE: [PATCH net-next 3/4] r8152: remove clear_bp function

2014-08-21 Thread Hayes Wang
Sergei Shtylyov [mailto:sergei.shtyl...@cogentembedded.com] [...] > >> Why leave 2 empty lines? One is enough. > > > The next patch would use another fucntion at the > > same location. I skip removing the empty line and > > re-adding it again. Is that better to do so? I would > > resend

<    3   4   5   6   7   8   9   10   11   12   >