mirror of
https://github.com/opnsense/src.git
synced 2026-04-28 01:28:00 -04:00
Quiet the READ_TOC errors that can appear on empty CDR's.
Assure cur_write_speed can be no less than 177 to avoid divide by 0 error.
This commit is contained in:
parent
4513fdec5e
commit
4dcb0f16ec
1 changed files with 2 additions and 2 deletions
|
|
@ -1229,7 +1229,7 @@ acd_read_toc(struct acd_softc *cdp)
|
|||
ccb[7] = len>>8;
|
||||
ccb[8] = len;
|
||||
if (atapi_queue_cmd(cdp->atp, ccb, (caddr_t)&cdp->toc, len,
|
||||
ATPR_F_READ, 30, NULL, NULL)) {
|
||||
ATPR_F_READ | ATPR_F_QUIET, 30, NULL, NULL)) {
|
||||
bzero(&cdp->toc, sizeof(cdp->toc));
|
||||
return;
|
||||
}
|
||||
|
|
@ -1915,7 +1915,7 @@ acd_get_cap(struct acd_softc *cdp)
|
|||
cdp->cap.max_read_speed = ntohs(cdp->cap.max_read_speed);
|
||||
cdp->cap.cur_read_speed = ntohs(cdp->cap.cur_read_speed);
|
||||
cdp->cap.max_write_speed = ntohs(cdp->cap.max_write_speed);
|
||||
cdp->cap.cur_write_speed = ntohs(cdp->cap.cur_write_speed);
|
||||
cdp->cap.cur_write_speed = max(ntohs(cdp->cap.cur_write_speed), 177);
|
||||
cdp->cap.max_vol_levels = ntohs(cdp->cap.max_vol_levels);
|
||||
cdp->cap.buf_size = ntohs(cdp->cap.buf_size);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue