Messages in this thread | | | Subject | Re: device_suspend() levels [was Re: [patch] ACPI work on aic7xxx] | From | Benjamin Herrenschmidt <> | Date | Tue, 20 Jul 2004 17:02:06 -0400 |
| |
On Tue, 2004-07-20 at 16:50, Nathan Bryant wrote: > Benjamin Herrenschmidt wrote: > > > Note regarding aix7xxx, we also need proper hooks in the SCSI stack to > > block the queue correctly etc... in the same way we do on IDE. I didn't > > have time to look into this yet. > > Here's what we currently do, aic7xxx_core.c - looks like it attempts to > quiesce, and then refuse to suspend if we happen to be busy. This is a > little messy because it's done in the suspend call rather than the > save_state call, therefore resume will still be called if this routine > returns an error code, which will reinitialize the device when we didn't > really need to.
save_state is a nonsense, didn't we kill it ? queue quiescing must be done by the upper level, which is a bit nasty with things like md & multipath... basically, the low level driver must have a way to notify it's functional parent (as opposed to it's bus parent) that it's going to sleep, and any path using this low level driver must then be quiesced, the parent must resume only when all the drivers it relies on are back up.
> int > ahc_suspend(struct ahc_softc *ahc) > { > > ahc_pause_and_flushwork(ahc); > > if (LIST_FIRST(&ahc->pending_scbs) != NULL) { > ahc_unpause(ahc); > return (EBUSY); > } > > #ifdef AHC_TARGET_MODE > /* > * XXX What about ATIOs that have not yet been serviced? > * Perhaps we should just refuse to be suspended if we > * are acting in a target role. > */ > if (ahc->pending_device != NULL) { > ahc_unpause(ahc); > return (EBUSY); > } > #endif > ahc_shutdown(ahc); > return (0); > } -- Benjamin Herrenschmidt <benh@kernel.crashing.org>
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |