cd.4 (256281) | cd.4 (264522) |
---|---|
1.\" Copyright (c) 1996 2.\" Julian Elischer <julian@FreeBSD.org>. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 9 unchanged lines hidden (view full) --- 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" | 1.\" Copyright (c) 1996 2.\" Julian Elischer <julian@FreeBSD.org>. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 9 unchanged lines hidden (view full) --- 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" |
26.\" $FreeBSD: stable/10/share/man/man4/cd.4 254929 2013-08-26 18:47:10Z jmg $ | 26.\" $FreeBSD: stable/10/share/man/man4/cd.4 264522 2014-04-16 10:04:19Z mav $ |
27.\" | 27.\" |
28.Dd February 8, 2012 | 28.Dd April 9, 2014 |
29.Dt CD 4 30.Os 31.Sh NAME 32.Nm cd 33.Nd SCSI CD-ROM driver 34.Sh SYNOPSIS 35.Cd device cd | 29.Dt CD 4 30.Os 31.Sh NAME 32.Nm cd 33.Nd SCSI CD-ROM driver 34.Sh SYNOPSIS 35.Cd device cd |
36.Cd "options ""CHANGER_MIN_BUSY_SECONDS=3""" 37.Cd "options ""CHANGER_MAX_BUSY_SECONDS=11""" | |
38.Sh DESCRIPTION 39The 40.Nm 41driver provides support for a 42.Tn SCSI 43.Tn CD-ROM 44(Compact Disc-Read Only Memory) drive. 45In an attempt to look like a regular disk, the --- 237 unchanged lines hidden (view full) --- 283.Tn CD-ROM 284manufacturers have not followed the standard, there are many 285.Tn CD-ROM 286drives for which audio will not work. 287Some work is planned to support 288some of the more common `broken' 289.Tn CD-ROM 290drives; however, this is not yet under way. | 36.Sh DESCRIPTION 37The 38.Nm 39driver provides support for a 40.Tn SCSI 41.Tn CD-ROM 42(Compact Disc-Read Only Memory) drive. 43In an attempt to look like a regular disk, the --- 237 unchanged lines hidden (view full) --- 281.Tn CD-ROM 282manufacturers have not followed the standard, there are many 283.Tn CD-ROM 284drives for which audio will not work. 285Some work is planned to support 286some of the more common `broken' 287.Tn CD-ROM 288drives; however, this is not yet under way. |
291.Sh CHANGER OPERATION 292This driver has built-in support for LUN-based CD changers. 293A LUN-based CD 294changer is a drive that can hold two or more CDs, but only has one CD 295player mechanism. 296Each CD in the drive shows up as a separate logical unit 297on the 298.Tn SCSI 299bus. 300The 301.Nm 302driver automatically recognizes LUN-based changers, and routes commands for 303changers through an internal scheduler. 304The scheduler prevents changer 305"thrashing", which is caused by sending commands to different LUNs in the 306changer at the same time. 307.Pp 308The scheduler honors minimum and maximum time 309quanta that the driver will spend on a particular LUN. 310The minimum time 311is the guaranteed minimum amount of time that the driver will spend on a 312given LUN, even if there is no outstanding I/O for that LUN. 313The maximum 314time is the maximum amount of time the changer will spend on a LUN if there 315is outstanding I/O for another LUN. 316If there is no outstanding I/O for 317another LUN, the driver will allow indefinite access to a given LUN. 318.Pp 319The minimum and maximum time quanta are configurable via kernel options and 320also via sysctl and kernel tunable variables. 321The kernel options are: 322.Pp 323.Bl -item -compact 324.It 325.Cd "options ""CHANGER_MIN_BUSY_SECONDS=3""" 326.It 327.Cd "options ""CHANGER_MAX_BUSY_SECONDS=11""" 328.El 329.Pp 330The sysctl/kernel tunable variables are: 331.Pp 332.Bl -item -compact 333.It 334.Va kern.cam.cd.changer.min_busy_seconds 335.It 336.Va kern.cam.cd.changer.max_busy_seconds 337.El 338.Pp 339It is suggested that the user try experimenting with the minimum and 340maximum timeouts via the sysctl variables to arrive at the proper values 341for your changer. 342Once you have settled on the proper timeouts for your 343changer, you can then put them in your kernel config file. 344.Pp 345If your system does have a LUN-based changer, you may notice that the 346probe messages for the various LUNs of the changer will continue to appear 347while the boot process is going on. 348This is normal, and is caused by the 349changer scheduling code. | |
350.Sh SYSCTL VARIABLES 351The following variables are available as both 352.Xr sysctl 8 353variables and 354.Xr loader 8 355tunables: 356.Bl -tag -width 12 357.It kern.cam.cd.retry_count --- 34 unchanged lines hidden (view full) --- 392sysctl variables and loader tunables. 393Where 394.Dq %d 395is the unit number of the drive in question. 396Valid minimum command sizes 397are 6 and 10. 398Any value above 6 will be rounded to 10, and any value below 3996 will be rounded to 6. | 289.Sh SYSCTL VARIABLES 290The following variables are available as both 291.Xr sysctl 8 292variables and 293.Xr loader 8 294tunables: 295.Bl -tag -width 12 296.It kern.cam.cd.retry_count --- 34 unchanged lines hidden (view full) --- 331sysctl variables and loader tunables. 332Where 333.Dq %d 334is the unit number of the drive in question. 335Valid minimum command sizes 336are 6 and 10. 337Any value above 6 will be rounded to 10, and any value below 3386 will be rounded to 6. |
400.It kern.cam.cd.changer.min_busy_seconds 401.It kern.cam.cd.changer.max_busy_seconds 402.Pp 403Tune how long individual LUNs are 'locked' for I/O operations to 404optimize changer operation. 405See CHANGER OPERATION section for information on how to use these items. | |
406.El 407.Sh FILES 408.Bl -tag -width /dev/cd[0-9][a-h] -compact 409.It Pa /dev/cd[0-9][a-h] 410raw mode 411.Tn CD-ROM 412devices 413.El --- 18 unchanged lines hidden (view full) --- 432.Fx 3.0 . 433.Sh BUGS 434The names of the structures used for the third argument to 435.Fn ioctl 436were poorly chosen, and a number of spelling errors have survived in 437the names of the 438.Fn ioctl 439commands. | 339.El 340.Sh FILES 341.Bl -tag -width /dev/cd[0-9][a-h] -compact 342.It Pa /dev/cd[0-9][a-h] 343raw mode 344.Tn CD-ROM 345devices 346.El --- 18 unchanged lines hidden (view full) --- 365.Fx 3.0 . 366.Sh BUGS 367The names of the structures used for the third argument to 368.Fn ioctl 369were poorly chosen, and a number of spelling errors have survived in 370the names of the 371.Fn ioctl 372commands. |
440.Pp 441There is no mechanism currently to set different minimum and maximum 442timeouts for different CD changers; the timeout values set by the kernel 443options or the sysctl variables apply to all LUN-based CD changers in the 444system. 445It is possible to implement such support, but the sysctl 446implementation at least would be rather inelegant, because of the current 447inability of the sysctl code to handle the addition of nodes after compile 448time. 449Thus, it would take one dynamically sized sysctl variable and a 450userland utility to get/set the timeout values. 451Implementation of separate 452timeouts for different CD devices in the kernel config file would likely 453require modification of 454.Xr config 8 455to support the two timeouts when hardwiring 456.Nm 457devices. | |