Re: APM "SuspendToDisk" implementation problem

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sun, 22 Nov 1998 06:47:25 +0000 (GMT)


> I discovered that Linux doesn't reinitialize the EIDE controllers/HDDs
> at all when resuming from a "Suspend To Disk".

Indeed

> Guess what that means...

It means your BIOS sucks.

> So I decided to begin writing support for IDE APM reconfiguration.
> Now I'm experiencing problems with "Scheduling in interrupt".

Right. You are acting in the interrupt handler

> printk("setting: %p, ", setting);
> ide_write_setting(drive, setting, ide_read_setting(drive, setting));
> setting = setting->next;

This function will wait. You can't wait in an IRQ. There are several ways
to tackle this

1. You can instead put the stuff in apmd - so when it sees a resume the
APM daemon configures your disk back

2. You wake a thread (or let an existing thread) do it. The thread can
sleep even though the irq cannot.

Making apmd handle it seems "right" since it keeps it in user space

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/