* [PATCH net 1/1] 8139cp: revert "set ring address before enabling receiver"
@ 2012-11-21 20:07 Francois Romieu
2012-11-22 3:44 ` Jeff Garzik
2012-11-23 19:01 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Francois Romieu @ 2012-11-21 20:07 UTC (permalink / raw)
To: David Miller; +Cc: netdev, David Woodhouse, Jason Wang, Jeff Garzik, gilboad
This patch reverts b01af4579ec41f48e9b9c774e70bd6474ad210db.
The original patch was tested with emulated hardware. Real
hardware chokes.
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=47041
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
---
drivers/net/ethernet/realtek/8139cp.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
index 1c81825..b01f83a 100644
--- a/drivers/net/ethernet/realtek/8139cp.c
+++ b/drivers/net/ethernet/realtek/8139cp.c
@@ -979,17 +979,6 @@ static void cp_init_hw (struct cp_private *cp)
cpw32_f (MAC0 + 0, le32_to_cpu (*(__le32 *) (dev->dev_addr + 0)));
cpw32_f (MAC0 + 4, le32_to_cpu (*(__le32 *) (dev->dev_addr + 4)));
- cpw32_f(HiTxRingAddr, 0);
- cpw32_f(HiTxRingAddr + 4, 0);
-
- ring_dma = cp->ring_dma;
- cpw32_f(RxRingAddr, ring_dma & 0xffffffff);
- cpw32_f(RxRingAddr + 4, (ring_dma >> 16) >> 16);
-
- ring_dma += sizeof(struct cp_desc) * CP_RX_RING_SIZE;
- cpw32_f(TxRingAddr, ring_dma & 0xffffffff);
- cpw32_f(TxRingAddr + 4, (ring_dma >> 16) >> 16);
-
cp_start_hw(cp);
cpw8(TxThresh, 0x06); /* XXX convert magic num to a constant */
@@ -1003,6 +992,17 @@ static void cp_init_hw (struct cp_private *cp)
cpw8(Config5, cpr8(Config5) & PMEStatus);
+ cpw32_f(HiTxRingAddr, 0);
+ cpw32_f(HiTxRingAddr + 4, 0);
+
+ ring_dma = cp->ring_dma;
+ cpw32_f(RxRingAddr, ring_dma & 0xffffffff);
+ cpw32_f(RxRingAddr + 4, (ring_dma >> 16) >> 16);
+
+ ring_dma += sizeof(struct cp_desc) * CP_RX_RING_SIZE;
+ cpw32_f(TxRingAddr, ring_dma & 0xffffffff);
+ cpw32_f(TxRingAddr + 4, (ring_dma >> 16) >> 16);
+
cpw16(MultiIntr, 0);
cpw8_f(Cfg9346, Cfg9346_Lock);
--
1.7.11.7
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net 1/1] 8139cp: revert "set ring address before enabling receiver"
2012-11-21 20:07 [PATCH net 1/1] 8139cp: revert "set ring address before enabling receiver" Francois Romieu
@ 2012-11-22 3:44 ` Jeff Garzik
2012-11-22 4:39 ` David Miller
2012-11-23 19:01 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Jeff Garzik @ 2012-11-22 3:44 UTC (permalink / raw)
To: Francois Romieu
Cc: David Miller, netdev, David Woodhouse, Jason Wang, gilboad
On 11/21/2012 03:07 PM, Francois Romieu wrote:
> This patch reverts b01af4579ec41f48e9b9c774e70bd6474ad210db.
>
> The original patch was tested with emulated hardware. Real
> hardware chokes.
>
> Fixes https://bugzilla.kernel.org/show_bug.cgi?id=47041
>
> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net 1/1] 8139cp: revert "set ring address before enabling receiver"
2012-11-22 3:44 ` Jeff Garzik
@ 2012-11-22 4:39 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2012-11-22 4:39 UTC (permalink / raw)
To: jgarzik; +Cc: romieu, netdev, dwmw2, jasowang, gilboad
From: Jeff Garzik <jgarzik@pobox.com>
Date: Wed, 21 Nov 2012 22:44:02 -0500
> On 11/21/2012 03:07 PM, Francois Romieu wrote:
>> This patch reverts b01af4579ec41f48e9b9c774e70bd6474ad210db.
>>
>> The original patch was tested with emulated hardware. Real
>> hardware chokes.
>>
>> Fixes https://bugzilla.kernel.org/show_bug.cgi?id=47041
>>
>> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
>
> Acked-by: Jeff Garzik <jgarzik@redhat.com>
I'm definitely not applying the revert, because it hurts the largest
user of this driver, which is the virtual hardware.
David Woodhouse's patch is the only reasonable way forward at this
point, so I'd apprecite it if you'd give his patch a review too.
Thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net 1/1] 8139cp: revert "set ring address before enabling receiver"
2012-11-21 20:07 [PATCH net 1/1] 8139cp: revert "set ring address before enabling receiver" Francois Romieu
2012-11-22 3:44 ` Jeff Garzik
@ 2012-11-23 19:01 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2012-11-23 19:01 UTC (permalink / raw)
To: romieu; +Cc: netdev, dwmw2, jasowang, jgarzik, gilboad
From: Francois Romieu <romieu@fr.zoreil.com>
Date: Wed, 21 Nov 2012 21:07:29 +0100
> This patch reverts b01af4579ec41f48e9b9c774e70bd6474ad210db.
>
> The original patch was tested with emulated hardware. Real
> hardware chokes.
>
> Fixes https://bugzilla.kernel.org/show_bug.cgi?id=47041
>
> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
I leiu of a response from the realtec folks, I'm applying this
for now.
What I'll do, the next time I merge net into net-next, is revert
this revert and apply Dave's patch.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-23 19:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-21 20:07 [PATCH net 1/1] 8139cp: revert "set ring address before enabling receiver" Francois Romieu
2012-11-22 3:44 ` Jeff Garzik
2012-11-22 4:39 ` David Miller
2012-11-23 19:01 ` 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).