Subject: Re: Additional offset when mapping pci regs
To: Jason Thorpe <>
From: Lennart Augustsson <>
List: tech-kern
Date: 01/18/2000 20:14:45
Jason Thorpe wrote:

> On Tue, 18 Jan 2000 12:03:16 +0000 (GMT)
>  Andy Doran <> wrote:
>  > Perhaps a silly question. Is there a way to specify an offset when using
>  > pci_mapreg_map()? Nothing stands out, other than "add 'n' when using the
>  > bus_space calls".
> After pci_mapreg_map(), use bus_space_subregion().  Remember to save the
> original handle from pci_mapreg_map() in case you ever need to unmap.

What do you mean "in case you ever need to unmap"? :)  I think all drivers should
be written so they have a detach method.  It makes it much more likely that
the driver can be reused, since we seem to be moving into a world where
hot swapping is getting popular.


        -- Lennart