In our "extreme prejudice" suspend (this is in the context of masking
& recovering from a fault in a fault-tolerant machine) we have cases
in which completion of pending commands isn't possible. Our solution
is to issue a SCSI bus reset, and terminate all outstanding commands
with an appropriate (retryable) error. This is especially easy to
implement in drivers that use SCSI bus reset as a routine (though
last resort) error recovery mechanism, since the requisite logic is
already in place. Not pretty, I suppose, but effective.
One model we've considered (but haven't implemented yet) is to make
parents in the device tree responsible for suspending their children,
so the suspend propagates down the tree and each node "knows" how to
suspend its children, assuming any special action is required. So a
SCSI HBA, for example, would be asked by its bus parent to suspend,
and in turn would suspend its SCSI device children before suspending
itself. I'm not quite sure how virtual device layers like md would
fit into this scheme, since they can cut across device and power
hierarchies.
At 11:54 AM +0100 10/24/01, Alan Cox wrote:
>So the scsi devices hang off sd, sr etc which in turn hang off scsi and
>the controllers hang off scsi (and or the bus layers)
Our first implementation was under Solaris 2.x (SPARC) in which the
parent->child relationship is bus->hba->sd. scsi isn't in the tree;
it's more of an interface layer between hba & sd. fwiw.
-- /Jonathan Lundell. - 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/