netdev
[Top] [All Lists]

Re: 2.6.9-rc1-bk11+ and 2.6.9-rc1-mm3,4 r8169: freeze during boot (FIX i

To: Jeff Garzik <jgarzik@xxxxxxxxx>
Subject: Re: 2.6.9-rc1-bk11+ and 2.6.9-rc1-mm3,4 r8169: freeze during boot (FIX included)
From: Francois Romieu <romieu@xxxxxxxxxxxxx>
Date: Mon, 20 Sep 2004 23:15:02 +0200
Cc: Andy Lutomirski <luto@xxxxxxxxxxxxx>, Hans-Frieder Vogt <hfvogt@xxxxxxxx>, Jon Mason <jdmason@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <414F1A8C.10803@xxxxxxxxx>
References: <200409130035.50823.hfvogt@xxxxxxxx> <20040916070211.GA32592@xxxxxxxxxxxxxxxxxxxxxxxxxx> <200409161320.16526.jdmason@xxxxxxxxxxxxxxxxxxxxxxx> <200409171043.21772.jdmason@xxxxxxxxxxxxxxxxxxxxxxx> <20040917160151.GA29337@xxxxxxxxxxxxxxxxxxxxxxxxxx> <414DF773.7060402@xxxxxxxxxxxxx> <20040919213952.GA32570@xxxxxxxxxxxxxxxxxxxxxxxxxx> <414E46F1.9050309@xxxxxxxxx> <20040920071743.GA7115@xxxxxxxxxxxxxxxxxxxxxxxxxx> <414F1A8C.10803@xxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.1i
Jeff Garzik <jgarzik@xxxxxxxxx> :
[...]
> Let me know what happens :)

Nothing conclusive so far.

I applied patch below on my 32bit system on top of current 2.6.9-rc2-mm1 + 
patch issued yesterday + extra hack to force PCI DAC on 32 bit system.
It does not help if I force PCI DAC.
It does not change anything if PCI DAC is not enabled.


diff -puN drivers/net/r8169.c~r8169-145b-4 drivers/net/r8169.c
--- linux-2.6.9-rc2/drivers/net/r8169.c~r8169-145b-4    2004-09-20 
21:39:20.000000000 +0200
+++ linux-2.6.9-rc2-fr/drivers/net/r8169.c      2004-09-20 21:39:20.000000000 
+0200
@@ -1483,6 +1483,11 @@ rtl8169_hw_start(struct net_device *dev)
        void *ioaddr = tp->mmio_addr;
        u32 i;
 
+       RTL_W32(TxDescStartAddrLow, ((u64) tp->TxPhyAddr & DMA_32BIT_MASK));
+       RTL_W32(TxDescStartAddrHigh, ((u64) tp->TxPhyAddr >> 32));
+       RTL_W32(RxDescAddrLow, ((u64) tp->RxPhyAddr & DMA_32BIT_MASK));
+       RTL_W32(RxDescAddrHigh, ((u64) tp->RxPhyAddr >> 32));
+
        /* Soft reset the chip. */
        RTL_W8(ChipCmd, CmdReset);
 
@@ -1494,7 +1499,6 @@ rtl8169_hw_start(struct net_device *dev)
        }
 
        RTL_W8(Cfg9346, Cfg9346_Unlock);
-       RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
        RTL_W8(EarlyTxThres, EarlyTxThld);
 
        // For gigabit rtl8169
@@ -1509,24 +1513,9 @@ rtl8169_hw_start(struct net_device *dev)
        RTL_W32(TxConfig,
                (TX_DMA_BURST << TxDMAShift) | (InterFrameGap <<
                                                TxInterFrameGapShift));
-       tp->cp_cmd |= RTL_R16(CPlusCmd);
-       RTL_W16(CPlusCmd, tp->cp_cmd);
-
-       if (tp->mac_version == RTL_GIGA_MAC_VER_D) {
-               dprintk(KERN_INFO PFX "Set MAC Reg C+CR Offset 0xE0. "
-                       "Bit-3 and bit-14 MUST be 1\n");
-               tp->cp_cmd |= (1 << 14) | PCIMulRW;
-               RTL_W16(CPlusCmd, tp->cp_cmd);
-       }
-
        tp->cur_rx = 0;
 
-       RTL_W32(TxDescStartAddrLow, ((u64) tp->TxPhyAddr & DMA_32BIT_MASK));
-       RTL_W32(TxDescStartAddrHigh, ((u64) tp->TxPhyAddr >> 32));
-       RTL_W32(RxDescAddrLow, ((u64) tp->RxPhyAddr & DMA_32BIT_MASK));
-       RTL_W32(RxDescAddrHigh, ((u64) tp->RxPhyAddr >> 32));
        RTL_W8(Cfg9346, Cfg9346_Lock);
-       udelay(10);
 
        RTL_W32(RxMissed, 0);
 
@@ -1538,6 +1527,17 @@ rtl8169_hw_start(struct net_device *dev)
        /* Enable all known interrupts by setting the interrupt mask. */
        RTL_W16(IntrMask, rtl8169_intr_mask);
 
+       tp->cp_cmd |= RTL_R16(CPlusCmd);
+
+       if (tp->mac_version == RTL_GIGA_MAC_VER_D) {
+               dprintk(KERN_INFO PFX "Set MAC Reg C+CR Offset 0xE0. "
+                       "Bit-3 and bit-14 MUST be 1\n");
+               tp->cp_cmd |= (1 << 14) | PCIMulRW;
+       }
+
+       RTL_W16(CPlusCmd, tp->cp_cmd);
+       RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
+
        netif_start_queue(dev);
 }
 

_

<Prev in Thread] Current Thread [Next in Thread>