Re: PATCH: Shutdown IDE before powering off.

Andrew Morton
2004-01-22T07:49:19Z

Nigel Cunningham <ncunningham@users.sourceforge.net> wrote:
>
> +static void ide_drive_shutdown (struct device * dev)
> +{
> + generic_ide_suspend(dev, 5);
> +}
> +
> int ide_register_driver(ide_driver_t *driver)
> {
> struct list_head list;
> @@ -2519,6 +2524,7 @@
> driver->gen_driver.name = (char *) driver->name;
> driver->gen_driver.bus = &ide_bus_type;
> driver->gen_driver.remove = ide_drive_remove;
> + driver->gen_driver.shutdown = ide_drive_shutdown;

This spins down the disk(s) when you're just doing do a reboot. That's
fairly irritating and could affect reboot times if one has many disks.