Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.4.1 /drivers/net/eepro100.c

Filename:/drivers/net/eepro100.c
Lines Added:9
Lines Deleted:6
Also changed in: (Previous) 2.4.1-pre12  2.4.1-pre11  2.4.0-ac12  2.4.0-ac11  2.4.0-ac10  2.4.0-ac9 
(Following) 2.4.1-ac1  2.4.1-ac2  2.4.1-ac3  2.4.1-ac4  2.4.1-ac5  2.4.1-ac6 

Location
[  2.4.1
  [  drivers
    [  net
       o  eepro100.c

Patch

diff -u --recursive --new-file v2.4.0/linux/drivers/net/eepro100.c linux/drivers/net/eepro100.c
--- v2.4.0/linux/drivers/net/eepro100.c   Mon Nov 27 17:58:32 2000
+++ linux/drivers/net/eepro100.c   Sat Jan 27 10:40:14 2001
@@ -29,7 +29,7 @@
 
 static const char *version =
 "eepro100.c:v1.09j-t 9/29/99 Donald Becker http://cesdis.gsfc.nasa.gov/linux/drivers/eepro100.html\n"
-"eepro100.c: $Revision: 1.35 $ 2000/11/17 Modified by Andrey V. Savochkin <saw@saw.sw.com.sg> and others\n";
+"eepro100.c: $Revision: 1.36 $ 2000/11/17 Modified by Andrey V. Savochkin <saw@saw.sw.com.sg> and others\n";
 
 /* A few user-configurable values that apply to all boards.
    First set is undocumented and spelled per Intel recommendations. */
@@ -698,6 +698,7 @@
       This takes less than 10usec and will easily finish before the next
       action. */
    outl(PortReset, ioaddr + SCBPort);
+   inl(ioaddr + SCBPort);
    udelay(10);
 
    if (eeprom[3] & 0x0100)
@@ -785,6 +786,7 @@
 #endif  /* kernel_bloat */
 
    outl(PortReset, ioaddr + SCBPort);
+   inl(ioaddr + SCBPort);
    udelay(10);
 
    /* Return the chip to its original power state. */
@@ -801,7 +803,7 @@
    sp->tx_ring = tx_ring_space;
    sp->tx_ring_dma = tx_ring_dma;
    sp->lstats = (struct speedo_stats *)(sp->tx_ring + TX_RING_SIZE);
-   sp->lstats_dma = cpu_to_le32(TX_RING_ELEM_DMA(sp, TX_RING_SIZE));
+   sp->lstats_dma = TX_RING_ELEM_DMA(sp, TX_RING_SIZE);
    init_timer(&sp->timer); /* used in ioctl() */
 
    sp->full_duplex = option >= 0 && (option & 0x10) ? 1 : 0;
@@ -1002,7 +1004,9 @@
    /* Set the segment registers to '0'. */
    wait_for_cmd_done(ioaddr + SCBCmd);
    outl(0, ioaddr + SCBPointer);
-   inl(ioaddr + SCBPointer); /* XXX */
+   /* impose a delay to avoid a bug */
+   inl(ioaddr + SCBPointer);
+   udelay(10);
    outb(RxAddrLoad, ioaddr + SCBCmd);
    wait_for_cmd_done(ioaddr + SCBCmd);
    outb(CUCmdBase, ioaddr + SCBCmd);
@@ -1010,7 +1014,6 @@
    /* Load the statistics block and rx ring addresses. */
    wait_for_cmd_done(ioaddr + SCBCmd);
    outl(sp->lstats_dma, ioaddr + SCBPointer);
-   inl(ioaddr + SCBPointer); /* XXX */
    outb(CUStatsAddr, ioaddr + SCBCmd);
    sp->lstats->done_marker = 0;
 
@@ -1045,7 +1048,7 @@
 
    /* Start the chip's Tx process and unmask interrupts. */
    wait_for_cmd_done(ioaddr + SCBCmd);
-   outl(cpu_to_le32(TX_RING_ELEM_DMA(sp, sp->dirty_tx % TX_RING_SIZE)),
+   outl(TX_RING_ELEM_DMA(sp, sp->dirty_tx % TX_RING_SIZE),
        ioaddr + SCBPointer);
    /* We are not ACK-ing FCP and ER in the interrupt handler yet so they should
       remain masked --Dragan */
@@ -1274,7 +1277,7 @@
       /* Only the command unit has stopped. */
       printk(KERN_WARNING "%s: Trying to restart the transmitter...\n",
             dev->name);
-      outl(cpu_to_le32(TX_RING_ELEM_DMA(sp, dirty_tx % TX_RING_SIZE])),
+      outl(TX_RING_ELEM_DMA(sp, dirty_tx % TX_RING_SIZE]),
           ioaddr + SCBPointer);
       outw(CUStart, ioaddr + SCBCmd);
       reset_mii(dev);


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.