linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH next] ide: fix PowerMac bootup oops
@ 2009-06-08 20:45 Hugh Dickins
  2009-06-08 21:28 ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 6+ messages in thread
From: Hugh Dickins @ 2009-06-08 20:45 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Joao Ramos, Sergei Shtylyov, Benjamin Herrenschmidt,
	Andrew Morton, linux-kernel, linux-ide

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.
It does the right thing if id is not set, so long as we check for that.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-06-10 12:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-08 20:45 [PATCH next] ide: fix PowerMac bootup oops Hugh Dickins
2009-06-08 21:28 ` Bartlomiej Zolnierkiewicz
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

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).