Subject: Re: Additional offset when mapping pci regs
To: Jason Thorpe <email@example.com>
From: Lennart Augustsson <firstname.lastname@example.org>
Date: 01/18/2000 20:14:45
Jason Thorpe wrote:
> On Tue, 18 Jan 2000 12:03:16 +0000 (GMT)
> Andy Doran <email@example.com> 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.