netdev
[Top] [All Lists]

[patch 2.6.7-rc2 + bk-netdev 3/4] r8169: gcc bug workaround

To: Jeff Garzik <jgarzik@xxxxxxxxx>
Subject: [patch 2.6.7-rc2 + bk-netdev 3/4] r8169: gcc bug workaround
From: Francois Romieu <romieu@xxxxxxxxxxxxx>
Date: Thu, 3 Jun 2004 01:35:11 +0200
Cc: akpm@xxxxxxxx, luto@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20040603013319.A22272@xxxxxxxxxxxxxxxxxxxxxxxxxx>; from romieu@xxxxxxxxxxxxx on Thu, Jun 03, 2004 at 01:33:19AM +0200
References: <200406010922.i519MIr27814@xxxxxxxxxxxxx> <40BE2FAB.1040008@xxxxxxxxx> <20040603013128.D18059@xxxxxxxxxxxxxxxxxxxxxxxxxx> <20040603013319.A22272@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.2.5.1i
Add a temporary variable to workaround gcc 2.95.3 bug.

diff -puN drivers/net/r8169.c~r8169-gcc-killed-me drivers/net/r8169.c
--- linux-2.6.7-rc2/drivers/net/r8169.c~r8169-gcc-killed-me     2004-06-03 
00:15:34.000000000 +0200
+++ linux-2.6.7-rc2-fr/drivers/net/r8169.c      2004-06-03 00:15:34.000000000 
+0200
@@ -1542,6 +1542,7 @@ rtl8169_start_xmit(struct sk_buff *skb, 
 
        if (!(le32_to_cpu(tp->TxDescArray[entry].status) & OWNbit)) {
                dma_addr_t mapping;
+               u32 status;
 
                mapping = pci_map_single(tp->pci_dev, skb->data, len,
                                         PCI_DMA_TODEVICE);
@@ -1549,8 +1550,10 @@ rtl8169_start_xmit(struct sk_buff *skb, 
                tp->Tx_skbuff[entry] = skb;
                tp->TxDescArray[entry].addr = cpu_to_le64(mapping);
 
-               tp->TxDescArray[entry].status = cpu_to_le32(OWNbit | FSbit |
-                       LSbit | len | (EORbit * !((entry + 1) % NUM_TX_DESC)));
+               /* anti gcc 2.95.3 bugware */
+               status = OWNbit | FSbit | LSbit | len |
+                        (EORbit * !((entry + 1) % NUM_TX_DESC));
+               tp->TxDescArray[entry].status = cpu_to_le32(status);
                        
                RTL_W8(TxPoll, 0x40);   //set polling bit
 

_

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