RE: Specifying properly the PCI driver model on all linux archite

Bret Indrelee (bindrelee@sbs-cp.com)
Wed, 3 Nov 1999 13:47:13 -0600


Jeff Garzik [mailto:jgarzik@mandrakesoft.com] wrote:
> Bret Indrelee wrote:
> > What are 2.2 drivers supposed to do when claiming PCI memory space,
>
> Plug and Pray(tm)
>
> > At a guess, I would just
> > duplicate the macro from the 2.3 sources back into 2.2 so
> that the driver
> > works with either but uses the new names.
>
> It will not work under 2.2.x because check_mem_region uses
> new resource
> allocation code

That makes it easier.

#if LINUX_VERSION_CODE < VERSION(2,3,0)
#define check_mem_region(start,n) /* mem #start size #n */
#endif /* LINUX_VERSION_CODE */

Should take care of the problem, allowing the driver to work under either
the 'stable' version or the development version.

I think you will find that you'll have problems with your hot swap and
bridges, it really should be the PCI subsystem that decides what areas of
PCI are used or not. Once it is put in the configuration register, that
should be the end of it.

I think that having all the PCI device drivers do check_mem_region() and
request_mem_region() is going to cause problems.

-Bret

-------------------------------------------------------------
SBS Technologies, Connectivity Products
... solutions for real-time connectivity

Bret Indrelee, Engineer
SBS Technologies, Inc., Connectivity Products
1284 Corporate Center Drive, St. Paul MN 55121
Direct: (651) 905-4731
Main: (651) 905-4700 Fax: (651) 905-4701
E-mail: bindrelee@sbs-cp.com http://www.sbs.com
-------------------------------------------------------------

-
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/