Subject: Re: Should Alpha PCI code manage latency timers?
To: List Mail User <track@Plectere.com>
From: Greg A. Woods <woods@weird.com>
List: port-alpha
Date: 01/25/2005 21:11:03
[ On Monday, January 24, 2005 at 15:48:49 (-0800), List Mail User wrote: ]
> Subject: Re: Should Alpha PCI code manage latency timers?
>
> 	Could someone else check some other non-x86 machines, both old and
> relatively current to see the behavior (I thinking of Suns and/or SGI boxes).

Here's the AlphaServer ES40 I've been working on.  First the SRM output
to show what devices the firmware recognizes:

probe I/O subsystem
probing hose 1, PCI
bus 0, slot 4 -- pka -- NCR 53C895
bus 0, slot 5 -- ewa -- DE500-BA Network Controller
bus 0, slot 6 -- ega -- DEGXA-TA Gigabit Ethernet
probing hose 0, PCI
probing PCI-to-ISA bridge, bus 1
bus 0, slot 2, function 0 -- pkb -- Adaptec AIC-7899
bus 0, slot 2, function 1 -- pkc -- Adaptec AIC-7899
bus 0, slot 4 -- ewb -- DE500-BA Network Controller
bus 0, slot 15 -- dqa -- Acer Labs M1543C IDE
bus 0, slot 15 -- dqb -- Acer Labs M1543C IDE


It's currently running a test -current kernel:


[console]<@> # uname -srm
NetBSD 2.99.11 alpha


[console]<@> # pcictl /dev/pci0 list
000:01:0: ATI Technologies 3D Rage II+ (VGA display, revision 0x9a)
000:02:0: Adaptec (2nd PCI Vendor ID) AIC-7899A U160 (SCSI mass storage, revision 0x01)
000:02:1: Adaptec (2nd PCI Vendor ID) AIC-7899A U160 (SCSI mass storage, revision 0x01)
000:03:0: Q Logic product 0x2312 (Fiber Channel serial bus, revision 0x02)
000:04:0: Digital Equipment DECchip 21142/21143 10/100 Ethernet (ethernet network, revision 0x30)
000:07:0: Acer Labs M1543 PCI-ISA Bridge (ISA bridge, revision 0xc3)
000:15:0: Acer Labs M5229 UDMA IDE Controller (IDE mass storage, interface 0xfa, revision 0xc1)
000:19:0: Acer Labs M5237 USB Host Controller (USB serial bus, interface 0x10, revision 0x03)
[console]<@> # pcictl /dev/pci0 dump -d 1 | fgrep -i latency
    Latency Timer: 0xff
    Maximum Latency: 0x00
[console]<@> # pcictl /dev/pci0 dump -d 2 | fgrep -i latency
    Latency Timer: 0xfc
    Maximum Latency: 0x19
[console]<@> # pcictl /dev/pci0 dump -d 2 -f 1 | fgrep -i latency
    Latency Timer: 0xfc
    Maximum Latency: 0x19
[console]<@> # pcictl /dev/pci0 dump -d 3 | fgrep -i latency
    Latency Timer: 0x40
    Maximum Latency: 0x00
[console]<@> # pcictl /dev/pci0 dump -d 4 | fgrep -i latency
    Latency Timer: 0xff
    Maximum Latency: 0x28
[console]<@> # pcictl /dev/pci0 dump -d 7 | fgrep -i latency
    Latency Timer: 0x00
    Maximum Latency: 0x00
[console]<@> # pcictl /dev/pci0 dump -d 15 | fgrep -i latency
    Latency Timer: 0xff
    Maximum Latency: 0x04
[console]<@> # pcictl /dev/pci0 dump -d 19 | fgrep -i latency
    Latency Timer: 0xf8
    Maximum Latency: 0x50


(that first intel card below is an i82546GB dual-port 1000baseSX fibre card)

[console]<@> # pcictl /dev/pci1 list                        
000:01:0: Intel product 0x107a (ethernet network, revision 0x03)
000:01:1: Intel product 0x107a (ethernet network, revision 0x03)
000:02:0: Q Logic product 0x2312 (Fiber Channel serial bus, revision 0x02)
000:03:0: Intel i82544EI Gigabit Ethernet (1000BASE-T) (ethernet network, revision 0x02)
000:04:0: Symbios Logic 53c895 (SCSI mass storage, revision 0x02)
000:05:0: Digital Equipment DECchip 21142/21143 10/100 Ethernet (ethernet network, revision 0x30)
000:06:0: Broadcom Corporation BCM5703X 10/100/1000 Ethernet (ethernet network, revision 0x02)
[console]<@> # pcictl /dev/pci1 dump -d 1 | fgrep -i latency 
    Latency Timer: 0xfc
    Maximum Latency: 0x00
[console]<@> # pcictl /dev/pci1 dump -d 1 -f 1 | fgrep -i latency
    Latency Timer: 0xfc
    Maximum Latency: 0x00
[console]<@> # pcictl /dev/pci1 dump -d 2 | fgrep -i latency     
    Latency Timer: 0x40
    Maximum Latency: 0x00
[console]<@> # pcictl /dev/pci1 dump -d 3 | fgrep -i latency
    Latency Timer: 0xfc
    Maximum Latency: 0x00
[console]<@> # pcictl /dev/pci1 dump -d 4 | fgrep -i latency
    Latency Timer: 0xff
    Maximum Latency: 0x40
[console]<@> # pcictl /dev/pci1 dump -d 5 | fgrep -i latency
    Latency Timer: 0xff
    Maximum Latency: 0x28
[console]<@> # pcictl /dev/pci1 dump -d 6 | fgrep -i latency
    Latency Timer: 0xf8
    Maximum Latency: 0x00



I wonder if setting pci0:07:00 to have a non-zero latency timer would
fix some of the problems with the "interrrupt conflicts" seen whenver
the NetBSD kernel trys to use the IDE CDROM....

-- 
						Greg A. Woods

H:+1 416 218-0098  W:+1 416 489-5852 x122  VE3TCP  RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>          Secrets of the Weird <woods@weird.com>