MODULE_AUTHOR("Jeff Garzik <jgarzik@pobox.com>");
MODULE_DESCRIPTION("Intel/Digital 21040/1 series PCI Ethernet driver");
MODULE_LICENSE("GPL");
+MODULE_VERSION(DRV_VERSION);
static int debug = -1;
-MODULE_PARM (debug, "i");
+module_param (debug, int, 0);
MODULE_PARM_DESC (debug, "de2104x bitmapped message enable number");
/* Set the copy breakpoint for the copy-only-tiny-buffer Rx structure. */
#else
static int rx_copybreak = 100;
#endif
-MODULE_PARM (rx_copybreak, "i");
+module_param (rx_copybreak, int, 0);
MODULE_PARM_DESC (rx_copybreak, "de2104x Breakpoint at which Rx packets are copied");
#define PFX DRV_NAME ": "
unsigned tx_tail;
unsigned rx_tail;
- void *regs;
+ void __iomem *regs;
struct net_device *dev;
spinlock_t lock;
static u16 t21041_csr15[] = { 0x0008, 0x0006, 0x000E, 0x0008, 0x0008, };
-static inline unsigned long
-msec_to_jiffies(unsigned long ms)
-{
- return (((ms)*HZ+999)/1000);
-}
-
-
#define dr32(reg) readl(de->regs + (reg))
#define dw32(reg,val) writel((val), de->regs + (reg))
pci_write_config_dword(de->pdev, PCIPM, pmctl);
/* de4x5.c delays, so we do too */
- current->state = TASK_UNINTERRUPTIBLE;
- schedule_timeout(msec_to_jiffies(10));
+ msleep(10);
}
}
value = dr32(ROMCmd);
while (value < 0 && --boguscnt > 0);
de->dev->dev_addr[i] = value;
+ udelay(1);
if (boguscnt <= 0)
printk(KERN_WARNING PFX "timeout reading 21040 MAC address byte %u\n", i);
}
}
/* Note: this routine returns extra data bits for size detection. */
-static unsigned __init tulip_read_eeprom(void *regs, int location, int addr_len)
+static unsigned __init tulip_read_eeprom(void __iomem *regs, int location, int addr_len)
{
int i;
unsigned retval = 0;
- void *ee_addr = regs + ROMCmd;
+ void __iomem *ee_addr = regs + ROMCmd;
int read_cmd = location | (EE_READ_CMD << addr_len);
writel(EE_ENB & ~EE_CS, ee_addr);
struct net_device *dev;
struct de_private *de;
int rc;
- void *regs;
+ void __iomem *regs;
long pciaddr;
static int board_idx = -1;
dev->tx_timeout = de_tx_timeout;
dev->watchdog_timeo = TX_TIMEOUT;
- dev->irq = pdev->irq;
-
de = dev->priv;
de->de21040 = ent->driver_data == 0 ? 1 : 0;
de->pdev = pdev;
goto err_out_res;
}
+ dev->irq = pdev->irq;
+
/* obtain and check validity of PCI I/O address */
pciaddr = pci_resource_start(pdev, 1);
if (!pciaddr) {