ATA_FLAG_SKIP_D2H_BSY was added because some ahci controllers failed to turn off !BSY after hotplug regardless of device state. However, some ahci controllers time out on softreset if it is issued while BSY is set. This can also be resolved by always doing CLO before SRST but CLO is an optional feature. This patch makes ahci use hardreset after link resume event including hotplug. Hardreset doesn't wait for !BSY, so the unnecessary timeout is avoided and ahci now politely waits for !BSY on normal soft resets (including boot and EH) thus avoiding SRST timeout caused by issuing it while BSY is set. Signed-off-by: Tejun Heo <htejun@xxxxxxxxx> --- Jeff, this should fix the 'first reset fails on slow ATAPI device if delay during initialization is shortened' problem. This makes much more sense too as the only problemetic reset was post-hotplug SRST. Thanks. diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 1aabc81..0b0619b 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -279,7 +279,7 @@ static const struct ata_port_info ahci_p .sht = &ahci_sht, .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | - ATA_FLAG_SKIP_D2H_BSY, + ATA_FLAG_HRST_TO_RESUME, .pio_mask = 0x1f, /* pio0-4 */ .udma_mask = 0x7f, /* udma0-6 ; FIXME */ .port_ops = &ahci_ops, @@ -289,7 +289,7 @@ static const struct ata_port_info ahci_p .sht = &ahci_sht, .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | - ATA_FLAG_SKIP_D2H_BSY | + ATA_FLAG_HRST_TO_RESUME | AHCI_FLAG_RESET_NEEDS_CLO | AHCI_FLAG_NO_NCQ, .pio_mask = 0x1f, /* pio0-4 */ .udma_mask = 0x7f, /* udma0-6 ; FIXME */ diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c - 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