Subject: Cyclades Cyclom 8Y-2 with PLX ID 9050 vs. NetBSD-current
To: NetBSD-current Discussion List <current-users@NetBSD.ORG>
From: Greg A. Woods <>
List: current-users
Date: 09/02/2000 16:23:00
We've been trying to get a Cyclades Cyclom 8Y-2 card to work with
NetBSD.  It shows up as:

	cy0 at pci2 dev 0 function 0: interrupting at irq 9
	cy0: 8 ports

If I've got the cronology right we first tried it on a Mac-G3 where it
just didn't seem to generate any interrupts.  Then we tried it on a
Mac-G4 where it mostly worked but would lock up under load during
loop-back tests (with several hundred interrupts per second according to
sysstat), sometimes eventually recovering and sometimes needing a
reboot; and it would lose characters during operations (eg. when sending
a fax to a fax modem).

We're now trying to get it working on a P-III class machine.  Again it
didn't seem to be generating any interrupts.  Examining the FreeBSD
driver revealed that for the PLX ID of 9050 [0x0b] their driver was
doing the equivalent of the following in the cy_attach() routine:

	bus_space_write_2(iot, ioh, CY_PCI_INTENA_9050,
	    bus_space_read_2(iot, ioh, CY_PCI_INTENA_9050) | 0x41);

whereas the NetBSD driver does:

	bus_space_write_2(iot, ioh, CY_PCI_INTENA_9050,
	    bus_space_read_2(iot, ioh, CY_PCI_INTENA_9050) | 0x40);

The FreeBSD driver calls the '0x01' bit CY_PLX_9050_ICS_LOCAL_IENABLE
(and the 0x40 flag is CY_PLX_9050_ICS_IENABLE).

Note also that for the PLX 9060 and PLX 9080 cases the NetBSD driver
uses the magic value 0x900, which is according to FreeBSD the same as
their pair of flags:


Since these are suspiciously similar looking to the PLX 9050 case, we
added the 0x01 flag to the NetBSD driver and the machine promptly hung
right after it printed "biomask fd45 netmask fd65 ttymask ffe7".  Adding
a debug printf() to the top of the cyintr() routine shows that the hang
is due to an endless series of interrupts -- or at least an endless loop
calling cyintr().

I've tried to compare how the FreeBSD cyintr() routine works with
NetBSD's, but the differences are far too great for me to understand
what it might be doing differently that might allow it to work -- it
more or less seems to handle all of the details differently!  Note that
we've not yet tried booting FreeBSD on this latest machine to see if it
does indeed work or not -- we may have to, though we may also resort to
buying a pair of Lava Quattro cards and hope that they work.

If anyone has any clues as to what might be wrong I'd appreciate hearing
from you.  If anyone has a matching card that's working please speak up
too!  Thanks!

							Greg A. Woods

+1 416 218-0098      VE3TCP      <>      <robohack!woods>
Planix, Inc. <>; Secrets of the Weird <>