From: Hugh Dickins Date: Wed, 10 Jun 2009 12:37:20 +0000 (+0200) Subject: ide: fix PowerMac bootup oops X-Git-Tag: v2.6.31-rc1~372^2~2 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f4417a156a6e44359effa9492de3ed5638a9b13;p=pandora-kernel.git ide: fix PowerMac bootup oops 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() to be called before drive->id has been set. Bart points out other places which now need drive->id set earlier, so follow his advice to allocate it in ide_port_alloc_devices() (using kzalloc_node, without error message, as when allocating drive) and memset it for reuse in ide_port_init_devices_data(). Fixed in passing: ide_host_alloc() was missing ide_port_free_devices() from an error path. Signed-off-by: Hugh Dickins Cc: Joao Ramos Cc: Sergei Shtylyov Cc: Benjamin Herrenschmidt Cc: Andrew Morton Signed-off-by: Bartlomiej Zolnierkiewicz --- Reading git-diff-tree failed