* 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.
*
*/
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/init.h>
+#include <linux/jiffies.h>
#include <asm/board.h>
#include <asm/io.h>
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
ret = register_netdev(dev);
if (ret)
goto out_irq;
-
+
oaknet_devs = dev;
return 0;
* 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
* 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;
#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;
}