Oh please, Oh please.....
I have had a time when I wanted to write to PCI device registers:
To test those extra configuration registers of my host bridge.
> diff -Ncr -X ../exclude ./Makefile /usr/src/linux-2.1.55/Makefile
> *** ./Makefile Mon Sep 8 21:57:58 1997
> --- /usr/src/linux-2.1.55/Makefile Thu Sep 11 16:56:47 1997
> ***************
> *** 11,17 ****
> #
> # NOTE! SMP is experimental. See the file Documentation/SMP.txt
> #
> ! SMP = 1
> #
> # SMP profiling options
> # SMP_PROF = 1
Please review your patches (by hand!) to delete this type of configuration
stuff. You can either keep a "clean tree with this patch", add this
file to your exclude list, or simply edit it out by hand....
> + tcnt = cnt;
> + if (tpos & 3) {
> + tcnt += tpos & 3;
> + tpos &= ~3;
> + }
> +
> + tcnt = (tcnt + 3) & ~3;
Suppose I have to muck with a few configuration registers of a device
that I'm writing a userlevel device driver for. Now the manual
says that I have this register at offset 30 (dec!).
short bla;
pcibus = open ("/dev/pcibus", "r");
seek (pcibus, 30, SEEK_SET);
read (pcibus, &bla, 2);
Now what? I dont get the bytes I want. Sure I can go along with you
that you might want to use only 32bit accesses, but then GIVE ME
the right bytes anyway....
Roger.
-- ** R.E.Wolff@BitWizard.nl ** +31-15-2137555 ** http://www.BitWizard.nl/ ** Florida -- A 39 year old construction worker woke up this morning when a 109-car freigt train drove over him. According to the police the man was drunk. The man himself claims he slipped while walking the dog. 080897