fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / net / oaknet.c
index 62167a2..702e3e9 100644 (file)
@@ -9,7 +9,7 @@
  *      on-board the IBM PowerPC "Oak" evaluation board. Adapted from the
  *      various other 8390 drivers written by Donald Becker and Paul Gortmaker.
  *
- *      Additional inspiration from the "tcd8390.c" driver from TiVo, Inc. 
+ *      Additional inspiration from the "tcd8390.c" driver from TiVo, Inc.
  *      and "enetLib.c" from IBM.
  *
  */
@@ -20,6 +20,7 @@
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/init.h>
+#include <linux/jiffies.h>
 
 #include <asm/board.h>
 #include <asm/io.h>
@@ -97,7 +98,7 @@ static int __init oaknet_init(void)
        int ret = -ENOMEM;
        struct net_device *dev;
 #if 0
-       unsigned long ioaddr = OAKNET_IO_BASE; 
+       unsigned long ioaddr = OAKNET_IO_BASE;
 #else
        unsigned long ioaddr = ioremap(OAKNET_IO_BASE, OAKNET_IO_SIZE);
 #endif
@@ -200,7 +201,7 @@ static int __init oaknet_init(void)
        ret = register_netdev(dev);
        if (ret)
                goto out_irq;
-       
+
        oaknet_devs = dev;
        return 0;
 
@@ -446,8 +447,8 @@ oaknet_block_input(struct net_device *dev, int count, struct sk_buff *skb,
  * Input(s):
  *  *dev        - Pointer to the device structure for this driver.
  *   count      - Number of bytes to be transferred.
- *  *buf        - 
- *   start_page - 
+ *  *buf        -
+ *   start_page -
  *
  * Output(s):
  *   N/A
@@ -583,7 +584,7 @@ retry:
         * This was for the ALPHA version only, but enough people have
         * been encountering problems so it is still here.
         */
-       
+
        {
                /* DMA termination address check... */
                int addr, tries = 20;
@@ -606,14 +607,14 @@ retry:
 #endif
 
        while ((ei_ibp(base + EN0_ISR) & ENISR_RDC) == 0) {
-               if (jiffies - start > OAKNET_WAIT) {
+               if (time_after(jiffies, start + OAKNET_WAIT)) {
                        printk("%s: timeout waiting for Tx RDC.\n", dev->name);
                        oaknet_reset_8390(dev);
                        NS8390_init(dev, TRUE);
                        break;
                }
        }
-       
+
        ei_obp(ENISR_RDC, base + EN0_ISR);      /* Ack intr. */
        ei_status.dmaing &= ~0x01;
 }