mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Pavel Machek <pavel@suse.cz>,
	Arkadiusz Miskiewicz <arekm@maven.pl>,
	Jeff Chua <jeffchua@silk.corp.fedex.com>,
	Matt Mackall <mpm@selenic.com>, Jens Axboe <axboe@suse.de>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>
Subject: Re: sata suspend resume ...
Date: Sun, 23 Apr 2006 13:58:41 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0604231343010.2515@blonde.wat.veritas.com> (raw)
In-Reply-To: <4449504D.1040901@garzik.org>

Thanks for taking a look, and replying in such detail, Jeff
(I'm afraid you overestimate my understanding of this area!)

On Fri, 21 Apr 2006, Jeff Garzik wrote:
> This is helpful to narrow down the problem, but its a bit of a layering
> violation.  In the current code, all functions called by
> ata_device_{suspend,resume}() are high level functions, which uses
> ata_qc_issue/ata_qc_complete high level API to address the device.

Ah, that's a pity.  I see what you mean.

> In contrast, ata_busy_sleep() sticks its hands deep into the host state
> machine, and gives the tree a good hard shake.  :)

Though that seems a considerable overstatement: ata_busy_sleep doesn't
shake anything, it just hangs around reading and testing a flag (in a
bewildering series of slightly different loops).  I guess even reading
status must be viewed as "a good hard shake" at this upper level.

> Consider that
> ata_busy_sleep() doesn't make sense for unusual cases like ATA-over-ethernet
> (AoE), or other tunnelled ATA transports.
> 
> It may very well be that ata_busy_sleep() is the proper solution for your
> hardware, but it isn't applicable to all hardware.

Can it do harm on any hardware to wait for ATA_BUSY to clear there?
Would it be less of a violation to do it in ata_scsi_device_resume?
Or should ata_piix.c have its own .resume to add this in?  Or....

> So you really want an ata_make_sure_bus_is_awake_and_working() called at that
> location.  ata_busy_sleep()'s purpose is to bring a PATA-like bus to the
> bus-idle state.  So, when working on suspend/resume, the software needs to
> have points at which the bus state is controlled/queried/asserted.

As you can see from my questions, I haven't a clue around here.  So for
now I'll just have to keep that ata_busy_sleep with the patches I apply
to my kernel, until someone with a clue makes it redundant.  And it is
now there in the LKML archives for those who find it useful.

Hugh

  reply	other threads:[~2006-04-23 12:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-19 15:26 Jeff Chua
2006-04-19 15:52 ` Arkadiusz Miskiewicz
2006-04-20  2:18   ` Jeff Chua
2006-04-19 16:13 ` Hugh Dickins
2006-04-19 16:56   ` Arkadiusz Miskiewicz
2006-04-19 17:08     ` Hugh Dickins
2006-04-19 21:49   ` Matt Mackall
2006-04-19 22:50     ` Hugh Dickins
2006-04-19 22:57       ` Matt Mackall
2006-04-19 23:26         ` Hugh Dickins
2006-04-20 13:25   ` Arkadiusz Miskiewicz
2006-04-20 13:47   ` Pavel Machek
2006-04-21 12:49     ` Hugh Dickins
2006-04-21 16:39       ` Pavel Machek
2006-04-21 20:44         ` Hugh Dickins
2006-04-21 20:50           ` Matt Mackall
2006-04-21 21:15           ` Pavel Machek
2006-04-21 21:36           ` Jeff Garzik
2006-04-23 12:58             ` Hugh Dickins [this message]
2006-04-29 18:06               ` Hugh Dickins
2006-04-21 23:39           ` Chris Ball
2006-04-23 12:42             ` Hugh Dickins
2006-04-23 13:52               ` Jeff Chua

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=Pine.LNX.4.64.0604231343010.2515@blonde.wat.veritas.com \
    --to=hugh@veritas.com \
    --cc=arekm@maven.pl \
    --cc=axboe@suse.de \
    --cc=jeff@garzik.org \
    --cc=jeffchua@silk.corp.fedex.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=pavel@suse.cz \
    /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

all inboxes | Powered by JetHome®