kernel -- nata: Use ATA_DEFAULT_TIMEOUT (10) rather than 1 for ATA controlcmds.
authorVenkatesh Srinivas <me@endeavour.zapto.org>
Fri, 27 Jan 2012 10:55:15 +0000 (02:55 -0800)
committerVenkatesh Srinivas <me@endeavour.zapto.org>
Mon, 30 Jan 2012 12:07:37 +0000 (04:07 -0800)
A one-second timeout for control commands was inappropriate for
SET TRANSFER MODE/ENABLE RCACHE/ENABLE WCACHE on spun-down WD Caviar Greens,
among others.

sys/dev/disk/nata/ata-queue.c

index 8aec1d3..b1b96a3 100644 (file)
@@ -168,7 +168,7 @@ ata_controlcmd(device_t dev, u_int8_t command, u_int16_t feature,
        request->u.ata.count = count;
        request->u.ata.feature = feature;
        request->flags = ATA_R_CONTROL;
-       request->timeout = 1;
+       request->timeout = ATA_DEFAULT_TIMEOUT;
        request->retries = 0;
        ata_queue_request(request);
        error = request->result;