Messages in this thread | | | From | "Ulrich Windl" <> | Date | Wed, 6 Mar 1996 14:16:58 +0100 | Subject | Re: Long-standing bugs and typos |
| |
On 6 Mar 96 at 0:56, Stephen Lee wrote:
> On Mar 5, 9:10pm, Johannes Kroeger wrote: > > > > Hello experts, > > > > Here is a small collection of bugs and typos that should be fixed before the > > next stable release. > > > Add this typo to your list...
I'm not sure about this
> > This is linux/include/linux/pci.h: > > --- pci.h- Wed Mar 6 01:01:45 1996 > +++ pci.h Wed Mar 6 01:01:53 1996 > @@ -536,8 +536,8 @@ > * devices. The slot/function address of each device is encoded > * in a single byte as follows: > * > - * 7:4 = slot > - * 3:0 = function
I don't have the source here, but I guess the first number is the bit position while the second number is the length.
> + * 7:3 = slot > + * 2:0 = function > */ > #define PCI_DEVFN(slot,func) ((((slot) & 0x1f) << 3) | ((func) & 0x07))
0x1f makes five bits for me (00011111); that is 7:5 for slot, and 2:3 for function (if I'm assuming the semantics correctly). 0x07 makes three bits (00000111).
> #define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) > > > Ulrich
| |