Subject: Re: Cyclades-8Y on macppc G3/G4
To: None <tech-kern@netbsd.org>
From: Andreas Wrede <andreas@planix.com>
List: tech-kern
Date: 07/28/2000 10:39:29
I have two additional datapoints:

1. The card works properly (ie. with interrupts) in a Apple Network
Server 700 with the same kernel I built for the G3/G4s. 

2. In both the G3 and the G4, the card is in a long PCI slot (64
bit?). There are not regular PCI slots on the G3/G4 motherboards.  In
the ANS700 it's in a regular PCI slot.

Should the driver be aware of 32/64 bit PCI slots? Do they need to be
initialized or handled differently?

Here is the boot log on a ANS 700:

NetBSD 1.5B (WALKER) #2: Sun Jul 23 13:57:10 PDT 2000
    root@test2:/usr/src/sys/arch/macppc/compile/WALKER
total memory = 49152 KB
avail memory = 40508 KB
using 640 buffers containing 2560 KB of memory
mainbus0 (root)
cpu0 at mainbus0: 604 (Revision 303), ID 0 (primary)
bandit0 at mainbus0
pci0 at bandit0 bus 0
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 11 function 0
pchb0: Apple Computer Bandit Host-PCI Bridge (rev. 0x03)
tlp0 at pci0 dev 13 function 0: DECchip 21140 Ethernet, pass 1.1
tlp0: broken MicroWire interface detected; setting SROM size to 1Kb
tlp0: interrupting at irq 23
tlp0: Ethernet address 00:05:02:00:01:40
tlp0: 10baseT, 100baseTX, 10baseT-FDX, 100baseTX-FDX
ofb0 at pci0 dev 15 function 0: Cirrus Logic CL-GD5430
ofb0: 640 x 480, 8bpp
wsdisplay0 at ofb0
obio0 at pci0 dev 16 function 0: addr 0xf3000000
esp0 at obio0 offset 0x10000 irq 12: NCR53C94, 25MHz, SCSI ID 7
scsibus0 at esp0: 8 targets, 8 luns per target
mc0 at obio0 offset 0x11000: irq 14,2,3: address 00:a0:40:25:6a:ea
zsc0 at obio0 offset 0x13000: irq 15,16
zstty0 at zsc0 channel 0 (console)
zstty1 at zsc0 channel 1
awacs at obio0 offset 0x14000 not configured
swim3 at obio0 offset 0x15000 not configured
adb0 at obio0 offset 0x16000 irq 18: 0 targets
aed0 at adb0 addr 0: ADB Event device
nvram0 at obio0 offset 0x1d000
lcd at obio0 offset 0x1c000 not configured
siop0 at pci0 dev 17 function 0: Symbios Logic 53c825a (fast wide scsi)
siop0: using on-board RAM
siop0: interrupting at irq 22
scsibus1 at siop0: 16 targets, 8 luns per target
siop1 at pci0 dev 18 function 0: Symbios Logic 53c825a (fast wide scsi)
siop1: using on-board RAM
siop1: interrupting at irq 26
scsibus2 at siop1: 16 targets, 8 luns per target
bandit1 at mainbus0
pci1 at bandit1 bus 1
pci1: i/o space, memory space enabled
pchb1 at pci1 dev 11 function 0
pchb1: Apple Computer Bandit Host-PCI Bridge (rev. 0x03)
cy: Found Cyclades PCI device, id = 0x105120e
cy0 at pci1 dev 13 function 0cy: card reset done
cy0 probe chip 0 offset 0x0 ... firmware version 0x48
cy0 probe chip 1 offset 0x800 ... firmware version 0x48
cy0 probe chip 2 offset 0x1000 ... not ready for command
found 2 CD1400s
: interrupting at irq 25
cy0attach CD1400 #0 offset 0x0
attach CD1400 #1 offset 0x800
: 8 ports
scsibus0: waiting 2 seconds for devices to settle...
scsibus1: waiting 2 seconds for devices to settle...
siop0: target 0 using 8bit transfers
siop0: target 0 now synchronous at 10.0Mhz, offset 8
st0 at scsibus1 target 0 lun 0: <HP, C1533A, 9503> SCSI2 1/sequential removable
st0: drive empty
siop0: target 1 using 8bit transfers
siop0: target 1 now synchronous at 5.0Mhz, offset 8
cd0 at scsibus1 target 1 lun 0: <MATSHITA, CD-ROM CR-8005A, 4.0i> SCSI2 5/cdrom removable
siop0: target 2 using 16bit transfers
siop0: target 2 now synchronous at 10.0Mhz, offset 8
sd0 at scsibus1 target 2 lun 0: <SEAGATE, ST15150W_APL, 9503> SCSI2 0/direct fixed
sd0: 4095 MB, 3712 cyl, 21 head, 107 sec, 512 bytes/sect x 8388315 sectors
scsibus2: waiting 2 seconds for devices to settle...
IPsec: Initialized Security Association Processing.
boot device: sd0
root on sd0a dumps on sd0b
root file system type: ffs



On Thu, 27 Jul 2000, Andreas Wrede wrote:

> Bill Studenmund suggested to that I post this problem to tech-kern. I
> am not on tech-kern, so please leave me in the Cc:
> 
> The Cylcades-8Y PCI card does get recognized by the cy driver, and
> after making the /dev nodes manually (no support in MAKEDEV, send-pr
> to follow), I can open a port on the card. The modem signals appear to
> be handled correctly, ie. the attached modem lights DTR when the port
> is opened, and kermit reports correct status of DCD and DSR. However,
> I cannot send or receive any characters through the port. systat
> vmstat does not list the irq (irq24) in the right column, which leads
> me to believe that something is wrong with the interrupt management in
> the driver.
> 
> The problem occurs in both a G4(Yikes!) and a Blue&White G3(Yosemite). 
> 
> Bill suggests that the driver somehow failes to enable the interrupts
> properly. Tsubai Masanari has the card working on a macppc/9600. He
> says "Probably uninorth is wrong?"
> 
> 
> $ ls -l /dev/*tyCY00                                                                     
> crw-------  1 uucp  wheel  47, 128 Jul 13 11:50 /dev/dtyCY00                              
> crw-------  1 uucp  wheel  47,   0 Jul 13 10:26 /dev/ttyCY00                              
>                                                                                           
> The dmesg output below has the CY_DEBUG option enabled in the cy driver. 
> The default MSGBUFSIZE is to small hence the truncation at the top.
> 
> 
> 28 MB
> avail memory = 112 MB
> using 1664 buffers containing 6656 KB of memory
> mainbus0 (root)
> cpu0 at mainbus0: 750 (Revision 202), ID 0 (primary)
> cpu0: 1MB backside cache
> grackle0 at mainbus0
> pci0 at grackle0 bus 0
> pci0: i/o space, memory space enabled
> pchb0 at pci0 dev 0 function 0
> pchb0: Motorola MPC106 "Grackle" Host Bridge (rev. 0x40)
> ppb0 at pci0 dev 13 function 0: Digital Equipment DECchip 21154
> PCI-PCI Bridge (rev. 0x02)
> pci1 at ppb0 bus 1
> pci1: i/o space, memory space enabled
> Texas Instruments TSB12LV21 IEEE 1394 Host Controller (Firewire serial
> bus, revision 0x02) at pci1 dev 0 function 0 not configured
> pciide0 at pci1 dev 1 function 0: CMD Technology PCI0646 (rev. 0x07)
> pciide0: bus-master DMA support present
> pciide0: primary channel configured to native-PCI mode
> pciide0: using irq 26 for native-PCI interrupt
> pciide0: secondary channel configured to native-PCI mode
> pciide0: secondary channel ignored (disabled)
> cy: Found Cyclades PCI device, id = 0x105120e
> cy0 at pci1 dev 4 function 0cy: card reset done
> cy0 probe chip 0 offset 0x0 ... firmware version 0x48
> cy0 probe chip 1 offset 0x800 ... firmware version 0x48
> cy0 probe chip 2 offset 0x1000 ... not ready for command
> found 2 CD1400s
> : interrupting at irq 25
> cy0attach CD1400 #0 offset 0x0
> attach CD1400 #1 offset 0x800
> : 8 ports
> obio0 at pci1 dev 5 function 0: addr 0x80800000
> scsi at obio0 offset 0x10000 not configured
> zsc0 at obio0 offset 0x13000: irq 15,16
> zstty0 at zsc0 channel 0
> zstty1 at zsc0 channel 1
> davbus at obio0 offset 0x14000 not configured
> fdc at obio0 offset 0x15000 not configured
> adb0 at obio0 offset 0x16000 irq 18: 0 targets
> aed0 at adb0 addr 0: ADB Event device
> wdc0 at obio0 offset 0x20000 irq 13: DMA transfer
> wd0 at wdc0 channel 0 drive 0: <QUANTUM FIREBALL CX10.2A>
> wd0: drive supports 16-sector pio transfers, lba addressing
> wd0: 9787 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 20044080 sectors
> wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4
> bm0 at obio0 offset 0x11000 irq 42,33: address 00:50:e4:20:b3:0f
> lxtphy0 at bm0 phy 0: LXT970 10/100 media interface, rev. 1
> lxtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
> nvram0 at obio0 offset 0x60000
> ohci0 at pci1 dev 6 function 0: Opti RM861HA (rev. 0x10)
> ohci0: interrupting at irq 28
> ohci0: OHCI version 1.0, legacy support
> usb0 at ohci0: USB revision 1.0
> uhub0 at usb0
> uhub0: Opti OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub0: 2 ports with 2 removable, self powered
> ofb0 at pci0 dev 16 function 0: ATI Technologies product 0x5245
> ofb0: 640 x 480, 8bpp
> wsdisplay0 at ofb0: console (std, vt100 emulation)
> IPsec: Initialized Security Association Processing.
> uhub1 at uhub0 port 1
> uhub1: Mitsumi Electric Hub in Apple USB Keyboard, class 9/0, rev 1.10/2.11, addr 2
> uhub1: 3 ports with 2 removable, bus powered
> ukbd0 at uhub1 port 1 configuration 1 interface 0
> ukbd0: Mitsumi Electric Apple USB Keyboard, rev 1.00/1.03, addr 3, iclass 3/1
> wskbd1 at ukbd0: console keyboard, using wsdisplay0
> ums0 at uhub1 port 2 configuration 1 interface 0
> ums0: Mitsumi Apple USB Mouse, rev 1.00/5.01, addr 4, iclass 3/1
> ums0: 1 buttons
> wsmouse1 at ums0
> boot device: wd0
> root on wd0a dumps on wd0b
> root file system type: ffs
> cy12032 open port 0 flag 0x5 mode 0x2000
> c1400_channel_cmd cy 0xe0221060 command 0x80
> cy0: port 0 param tty 0xe00378 termios 0xe00450
> ispeed 9600 ospeed 9600
> c1400_channel_cmd cy 0xe0221060 command 0x1a
> cor1 = 0x13...c1400_channel_cmd cy 0xe0221060 command 0x4e
> cy0: port 0 ioctl cmd 0x8004745c data 0xe975fe28 flag 0x5
> cy0: close port 0, flag 0x5, mode 0x2000
> cy0: port 0 stop tty 0xe00378 flag 0x3
> cy0: port 0 stop tty 0xe00378 flag 0x3
> cy12033 open port 1 flag 0x5 mode 0x2000
> c1400_channel_cmd cy 0xe02210a0 command 0x80
> cy0: port 1 param tty 0xe004a0 termios 0xe00578
> ispeed 9600 ospeed 9600
> c1400_channel_cmd cy 0xe02210a0 command 0x1a
> cor1 = 0x13...c1400_channel_cmd cy 0xe02210a0 command 0x4e
> cy0: port 1 ioctl cmd 0x8004745c data 0xe975fe28 flag 0x5
> cy0: close port 1, flag 0x5, mode 0x2000
> cy0: port 1 stop tty 0xe004a0 flag 0x3
> cy0: port 1 stop tty 0xe004a0 flag 0x
> 

-- 
    - aew