* [patch 10/50] libata: force hardreset if link is in powersave mode
[not found] <20080607010215.358296706@sous-sol.org>
@ 2008-06-07 1:02 ` Chris Wright
2008-06-07 1:27 ` Linus Torvalds
0 siblings, 1 reply; 5+ messages in thread
From: Chris Wright @ 2008-06-07 1:02 UTC (permalink / raw)
To: linux-kernel, stable, Jeff Garzik, IDE/ATA development list
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan, Tejun Heo,
matthieu.castet, Greg Kroah-Hartman
[-- Attachment #1: libata-force-hardreset-if-link-is-in-powersave-mode.patch --]
[-- Type: text/plain, Size: 1533 bytes --]
-stable review patch. If anyone has any objections, please let us know.
---------------------
From: Tejun Heo <htejun@gmail.com>
Inhibiting link PM mode doesn't bring the link back online if it's
already in powersave mode. If SRST is used in these cases, libata EH
thinks that the link is offline and fails detection. Force hardreset
if link is in powersave mode.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
drivers/ata/libata-core.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3947,6 +3947,7 @@ int ata_std_prereset(struct ata_link *li
struct ata_port *ap = link->ap;
struct ata_eh_context *ehc = &link->eh_context;
const unsigned long *timing = sata_ehc_deb_timing(ehc);
+ u32 sstatus;
int rc;
/* handle link resume */
@@ -3960,6 +3961,17 @@ int ata_std_prereset(struct ata_link *li
if (ap->flags & ATA_FLAG_PMP)
ehc->i.action |= ATA_EH_HARDRESET;
+ /* if link powersave is on, force hardreset */
+ if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0) {
+ u8 ipm = sstatus >> 8;
+
+ if (ipm == 2 || ipm == 6) {
+ ata_link_printk(link, KERN_INFO, "link in powersave "
+ "mode (ipm=%d), forcing hardreset\n", ipm);
+ ehc->i.action |= ATA_EH_HARDRESET;
+ }
+ }
+
/* if we're about to do hardreset, nothing more to do */
if (ehc->i.action & ATA_EH_HARDRESET)
return 0;
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch 10/50] libata: force hardreset if link is in powersave mode
2008-06-07 1:02 ` [patch 10/50] libata: force hardreset if link is in powersave mode Chris Wright
@ 2008-06-07 1:27 ` Linus Torvalds
2008-06-07 1:57 ` [stable] " Greg KH
2008-06-07 3:14 ` Jeff Garzik
0 siblings, 2 replies; 5+ messages in thread
From: Linus Torvalds @ 2008-06-07 1:27 UTC (permalink / raw)
To: Chris Wright
Cc: linux-kernel, stable, Jeff Garzik, IDE/ATA development list,
Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, akpm, alan, Tejun Heo,
matthieu.castet, Greg Kroah-Hartman
On Fri, 6 Jun 2008, Chris Wright wrote:
>
> -stable review patch. If anyone has any objections, please let us know.
> ---------------------
>
> From: Tejun Heo <htejun@gmail.com>
>
> Inhibiting link PM mode doesn't bring the link back online if it's
> already in powersave mode. If SRST is used in these cases, libata EH
> thinks that the link is offline and fails detection. Force hardreset
> if link is in powersave mode.
This isn't upstream. Maybe there's some reason it's not needed upstream,
but it would be nice to know.
Linus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [stable] [patch 10/50] libata: force hardreset if link is in powersave mode
2008-06-07 1:27 ` Linus Torvalds
@ 2008-06-07 1:57 ` Greg KH
2008-06-07 16:51 ` Linus Torvalds
2008-06-07 3:14 ` Jeff Garzik
1 sibling, 1 reply; 5+ messages in thread
From: Greg KH @ 2008-06-07 1:57 UTC (permalink / raw)
To: Linus Torvalds
Cc: Chris Wright, Tejun Heo, Theodore Ts'o, Zwane Mwaikambo,
Jeff Garzik, Greg Kroah-Hartman, Justin Forbes, linux-kernel,
Chris Wedgwood, Domenico Andreoli, IDE/ATA development list,
Randy Dunlap, Michael Krufky, matthieu.castet, Chuck Ebbert,
Dave Jones, akpm, Chuck Wolber, stable, alan
On Fri, Jun 06, 2008 at 06:27:15PM -0700, Linus Torvalds wrote:
>
>
> On Fri, 6 Jun 2008, Chris Wright wrote:
> >
> > -stable review patch. If anyone has any objections, please let us know.
> > ---------------------
> >
> > From: Tejun Heo <htejun@gmail.com>
> >
> > Inhibiting link PM mode doesn't bring the link back online if it's
> > already in powersave mode. If SRST is used in these cases, libata EH
> > thinks that the link is offline and fails detection. Force hardreset
> > if link is in powersave mode.
>
> This isn't upstream. Maybe there's some reason it's not needed upstream,
> but it would be nice to know.
To quote Tejun when he sent this patch:
---
Patch for -stable only. Devel branch now uses hardreset by
default so this type of promotion logic isn't necessary anymore.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch 10/50] libata: force hardreset if link is in powersave mode
2008-06-07 1:27 ` Linus Torvalds
2008-06-07 1:57 ` [stable] " Greg KH
@ 2008-06-07 3:14 ` Jeff Garzik
1 sibling, 0 replies; 5+ messages in thread
From: Jeff Garzik @ 2008-06-07 3:14 UTC (permalink / raw)
To: Linus Torvalds
Cc: Chris Wright, linux-kernel, stable, IDE/ATA development list,
Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, akpm, alan, Tejun Heo,
matthieu.castet, Greg Kroah-Hartman
Linus Torvalds wrote:
>
> On Fri, 6 Jun 2008, Chris Wright wrote:
>> -stable review patch. If anyone has any objections, please let us know.
>> ---------------------
>>
>> From: Tejun Heo <htejun@gmail.com>
>>
>> Inhibiting link PM mode doesn't bring the link back online if it's
>> already in powersave mode. If SRST is used in these cases, libata EH
>> thinks that the link is offline and fails detection. Force hardreset
>> if link is in powersave mode.
>
> This isn't upstream. Maybe there's some reason it's not needed upstream,
> but it would be nice to know.
We do hard reset by default...
Jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [stable] [patch 10/50] libata: force hardreset if link is in powersave mode
2008-06-07 1:57 ` [stable] " Greg KH
@ 2008-06-07 16:51 ` Linus Torvalds
0 siblings, 0 replies; 5+ messages in thread
From: Linus Torvalds @ 2008-06-07 16:51 UTC (permalink / raw)
To: Greg KH
Cc: Chris Wright, Tejun Heo, Theodore Ts'o, Zwane Mwaikambo,
Jeff Garzik, Greg Kroah-Hartman, Justin Forbes, linux-kernel,
Chris Wedgwood, Domenico Andreoli, IDE/ATA development list,
Randy Dunlap, Michael Krufky, matthieu.castet, Chuck Ebbert,
Dave Jones, akpm, Chuck Wolber, stable, alan
On Fri, 6 Jun 2008, Greg KH wrote:
> >
> > This isn't upstream. Maybe there's some reason it's not needed upstream,
> > but it would be nice to know.
>
> To quote Tejun when he sent this patch:
> ---
> Patch for -stable only. Devel branch now uses hardreset by
> default so this type of promotion logic isn't necessary anymore.
Ok, thanks,
Linus
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-06-07 16:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20080607010215.358296706@sous-sol.org>
2008-06-07 1:02 ` [patch 10/50] libata: force hardreset if link is in powersave mode Chris Wright
2008-06-07 1:27 ` Linus Torvalds
2008-06-07 1:57 ` [stable] " Greg KH
2008-06-07 16:51 ` Linus Torvalds
2008-06-07 3:14 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).