linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] r8152: patches about firmware
@ 2014-10-01  5:25 Hayes Wang
  2014-10-01  5:25 ` [PATCH net 1/2] r8152: remove clearing bp Hayes Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hayes Wang @ 2014-10-01  5:25 UTC (permalink / raw)
  To: netdev; +Cc: nic_swsd, linux-kernel, linux-usb, 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 ++----------------------------
 1 file changed, 2 insertions(+), 28 deletions(-)

-- 
1.9.3


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH net 1/2] r8152: remove clearing bp
  2014-10-01  5:25 [PATCH net 0/2] r8152: patches about firmware Hayes Wang
@ 2014-10-01  5:25 ` Hayes Wang
  2014-10-01  5:25 ` [PATCH net 2/2] r8152: disable power cut for RTL8153 Hayes Wang
  2014-10-01 20:47 ` [PATCH net 0/2] r8152: patches about firmware David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Hayes Wang @ 2014-10-01  5:25 UTC (permalink / raw)
  To: netdev; +Cc: nic_swsd, linux-kernel, linux-usb, Hayes Wang

The xxx_clear_bp() is used to halt the firmware. It only necessary
for updating the new firmware. Besides, depend on the version of
the current firmware, it may have problem to halt the firmware
directly. Finally, halt the firmware would let the firmware code
useless, and the bugs which are fixed by the firmware would occur.

Signed-off-by: Hayes Wang <hayeswang@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/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -24,7 +24,7 @@
 #include <net/ip6_checksum.h>
 
 /* Version Information */
-#define DRIVER_VERSION "v1.06.0 (2014/03/03)"
+#define DRIVER_VERSION "v1.06.1 (2014/10/01)"
 #define DRIVER_AUTHOR "Realtek linux nic maintainers <nic_swsd@realtek.com>"
 #define DRIVER_DESC "Realtek RTL8152/RTL8153 Based USB Ethernet Adapters"
 #define MODULENAME "r8152"
@@ -2201,28 +2201,6 @@ static void rtl_phy_reset(struct r8152 *tp)
 	}
 }
 
-static void rtl_clear_bp(struct r8152 *tp)
-{
-	ocp_write_dword(tp, MCU_TYPE_PLA, PLA_BP_0, 0);
-	ocp_write_dword(tp, MCU_TYPE_PLA, PLA_BP_2, 0);
-	ocp_write_dword(tp, MCU_TYPE_PLA, PLA_BP_4, 0);
-	ocp_write_dword(tp, MCU_TYPE_PLA, PLA_BP_6, 0);
-	ocp_write_dword(tp, MCU_TYPE_USB, USB_BP_0, 0);
-	ocp_write_dword(tp, MCU_TYPE_USB, USB_BP_2, 0);
-	ocp_write_dword(tp, MCU_TYPE_USB, USB_BP_4, 0);
-	ocp_write_dword(tp, MCU_TYPE_USB, USB_BP_6, 0);
-	mdelay(3);
-	ocp_write_word(tp, MCU_TYPE_PLA, PLA_BP_BA, 0);
-	ocp_write_word(tp, MCU_TYPE_USB, USB_BP_BA, 0);
-}
-
-static void r8153_clear_bp(struct r8152 *tp)
-{
-	ocp_write_byte(tp, MCU_TYPE_PLA, PLA_BP_EN, 0);
-	ocp_write_byte(tp, MCU_TYPE_USB, USB_BP_EN, 0);
-	rtl_clear_bp(tp);
-}
-
 static void r8153_teredo_off(struct r8152 *tp)
 {
 	u32 ocp_data;
@@ -2265,8 +2243,6 @@ static void r8152b_hw_phy_cfg(struct r8152 *tp)
 		r8152_mdio_write(tp, MII_BMCR, data);
 	}
 
-	rtl_clear_bp(tp);
-
 	set_bit(PHY_RESET, &tp->flags);
 }
 
@@ -2417,8 +2393,6 @@ static void r8153_hw_phy_cfg(struct r8152 *tp)
 		r8152_mdio_write(tp, MII_BMCR, data);
 	}
 
-	r8153_clear_bp(tp);
-
 	if (tp->version == RTL_VER_03) {
 		data = ocp_reg_read(tp, OCP_EEE_CFG);
 		data &= ~CTAP_SHORT_EN;
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH net 2/2] r8152: disable power cut for RTL8153
  2014-10-01  5:25 [PATCH net 0/2] r8152: patches about firmware Hayes Wang
  2014-10-01  5:25 ` [PATCH net 1/2] r8152: remove clearing bp Hayes Wang
@ 2014-10-01  5:25 ` Hayes Wang
  2014-10-01 20:47 ` [PATCH net 0/2] r8152: patches about firmware David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Hayes Wang @ 2014-10-01  5:25 UTC (permalink / raw)
  To: netdev; +Cc: nic_swsd, linux-kernel, linux-usb, Hayes Wang

The firmware would be clear when the power cut is enabled for
RTL8153.

Signed-off-by: Hayes Wang <hayeswang@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
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -3397,7 +3397,7 @@ static void rtl8153_unload(struct r8152 *tp)
 	if (test_bit(RTL8152_UNPLUG, &tp->flags))
 		return;
 
-	r8153_power_cut_en(tp, true);
+	r8153_power_cut_en(tp, false);
 }
 
 static int rtl_ops_init(struct r8152 *tp, const struct usb_device_id *id)
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net 0/2] r8152: patches about firmware
  2014-10-01  5:25 [PATCH net 0/2] r8152: patches about firmware Hayes Wang
  2014-10-01  5:25 ` [PATCH net 1/2] r8152: remove clearing bp Hayes Wang
  2014-10-01  5:25 ` [PATCH net 2/2] r8152: disable power cut for RTL8153 Hayes Wang
@ 2014-10-01 20:47 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2014-10-01 20:47 UTC (permalink / raw)
  To: hayeswang; +Cc: netdev, nic_swsd, linux-kernel, linux-usb

From: Hayes Wang <hayeswang@realtek.com>
Date: Wed, 1 Oct 2014 13:25:09 +0800

> 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.

Series applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-01 20:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-01  5:25 [PATCH net 0/2] r8152: patches about firmware Hayes Wang
2014-10-01  5:25 ` [PATCH net 1/2] r8152: remove clearing bp Hayes Wang
2014-10-01  5:25 ` [PATCH net 2/2] r8152: disable power cut for RTL8153 Hayes Wang
2014-10-01 20:47 ` [PATCH net 0/2] r8152: patches about firmware David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).