Date: Thu, 4 May 95 00:35 CDT From: steve@simon.chi.il.us (Steven E. Piette) To: bens@jhbs.com.au Cc: questions@FreeBSD.org Subject: Re: SMC8416T patches to 2.0R Message-ID: <m0s6tZe-000NAyC@simon.chi.il.us>
next in thread | raw e-mail | index | archive | help
> From jhbs.com.au!bens Wed May 3 01:41:27 1995 > Date: Wed, 3 May 1995 09:06:28 +1000 (EET) > From: Ben Seaman MIS <bens@jhbs.com.au> > To: "Steven E. Piette" <steve@simon.chi.il.us> > Subject: Re: SMC8416T > > Thanks Steve, we can't go to -current here because we have a controlled > production environment. Can you send the patches over to me and some > instructions on how to apply them. > > On Tue, 2 May > 1995, Steven E. Piette wrote: > > > > > > Date: Tue, 18 Apr 1995 18:14:41 +1000 (EET) > > > From: Ben Seaman MIS <bens@jhbs.com.au> > > > To: questions FreeBSD <questions@FreeBSD.org> > > > Subject: SMC8416T > > > > > > > > > Hi, > > > > > > I have been trying to configure some SMC Elite cards which I am told are > > > type 8416T (thats whats written on the card). The SMC guy told me that > > > these cards are compatible with the 8216T, but only use 8K memory-mapped > > > I/O rather than the 16K used by the 8216. This is a problem on my FreeBSD2.0 > > > system as the driver thinks they are "SMC8216T" and sets memsize = 16k. > > > When the driver initialises i/o memory it fails at the 8k point. Is there > > > any support for the SMC8416T in one of the later SNAPs, or does anyone > > > out there have an update for if_ed.c to support this card? > > > > > > regards, > > > Ben > > > > I hope someone has gotten back to you before this... > > > > There is support for the SMC EtherEZ card in -current and I have patches > > to 2.0R to add support as well. Email me if you need them. > > > > Steve > > > Ben > Here's the patches to be applied to the files in /usr/src/sys/i386/isa. The easiest way to apply them is to cd there and then feed each one to patch (patch -p <this mail message). Once the patches are applied you'll need to rebuild a kernel and install it before the driver will work. If you haven't done this before just cd /usr/src/sys/i386/conf. type config GENERIC or whatever kernel your running. (you can find this out from the command uname -v) then cd to /usr/src/sys/compile/GENERIC (use the same name as above) make and then make install once it's finished you can reboot. Make sure that you have configured the SMC 8416 card under DOS to io address 0x280, the interrupt to 5, io mem address to 0xd8000, set the network interface to what your using or auto select, and disable Plug and Play. I hope this helps, here's the differences from the 2.0R source base. *** if_edreg.h.20R Thu Aug 4 12:42:35 1994 --- if_edreg.h Sat Jan 21 13:23:31 1995 *************** *** 705,710 **** --- 705,729 ---- #define ED_WD790_ICR_EIL 0x01 /* enable interrupts */ /* + * REV/IOPA Revision / I/O Pipe register for the 83C79X + */ + #define ED_WD790_REV 7 + + #define ED_WD790 0x20 + #define ED_WD795 0x40 + + /* + * 79X RAM Address Register (RAR) + * Enabled with SWH bit=1 in HWR register + */ + #define ED_WD790_RAR 0x0b + + #define ED_WD790_RAR_SZ8 0x00 /* 8k memory buffer */ + #define ED_WD790_RAR_SZ16 0x10 /* 16k memory buffer */ + #define ED_WD790_RAR_SZ32 0x20 /* 32k memory buffer */ + #define ED_WD790_RAR_SZ64 0x30 /* 64k memory buffer */ + + /* * General Control Register (GCR) * Enabled with SWH bit=1 in HWR register */ *************** *** 714,719 **** --- 733,739 ---- #define ED_WD790_GCR_IR1 0x08 /* bit 1 of encoded IRQ */ #define ED_WD790_GCR_ZWSEN 0x20 /* zero wait state enable */ #define ED_WD790_GCR_IR2 0x40 /* bit 2 of encoded IRQ */ + #define ED_WD790_GCR_LIT 0x01 /* Link Integrity Test Enable */ /* * The three bits of the encoded IRQ are decoded as follows: * *** if_ed.c.20R Thu Nov 17 08:42:27 1994 --- if_ed.c Sat Jan 21 13:19:21 1995 *************** *** 408,413 **** --- 408,437 ---- isa16bit = 0; memsize = 8192; } + + + if (sc->is790) { + outb(sc->asic_addr + ED_WD790_HWR, + inb(sc->asic_addr + ED_WD790_HWR) | ED_WD790_HWR_SWH); + + switch (inb(sc->asic_addr + ED_WD790_RAR) & ED_WD790_RAR_SZ64) { + case ED_WD790_RAR_SZ64: + memsize = 65536; + break; + case ED_WD790_RAR_SZ32: + memsize = 32768; + break; + case ED_WD790_RAR_SZ16: + memsize = 16384; + break; + case ED_WD790_RAR_SZ8: + memsize = 8192; + break; + } + outb(sc->asic_addr + ED_WD790_HWR, + inb(sc->asic_addr + ED_WD790_HWR) & ~ED_WD790_HWR_SWH); + } + #if ED_DEBUG printf("type = %x type_str=%s isa16bit=%d memsize=%d id_msize=%d\n", sc->type, sc->type_str, isa16bit, memsize, isa_dev->id_msize); *************** *** 546,556 **** sc->cr_proto = ED_CR_RD2; } else { outb(sc->asic_addr + ED_WD_MSR, ED_WD_MSR_MENB); ! outb(sc->asic_addr + 0x04, (inb(sc->asic_addr + 0x04) | 0x80)); ! outb(sc->asic_addr + 0x0b, ((kvtop(sc->mem_start) >> 13) & 0x0f) | ((kvtop(sc->mem_start) >> 11) & 0x40) | ! (inb(sc->asic_addr + 0x0b) & 0xb0)); ! outb(sc->asic_addr + 0x04, (inb(sc->asic_addr + 0x04) & ~0x80)); sc->cr_proto = 0; } --- 570,580 ---- sc->cr_proto = ED_CR_RD2; } else { outb(sc->asic_addr + ED_WD_MSR, ED_WD_MSR_MENB); ! outb(sc->asic_addr + ED_WD790_HWR, (inb(sc->asic_addr + ED_WD790_HWR) | ED_WD790_HWR_SWH)); ! outb(sc->asic_addr + ED_WD790_RAR, ((kvtop(sc->mem_start) >> 13) & 0x0f) | ((kvtop(sc->mem_start) >> 11) & 0x40) | ! (inb(sc->asic_addr + ED_WD790_RAR) & 0xb0)); ! outb(sc->asic_addr + ED_WD790_HWR, (inb(sc->asic_addr + ED_WD790_HWR) & ~ED_WD790_HWR_SWH)); sc->cr_proto = 0; } Steve Piette Applied Computer Technology steve@simon.chi.il.US. 7N852 Phar Lap Drive (708) 513-6920 St. Charles, IL 60175-6868 -------------------------------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0s6tZe-000NAyC>