diff options
author | 2009-12-07 12:36:23 +0000 | |
---|---|---|
committer | 2009-12-07 12:36:23 +0000 | |
commit | a86213d9b2512e363d3fddeae2bcc4b793d46417 (patch) | |
tree | e6dedfcbad54444b29d02500136e752446dae97b | |
parent | get rid of the return codes from command submission, ata_cmd handlers (diff) | |
download | wireguard-openbsd-a86213d9b2512e363d3fddeae2bcc4b793d46417.tar.xz wireguard-openbsd-a86213d9b2512e363d3fddeae2bcc4b793d46417.zip |
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); |