lkml.org 
[lkml]   [1996]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: 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


\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.045 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site