linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Lee Trager <Lee@PicturesInMotion.net>
Cc: linux-ide@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH] ide: Reinitilize idedisk_capacity for HPA drives on resume
Date: Mon, 21 Aug 2006 20:33:31 +0400	[thread overview]
Message-ID: <44E9E05B.4030502@ru.mvista.com> (raw)
In-Reply-To: <44E9038D.4040109@PicturesInMotion.net>

Hello.

Lee Trager wrote:

> This patch fixes a problem that when a computer with HPA on it's hard
> drive comes out of sleep mode it needs the disks capacity reinitialized.

> This is my first patch to the Linux kernel so if I did anything wrong
> please be gentle ;)

    Your mailer spoils tabs, so either attach your patch or use the different
mailer.

[...]

> diff -Naur linux-2.6.18-rc4-old/drivers/ide/ide.c
> linux-2.6.18-rc4/drivers/ide/ide.c
> --- linux-2.6.18-rc4-old/drivers/ide/ide.c    2006-08-19
> 03:49:03.000000000 -0400
> +++ linux-2.6.18-rc4/drivers/ide/ide.c    2006-08-20 19:12:38.000000000
> -0400
> @@ -1232,6 +1232,7 @@
>      struct request rq;
>      struct request_pm_state rqpm;
>      ide_task_t args;
> +    int ide_cmd;
>  
>      memset(&rq, 0, sizeof(rq));
>      memset(&rqpm, 0, sizeof(rqpm));
> @@ -1242,7 +1243,15 @@
>      rqpm.pm_step = ide_pm_state_start_resume;
>      rqpm.pm_state = PM_EVENT_ON;
>  
> -    return ide_do_drive_cmd(drive, &rq, ide_head_wait);
> +    ide_cmd = ide_do_drive_cmd(drive, &rq, ide_head_wait);
> +
> +    /* check to see if this is a hard drive
> +     * if it is then checkhpa needs to be
> +     * disabled */
> +    if(drive->media == ide_disk && idedisk_supports_hpa(drive->id))
> +        init_idedisk_capacity(drive);
> +
> +    return ide_cmd;
>  }

    Hm, shouldn't this be handled as a separate resume process step?

MBR, Sergei


  reply	other threads:[~2006-08-21 16:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-21  0:51 [PATCH] ide: Reinitilize idedisk_capacity for HPA drives on resume Lee Trager
2006-08-21 16:33 ` Sergei Shtylyov [this message]
2006-08-21 21:18   ` Lee Trager
2006-08-21 23:15     ` Lee Trager

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=44E9E05B.4030502@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=Lee@PicturesInMotion.net \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-ide@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).