libata: fix shutdown warning message printing
authorTejun Heo <htejun@gmail.com>
Mon, 14 May 2007 15:26:18 +0000 (17:26 +0200)
committerJeff Garzik <jeff@garzik.org>
Wed, 16 May 2007 05:18:31 +0000 (01:18 -0400)
commitda071b42f73dabbd0daf7ea4c3ff157d53b00648
tree6b8aa61169f6c18263821d9c5fe298b3b2eb6b21
parent3cadbcc09891b8544203f211dac13f9cc4e6832a
libata: fix shutdown warning message printing

Unlocking ap->lock and ssleeping don't work because SCSI commands can
be issued from completion path without context.  Reimplement delayed
completion by allowing translation functions to override
qc->scsidone(), storing the original completion function to
scmd->scsi_done() and overriding qc->scsidone() with a function which
schedules delayed invocation of scmd->scsi_done().

This isn't pretty at all but all the ugly parts are thankfully
contained in the stop translation path where the compat feature is
implemented.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-scsi.c