Subject: port-i386/3456: problem with the isapnp ep driver, maybe a com.c problem
To: None <gnats-bugs@gnats.netbsd.org, bernd@arresum.inka.de,>
From: Bernd Ernesti <bernd@parresum.inka.de>
List: netbsd-bugs
Date: 04/07/1997 12:55:18
>Number:         3456
>Category:       port-i386
>Synopsis:       problem with the isapnp ep driver, maybe a com.c problem
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr  7 04:05:01 1997
>Last-Modified:
>Originator:     Bernd Ernesti
>Organization:
	
>Release:        NetBSD-current of 07-Apr-97 08:00GMT
>Environment:
	
System: NetBSD parresum 1.2D NetBSD 1.2D (VEEGO) #86: Mon Apr 7 10:56:08 MEST 1997 bernd@parresum:/home/source/obj_i386/src/sys/arch/i386/compile/VEEGO i386


>Description:
	A 3c509b does not work with the ISAPNP driver but works with the
	normal ISA driver.

working kernel before the recent com changes (it has the upcoming elink3 media
changes):

[..]
 isa0 at pcib0
 com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
 com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
 lpt0 at isa0 port 0x378-0x37b irq 7
 sb0 at isa0 port 0x220-0x237 irq 7 drq 1: dsp v4.13
 npx0 at isa0 port 0xf0-0xff: using exception 16
 pc0 at isa0 port 0x60-0x6f irq 1: color 
 fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
 fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
 isapnp0 at isa0 port 0x279: read port 0x20f
 ep0 at isapnp0 port 0x210/16 irq 3
 ep0: 3Com 3C509B EtherLink III
 ep0: MAC address 00:20:af:e6:dc:39
 ep0: 8KB byte-wide FIFO, 1:1 Rx:Tx split, utp/aui/bnc
[..]

working kernel with a isa only ep driver with a current source (it has the
upcoming elink3 media changes):

[..]
 isa0 at pcib0
 ep0 at isa0 port 0x310-0x31f irq 11: 3Com 3C509 Ethernet
 ep0: MAC address 00:20:af:e6:dc:39
 ep0: 8KB byte-wide FIFO, 1:1 Rx:Tx split, utp/aui/bnc, default port: bnc
 com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo  
 com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo  
[..]

broken -current kernel with and without the upcoming elink3 media changes.
This is the output with plain -current source:

[..]
 isa0 at pcib0
 com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo  
 com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo  
 lpt0 at isa0 port 0x378-0x37b irq 7
 sb0 at isa0 port 0x220-0x237 irq 7 drq 1: dsp v4.13
 npx0 at isa0 port 0xf0-0xff: using exception 16
 pc0 at isa0 port 0x60-0x6f irq 1: color
 fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
 fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
 isapnp0 at isa0 port 0x279: read port 0x20f
 ep0 at isapnp0 port 0x210/16 irq 3
 ep0: 3Com 3C509B EtherLink III
 ep0: 8KB byte-wide FIFO, 1:1 Rx:Tx split, MAC address 00:20:af:e6:dc:39 
[..]

I see the outgoing packets from the 3c509 on another machine, but the 3c509
does not see the answer.

I suspect that it don't get the interrupt when it receive a new packet.
I try later an older version of the com.c driver.

This a partly output from a kernel with DEBUG_ISAPNP:

 (isapnp probe): Trying port 203
 (isapnp probe): Trying port 207
 (isapnp probe): Trying port 20b
 isapnp0 at isa0 port 0x279isapnp0: Trying port 203
 isapnp0: Trying port 207
 isapnp0: Trying port 20f
 : read port 0x20f
 PnP version 1.0, Vendor version 1.0
 ANSI Ident: 3Com 3C509B EtherLink III
 Logical device id TCM5094
 Compatible device id PNP80F7
 IRQ's supported: 3 5 7 9 10 11 12 15 E+
 16  IO Ports: 16 address bits, alignment 16 min 0x210, max 0x3e0
 Selecting attachments
 Found 3Com 3C509B EtherLink III TCM5094  config: acceptable 
 16  IO Ports: 16 address bits, alignment 16 min 0x210, max 0x3e0
 IRQ's supported: 3 5 7 9 10 11 12 15 E+
 Register configuration:
 io[0]: 0x210/0
 irq[0]: 3
 ep0 at isapnp0 port 0x210/16 irq 3
 Found 3Com 3C509B EtherLink III TCM5094  config: acceptable  
 16  IO Ports: 16 address bits, alignment 16 min 0x210, max 0x3e0
 IRQ's supported: 3 5 7 9 10 11 12 15 E+
 ep0: 3Com 3C509B EtherLink III
 ep0: MAC address 00:20:af:e6:dc:39
 ep0: 8KB byte-wide FIFO, 1:1 Rx:Tx split, utp/aui/bnc, default port: bnc

There is no way to disable irq3 or irq4 for the 3com.

This is a full demsg output with a isa only ep driver:

NetBSD 1.2D (VEEGO) #86: Mon Apr  7 10:56:08 MEST 1997
    bernd@parresum:/home/source/obj_i386/src/sys/arch/i386/compile/VEEGO
cpu0: family 5 model 2 step c
cpu0: Intel Pentium (P54C) (586-class)
real mem  = 66711552
avail mem = 60338176
using 839 buffers containing 3436544 bytes of memory
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
Intel 82439 (Triton II) TXC Host Bridge (host bridge, revision 0x03) at pci0 dev 0 function 0 not configured
pcib0 at pci0 dev 7 function 0
pcib0: Intel 82371SB (Triton II) PCI-ISA Bridge (rev. 0x01)
Intel 82371SB (Triton II) IDE controller (IDE mass storage, interface 0x80) at pci0 dev 7 function 1 not configured
Matrox MGA Millenium 2064W ("Storm") (VGA display, revision 0x01) at pci0 dev 9 function 0 not configured
ahc0 at pci0 dev 10 function 0
ahc0: interrupting at irq 12
ahc0: aic7880 Single Channel, SCSI Id=7, 16 SCBs
scsibus0 at ahc0 channel 0: 8 targets
ahc0: target 0 synchronous at 10.0MHz, offset = 0xf
sd0 at scsibus0 targ 0 lun 0: <IBM, DORS-32160, WA6A> SCSI2 0/direct fixed
sd0: 2063MB, 6703 cyl, 5 head, 126 sec, 512 bytes/sec
ahc0: target 1 synchronous at 10.0MHz, offset = 0xf
sd1 at scsibus0 targ 1 lun 0: <IBM, DCAS-34330, S60B> SCSI2 0/direct fixed
sd1: 4134MB, 8205 cyl, 6 head, 171 sec, 512 bytes/sec
ahc0: target 2 synchronous at 10.0MHz, offset = 0x8
cd0 at scsibus0 targ 2 lun 0: <TEAC, CD-ROM CD-56S, 1.0D> SCSI2 5/cdrom removable
de0 at pci0 dev 11 function 0 at irq 10
de0: 21140 [10-100Mb/s] pass 1.1
de0: address 00:80:c8:1e:db:a3
isa0 at pcib0
ep0 at isa0 port 0x310-0x31f irq 11: 3Com 3C509 Ethernet
ep0: MAC address 00:20:af:e6:dc:39
ep0: 8KB byte-wide FIFO, 1:1 Rx:Tx split, utp/aui/bnc, default port: bnc
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
lpt0 at isa0 port 0x378-0x37b irq 7
sb0 at isa0 port 0x220-0x237 irq 7 drq 1: dsp v4.13
npx0 at isa0 port 0xf0-0xff: using exception 16
pc0 at isa0 port 0x60-0x6f irq 1: color
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
biomask 1040 netmask 1c40 ttymask 1cc2
boot device: sd1
root on sd1a swap on sd1b
root file system type: ffs

>How-To-Repeat:
	Get a 3c509b and put it into PNP mode.
>Fix:
	unkown
>Audit-Trail:
>Unformatted: