1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00
freebsd/sys
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
..
alpha Change the console interface to pass a "struct consdev *" instead of a 2003-02-20 20:54:45 +00:00
amd64 Fix fumble in rev 1.525. pmap_kenter()'s second argument is a physical 2003-02-20 05:35:52 +00:00
arm MB_LEN_MAX is not MD, move it to the MI limits.h. 2002-12-22 06:38:45 +00:00
boot Simplify page alignment. 2003-02-20 06:47:54 +00:00
cam Fix ATAPI/USB/Firewire CDROM drive handling in cd(4) and hopefully fix 2003-02-21 06:19:38 +00:00
coda Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
compat Add M_WAITOK 2003-02-20 11:24:55 +00:00
conf First round off updates/fixes to the ATA driver. 2003-02-20 20:02:32 +00:00
contrib Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
crypto Remove some unnecessary casts. 2003-01-25 22:41:22 +00:00
ddb - Split the struct kse into struct upcall and struct kse. struct kse will 2003-02-17 05:14:26 +00:00
dev Fix ATAPI/USB/Firewire CDROM drive handling in cd(4) and hopefully fix 2003-02-21 06:19:38 +00:00
fs Do not call smbfs_attr_cacheremove() in the EXDEV case in smbfs_rename(). 2003-02-19 11:54:35 +00:00
geom Add M_WAITOK 2003-02-19 22:51:33 +00:00
gnu Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
i4b Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
i386 Change the console interface to pass a "struct consdev *" instead of a 2003-02-20 20:54:45 +00:00
ia64 Change the console interface to pass a "struct consdev *" instead of a 2003-02-20 20:54:45 +00:00
isa Switch to using the TSC code in i386/i386/tsc.c. 2003-02-11 11:43:25 +00:00
isofs/cd9660 Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
kern Change the console interface to pass a "struct consdev *" instead of a 2003-02-20 20:54:45 +00:00
libkern Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
modules Split the arch-specific AGP files into the appropriate files.* and do the same 2003-02-14 06:33:52 +00:00
net Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
netatalk Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
netatm Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
netgraph Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
netinet The ancient and outdated concept of "privileged ports" in UNIX-type 2003-02-21 05:28:27 +00:00
netinet6 Remove unused variables in the IPSEC case. 2003-02-20 18:22:21 +00:00
netipsec Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
netipx Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
netkey Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
netnatm Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
netncp Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
netns Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
netsmb Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
nfs Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
nfsclient Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
nfsserver Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
opencrypto Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
pc98 Change the console interface to pass a "struct consdev *" instead of a 2003-02-20 20:54:45 +00:00
pccard Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
pci Fix panic on sparc64 introduced in my last commit. I really 2003-02-19 18:33:29 +00:00
posix4 Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
powerpc Adjust IRQ count for psim's OpenPIC model - it seems to be 2003-02-20 01:59:42 +00:00
rpc
security Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
sparc64 Uncomment the xl(4) driver since it's now working properly 2003-02-20 17:08:42 +00:00
sys Change the console interface to pass a "struct consdev *" instead of a 2003-02-20 20:54:45 +00:00
tools Remove miidevs.h and generate it from miidevs at compile time. 2003-01-19 02:59:34 +00:00
ufs Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
vm Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
Makefile