summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2007-03-13 11:20:58 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2007-03-13 11:20:58 +0000
commit6e592be0b3aa6e8ddbd46156d223159c7636d325 (patch)
tree012dfcc25ec17a7023328fbd10e1757ff5077efb /sys/dev
parent7621b06282fd49a54fa2e5552135688735e63a4e (diff)
add timeouts on ata_xfers
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/atascsi.c4
-rw-r--r--sys/dev/ata/atascsi.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c
index 323263448a2..a3e3e3b7185 100644
--- a/sys/dev/ata/atascsi.c
+++ b/sys/dev/ata/atascsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atascsi.c,v 1.14 2007/03/12 00:35:15 dlg Exp $ */
+/* $OpenBSD: atascsi.c,v 1.15 2007/03/13 11:20:57 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -394,6 +394,7 @@ atascsi_disk_inq(struct scsi_xfer *xs)
return (atascsi_stuffup(xs));
xa->complete = atascsi_disk_inq_done;
+ xa->timeout = xs->timeout;
xa->atascsi_private = xs;
if (xs->flags & SCSI_POLL)
xa->flags |= ATA_F_POLL;
@@ -459,6 +460,7 @@ atascsi_disk_capacity(struct scsi_xfer *xs)
return (atascsi_stuffup(xs));
xa->complete = atascsi_disk_capacity_done;
+ xa->timeout = xs->timeout;
xa->atascsi_private = xs;
if (xs->flags & SCSI_POLL)
xa->flags |= ATA_F_POLL;
diff --git a/sys/dev/ata/atascsi.h b/sys/dev/ata/atascsi.h
index 2b55fe4d68b..78f123651d5 100644
--- a/sys/dev/ata/atascsi.h
+++ b/sys/dev/ata/atascsi.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: atascsi.h,v 1.6 2007/02/28 13:25:42 dlg Exp $ */
+/* $OpenBSD: atascsi.h,v 1.7 2007/03/13 11:20:57 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -60,6 +60,8 @@ struct ata_xfer {
size_t datalen;
void (*complete)(struct ata_xfer *);
+ struct timeout stimeout;
+ u_int timeout;
struct ata_port *port;
int flags;