Fssforo wrote:
> Hi guys. I am new to OpenBSD.
> 
> I am trying to transform my Linux gateway + firewall into OpenBSD
> gateway + firewall.
> Currently i've 2 PCI NICs - both Realtek 8139 (correctly recognized by
> OBSD) and 2 ISA NICs - both SMC EtherEZ 8416 (now recognized but not
> working).

8416 cards are about the hardest NICs to work with that are supported on
OpenBSD.  In the mode they need to run on OpenBSD in, they are also
among the hardest to work with on ANY OS.

However, just a few weeks ago, I powered up a system with an 8216 card
in it (very slightly easier than the 8416 card...mostly because they
have a jumper which slams the card to a usable config).  They work fine.

> After some work disabling PnP on both of the ISA NICs, adjusting IRQ
> and IO address, setting BIOS memory to handle ISA instead of PCI/PnP,
> and saving the config changed at UKC, i got them recognized:
> 
> $ dmesg |grep -i smc
> we0 at isa0 port 0x240/32 iomem 0xd0000/8192 irq 15: SMC8416T (16-bit)
> we1 at isa0 port 0x260/32 iomem 0xcc000/8192 irq 5: SMC8416T (16-bit)
>
> but i can't make them work !

That usually means the rest of your hardware is misconfigured.

Machines of your vintage usually have a way to "reserve" IRQs and
(often) memory space for ISA cards.  PCI and PnP are supposed to be able
to allocate this automatically, but ISA cards just plop themselves where
they were set to go, and hope nothing else was there.

IRQ 15 on a machine of this vintage is usually occupied by the second
IDE channel.  IRQ 5 is often used by other ISA cards, notably sound
cards.  That part of your dmesg was snipped off.

> I can set IPs at the ISA NICs, but when i try to communicate with
> other hosts, i get the following error in my logs - or ehile other
> hosts are sending packets.
> 
> we1: length does not match next packet pointer
> we1: len 0000 nlen 1200 start 06 first 07 curr 08 next 00 stop 20
> we1: NIC memory corrupt - invalid packet length 4608
> 
> when i try to ping an IP on the other side of the wire, the packets
> aren't generated correctly (captured with tcpdump) - even the own ISA
> NIC MAC address isn't correct:
> 
> 23:35:09.088037 54:55:55:15:59:75 > 55:55:01:55:45:45, ethertype
> Unknown (0xd545), length 98:
>         0x0000:  1555 5554 0555 5555 5455 5555 5441 4555  .UUT.UUUTUUUTAEU
>         0x0010:  4455 5515 1535 545d 555c 5554 5555 1055  DUU..5T]U\UTUU.U
>         0x0020:  5057 5545 5455 1555 5145 5575 1555 4115  PWUETU.UQEUu.UA.
>         0x0030:  4575 515d 5155 5115 5455 5577 1555 7055  EuQ]QUQ.TUUw.UpU
>         0x0040:  0055 5514 5555 1155 0455 5575 5755 1141  .UU.UU.U.UUuWU.A
>         0x0050:  0555
> 
> and the MAC address of the other interface i am pinging isn't learned
> well. I've to set them statically with "arp" - but network still
> doesn't works.

forcing broken things to give you the numbers you want really isn't
expected to work...

This sounds to me like something is clobbering your NIC's shared RAM
space, which usually means a misconfigure in the machine itself (or the
card isn't configured as you think).

> After A LOT OF browsing, i saw this NetBSD patch:
> 
> http://groups.google.com.br/group/mailing.netbsd.bugs/browse_thread/thread/9cf8e8e6e12cf637/f9337a5e87acb375?lnk=st&q=we.c+freebsd+%22length+does+not+match%22&rnum=1&hl=pt-BR#f9337a5e87acb375

That might be important..IF we were to support Microchannel some day.  I
don't think that's your problem.

> There is a know way / workaround to put these cards working on OpenBSD ?
> 
> Machine: Pentium 200Mhz MMX @ 32Mb RAM
> OS: OpenBSD 3.9
> dmesg:
> 
> OpenBSD 3.9 (GENERIC) #617: Thu Mar  2 02:26:48 MST 2006
>     [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
> cpu0: Intel Pentium/MMX ("GenuineIntel" 586-class) 200 MHz
> cpu0: FPU,V86,DE,PSE,TSC,MSR,MCE,CX8,MMX
> cpu0: F00F bug workaround installed
> real mem  = 33136640 (32360K)
> avail mem = 22138880 (21620K)
> using 430 buffers containing 1761280 bytes (1720K) of memory
> mainbus0 (root)
> bios0 at mainbus0: AT/286+(00) BIOS, date 07/15/95, BIOS32 rev. 0 @ 0xfdb10
> apm0 at bios0: Power Management spec V1.2 (BIOS mgmt disabled)
> apm0: APM power management enable: power management disabled (1)
> apm0: APM engage (device 1): power management disabled (1)
> apm0: AC on, battery charge unknown
> apm0: flags b0102 dobusy 0 doidle 1
> pcibios0 at bios0: rev 2.1 @ 0xf0000/0x10000
> pcibios0: PCI BIOS has 4 Interrupt Routing table entries
> pcibios0: no compatible PCI ICU found
> pcibios0: Warning, unable to fix up PCI interrupt routing
> pcibios0: PCI bus #0 is the last bus
> bios0: ROM list: 0xc0000/0x8000
> cpu0 at mainbus0
> pci0 at mainbus0 bus 0: configuration mode 1 (bios)
> pchb0 at pci0 dev 5 function 0 "Hint Host" rev 0x00
> pcib0 at pci0 dev 5 function 1 "Hint ISA" rev 0x00
> pciide0 at pci0 dev 5 function 2 "Hint EIDE" rev 0x00: no DMA, channel
> 0 wired to compatibility, channel 1 wired to compatibility
> wd0 at pciide0 channel 0 drive 0: <Maxtor 7540 AV>
> wd0: 8-sector PIO, LBA, 515MB, 1055020 sectors
> atapiscsi0 at pciide0 channel 0 drive 1
> scsibus0 at atapiscsi0: 2 targets
> cd0 at scsibus0 targ 0 lun 0: <ATAPI-CD, ROM-DRIVE-56MAX, 56GA> SCSI0
> 5/cdrom removable
> pciide0: channel 1 ignored (not responding; disabled or no drives?)
> vga1 at pci0 dev 9 function 0 "Trident TGUI 9660" rev 0xd3
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> rl0 at pci0 dev 10 function 0 "Realtek 8139" rev 0x10: irq 10, address
> 00:02:2a:d9:d6:ab
> rlphy0 at rl0 phy 0: RTL internal PHY
> rl1 at pci0 dev 11 function 0 "Realtek 8139" rev 0x10: irq 11, address
> 00:30:4f:33:89:02
> rlphy1 at rl1 phy 0: RTL internal PHY
> isa0 at pcib0
> isadma0 at isa0
> pckbc0 at isa0 port 0x60/5
> pckbd0 at pckbc0 (kbd slot)
> pckbc0: using irq 1 for kbd slot
> wskbd0 at pckbd0: console keyboard, using wsdisplay0
> pcppi0 at isa0 port 0x61
> midi0 at pcppi0: <PC speaker>
> spkr0 at pcppi0
> lpt0 at isa0 port 0x378/4 irq 7
> npx0 at isa0 port 0xf0/16: using exception 16
> pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
> fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
> isapnp0 at isa0 port 0x279: read port 0x203
> "SMC EtherEZ (8416), SMC8416, , "

ARGH!  You snipped your dmesg!  Evil!
'specially since I had good reason to believe some interesting stuff was
coming up, and it looks like your cards are coming up with ISAPnP still
turned on.

Recommended course of action:
  1) Go find an old machine with four PCI slots, use it with four PCI
NICs instead.


The "I really want to use THIS machine" Course of action:
  1) Get some easier to support NICs, such as NE2000 compatibles or
3c509 (3c509 is probably the easiest ISA card to set up...hich is much
like discussing least painful ways to chop off your own finger).
  2) Make sure the IRQs are properly reserved in your BIOS.
  3) Install and test one card at a time.


The "I really want to go about this the hardest way, using THIS stuff"
course of action:
  1) Set ONE card to the default OpenBSD settings, they are "better"
than the values you set, plus it will make upgrades later easier.
     we0 at isa? port 0x280 iomem 0xd0000 irq 9
     we1 at isa? port 0x300 iomem 0xcc000 irq 10
  2) Make sure IRQs 9 and 10 are reserved in your BIOS for ISA cards.
  3) Make sure the RAM from cc00:0000 to d3ff:0000 is reserved for ISA
cards (note, not all systems have this option.  The ones that don't may
not grab the upper RAM space, or they may not ever let it go.  Scary)).
  4) Put ONLY THAT ONE card in your machine, get it working.
  5) Remove this NIC.
  6) Configure second NIC to second set of values above, install it, get
it working.
  7) Reinstall first we(4) card, verify both work.
  8) Install PCI NICs.  Note how much easier life would have been if you
had followed my recommended course of action.


Note: this "one card at a time" process is usually what experienced
people do with ISA stuff, doesn't matter what OS.  OpenBSD is actually
much easier than many more "popular" OSs, as the dmesg tells you what is
going on.  Assuming you don't snip the thing (sheesh).

Nick.

Reply via email to