diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2009-12-07 12:36:24 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2009-12-07 12:36:24 +0000 |
commit | caf296e2338a339493244139db15da01acf78d46 (patch) | |
tree | 8bcb3ae963025d4d1166dd33bfab6178f068a60e | |
parent | af936f6e7df568eff7ab6f3b565c3b1e8549a9cc (diff) |
oops, wrong version of previous diff.
we have to exec a command (with ata_exec) before we check if its done with
ata_polled. of course an unstarted command will not be done.
found by and debugged with krw@
ok krw@
-rw-r--r-- | sys/dev/ata/atascsi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c index 13a97ed252d..98d7c488950 100644 --- a/sys/dev/ata/atascsi.c +++ b/sys/dev/ata/atascsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.c,v 1.67 2009/12/07 09:37:34 dlg Exp $ */ +/* $OpenBSD: atascsi.c,v 1.68 2009/12/07 12:36:23 dlg Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -209,6 +209,7 @@ atascsi_probe(struct scsi_link *link) xa->flags = ATA_F_READ | ATA_F_PIO | ATA_F_POLL; xa->timeout = 1000; xa->complete = ata_polled_complete; + ata_exec(as, xa); rv = ata_polled(xa); if (rv != 0) goto error; @@ -231,6 +232,7 @@ atascsi_probe(struct scsi_link *link) xa->flags = ATA_F_READ | ATA_F_PIO | ATA_F_POLL; xa->timeout = 1000; xa->complete = ata_polled_complete; + ata_exec(as, xa); ata_polled(xa); /* we dont care if it doesnt work */ } @@ -245,6 +247,7 @@ atascsi_probe(struct scsi_link *link) xa->flags = ATA_F_READ | ATA_F_PIO | ATA_F_POLL; xa->timeout = 1000; xa->complete = ata_polled_complete; + ata_exec(as, xa); ata_polled(xa); /* we dont care if it doesnt work */ } @@ -263,6 +266,7 @@ atascsi_probe(struct scsi_link *link) xa->flags = ATA_F_READ | ATA_F_PIO | ATA_F_POLL; xa->timeout = 1000; xa->complete = ata_polled_complete; + ata_exec(as, xa); ata_polled(xa); /* we dont care if it doesnt work */ return (0); |