mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Round timeout up when converting CAM milliseconds to ATA seconds.
This commit is contained in:
parent
cc0daebb53
commit
e8579543e8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=198487
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user