Subject: Re: Should Alpha PCI code manage latency timers?
To: None <simonb@wasabisystems.com, tls@rek.tjls.com>
From: List Mail User <track@Plectere.com>
List: tech-kern
Date: 01/24/2005 15:40:46
>From bounces-tech-kern-owner-track=Plectere.com@NetBSD.org Mon Jan 24 14:07:25 2005
>X-Original-To: tech-kern@netbsd.org
>Delivered-To: tech-kern@netbsd.org
>From: Simon Burge <simonb@wasabisystems.com>
>Organization: Wasabi Systems, Inc.
>To: tls@rek.tjls.com
>Cc: port-alpha@NetBSD.org, tech-kern@NetBSD.org
>Subject: Re: Should Alpha PCI code manage latency timers? 
>In-Reply-To: Your message of "Mon, 24 Jan 2005 15:52:47 -0500 "
>	<20050124205247.GA19099@panix.com> 
>Date: Tue, 25 Jan 2005 09:06:06 +1100
>Sender: tech-kern-owner@NetBSD.org
>Precedence: list
>
>Thor Lancelot Simon wrote:
>
>> One thing I'm curious about: is a latency timer value of 0x00 legal?
>
>As a data point, all the PCI machines I have here that are turned on
>have at least one device with a latency timer of 0.  Most of these are
>bridge type devices, including the Alpha pc164's sio PCI-to-ISA bridge.
>But I also have various USB, audio and IDE controllers that have 0 for
>the latency timer too.

	Bridges are treated special (I believe something about whether they
contain their own buffers for bus-mastership or not).  On the machine I'm
using to type on now, there are bridges with both values of zero and 32; Also,
I think the requirements for host bridges is different that that for PCI-PCI
bridges.  Also, I'm certain the PCI-legacy (re. ISA in most cases) are also
special (they seem to always read zero on all of my machines, regardless of
any BIOS setting).  Also, it seem logical that a device that can always
respond to an abort within two cycles (and restart without any data loss
later), *should* be allowed to use a latency of zero, but I'm pretty sure we
didn't consider that case way back when.

	I'm pretty sure that values of zero for either USB, IDE controllers
or audio devices are likely incorrect (again assuming they are bus masters,
as most are).  Again, I want to note that the likely changes from the 1.0 and
1.1 specs I have to 1.2, and eventually 2.[012] must have made some changes
to allow for the ever increasing complexity of dynamically attached devices
(which were not considered back in the PCI 1.0/1.1 time frame).

	Also, on this machine I see some values of latency of 16, but only
behind a Cardbus bridge - so that may be related to the issue unknown to me,
how the specs were updated for Cardbus and Hot-plug devices (BTW. The Cardbus
bridge itself is also set to a latency of 16 - so the effective latency of the
devices beyond the bridge match the value of 32 used by the rest of the system).

	BTW.  All the old machines I still have (pre- PnP BIOS) have identical
values for all devices except the PCI-ISA bridges which do seem to always have
a  latency of zero. (I have three, and could probably test another 6 to 8 by
changing the BIOS settings) - This includes the original PIIX USB controller
and old Adaptec cards.

>
>Simon.
>--
>Simon Burge                            <simonb@wasabisystems.com>
>NetBSD Support and Service:         http://www.wasabisystems.com/
>

	Paul Shupak