Netboot Mailing List (by thread)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix for ns8390.c probe hang





Further to my problem with failure at probe time of my PCI NE2000 clone
(and silly previous proposal re call to eth_pio_write at line 880 of
ns8390.c), here is a possible fix - hopefully not so silly. Test whether
probing a PCI board and, if so, go immediately into 16 bit mode before
the first memory test, i.e.

*** ns8390.c.orig       Fri Mar 17 07:53:06 2000
--- ns8390.c    Fri Mar 17 07:54:14 2000
***************
*** 877,882 ****
--- 877,885 ----
                        outb(D8390_DCR_FT1 | D8390_DCR_LS, eth_nic_base + D8390_P0_DCR);
                        outb(MEM_8192, eth_nic_base + D8390_P0_PSTART);
                        outb(MEM_16384, eth_nic_base + D8390_P0_PSTOP);
+ #ifdef INCLUDE_NEPCI
+                       eth_flags |= FLAG_16BIT;
+ #endif
                        eth_pio_write(test, 8192, sizeof(test));
                        eth_pio_read(8192, testbuf, sizeof(test));
                        if (!memcmp(test, testbuf, sizeof(test)))

It seems that in the kernel driver (ne2k-pci.c) it is assumed that all
PCI boards operate (at least) in 16 bit mode so the above patch just
makes the same assumption.

I don't know (and can't test) if this may raise problems if a machine has
both PCI and ISA boards installed and an ISA board is 8390 based.

chris


_______________________________________________________________
Chris Willing                      Telephone   (61-2) 9351 3005
VisLab, A28                        Facsimile   (61-2) 9351 1880
University of Sydney            mailto:chris@vislab.usyd.edu.au
NSW 2006 Australia                http://www.vislab.usyd.edu.au

===========================================================================
This Mail was sent to netboot mailing list by:
Christoph Willing <chris@vislab.usyd.edu.au>
To get help about this list, send a mail with 'help' as the only string in
it's body to majordomo@baghira.han.de. If you have problems with this list,
send a mail to netboot-owner@baghira.han.de.



For requests or suggestions regarding this mailing list archive please write to netboot@gkminix.han.de.