mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Mikael Pettersson <mikpe@it.uu.se>
Cc: Christian Mueller <Christian.Mueller@wdc.com>,
	Bruce Allen <ballen@gravity.phys.uwm.edu>,
	Smartmontools Mailing List 
	<smartmontools-support@lists.sourceforge.net>,
	LKML <linux-kernel@vger.kernel.org>,
	IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: Re: [smartmontools-support] inactive SATA drives won't stay in standby or sleep, PATA models did. (fwd)
Date: Tue, 21 Oct 2008 13:18:22 +0900	[thread overview]
Message-ID: <48FD580E.4080101@gmail.com> (raw)
In-Reply-To: <18683.50533.786782.474536@harpo.it.uu.se>

Hello, Mikael.

> --- linux-2.6.27/drivers/ata/sata_promise.c.~1~	2008-07-14 10:22:36.000000000 +0200
> +++ linux-2.6.27/drivers/ata/sata_promise.c	2008-10-20 00:20:58.000000000 +0200
> @@ -153,6 +153,7 @@ static void pdc_freeze(struct ata_port *
>  static void pdc_sata_freeze(struct ata_port *ap);
>  static void pdc_thaw(struct ata_port *ap);
>  static void pdc_sata_thaw(struct ata_port *ap);
> +static int pdc_prereset(struct ata_link *link, unsigned long deadline);
>  static void pdc_error_handler(struct ata_port *ap);
>  static void pdc_post_internal_cmd(struct ata_queued_cmd *qc);
>  static int pdc_pata_cable_detect(struct ata_port *ap);
> @@ -175,6 +176,7 @@ static const struct ata_port_operations 
>  	.sff_irq_clear		= pdc_irq_clear,
>  
>  	.post_internal_cmd	= pdc_post_internal_cmd,
> +	.prereset		= pdc_prereset,
>  	.error_handler		= pdc_error_handler,
>  };
>  
> @@ -691,6 +693,12 @@ static void pdc_sata_thaw(struct ata_por
>  	readl(host_mmio + hotplug_offset); /* flush */
>  }
>  
> +static int pdc_prereset(struct ata_link *link, unsigned long deadline)
> +{
> +	pdc_reset_port(link->ap);

I would put this into ->hardreset itself as the controller can also
get out of sync with reality during reset.  Other than that, looks
like the correct approach.

Thanks.

-- 
tejun

  reply	other threads:[~2008-10-21  4:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <48EBFB63.20506@gmail.com>
2008-10-08  0:20 ` Christian Mueller
2008-10-08  0:28   ` Tejun Heo
2008-10-12 14:55     ` Mikael Pettersson
2008-10-13  5:16       ` Tejun Heo
2008-10-13  7:03         ` Mikael Pettersson
2008-10-13  7:08           ` Tejun Heo
2008-10-19 23:40         ` Mikael Pettersson
2008-10-21  4:18           ` Tejun Heo [this message]
2008-10-21  7:56             ` Mikael Pettersson
2008-10-21  9:02               ` Tejun Heo
2008-10-21  9:30                 ` Mikael Pettersson
2008-10-21  7:59           ` Mikael Pettersson
2008-10-21  8:55             ` Tejun Heo
     [not found] <Pine.LNX.4.64.0809142159550.18213@gc.phys.uwm.edu>
     [not found] ` <48E1B8F8.3090205@gmail.com>
     [not found]   ` <48E26BDA.8080804@tlinx.org>
     [not found]     ` <48E26E61.2010705@gmail.com>
     [not found]       ` <48E34BC8.3050009@tlinx.org>
     [not found]         ` <48E6DE07.70706@gmail.com>
2008-10-07  0:37           ` Linda Walsh
2008-10-07  1:08             ` Tejun Heo
2008-10-07  1:36               ` Linda Walsh
2008-10-07  1:42                 ` Tejun Heo
2008-10-07 10:13                   ` Linda Walsh
2008-10-07 22:27                   ` Linda Walsh
2008-10-07 23:59                     ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48FD580E.4080101@gmail.com \
    --to=htejun@gmail.com \
    --cc=Christian.Mueller@wdc.com \
    --cc=ballen@gravity.phys.uwm.edu \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikpe@it.uu.se \
    --cc=smartmontools-support@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome