From 6e592be0b3aa6e8ddbd46156d223159c7636d325 Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Tue, 13 Mar 2007 11:20:58 +0000 Subject: add timeouts on ata_xfers --- sys/dev/ata/atascsi.c | 4 +++- sys/dev/ata/atascsi.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'sys/dev') 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 @@ -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 @@ -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; -- cgit v1.2.3