diff options
-rw-r--r-- | drivers/ata/libata-eh.c | 5 | ||||
-rw-r--r-- | include/linux/libata.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index a93247cc395a..d2409a8acece 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -2010,8 +2010,13 @@ void ata_eh_autopsy(struct ata_port *ap) | |||
2010 | struct ata_eh_context *mehc = &ap->link.eh_context; | 2010 | struct ata_eh_context *mehc = &ap->link.eh_context; |
2011 | struct ata_eh_context *sehc = &ap->slave_link->eh_context; | 2011 | struct ata_eh_context *sehc = &ap->slave_link->eh_context; |
2012 | 2012 | ||
2013 | /* transfer control flags from master to slave */ | ||
2014 | sehc->i.flags |= mehc->i.flags & ATA_EHI_TO_SLAVE_MASK; | ||
2015 | |||
2016 | /* perform autopsy on the slave link */ | ||
2013 | ata_eh_link_autopsy(ap->slave_link); | 2017 | ata_eh_link_autopsy(ap->slave_link); |
2014 | 2018 | ||
2019 | /* transfer actions from slave to master and clear slave */ | ||
2015 | ata_eh_about_to_do(ap->slave_link, NULL, ATA_EH_ALL_ACTIONS); | 2020 | ata_eh_about_to_do(ap->slave_link, NULL, ATA_EH_ALL_ACTIONS); |
2016 | mehc->i.action |= sehc->i.action; | 2021 | mehc->i.action |= sehc->i.action; |
2017 | mehc->i.dev_action[1] |= sehc->i.dev_action[1]; | 2022 | mehc->i.dev_action[1] |= sehc->i.dev_action[1]; |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 947cf84e555d..c261aa0584b1 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -340,6 +340,9 @@ enum { | |||
340 | 340 | ||
341 | ATA_EHI_DID_RESET = ATA_EHI_DID_SOFTRESET | ATA_EHI_DID_HARDRESET, | 341 | ATA_EHI_DID_RESET = ATA_EHI_DID_SOFTRESET | ATA_EHI_DID_HARDRESET, |
342 | 342 | ||
343 | /* mask of flags to transfer *to* the slave link */ | ||
344 | ATA_EHI_TO_SLAVE_MASK = ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, | ||
345 | |||
343 | /* max tries if error condition is still set after ->error_handler */ | 346 | /* max tries if error condition is still set after ->error_handler */ |
344 | ATA_EH_MAX_TRIES = 5, | 347 | ATA_EH_MAX_TRIES = 5, |
345 | 348 | ||