Commit bf473457 authored by Martin H. VanLeeuwen's avatar Martin H. VanLeeuwen Committed by Linus Torvalds

[PATCH] 2.5.56, ne2k compiles and works

This patch makes the ne.c compile and ISA pnp ne2k work after
changes in 2.5.54 for PNP broke it.

 a. use pnp_dev instead of pci_dev
 b. convert to appropriate pnp_*()'s
 c. check -1 instead of 0 for invalid IRQ
parent 8d252906
...@@ -196,23 +196,21 @@ static int __init ne_probe_isapnp(struct net_device *dev) ...@@ -196,23 +196,21 @@ static int __init ne_probe_isapnp(struct net_device *dev)
int i; int i;
for (i = 0; isapnp_clone_list[i].vendor != 0; i++) { for (i = 0; isapnp_clone_list[i].vendor != 0; i++) {
struct pci_dev *idev = NULL; struct pnp_dev *idev = NULL;
while ((idev = isapnp_find_dev(NULL, while ((idev = pnp_find_dev(NULL,
isapnp_clone_list[i].vendor, isapnp_clone_list[i].vendor,
isapnp_clone_list[i].function, isapnp_clone_list[i].function,
idev))) { idev))) {
/* Avoid already found cards from previous calls */ /* Avoid already found cards from previous calls */
if (idev->prepare(idev)) if (pnp_activate_dev(idev, NULL))
continue;
if (idev->activate(idev))
continue; continue;
/* if no irq, search for next */ /* if no irq, search for next */
if (idev->irq_resource[0].start == 0) if (pnp_irq(idev, 0) == -1)
continue; continue;
/* found it */ /* found it */
dev->base_addr = idev->resource[0].start; dev->base_addr = pnp_port_start(idev, 0);
dev->irq = idev->irq_resource[0].start; dev->irq = pnp_irq(idev, 0);
printk(KERN_INFO "ne.c: ISAPnP reports %s at i/o %#lx, irq %d.\n", printk(KERN_INFO "ne.c: ISAPnP reports %s at i/o %#lx, irq %d.\n",
(char *) isapnp_clone_list[i].driver_data, (char *) isapnp_clone_list[i].driver_data,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment