summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-queue.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2009-02-26 21:33:48 +0000
committermav <mav@FreeBSD.org>2009-02-26 21:33:48 +0000
commitbb22735cfd8d9750d7d63bbe7a69bb5e7f68060c (patch)
tree0fcc3922c3bc54621b1ead87fd3a5fb83ffad5d5 /sys/dev/ata/ata-queue.c
parente2be17ec8c033846c60a3c3371e6709f46d8efcb (diff)
downloadFreeBSD-src-bb22735cfd8d9750d7d63bbe7a69bb5e7f68060c.zip
FreeBSD-src-bb22735cfd8d9750d7d63bbe7a69bb5e7f68060c.tar.gz
Remove direct ata_completed() call options from ata_finish(), except for the
kernel dumping case. ata_completed() may initiate ata_reinit() on error, that may lead to drives attach or detach. Attach and detach are sending requests to drives and sleep waiting for results. But ata_finish() can be called directly from interrupt handler where sleeping is prohibited, so we must break this chain somewhere. This place seems to fit best.
Diffstat (limited to 'sys/dev/ata/ata-queue.c')
-rw-r--r--sys/dev/ata/ata-queue.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/dev/ata/ata-queue.c b/sys/dev/ata/ata-queue.c
index 707dfe9..b438467 100644
--- a/sys/dev/ata/ata-queue.c
+++ b/sys/dev/ata/ata-queue.c
@@ -237,14 +237,8 @@ ata_start(device_t dev)
void
ata_finish(struct ata_request *request)
{
- struct ata_channel *ch = device_get_softc(request->parent);
- /*
- * if in ATA_STALL_QUEUE state or request has ATA_R_DIRECT flags set
- * we need to call ata_complete() directly here (no taskqueue involvement)
- */
- if (dumping ||
- (ch->state & ATA_STALL_QUEUE) || (request->flags & ATA_R_DIRECT)) {
+ if (dumping) {
ATA_DEBUG_RQ(request, "finish directly");
ata_completed(request, 0);
}
OpenPOWER on IntegriCloud