diff options
author | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2007-03-20 15:03:23 +0000 |
---|---|---|
committer | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2007-03-20 15:03:23 +0000 |
commit | d8fdd20cc7c2b1cdedd9ac13117536c652163fc3 (patch) | |
tree | d9b12f5ca591bc07b38666935b48fafcdc749f27 /sys | |
parent | 9010469d20a6b0ab7b300d874cfaf7b6bd1fb87c (diff) |
Be sure to reset ata_xfer flags for all PACKET transfers, otherwise we
could pick up a previous ATA_F_POLL from a previous non-data command.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ata/atascsi.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c index 8386ed92b01..6790502eed9 100644 --- a/sys/dev/ata/atascsi.c +++ b/sys/dev/ata/atascsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.c,v 1.28 2007/03/20 13:42:05 pascoe Exp $ */ +/* $OpenBSD: atascsi.c,v 1.29 2007/03/20 15:03:22 pascoe Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -608,14 +608,15 @@ atascsi_atapi_cmd(struct scsi_xfer *xs) switch (xs->flags & (SCSI_DATA_IN | SCSI_DATA_OUT)) { case SCSI_DATA_IN: - xa->flags = ATA_F_READ; + xa->flags = ATA_F_PACKET | ATA_F_READ; break; case SCSI_DATA_OUT: - xa->flags = ATA_F_WRITE; + xa->flags = ATA_F_PACKET | ATA_F_WRITE; break; + default: + xa->flags = ATA_F_PACKET; } - xa->flags |= ATA_F_PACKET; xa->data = xs->data; xa->datalen = xs->datalen; xa->complete = atascsi_atapi_cmd_done; |