Messages in this thread |  | | | From | "Adam J. Richter" <> | | Date | Mon, 26 Jan 1998 14:28:51 -0800 | | Subject | linux-2.1.81 PATCH for ZNet ethernet driver |
| |
Thanks for some helpful advice by Alan Cox, I gotten the ZNet driver not to cause a kernel panic at initialization. I do not actually have a ZNet ("Z-Note?") card, so I do not know if the driver actually works, but I think this patch is a step in the right direction.
Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 205 adam@yggdrasil.com \ / San Jose, California 95129-1034 +1 408 261-6630 | g g d r a s i l United States of America fax +1 408 261-6631 "Free Software For The Rest Of Us." --------------------------CUT HERE---------------------------------------- *** /tmp/linux-2.1.81.orig/drivers/net/znet.c Mon Nov 3 09:29:31 1997 --- linux/drivers/net/znet.c Sun Jan 25 18:20:24 1998 *************** *** 206,216 **** struct netidblk *netinfo; char *p; /* This code scans the region 0xf0000 to 0xfffff for a "NETIDBLK". */ ! for(p = (char *)0xf0000; p < (char *)0x100000; p++) ! if (*p == 'N' && strncmp(p, "NETIDBLK", 8) == 0) break; ! if (p >= (char *)0x100000) { if (znet_debug > 1) printk(KERN_INFO "No Z-Note ethernet adaptor found.\n"); --- 206,221 ---- struct netidblk *netinfo; char *p; + char *const scan_start = (char*) phys_to_virt(0xf0000); + char *const scan_end = (char*) phys_to_virt(0x100000); /* This code scans the region 0xf0000 to 0xfffff for a "NETIDBLK". */ ! /* WARNING: This code assumes that the range of physical addresses ! being examined is mapped into a single contiguous range of ! virtual addresses. */ ! for(p = scan_start; p < scan_end; p++) ! if (*p == 'N'&& strncmp(p, "NETIDBLK", 8) == 0) break; ! if (p >= scan_end) { if (znet_debug > 1) printk(KERN_INFO "No Z-Note ethernet adaptor found.\n");
|  |