Find a file
Kenneth D. Merry 56eac725a3 Fix ATAPI/USB/Firewire CDROM drive handling in cd(4) and hopefully fix
a number of related problems along the way.

 - Automatically detect CDROM drives that can't handle 6 byte mode
   sense and mode select, and adjust our command size accordingly.
   We have to handle this in the cd(4) driver (where the buffers are
   allocated), since the parameter list length is different for the
   6 and 10 byte mode sense commands.

 - Remove MODE_SENSE and MODE_SELECT translation removed in ATAPICAM
   and in the umass(4) driver, since there's no way for that to work
   properly.

 - Add a quirk entry for CDROM drives that just hang when they get a 6
   byte mode sense or mode select.  The reason for the quirk must be
   documented in a PR, and all quirks must be approved by
   ken@FreeBSD.org.  This is to make sure that we fully understand why
   each quirk is needed.  Once the CAM_NEW_TRAN_CODE is finished, we
   should be able to remove any such quirks, since we'll know what
   protocol the drive speaks (SCSI, ATAPI, etc.) and therefore whether
   we should use 6 or 10 byte mode sense/select commands.

 - Change the way the da(4) handles the no_6_byte sysctl.  There is
   now a per-drive sysctl to set the minimum command size for that
   particular disk.  (Since you could have multiple disks with
   multiple requirements in one system.)

 - Loader tunable support for all the sysctls in the da(4) and cd(4)
   drivers.

 - Add a CDIOCCLOSE ioctl for cd(4) (bde pointed this out a long
   time ago).

 - Add a media validation routine (cdcheckmedia()) to the cd(4)
   driver, to fix some problems bde pointed out a long time ago.  We
   now allow open() to succeed no matter what, but if we don't detect
   valid media, the user can only issue CDIOCCLOSE or CDIOCEJECT
   ioctls.

 - The media validation routine also reads the table of contents off
   the drive.  We use the table of contents to implement the
   CDIOCPLAYTRACKS ioctl using the PLAY AUDIO MSF command.  The
   PLAY AUDIO TRACK INDEX command that we previously used was
   deprecated after SCSI-2.  It works in every SCSI CDROM I've tried,
   but doesn't seem to work on ATAPI CDROM drives.  We still use the
   play audio track index command if we don't have a valid TOC, but
   I suppose it'll fail anyway in that case.

 - Add _len() versions of scsi_mode_sense() and scsi_mode_select() so
   that we can specify the minimum command length.

 - Fix a couple of formatting problems in the sense printing code.

MFC after: 	4 weeks
2003-02-21 06:19:38 +00:00
bin We can simplify this Makefile down to a single line now. 2003-02-19 16:56:30 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r110989, 2003-02-16 11:28:55 +00:00
crypto Resolve conflicts after import of OpenSSL 0.9.7a. 2003-02-19 23:24:16 +00:00
etc We stopped reloading rc.conf for each script a long time ago. Things 2003-02-16 20:46:08 +00:00
games "Happiness" is a noun. 2003-02-18 20:49:12 +00:00
gnu Some things don't build for PowerPC yet. 2003-02-21 02:30:51 +00:00
include Implement dlinfo() function. 2003-02-13 17:47:44 +00:00
kerberos5 Define OPENSSL_DES_LIBDES_COMPATIBILITY so that Heimdal will build with 2003-01-21 14:08:24 +00:00
kerberosIV update version numbers to (consistenly): 2002-10-23 06:12:21 +00:00
lib Some things don't build for PowerPC yet. 2003-02-21 02:30:51 +00:00
libexec Do not remove object from the lists at the unref_dag() stage. 2003-02-17 20:58:27 +00:00
release Modified release notes: OpenSSL-0.9.7a. 2003-02-20 17:26:11 +00:00
sbin Don't try to build devd when NO_CXX is set. 2003-02-21 02:16:35 +00:00
secure Regenerate man pages after import of OpenSSL 0.9.7a. 2003-02-19 23:30:52 +00:00
share mdoc(7) police: tidy up. 2003-02-20 20:22:20 +00:00
sys Fix ATAPI/USB/Firewire CDROM drive handling in cd(4) and hopefully fix 2003-02-21 06:19:38 +00:00
tools Adjust code for new kse_release interface. 2003-02-20 08:24:22 +00:00
usr.bin Some things don't build for PowerPC yet. 2003-02-21 02:30:51 +00:00
usr.sbin Some things don't build for PowerPC yet. 2003-02-21 02:30:51 +00:00
COPYRIGHT Update to add the July 22, 1999 addendum. 1999-09-05 21:33:47 +00:00
MAINTAINERS Nuke xargs, I haven't had to help anyone with it, so I assume it stands on 2003-02-18 00:07:06 +00:00
Makefile Don't spam sys/${MACHINE}/conf/ with _.${MACHINE}.makeLINT. 2003-02-19 16:57:12 +00:00
Makefile.inc1 Add -DNOMAN to the list. 2003-02-11 19:21:13 +00:00
Makefile.upgrade Removed "env" commands. "sh" is a real shell, so 2002-03-19 05:58:36 +00:00
README Fix broken handbook links. 2002-07-21 16:45:30 +00:00
UPDATING Acutally document how to make a LINT kernel config, besides telling all it 2003-02-13 17:55:12 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The
``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

kerberosIV	KerberosIV (eBones) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html