RE: [PATCH 2.6.8-rc2] sata_nv.c

From: Andrew Chew
Date: Tue Jul 27 2004 - 15:31:22 EST


Jeff Garzik wrote:
> 7) don't use host->scr_addr as a sly way to obtain your base address.
> Use host_set->mmio_base directly (casting from unsigned long
> if it's PIO
> rather than MMIO).

I noticed in libata-core.c's ata_pci_remove_one(), that the
host_set->mmio_base gets unmapped before calling
host_set->ops->host_stop(host_set). The problem is that I want to
access the registers mapped to host_set->mmio_base in my host_stop
routine (it's in my host_stop routine that I disable hotplug event
interrupts).

It looks safe to just swap the two calls, so we call
host_set->ops->host_stop(host_set) before we iounmap
host_set->mmio_base. That way, my host_stop routine can still access
host_set->mmio_base.

However, I don't want to break any architectural model you may have in
mind. Can you advise me on the proper approach I should take with this?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/