All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dgilbert@interlog.com>
To: Phillip Susi <psusi@ubuntu.com>,
	linux-scsi@vger.kernel.org,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>
Subject: Re: Disk wakeup on resume
Date: Tue, 05 Nov 2013 12:04:54 -0500	[thread overview]
Message-ID: <52792536.6020607@interlog.com> (raw)
In-Reply-To: <52791B85.1090805@ubuntu.com>

On 13-11-05 11:23 AM, Phillip Susi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 11/5/2013 10:56 AM, Douglas Gilbert wrote:
>> I think that you might find that almost any SCSI command
>> (translated to its ATA equivalent command) will wake up a SATA
>> disk. Perhaps just this sequence: fd = open(<ata_bloc_device>) ;
>> close(fd) ; is sufficient.
>
> No, otherwise hdparm, udisks, etc would not be able to issue the CHECK
> POWER command without waking the disk.  Most commands do wake the
> drive, but as far as I can see, nobody is sending down any, and more
> importantly, the wake is happening within the kernel pm resume path,
> not by userspace after resume.

hdparm is quite capable of using a pass-through device
to access disks. That allows it (and smartmontools) to
access physical disks in a RAID when the block layer
can only see the logical disk out front.

udisks is not that smart.


Perhaps you need to start debugging around here:

static int sd_resume(struct device *dev)
{
         struct scsi_disk *sdkp = scsi_disk_get_from_dev(dev);
         int ret = 0;

         if (!sdkp->device->manage_start_stop)
                 goto done;

         sd_printk(KERN_NOTICE, sdkp, "Starting disk\n");
         ret = sd_start_stop_device(sdkp, 1);

done:
         scsi_disk_put(sdkp);
         return ret;
}

to work out if it is spun up before or after that call.

Doug Gilbert


      reply	other threads:[~2013-11-05 17:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-05  2:37 Disk wakeup on resume Phillip Susi
2013-11-05  9:05 ` Aaron Lu
2013-11-05 14:07   ` Phillip Susi
2013-11-05 21:32   ` Phillip Susi
2013-11-06  5:49     ` Aaron Lu
2013-11-06 14:40       ` Phillip Susi
2013-11-06  0:07   ` Phillip Susi
2013-11-05 15:56 ` Douglas Gilbert
2013-11-05 16:23   ` Phillip Susi
2013-11-05 17:04     ` Douglas Gilbert [this message]

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=52792536.6020607@interlog.com \
    --to=dgilbert@interlog.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=psusi@ubuntu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.