Subject: Re: Should Alpha PCI code manage latency timers?
To: Thor Lancelot Simon <tls@rek.tjls.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 01/24/2005 23:10:58
On Mon, Jan 24, 2005 at 08:10:07AM -0500, Thor Lancelot Simon wrote:
> The upshot of a rather strange recent thread in netbsd-help (titled
> "got drivers?") was that, at least on some PCI alphas, neither SRM
> nor our MD PCI code set devices' latency timers at all.  A user had
> a machine with two tulips, a pciide, and a QL1040 -- only the 1040
> worked reliably, because the isp driver explicitly whacks the latency
> timer value to 0x40 if it finds it at 0x00.
> 
> The user adjusted the pciide driver to set the latency timer to 0x40
> and all of a sudden he could use the disk and talk on the network at
> the same time without losing packets.
> 
> If SRM isn't going to set the latency timer it seems to me we ought to;
> and not in every device driver, either!

As a data point, I have a Alpha DS20 server with:
disco:/dev#pcictl pci0 list
000:05:0: Contaq Microsystems 82C693 PCI-ISA Bridge (ISA bridge)
000:05:1: Contaq Microsystems 82C693 PCI-ISA Bridge (IDE mass storage, interface 0x80)
000:05:2: Contaq Microsystems 82C693 PCI-ISA Bridge (IDE mass storage)
000:05:3: Contaq Microsystems 82C693 PCI-ISA Bridge (USB serial bus, interface 0x10)
000:07:0: Symbios Logic 53c1010 (66MHz) (SCSI mass storage, revision 0x01)
000:07:1: Symbios Logic 53c1010 (66MHz) (SCSI mass storage, revision 0x01)
000:08:0: Symbios Logic 53c1010 (66MHz) (SCSI mass storage, revision 0x01)
000:08:1: Symbios Logic 53c1010 (66MHz) (SCSI mass storage, revision 0x01)
000:09:0: Netgear GA620 1000baseSX Gigabit Ethernet (ethernet network, revision 0x01)
disco:/dev#pcictl pci1 list
000:07:0: Symbios Logic 53c1010 (66MHz) (SCSI mass storage, revision 0x01)
000:07:1: Symbios Logic 53c1010 (66MHz) (SCSI mass storage, revision 0x01)
000:08:0: Symbios Logic 53c1010 (66MHz) (SCSI mass storage, revision 0x01)
000:08:1: Symbios Logic 53c1010 (66MHz) (SCSI mass storage, revision 0x01)
000:09:0: Digital Equipment DECchip 21152 PCI-PCI Bridge (PCI bridge, revision 0x03)
disco:/dev#pcictl pci2 list
002:00:0: Symbios Logic 53c875/876 (SCSI mass storage, revision 0x04)
002:01:0: Symbios Logic 53c875/876 (SCSI mass storage, revision 0x04)
002:02:0: Digital Equipment DECchip 21140 ("FasterNet") 10/100 Ethernet (ethernet network, revision 0x22)

All SCSI adapters and the 21140 have their latency timers set to 0xff.
The GA620 and the PCI-PCI bridge have 0xf8. All functions of the 82C693 have 0.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--