diff options
author | njl <njl@FreeBSD.org> | 2002-11-23 22:51:50 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2002-11-23 22:51:50 +0000 |
commit | d3c6d000f7222049182f11e6007845d3f5d901a3 (patch) | |
tree | f3a485a6ee3f04ec0062b9083e6399178b3ea30e /sys/cam | |
parent | a65fb8c3ded710a2b07584932b8b647dd7a6a376 (diff) | |
download | FreeBSD-src-d3c6d000f7222049182f11e6007845d3f5d901a3.zip FreeBSD-src-d3c6d000f7222049182f11e6007845d3f5d901a3.tar.gz |
Allow acd(4) and cd(4) to support old behavior for CDRIOC*SPEED ioctls.
If the value from the user is less than 177, assume it is a multiple of
a single speed CDROM and convert to KB/sec.
No complaints from: sos
Reviewed by: ken
Approved by: re
MFC after: 1 day
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/scsi/scsi_cd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c index 3984f77..c5be698 100644 --- a/sys/cam/scsi/scsi_cd.c +++ b/sys/cam/scsi/scsi_cd.c @@ -2976,6 +2976,12 @@ cdsetspeed(struct cam_periph *periph, u_int32_t rdspeed, u_int32_t wrspeed) ccb = cdgetccb(periph, /* priority */ 1); csio = &ccb->csio; + /* Preserve old behavior: units in multiples of CDROM speed */ + if (rdspeed < 177) + rdspeed *= 177; + if (wrspeed < 177) + wrspeed *= 177; + cam_fill_csio(csio, /* retries */ 1, /* cbfcnp */ cddone, |