lkml.org 
[lkml]   [1999]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PATCH: was Re: 2.3.13 pci_namedevice compile error


On Thu, 12 Aug 1999, Alan Cox wrote:

> > To be compartible with old struct pci_dev
> > "base_address[i]" had to be substitute by
> > "resource[i].start & resource[i].flags".
> > This patch will not work ...
> > You have to use
> >
> > static int __init
> > pci_get_base_address(struct pci_dev *pdev, int index, u_long *base)
> > )
> > {
> > *base = (pdev->resource[index].start|pdev->resource[index].flags);
> > index++;
> > return index;
> > }
>
> This patch will not work for some future machines. You are not
> guaranteeed start has anything to do with the bits in flags.

If you move the flags you still break drivers since there is no literals
other than the PCI_XXX ones or hard-coded values grabbed from PCI spec
that allow to deal with the flags. Breaking several times drivers by doing
incomplete changes looks way stupid to me.

The PCI stuff seems to me far from being stable and for now the flags are
just the PCI BAR flags. On the other hand I want the both drivers to also
work for 2.0, 2.2 and 2.3. For these reasons I do prefer for the moment a
very short patch that just adds the flags to the tampered BARs returned in
the pci_dev, and leave unchanged the code that deals with the base|flags
things as if they were real PCI BARs.

> See the updated patch I posted that keeps the two seperate (it gets both)

But it does not care at all about other linux versions, and there is still
some work-around for PPC it also does not care about.

COULD THE MAINTAINER OF THE PCI CODE MAKE AVAILABLE THE FINAL
SPECIFICATIONS OF THE CHANGES HE INTENDS TO APPLY TO THE pci_dev
STRUCTURE AND THAT MAY IMPACT PCI DEVICE DRIVERS ?

Gérard.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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