Date: Thu, 21 Dec 1995 11:18:12 +0100 (MET) From: Thomas Graichen <graichen@omega.physik.fu-berlin.de> To: dk+@ua.net Cc: bugs@freebsd.org Subject: Re: i386/906: netboot ca't find NE2000-compat card (DP83905 chip, Dauphin notebook) Message-ID: <199512211018.LAA02275@mordillo> In-Reply-To: <199512202040.WAA03820@snark.ukma.kiev.ua> from "Dmitry Kohmanyuk" at Dec 20, 95 10:40:41 pm
index | next in thread | previous in thread | raw e-mail
this came up some time before - it works if you uncomment the other
types wd etc. - but this is only a hack
t
hasn't Dmitry Kohmanyuk said ? ...
>
>
> >Number: 906
> >Category: i386
> >Synopsis: /sys/i386/boot/netboot/nb8390.com cannot recognize NE2000-comp. card
> >Confidential: no
> >Severity: serious
> >Priority: high
> >Responsible: freebsd-bugs
> >State: open
> >Class: sw-bug
> >Submitter-Id: current-users
> >Arrival-Date: Wed Dec 20 13:00:02 PST 1995
> >Last-Modified:
> >Originator: Dmitry Kohmanyuk
> >Organization:
> FARM Computing Association
> >Release: FreeBSD snark.ukma.kiev.ua 2.0.5-RELEASE
> >Environment:
>
>
> I have Douphin DTR-1 notebook (bought it yesterday).
> It is 486SLC (no coprocessor), has 6 megs of RAM, small HD,
> and built-in Ethernet card.
>
> The documentation claims that the card is NE-2000 compatible,
> based on DP83905 chip from NS, controller is AT/LANTIC,
> connection is TP, RJ-45,
> and it has 8K x 8 static RAM buffer (so, should be fast),
> 256 bit EEPROM (for port/irq/etc setup), 16 byte FIFO.
> Then, doc says: "Mode: I/O Port mode,
> compatible with 8BIT Mode offered by Novell NE2000"
>
> >Description:
>
> I try to setup my notebook to be a diskless FreeBSD workstation
> (I think it should work fine at least in text mode).
>
> I boot bare-bones DOS (F5 on boot), run the supplied "lanon"
> program (it enables the card); the light on hub goes on after that).
> I run the setup/diagnostic program in "packet sniffer" mode and it
> indeed shows all my rwho packets flowing on the wire (and some others, too).
> The setup/diag program, when tests reading NIC regs, says: "8 bit slot found",
> so I assume card should work in 8-bit mode.
>
> I already have 2 diskless PCs running FreeBSD (2.0.5 and 2.1) here.
> Then, I run nb8390.com program (from floppy).
> I know there can be some problems with supplied nb8390.com since it's configured
> to probe for both WD and NE, so I built a custom version which probes only for NE.
>
> the stock version says, "No adapter found". My version (that same file
> which boots 2 other boxes) hangs.
>
> The card is set to port 0x300, irq 5. The boot program is set to port 0x300.
> I have patched source to insert some debug printf's, and found that it
> fails testing for 8-bit card, and hangs when testing for 16-bit card.
> I have read the if_ed.c from 2.0.5 (it seems 2.1 is the same for NE2000s),
> and copied the ed_probe_generic8390() code to test the board. it succeeds!
> This is a relevant piece of code from /sys/i386/boot/netboot/ns8390.c
> (DPRINTF() and DELAY() are mine, as well as long if() followed by goto):
>
> [ the last thing printed is ne-3, so it hangs before ne-3.1 ]
> [ note that bcompare() returns 1 on memory equal, unlike bcmp() ]
>
> [...]
> DPRINTF(("NE*000 card... "));
> eth_bmem = (char *)0; /* No shared memory */
> eth_asic_base = NE_BASE + NE_ASIC_OFFSET;
> eth_nic_base = NE_BASE;
> eth_vendor = VENDOR_NOVELL;
> eth_flags = FLAG_PIO;
> eth_memsize = MEM_16384;
> eth_tx_start = 32;
> c = inb(eth_asic_base + NE_RESET);
> outb(eth_asic_base + NE_RESET, c);
> DELAY(5000);
> inb(0x84);
> outb(eth_nic_base + D8390_P0_COMMAND, D8390_COMMAND_STP |
> D8390_COMMAND_RD2);
> DELAY(5000);
> DPRINTF(("ne-1 "));
> /* dk: test for 8390 chip, from 2.0.5's driver */
> if ((inb(eth_nic_base + D8390_P0_COMMAND) &
> (D8390_COMMAND_RD2 | D8390_COMMAND_TXP |
> D8390_COMMAND_STA | D8390_COMMAND_STP)) !=
> (D8390_COMMAND_RD2 | D8390_COMMAND_STP) ||
> (inb(eth_nic_base + D8390_P0_ISR) & D8390_ISR_RST) != D8390_ISR_RST)
> goto no_novell;
> DPRINTF(("ne-1.2 "));
> outb(eth_nic_base + D8390_P0_RCR, D8390_RCR_MON);
> outb(eth_nic_base + D8390_P0_DCR, D8390_DCR_FT1 | D8390_DCR_LS);
> outb(eth_nic_base + D8390_P0_PSTART, MEM_8192);
> outb(eth_nic_base + D8390_P0_PSTOP, MEM_16384);
> DPRINTF(("ne-2 "));
> eth_pio_write(test, 8192, sizeof(test));
> eth_pio_read(8192, testbuf, sizeof(test));
> if (!bcompare(test, testbuf, sizeof(test))) {
> DPRINTF(("ne-3 "));
> eth_flags |= FLAG_16BIT;
> eth_memsize = MEM_32768;
> eth_tx_start = 64;
> outb(eth_nic_base + D8390_P0_DCR, D8390_DCR_WTS |
> D8390_DCR_FT1 | D8390_DCR_LS);
> outb(eth_nic_base + D8390_P0_PSTART, MEM_16384);
> outb(eth_nic_base + D8390_P0_PSTOP, MEM_32768);
> eth_pio_write(test, 16384, sizeof(test));
> eth_pio_read(16384, testbuf, sizeof(test));
> DPRINTF(("ne-3.1 "));
> if (!bcompare(testbuf, test, sizeof(test))) return (0);
> }
> DPRINTF(("ne-4 "));
> eth_pio_read(0, romdata, 16);
> DPRINTF(("ne-5 "));
> printf("\r\nNE1000/NE2000 base 0x%x, addr ", eth_nic_base);
> [...]
>
> I have tried to enable shared memory mode.
> I have tried to set 64K mode instead of 16K ("Novell-compatible" as setup prog
> says)
>
> I have "CHRDY after BALE high", "IO16 after strobe", "read cycles enhanced",
> "TPI link integrity checking enabled" settings, but I haven't touched them.
>
> I have written down the NIC registers (thanks great diag program
> which comes with board!)
> CR 22
> TSK 83
> ISR 15
> IMR 00
> RSR 11
> RCR 1C
> TCR 00
> DCR 58
> although I doubt this is relevant here.
>
> >How-To-Repeat:
>
> just run the nb8390.com program.
>
> >Fix:
>
> none known ;-(
>
> sorry for this long report, I have tried to provide _ALL_ the info
> which can help.
>
> >Audit-Trail:
> >Unformatted:
>
>
_______________________________________________________||___________________
__||
Perfection is reached, not when there is no __|| thomas graichen
longer anything to add, but when there __|| freie universitaet berlin
is no longer anything to take away __|| fachbereich physik
__||
- Antoine de Saint-Exupery - __|| graichen@mail.physik.fu-berlin.de
___________________________||__________________graichen@FreeBSD.org_________
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512211018.LAA02275>
