The comments say that happens, but it doesn't. Here's the code as I see
- setup_pci_device calls setup_host_channel once for ATA_PRIMARY and
once for ATA_SECONDARY.
- setup_host_channel calls setup_channel_dma, which calls the host-
specific dma init routine, which calls ata_init_dma.
- The routine ata_init_dma allocates the prd table. It says that it
will allocate enough room for the primary and secondary interface. In
reality, it allocates a page of memory for a table when called for the
primary controller and uses half of it. Then it does the same thing
when called for the secondary controller. Two different tables are
defined separately with no guarantees about their placement, and neither
interface uses the other table at all.
None of this is a big issue, but with the new code that constant is
exported to the bio code and it's not just an internal definition in the
ide driver any more. Since that constant is now a little more
important, I think it should have a little more accurate definition. Or
at least a little more accurate description if the number happens to
remain the same.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/