patch-2.4.0-test8 linux/drivers/net/epic100.c
Next file: linux/drivers/net/natsemi.c
Previous file: linux/drivers/net/defxx.h
Back to the patch index
Back to the overall index
- Lines: 64
- Date:
Fri Sep 8 12:34:55 2000
- Orig file:
v2.4.0-test7/linux/drivers/net/epic100.c
- Orig date:
Wed Aug 23 18:36:38 2000
diff -u --recursive --new-file v2.4.0-test7/linux/drivers/net/epic100.c linux/drivers/net/epic100.c
@@ -33,6 +33,10 @@
LK1.1.4 (jgarzik):
* Merge becker test version 1.09 (5/29/2000)
+ LK1.1.5 (jgarzik):
+ * Fix locking
+ * Limit 83c175 probe to ethernet-class PCI devices
+
*/
/* These identify the driver base version and may not be removed. */
@@ -41,7 +45,7 @@
static const char version2[] =
" http://www.scyld.com/network/epic100.html\n";
static const char version3[] =
-" (unofficial 2.4.x kernel port, version 1.1.4, August 10, 2000)\n";
+" (unofficial 2.4.x kernel port, version 1.1.5, September 7, 2000)\n";
/* The user-configurable values.
These may be modified when a driver module is loaded.*/
@@ -199,7 +203,8 @@
static struct pci_device_id epic_pci_tbl[] __devinitdata = {
{ 0x10B8, 0x0005, 0x1092, 0x0AB4, 0, 0, SMSC_83C170_0 },
{ 0x10B8, 0x0005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, SMSC_83C170 },
- { 0x10B8, 0x0006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, SMSC_83C175 },
+ { 0x10B8, 0x0006, PCI_ANY_ID, PCI_ANY_ID,
+ PCI_CLASS_NETWORK_ETHERNET << 8, 0xffff00, SMSC_83C175 },
{ 0,}
};
MODULE_DEVICE_TABLE (pci, epic_pci_tbl);
@@ -401,6 +406,12 @@
dev->base_addr = ioaddr;
dev->irq = pdev->irq;
+
+ ep = dev->priv;
+ ep->pci_dev = pdev;
+ ep->chip_flags = ci->drv_flags;
+ spin_lock_init (&ep->lock);
+
printk(KERN_INFO "%s: %s at %#lx, IRQ %d, ",
dev->name, ci->name, ioaddr, dev->irq);
@@ -430,10 +441,6 @@
i % 16 == 15 ? "\n" : "");
}
- ep = dev->priv;
- ep->pci_dev = pdev;
- ep->chip_flags = ci->drv_flags;
-
/* Find the connected MII xcvrs.
Doing this in open() would allow detecting external xcvrs later, but
takes much time and no cards have external MII. */
@@ -936,8 +943,7 @@
long ioaddr = dev->base_addr;
int status, boguscnt = max_interrupt_work;
- if (!spin_trylock(&ep->lock))
- return;
+ spin_lock(&ep->lock);
do {
status = inl(ioaddr + INTSTAT);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)