RE: Problems with ide-default.c and my hdd (2.5.64-ac3)

Osamu Tomita (tomita@cinet.co.jp)
Fri, 14 Mar 2003 11:20:25 +0900


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-27420-1047608474-0001-2
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

-----Original Message-----
From: Mauricio Nunez
To: linux-kernel@vger.kernel.org
Sent: 2003/03/14 11:03
Subject: Problems with ide-default.c and my hdd (2.5.64-ac3)

> I'm booting 2.5.64-ac3 with hdd=none because I got a Kernel Panic
> default attach failed.

I had same trable. But my box is the PC9800 architecture.
Please test my patch attached. This may be OK for standard PC too.

Regards,
Osamu Tomita

--=_courier-27420-1047608474-0001-2
Content-Type: application/octet-stream; name="ide-fix.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="ide-fix.patch"

This is quick fix for boot.=0A=
=0A=
diff -Nru linux-2.5.64-ac3/drivers/ide/ide-probe.c =
linux-2.5.64-ac3-quick-fix/drivers/ide/ide-probe.c=0A=
--- linux-2.5.64-ac3/drivers/ide/ide-probe.c 2003-03-08 =
12:29:29.000000000 +0900=0A=
+++ linux-2.5.64-ac3-quick-fix/drivers/ide/ide-probe.c 2003-03-10 =
21:25:30.000000000 +0900=0A=
@@ -1392,7 +1392,8 @@=0A=
if (!hwif->present)=0A=
continue;=0A=
for (unit =3D 0; unit < MAX_DRIVES; ++unit)=0A=
- ata_attach(&hwif->drives[unit]);=0A=
+ if (hwif->drives[unit].present)=0A=
+ ata_attach(&hwif->drives[unit]);=0A=
}=0A=
}=0A=
if (!ide_probe)=0A=
diff -Nru linux-2.5.64-ac3/drivers/ide/ide.c =
linux-2.5.64-ac3-quick-fix/drivers/ide/ide.c=0A=
--- linux-2.5.64-ac3/drivers/ide/ide.c 2003-03-08 12:29:29.000000000 =
+0900=0A=
+++ linux-2.5.64-ac3-quick-fix/drivers/ide/ide.c 2003-03-10 =
21:29:00.000000000 +0900=0A=
@@ -2377,7 +2377,8 @@=0A=
while (!list_empty(&list)) {=0A=
ide_drive_t *drive =3D list_entry(list.next, ide_drive_t, list);=0A=
list_del_init(&drive->list);=0A=
- ata_attach(drive);=0A=
+ if (drive->present)=0A=
+ ata_attach(drive);=0A=
}=0A=
driver->gen_driver.name =3D (char *) driver->name;=0A=
driver->gen_driver.bus =3D &ide_bus_type;=0A=

--=_courier-27420-1047608474-0001-2--