diff options
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r-- | drivers/ata/libata-eh.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index a93247cc395a..5d687d7cffae 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -1206,7 +1206,10 @@ void ata_eh_about_to_do(struct ata_link *link, struct ata_device *dev, | |||
1206 | 1206 | ||
1207 | ata_eh_clear_action(link, dev, ehi, action); | 1207 | ata_eh_clear_action(link, dev, ehi, action); |
1208 | 1208 | ||
1209 | if (!(ehc->i.flags & ATA_EHI_QUIET)) | 1209 | /* About to take EH action, set RECOVERED. Ignore actions on |
1210 | * slave links as master will do them again. | ||
1211 | */ | ||
1212 | if (!(ehc->i.flags & ATA_EHI_QUIET) && link != ap->slave_link) | ||
1210 | ap->pflags |= ATA_PFLAG_RECOVERED; | 1213 | ap->pflags |= ATA_PFLAG_RECOVERED; |
1211 | 1214 | ||
1212 | spin_unlock_irqrestore(ap->lock, flags); | 1215 | spin_unlock_irqrestore(ap->lock, flags); |
@@ -2010,8 +2013,13 @@ void ata_eh_autopsy(struct ata_port *ap) | |||
2010 | struct ata_eh_context *mehc = &ap->link.eh_context; | 2013 | struct ata_eh_context *mehc = &ap->link.eh_context; |
2011 | struct ata_eh_context *sehc = &ap->slave_link->eh_context; | 2014 | struct ata_eh_context *sehc = &ap->slave_link->eh_context; |
2012 | 2015 | ||
2016 | /* transfer control flags from master to slave */ | ||
2017 | sehc->i.flags |= mehc->i.flags & ATA_EHI_TO_SLAVE_MASK; | ||
2018 | |||
2019 | /* perform autopsy on the slave link */ | ||
2013 | ata_eh_link_autopsy(ap->slave_link); | 2020 | ata_eh_link_autopsy(ap->slave_link); |
2014 | 2021 | ||
2022 | /* transfer actions from slave to master and clear slave */ | ||
2015 | ata_eh_about_to_do(ap->slave_link, NULL, ATA_EH_ALL_ACTIONS); | 2023 | ata_eh_about_to_do(ap->slave_link, NULL, ATA_EH_ALL_ACTIONS); |
2016 | mehc->i.action |= sehc->i.action; | 2024 | mehc->i.action |= sehc->i.action; |
2017 | mehc->i.dev_action[1] |= sehc->i.dev_action[1]; | 2025 | mehc->i.dev_action[1] |= sehc->i.dev_action[1]; |
@@ -2447,14 +2455,14 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
2447 | dev->pio_mode = XFER_PIO_0; | 2455 | dev->pio_mode = XFER_PIO_0; |
2448 | dev->flags &= ~ATA_DFLAG_SLEEPING; | 2456 | dev->flags &= ~ATA_DFLAG_SLEEPING; |
2449 | 2457 | ||
2450 | if (ata_phys_link_offline(ata_dev_phys_link(dev))) | 2458 | if (!ata_phys_link_offline(ata_dev_phys_link(dev))) { |
2451 | continue; | 2459 | /* apply class override */ |
2452 | 2460 | if (lflags & ATA_LFLAG_ASSUME_ATA) | |
2453 | /* apply class override */ | 2461 | classes[dev->devno] = ATA_DEV_ATA; |
2454 | if (lflags & ATA_LFLAG_ASSUME_ATA) | 2462 | else if (lflags & ATA_LFLAG_ASSUME_SEMB) |
2455 | classes[dev->devno] = ATA_DEV_ATA; | 2463 | classes[dev->devno] = ATA_DEV_SEMB_UNSUP; |
2456 | else if (lflags & ATA_LFLAG_ASSUME_SEMB) | 2464 | } else |
2457 | classes[dev->devno] = ATA_DEV_SEMB_UNSUP; /* not yet */ | 2465 | classes[dev->devno] = ATA_DEV_NONE; |
2458 | } | 2466 | } |
2459 | 2467 | ||
2460 | /* record current link speed */ | 2468 | /* record current link speed */ |