Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 9f1122e3cc91315900f36ea9a01e5fff > files > 10

dkms-et131x-1.2.3-2.1mdv2008.0.src.rpm

Fix to sf.net bug at http://sourceforge.net/tracker/index.php?func=detail&aid=1979099&group_id=179406&atid=889023
Also pointed out by Bill Unruh at https://qa.mandriva.com/show_bug.cgi?id=42666

diff -p -up et131x-1.2.3/ET1310_tx.c.orig et131x-1.2.3/ET1310_tx.c
--- et131x-1.2.3/ET1310_tx.c.orig	2008-08-20 17:20:58.000000000 -0300
+++ et131x-1.2.3/ET1310_tx.c	2008-08-20 17:40:18.000000000 -0300
@@ -238,7 +238,8 @@ int et131x_tx_dma_memory_alloc( ET131X_A
                                    &tx_ring->TxDescOffset,
                                    0x0FFF );
 
-    tx_ring->pTxDescRingVa += tx_ring->TxDescOffset;
+    tx_ring->pTxDescRingVa = (void *)( (PUCHAR)tx_ring->pTxDescRingVa +
+                                               tx_ring->TxDescOffset );
 
 
     /**************************************************************************
@@ -306,7 +307,8 @@ void et131x_tx_dma_memory_free( ET131X_A
         /**********************************************************************
            Free memory relating to Tx rings here
          *********************************************************************/
-        adapter->TxRing.pTxDescRingVa -= adapter->TxRing.TxDescOffset;
+        adapter->TxRing.pTxDescRingVa = (void *)( (PUCHAR)adapter->TxRing.pTxDescRingVa -
+                                                          adapter->TxRing.TxDescOffset );
 
         desc_size = ( sizeof( TX_DESC_ENTRY_t ) * NUM_DESC_PER_RING_TX ) + 4096 - 1;