diff options
author | mav <mav@FreeBSD.org> | 2009-10-26 11:23:41 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2009-10-26 11:23:41 +0000 |
commit | d74c44b698663dc4b8a71611a4390f270227ed30 (patch) | |
tree | 715f0ad85893f6cc1538ae800a55ffdd2100754e | |
parent | 4d4863d52a449616bbb043267dc0972d97a239b8 (diff) | |
download | FreeBSD-src-d74c44b698663dc4b8a71611a4390f270227ed30.zip FreeBSD-src-d74c44b698663dc4b8a71611a4390f270227ed30.tar.gz |
Round timeout up when converting CAM milliseconds to ATA seconds.
-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 cf90c49..c9af632 100644 --- a/sys/dev/ata/atapi-cam.c +++ b/sys/dev/ata/atapi-cam.c @@ -629,7 +629,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 / 1000; /* XXX lost granularity */ + request->timeout = (ccb_h->timeout + 999) / 1000; request->callback = &atapi_cb; request->flags = request_flags; @@ -732,7 +732,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 / 1000; + request->timeout = (csio->ccb_h.timeout + 999) / 1000; request->retries = 2; request->flags = ATA_R_QUIET|ATA_R_ATAPI|ATA_R_IMMEDIATE; hcb->flags |= AUTOSENSE; |