Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

cd(9) [debian man page]

CD(9)							   BSD Kernel Developer's Manual						     CD(9)

NAME
cd -- CDROM driver for the CAM SCSI subsystem DESCRIPTION
The cd device driver provides a read only interface for CDROM drives (SCSI type 5) and WORM drives (SCSI type 4) that support CDROM type com- mands. Some drives do not behave as the driver expects. See the QUIRKS section for information on possible flags. QUIRKS
Each CD-ROM device can have different interpretations of the SCSI spec. This can lead to drives requiring special handling in the driver. The following is a list of quirks that the driver recognize. CD_Q_NO_TOUCH This flag tell the driver not to probe the drive at attach time to see if there is a disk in the drive and find out what size it is. This flag is currently unimplemented in the CAM cd driver. CD_Q_BCD_TRACKS This flag is for broken drives that return the track numbers in packed BCD instead of straight decimal. If the drive seems to skip tracks (tracks 10-15 are skipped) then you have a drive that is in need of this flag. CD_Q_NO_CHANGER This flag tells the driver that the device in question is not a changer. This is only necessary for a CDROM device with multiple luns that are not a part of a changer. CD_Q_CHANGER This flag tells the driver that the given device is a multi-lun changer. In general, the driver will figure this out auto- matically when it sees a LUN greater than 0. Setting this flag only has the effect of telling the driver to run the initial read capacity command for LUN 0 of the changer through the changer scheduling code. CD_Q_10_BYTE_ONLY This flag tells the driver that the given device only accepts 10 byte MODE SENSE/MODE SELECT commands. In general these types of quirks should not be added to the cd(4) driver. The reason is that the driver does several things to attempt to determine whether the drive in question needs 10 byte commands. First, it issues a CAM Path Inquiry command to determine whether the protocol that the drive speaks typically only allows 10 byte commands. (ATAPI and USB are two prominent exam- ples of protocols where you generally only want to send 10 byte commands.) Then, if it gets an ILLEGAL REQUEST error back from a 6 byte MODE SENSE or MODE SELECT command, it attempts to send the 10 byte version of the command instead. The only reason you would need a quirk is if your drive uses a protocol (e.g., SCSI) that typically does not have a problem with 6 byte commands. FILES
/sys/cam/scsi/scsi_cd.c is the driver source file. SEE ALSO
cd(4), scsi(4) HISTORY
The cd manual page first appeared in FreeBSD 2.2. AUTHORS
This manual page was written by John-Mark Gurney <gurney_j@efn.org>. It was updated for CAM and FreeBSD 3.0 by Kenneth Merry <ken@FreeBSD.org>. BSD
September 2, 2003 BSD

Check Out this Related Man Page

ATAPICAM(4)						   BSD Kernel Interfaces Manual 					       ATAPICAM(4)

NAME
atapicam -- CAM XPT (transport) module for ATAPI devices SYNOPSIS
To compile this driver into the kernel, place the following lines in your kernel configuration file: device scbus device ata device atapicam Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): atapicam_load="YES" DESCRIPTION
The ATAPI/CAM module allows ATAPI devices (CD-ROM, CD-RW, DVD drives, floppy drives such as Iomega Zip, tape drives) to be accessed through the SCSI subsystem, cam(4). ata(4) and scbus(4) must be configured in the kernel as well. The SCSI target drivers (cd(4), da(4), or st(4)) can then be used to access the devices. The generic passthrough device, pass(4), can also be used to send SCSI commands directly to the devices through the CAM API. A separate CAM bus is created for each ATA bus in the system. On each of these buses, target ID 0 is assigned to the master device, and ID 1 is assigned to the slave (provided they are ATAPI devices). IMPLEMENTATION NOTES
Some SCSI commands are intercepted by the driver, and undergo special processing in order to work around limitations of ATAPI devices. Such limitations can be consequences of the ATAPI specification. For example, ATAPI devices do not implement the 6-byte versions of MODE_SELECT, MODE_SENSE, READ, or WRITE. They can also be common bugs, such as hanging when queried for extended INQUIRY information. EXAMPLES
device ata device atapicam device scbus device cd device pass Add the atapicam driver to the kernel. camcontrol devlist Print the list of all devices available through CAM. mount -t cd9660 /dev/cd0 /mnt Mount a CD-ROM from an ATAPI CD-ROM drive (the command above assumes that the ATAPI drive is the only CD-ROM unit). SEE ALSO
ata(4), cam(4), scsi(4), atacontrol(8), camcontrol(8) HISTORY
The ATAPI/CAM driver first appeared in FreeBSD 4.8 and FreeBSD 5.0. AUTHORS
The ATAPI/CAM driver was written by Thomas Quinot <thomas@FreeBSD.org>. BUGS
atapicam and ATAPI-specific target drivers (acd(4), ast(4), and afd(4)) can be configured in the same kernel. Simultaneous access to the same device through the SCSI generic drivers and the ATAPI-specific drivers may cause problems and is strongly discouraged. BSD
October 22, 2009 BSD
Man Page