libata: move reset freeze/thaw handling into ata_eh_reset()
Previously reset freeze/thaw handling lived outside of ata_eh_reset() mainly because the original PMP reset code needed the port frozen while resetting all the fan-out ports, which is no longer the case. This patch moves freeze/thaw handling into ata_eh_reset(). @prereset() and @postreset() are now called w/o freezing the port although @prereset() an be called frozen if the port is frozen prior to entering ata_eh_reset(). This makes code simpler and will help removing hotplug event related races. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
@@ -700,8 +700,6 @@ static int sata_pmp_eh_recover_pmp(struct ata_port *ap,
|
||||
if (ehc->i.action & ATA_EH_RESET) {
|
||||
struct ata_link *tlink;
|
||||
|
||||
ata_eh_freeze_port(ap);
|
||||
|
||||
/* reset */
|
||||
rc = ata_eh_reset(link, 0, prereset, softreset, hardreset,
|
||||
postreset);
|
||||
@@ -711,8 +709,6 @@ static int sata_pmp_eh_recover_pmp(struct ata_port *ap,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ata_eh_thaw_port(ap);
|
||||
|
||||
/* PMP is reset, SErrors cannot be trusted, scan all */
|
||||
ata_port_for_each_link(tlink, ap) {
|
||||
struct ata_eh_context *ehc = &tlink->eh_context;
|
||||
|
Reference in New Issue
Block a user