Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Shaohua Li <shaohua.li@intel.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	linux-ide <linux-ide@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>, pavel <pavel@ucw.cz>,
	Len Brown <len.brown@intel.com>, akpm <akpm@osdl.org>
Subject: Re: [RFC]add ACPI hooks for IDE suspend/resume
Date: Wed, 7 Dec 2005 20:15:05 +0100	[thread overview]
Message-ID: <58cb370e0512071115i3dbb741aqda7f98a97221d99b@mail.gmail.com> (raw)
In-Reply-To: <1133918523.2936.12.camel@sli10-mobl.sh.intel.com>

On 12/7/05, Shaohua Li <shaohua.li@intel.com> wrote:
> On Wed, 2005-12-07 at 16:49 +0100, Bartlomiej Zolnierkiewicz wrote:
> > On 12/7/05, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> > > On Mer, 2005-12-07 at 15:45 +0100, Bartlomiej Zolnierkiewicz wrote:
> > > > OK, I understand it now - when using 'ide-generic' host driver for IDE
> > > > PCI device, resume fails (for obvious reason - IDE PCI device is not
> > > > re-configured) and this patch fixes it through using ACPI methods.
> >
> > I was talking about bugzilla bug #5604.
> Sorry for my ignorance in IDE side. From the ACPI spec, there isn't a
> generic way to save/restore IDE's configuration. That's why ACPI
> provides such methods. I suppose all IDE drivers need call the methods,
> wrong?

>From the hardware POV:
* there is generic way to save/restores IDE device's configuration
* there is no generic way to save/restore IDE controller's configuration

>From the software POV what we only do currently is setting controller
and drive for a correct transfer mode by using host driver specific callback
(in case of using 'ide-generic' there is no such callback).

> > > Even in the piix case some devices need it because the bios wants to
> > > issue commands such as password control if the laptop is set up in
> > > secure modes.
> >
> > I completely agree.  However at the moment this patch doesn't seem
> > to issue any ATA commands (code is commented out in _GTF) so
> > this is not a case for bugzilla bug #5604.
> I actually tried to invoke ATA commands using IDE APIs, but can't find
> any available one. I'd be very happy if you can give me any hint how to
> do it or even you can fix it.

Probably do_rw_taskfile() is the method you want to use, you also need
to place invoking of ACPI provided ATA commands in the right place in
the IDE PM state machine [ ide_{start,complete}_power_step() ].

PS1 Please don't use taskfile_lib_get_identify(), drive->id
should contain valid ID - if it doesn't it is a BUG.

PS2 Have you seen libata ACPI patches by Randy?
Maybe some of the code dealing with ACPI can be put to
<linux/ata.h> and be shared between IDE and libata drivers?

Thanks,
Bartlomiej

  reply	other threads:[~2005-12-07 19:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-06  6:10 [RFC]add ACPI hooks for IDE suspend/resume Shaohua Li
2005-12-06 22:20 ` Matthew Garrett
2005-12-06 22:50   ` Alan Cox
2005-12-07  8:17   ` Bartlomiej Zolnierkiewicz
2005-12-07 13:14     ` Matthew Garrett
2005-12-07 14:19       ` Bartlomiej Zolnierkiewicz
2005-12-07 14:26         ` Bartlomiej Zolnierkiewicz
2005-12-07 14:34           ` Matthew Garrett
2005-12-07 14:33         ` Matthew Garrett
2005-12-07 14:45           ` Bartlomiej Zolnierkiewicz
2005-12-07 14:58             ` Matthew Garrett
2005-12-07 15:44               ` Bartlomiej Zolnierkiewicz
2005-12-07 15:53                 ` Matthew Garrett
2005-12-07 15:41             ` Alan Cox
2005-12-07 15:49               ` Bartlomiej Zolnierkiewicz
2005-12-07  1:22                 ` Shaohua Li
2005-12-07 19:15                   ` Bartlomiej Zolnierkiewicz [this message]
2005-12-07 22:35                     ` Alan Cox
2005-12-07 22:42                       ` Bartlomiej Zolnierkiewicz
2005-12-07 22:43                       ` Pavel Machek
2005-12-07 22:48                         ` Matthew Garrett
2005-12-07  0:11 ` Randy.Dunlap
2005-12-07  1:15   ` Shaohua Li
  -- strict thread matches above, loose matches on Subject: below --
2005-12-07 21:58 Li, Shaohua
2005-12-07 23:19 Li, Shaohua

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=58cb370e0512071115i3dbb741aqda7f98a97221d99b@mail.gmail.com \
    --to=bzolnier@gmail.com \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=len.brown@intel.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=pavel@ucw.cz \
    --cc=shaohua.li@intel.com \
    /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