Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: libata: fix unexpectedly frozen port after ata_eh_reset()
This commit is contained in:
commit
45694c2895
1 changed files with 8 additions and 4 deletions
|
@ -2802,10 +2802,11 @@ int ata_eh_reset(struct ata_link *link, int classify,
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some controllers can't be frozen very well and may set
|
* Some controllers can't be frozen very well and may set spurious
|
||||||
* spuruious error conditions during reset. Clear accumulated
|
* error conditions during reset. Clear accumulated error
|
||||||
* error information. As reset is the final recovery action,
|
* information and re-thaw the port if frozen. As reset is the
|
||||||
* nothing is lost by doing this.
|
* final recovery action and we cross check link onlineness against
|
||||||
|
* device classification later, no hotplug event is lost by this.
|
||||||
*/
|
*/
|
||||||
spin_lock_irqsave(link->ap->lock, flags);
|
spin_lock_irqsave(link->ap->lock, flags);
|
||||||
memset(&link->eh_info, 0, sizeof(link->eh_info));
|
memset(&link->eh_info, 0, sizeof(link->eh_info));
|
||||||
|
@ -2814,6 +2815,9 @@ int ata_eh_reset(struct ata_link *link, int classify,
|
||||||
ap->pflags &= ~ATA_PFLAG_EH_PENDING;
|
ap->pflags &= ~ATA_PFLAG_EH_PENDING;
|
||||||
spin_unlock_irqrestore(link->ap->lock, flags);
|
spin_unlock_irqrestore(link->ap->lock, flags);
|
||||||
|
|
||||||
|
if (ap->pflags & ATA_PFLAG_FROZEN)
|
||||||
|
ata_eh_thaw_port(ap);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Make sure onlineness and classification result correspond.
|
* Make sure onlineness and classification result correspond.
|
||||||
* Hotplug could have happened during reset and some
|
* Hotplug could have happened during reset and some
|
||||||
|
|
Loading…
Add table
Reference in a new issue