Linus Torvalds dc87c3985e libata: honour host controllers that want just one host
The Marvell IDE interface on my machine would hit a BUG_ON() in
lib/iomem.c because it was calling ata_pci_init_one() specifying just a
single port on the host, but that would actually end up trying to
initialize two ports, the second one with bogus information.

This fixes "ata_pci_init_one()" so that it actually passes down the
n_ports variable that it got from the low-level driver to the host
allocation routine ("ata_host_alloc_pinfo()"), which results in the ATA
layer actually having the correct port number information.

And in order to make it all work, I also needed to fix a few places that
had incorrectly hard-coded the fact that a host always had exactly two
ports (both ata_pci_init_bmdma() and ata_request_legacy_irqs() would
just always iterate over both ports).

Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-30 17:43:48 -07:00
..
2007-04-28 14:51:33 -04:00
2007-04-28 14:16:01 -04:00
2007-04-28 14:16:01 -04:00
2007-04-28 14:15:59 -04:00
2007-04-28 15:16:21 -04:00
2007-04-28 14:15:55 -04:00
2007-04-28 14:16:01 -04:00
2007-04-28 14:16:01 -04:00
2007-04-28 14:15:57 -04:00
2007-04-28 15:16:39 -04:00
2007-04-28 14:16:01 -04:00
2007-04-28 14:15:56 -04:00
2007-04-28 14:15:57 -04:00
2007-04-28 14:15:56 -04:00
2006-08-10 07:31:37 -04:00
2007-02-21 04:58:17 -05:00