From caf296e2338a339493244139db15da01acf78d46 Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Mon, 7 Dec 2009 12:36:24 +0000 Subject: 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@ --- sys/dev/ata/atascsi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/dev') 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 @@ -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); -- cgit v1.2.3