summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorChristopher Pascoe <pascoe@cvs.openbsd.org>2007-03-24 22:03:19 +0000
committerChristopher Pascoe <pascoe@cvs.openbsd.org>2007-03-24 22:03:19 +0000
commit0201ac5085d6fc2d714b1f3d6607606aab57339c (patch)
treedcebed6d5653cc9d9f41789aef7ecdcd4ea64140 /sys/dev
parentd615ac397c48549fba1f9f82937c266784fd4d1b (diff)
Complete the right scsi_xfer when processing a disk sync request.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/atascsi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c
index 3e1e9a6cf87..f6e2723ff9a 100644
--- a/sys/dev/ata/atascsi.c
+++ b/sys/dev/ata/atascsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atascsi.c,v 1.37 2007/03/23 05:28:34 pascoe Exp $ */
+/* $OpenBSD: atascsi.c,v 1.38 2007/03/24 22:03:18 pascoe Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -517,12 +517,12 @@ atascsi_disk_sync(struct scsi_xfer *xs)
xa->datalen = 0;
xa->flags = ATA_F_READ;
- if (xs->flags & SCSI_POLL)
- xa->flags |= ATA_F_POLL;
xa->complete = atascsi_disk_sync_done;
-
/* Spec says flush cache can take >30 sec, so give it at least 45. */
xa->timeout = (xs->timeout < 45000) ? 45000 : xs->timeout;
+ xa->atascsi_private = xs;
+ if (xs->flags & SCSI_POLL)
+ xa->flags |= ATA_F_POLL;
xa->fis->flags = ATA_H2D_FLAGS_CMD;
xa->fis->command = ATA_C_FLUSH_CACHE;