We had problems getting a Contemporary Controls PCI22 Arcnet Device to
work. In the case of compilation as modules check_region returned "already
in use" and in neither case the driver worked (arc0 never showed up).
We did some source code reading and came up with the changes below. The
first change (com20020.c) was to test the return value of request_region
properly, and this routine returns 0 on failure. The second change is to
leave out the check_region call in the pci version (com20020-pci.c). Here
we still do not know why this does not work. Some enlightenment from
others would be fine.
Please use and test with care, as usual :)
--- ./linux-2.4.4/drivers/net/arcnet/com20020.c Tue Feb 13 22:15:05 2001
+++ ./linux-2.4.4-updated/drivers/net/arcnet/com20020.c Wed May 9
13:55:38 2001
@@ -202,7 +202,7 @@
return -ENODEV;
}
/* reserve the I/O region */
- if (request_region(ioaddr, ARCNET_TOTAL_SIZE, "arcnet (COM20020)")) {
+ if (!request_region(ioaddr, ARCNET_TOTAL_SIZE, "arcnet (COM20020)")) {
free_irq(dev->irq, dev);
return -EBUSY;
}
--- ./linux-2.4.4/drivers/net/arcnet/com20020-pci.c Wed Apr 18
23:40:05 2001
+++ ./linux-2.4.4-updated/drivers/net/arcnet/com20020-pci.c Wed May 9
13:55:11 2001
@@ -97,12 +97,15 @@
lp->timeout = timeout;
lp->hw.open_close_ll = com20020pci_open_close;
+ /*
if (check_region(ioaddr, ARCNET_TOTAL_SIZE)) {
BUGMSG(D_INIT, "IO region %xh-%xh already allocated.\n",
ioaddr, ioaddr + ARCNET_TOTAL_SIZE - 1);
err = -EBUSY;
goto out_priv;
}
+ */
+
if (ASTATUS() == 0xFF) {
BUGMSG(D_NORMAL, "IO address %Xh was reported by PCI BIOS, "
"but seems empty!\n", ioaddr);
Roman
-- Roman Fietze (Mail Code 6) roman.fietze@de.heidelberg.com Heidelberg Digital Finishing GmbH, Germany DDF-T SWEC ESW
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/