From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: Joao Ramos <joao.ramos@inov.pt>,
Sergei Shtylyov <sshtylyov@ru.montavista.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH next] ide: fix PowerMac bootup oops
Date: Mon, 8 Jun 2009 23:28:02 +0200 [thread overview]
Message-ID: <200906082328.02729.bzolnier@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0906082137120.22183@sister.anvils>
Hi Hugh,
On Monday 08 June 2009 22:45:28 Hugh Dickins wrote:
> PowerMac bootup with CONFIG_IDE=y oopses in ide_pio_cycle_time():
> because "ide: try to use PIO Mode 0 during probe if possible" causes
> pmac_ide_set_pio_mode() now to be called before drive->id has been set.
Good spotting, I overlooked this aspect of the change while testing it
with piix host driver..
> It does the right thing if id is not set, so long as we check for that.
After auditing some other host drivers I see that drive->id can be used
also directly in ->set_pio_mode methods..
Could you please instead try moving ->id allocation from probe_for_drive()
to ide_port_alloc_devices() (this would fix all such issues for good) and
verify that it also fixes the oops?
> Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
> ---
>
> drivers/ide/ide-timings.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- lnext/drivers/ide/ide-timings.c 2009-04-08 18:25:55.000000000 +0100
> +++ linux/drivers/ide/ide-timings.c 2009-06-03 19:45:58.000000000 +0100
> @@ -84,7 +84,7 @@ u16 ide_pio_cycle_time(ide_drive_t *driv
> struct ide_timing *t = ide_timing_find_mode(XFER_PIO_0 + pio);
> u16 cycle = 0;
>
> - if (id[ATA_ID_FIELD_VALID] & 2) {
> + if (id && (id[ATA_ID_FIELD_VALID] & 2)) {
> if (ata_id_has_iordy(drive->id))
> cycle = id[ATA_ID_EIDE_PIO_IORDY];
> else
next prev parent reply other threads:[~2009-06-08 21:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-08 20:45 [PATCH next] ide: fix PowerMac bootup oops Hugh Dickins
2009-06-08 21:28 ` Bartlomiej Zolnierkiewicz [this message]
2009-06-09 11:44 ` Hugh Dickins
2009-06-09 12:36 ` Bartlomiej Zolnierkiewicz
2009-06-09 13:02 ` Hugh Dickins
2009-06-10 12:50 ` Bartlomiej Zolnierkiewicz
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=200906082328.02729.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=hugh.dickins@tiscali.co.uk \
--cc=joao.ramos@inov.pt \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sshtylyov@ru.montavista.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;
as well as URLs for NNTP newsgroup(s).