diff options
-rw-r--r-- | drivers/ata/libata-eh.c | 5 | ||||
-rw-r--r-- | include/linux/libata.h | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 67bf150fa66b..2bff9adcacf1 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -1671,7 +1671,10 @@ static int ata_eh_reset(struct ata_port *ap, int classify, | |||
1671 | reset == softreset ? "soft" : "hard"); | 1671 | reset == softreset ? "soft" : "hard"); |
1672 | 1672 | ||
1673 | /* mark that this EH session started with reset */ | 1673 | /* mark that this EH session started with reset */ |
1674 | ehc->i.flags |= ATA_EHI_DID_RESET; | 1674 | if (reset == hardreset) |
1675 | ehc->i.flags |= ATA_EHI_DID_HARDRESET; | ||
1676 | else | ||
1677 | ehc->i.flags |= ATA_EHI_DID_SOFTRESET; | ||
1675 | 1678 | ||
1676 | rc = ata_do_reset(ap, reset, classes); | 1679 | rc = ata_do_reset(ap, reset, classes); |
1677 | 1680 | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index 73b86dd30aec..d8cfc72ea9c1 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -282,11 +282,13 @@ enum { | |||
282 | ATA_EHI_NO_AUTOPSY = (1 << 2), /* no autopsy */ | 282 | ATA_EHI_NO_AUTOPSY = (1 << 2), /* no autopsy */ |
283 | ATA_EHI_QUIET = (1 << 3), /* be quiet */ | 283 | ATA_EHI_QUIET = (1 << 3), /* be quiet */ |
284 | 284 | ||
285 | ATA_EHI_DID_RESET = (1 << 16), /* already reset this port */ | 285 | ATA_EHI_DID_SOFTRESET = (1 << 16), /* already soft-reset this port */ |
286 | ATA_EHI_PRINTINFO = (1 << 17), /* print configuration info */ | 286 | ATA_EHI_DID_HARDRESET = (1 << 17), /* already soft-reset this port */ |
287 | ATA_EHI_SETMODE = (1 << 18), /* configure transfer mode */ | 287 | ATA_EHI_PRINTINFO = (1 << 18), /* print configuration info */ |
288 | ATA_EHI_POST_SETMODE = (1 << 19), /* revaildating after setmode */ | 288 | ATA_EHI_SETMODE = (1 << 19), /* configure transfer mode */ |
289 | ATA_EHI_POST_SETMODE = (1 << 20), /* revaildating after setmode */ | ||
289 | 290 | ||
291 | ATA_EHI_DID_RESET = ATA_EHI_DID_SOFTRESET | ATA_EHI_DID_HARDRESET, | ||
290 | ATA_EHI_RESET_MODIFIER_MASK = ATA_EHI_RESUME_LINK, | 292 | ATA_EHI_RESET_MODIFIER_MASK = ATA_EHI_RESUME_LINK, |
291 | 293 | ||
292 | /* max repeat if error condition is still set after ->error_handler */ | 294 | /* max repeat if error condition is still set after ->error_handler */ |