On Mon, 18 Apr 2011 13:42:27 -0500 James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> wrote: > currently libata-sff is completely ignoring the enabled/disabled status > of the interfaces. Yes - it makes some machines work rather better because the BIOSes sometimes mess up the registers. It wad a *deliberate* decision not to port it over and as a result stuff works that failed before. Windows drivers clearly ignore the bits in many cases. In addition - Your patch seems to be applying the enable bits apply in native mode (they don't generally) - You seem to be assuming either first or both ports enabled, secondly only is just as valid This matters for CMD64x as several 64x devices are found on hotpluggable 'docking stations' using a PCI split bridge. Only doing the checks for chips in legacy mode should avoid that problem. In native mode the PCI bars are the only register bases used so the problem doesn't arise. The patch seems to be broken for all these cases and also incredibly invasive given you can just pass a dummy port in as one of your struct ata_port_info * pointers to ata_pci_dma_init_one() You shouldn't need to touch a single line of the core libata code, although it might be the best way of doing it. Either way if you do the number of ports needs to be a bitmask instead and you need to leave native mode alone. Alan -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html