Re: [linux-pm] [PATCH] Block on access to temporarily unavailable pci device

Alan Stern
2006-10-18T14:38:22Z

On Tue, 17 Oct 2006, Brian King wrote:

> Nack. This changes pci_block_user_cfg_access such that it can now sleep,
> which does not work for the ipr driver, which uses it to block during BIST.
> The ipr driver needs to be able to call this function at interrupt level
> when it receives an interrupt that its scsi adapter has received a fatal
> error and requires BIST to recover. The only way I see for ipr to be able
> to use the changed interface would require I create a kernel thread in
> the ipr driver for this specific purpose.

How about calling execute_in_process_context()?

You have to do _something_, because a user task could be about to read the
configuration space at the exact moment you want to start the BIST. That
means ipr would have to wait until the user access is finished, which
means it has to be prepared to sleep one way or another.

Alan Stern