Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 May 1999 18:12:13 +0200 (MET DST)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        louie@TransSys.COM (Louis A. Mamakos)
Subject:   Re: PCI bus chanages from 2.2.x to 3.x/4.x and data corruption.
Message-ID:  <199905301612.SAA17097@labinfo.iet.unipi.it>
In-Reply-To: <199905301719.NAA82586@whizzo.transsys.com> from "Louis A. Mamakos" at May 30, 99 01:18:48 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > > It may be a compiler optimisation.
> > 
> > i think all memory-mapped registers should be declared "volatile" to
> > avoid such things occur. I remember when i was looking at both the
> > meteor and bt848 drivers, there was some confusion about it.
> 
> Depending on when you looked, the stuff you excepted below probably
> didn't exist.  It's been more than a year now, I think, but I
> introduced the macro and associated typedef when I changed the driver

very likely. i have been using a home-grown bt848 driver (derived from
some early version of the official one) for some time until the time i
switched to 2.2.6.

In any case: the use of "volatile" seems correct now so i wonder why/if
the compiler "optimizes" out the sequence

	bt848->tdec = 0;
	bt848->tdec = something;

or perhaps is the bt848 chip which requires some time to detect&react
to the first write (and if i remember well, the data sheets are
extremely confused on this register).

	cheers
	luigi
-----------------------------------+-------------------------------------
  Luigi RIZZO, luigi@iet.unipi.it  . Dip. di Ing. dell'Informazione
  http://www.iet.unipi.it/~luigi/  . Universita` di Pisa
  TEL/FAX: +39-050-568.533/522     . via Diotisalvi 2, 56126 PISA (Italy)

		  http://www.iet.unipi.it/~luigi/ngc99/
====  First International Workshop on Networked Group Communication  ====
-----------------------------------+-------------------------------------


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905301612.SAA17097>