diff options
author | green <green@FreeBSD.org> | 2004-06-17 07:29:56 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 2004-06-17 07:29:56 +0000 |
commit | 16b3d5deee3312f7a4cec54acb9c4c2d749139f3 (patch) | |
tree | f2eb718fbca1f207bd965e78b479d5e08d377e28 /sys | |
parent | 4c2e464ea2a4a1c5d41aff23221551d76f839a6d (diff) | |
download | FreeBSD-src-16b3d5deee3312f7a4cec54acb9c4c2d749139f3.zip FreeBSD-src-16b3d5deee3312f7a4cec54acb9c4c2d749139f3.tar.gz |
atapicam(4) is currently off by three orders of magnitude regarding the
timeout values in the CAM CCBs. Divide by 1000 to get values in seconds
which are what ata(4) timeouts internally use.
This does lose granularity, though, and small values can now round down
to zero. It's probably worth making all ata(4) timeouts in terms of
hz/ticks/milliseconds/something.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ata/atapi-cam.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ata/atapi-cam.c b/sys/dev/ata/atapi-cam.c index 5d2706b..a0cd71c 100644 --- a/sys/dev/ata/atapi-cam.c +++ b/sys/dev/ata/atapi-cam.c @@ -496,7 +496,7 @@ atapi_action(struct cam_sim *sim, union ccb *ccb) request->data = buf; request->bytecount = len; request->transfersize = min(request->bytecount, 65534); - request->timeout = ccb_h->timeout; + request->timeout = ccb_h->timeout / 1000; /* XXX lost granularity */ request->retries = 2; request->callback = &atapi_cb; request->flags = request_flags; @@ -588,7 +588,7 @@ atapi_cb(struct ata_request *request) request->data = (caddr_t)&csio->sense_data; request->bytecount = sizeof(struct atapi_sense); request->transfersize = min(request->bytecount, 65534); - request->timeout = csio->ccb_h.timeout; + request->timeout = csio->ccb_h.timeout / 1000; request->retries = 2; request->flags = ATA_R_QUIET|ATA_R_ATAPI|ATA_R_IMMEDIATE; hcb->flags |= AUTOSENSE; |