summaryrefslogtreecommitdiff
path: root/sys/scsi/cd.c
AgeCommit message (Collapse)Author
2003-01-05spellingTheo de Raadt
2002-12-30Add new parameter to scsi_test_unit_ready(): retries number.Alexander Yurchenko
Use increased retries number and don't ignore SCSI_IGNORE_NOT_READY when call scsi_test_unit_ready() for cd-rom, this makes system wait if drive is loading media. Tested by millert@ and fgsch@; some input and ok from krw@. Problem reported by The lord of the CD-writers Igor Grabin <violent@death.kiev.ua>.
2002-06-09splassert a splbio assumption.Artur Grabowski
2002-06-08KISS. the spl variable doesn't have to be called s, but it make the code ↵Artur Grabowski
less confusing.
2002-06-08splbio around biodoneArtur Grabowski
2002-05-23Signed/unsigned int bug caused lp->d_npartitions to be set to zero.Constantine Sapuntzakis
Should fix disklabel warnings on disks with no data track. The old code was unnecessary complex too.
2002-03-14Final __P removal plus some cosmetic fixupsTodd C. Miller
2002-03-14First round of __P removal in sysTodd C. Miller
2002-02-01cdstrategy(): check that media is loaded before doing anything with theHans Insulander
cd. ok art@
2001-10-25Allow an empty cd to be opened (raw device/whole disk) primarily toDale Rahn
allow empty CD caddies to be ejected. Original diff from Alexander Guy. "pretty much straight from NetBSD" Addition to allow eject (mt) to eject an empty tray. ok csapuntz@
2001-06-22KNFTheo de Raadt
2000-07-18Update cd_size to handle failure of READ_CD_CAPACITY by returningConstantine Sapuntzakis
some default values
2000-04-18cd detachConstantine Sapuntzakis
2000-04-18sd and scsibus detachConstantine Sapuntzakis
cdlock/cdunlock now through disk_lock/disk_unlock
2000-04-09Don't trust the TOC coming from the drive so much.Constantine Sapuntzakis
Be better about handling failures of SCSI CD READ TOC command.
1999-11-12Use cdio.h instead of dvdio.hAngelos D. Keromytis
1999-11-11SCSI commands do not send data in both directions in the data phase.Constantine Sapuntzakis
Fixes DMA bug Angelos was seeing with DVD stuff. Happy ripping!
1999-11-09Fix lengths of scsi cmdsAngelos D. Keromytis
1999-11-03bzero the right amount of memory; I think NetBSD has this problem too.Angelos D. Keromytis
1999-11-03Some DVD support, from NetBSD.Angelos D. Keromytis
1999-10-16another fix form csapuntzTheo de Raadt
1999-10-14read disklabels only from CDs that have a data track, spoofed labels fromTheo de Raadt
the audio CDs could do with a bit more work, but this makes audio cd playing not generate disklabel read-failure messages on first open; csapuntz
1999-09-25sorry, but the last two changes completely broke disklabel spoofing, which ↵Theo de Raadt
we need for the release
1999-09-21Bug in the disklabel calculations fixed. Offsets were calculated inConstantine Sapuntzakis
terms of 512-unit sectors, yet the disklabel said that the sector size was 2048. Enabled code that tries to read disklabel from first data track. I guess this will be useful for those combination music/BSD install cds.
1999-09-21For some reason unbeknownst to me, the old acd driver had a more advancedConstantine Sapuntzakis
disklabel logic than the cd driver. This patch integrates that logic into the SCSI cd driver. Bug fixed - we no longer try to read disklabels off of audio CDs. No more SCSI errors when you hit play the first time on an audio CD.
1999-08-24Added type field to scsi_addr to reflect bus/device type (ATAPI or SCSI).Constantine Sapuntzakis
Updated ioctls to match Minor patches in anticipation of wd->sd translation layer
1999-08-10support DIOCRLDINFOTheo de Raadt
1999-07-21swap16_multi by niklas@cvs.openbsd.orgConstantine Sapuntzakis
Fix cd.c so it compiles on big-endian platforms
1999-07-20Be more generous with timeout on cd_play_msfConstantine Sapuntzakis
1999-07-20Make acd redundant.Constantine Sapuntzakis
Mostly based on NetBSD-current
1999-04-01If READ_CD_CAPACITY fails, just use the 2048/400000 defaults since some CDR ↵Todd C. Miller
drives don't support READ_CD_CAPACITY on blank media ; downsj with modifications by me
1998-10-05make DIOCGPDINFO equivalent to DIOCGDINFO for cd'sTodd C. Miller
1998-10-04Add DIOCGPDINFO supportTodd C. Miller
1998-10-03Add a "spoofonly" argument to readdisklabel() which will be used toTodd C. Miller
implement an ioctl to get a spoofed label even for disks that have a label on them.
1998-07-13CDs can have up to 99 tracks, not 65 tracks. Use kernel heap instead of stackConstantine Sapuntzakis
for temporary storage of CD table of contents
1998-07-12fill in d_bbsize and d_sbsizeTheo de Raadt
1998-03-27Fix strncpy usage and call a cdrom a cdrom in the fake labelTodd C. Miller
1997-12-05argh. this darn little bugger made CDIOCREADSUBCHANNEL unuseable, thisNiels Provos
should also fix some cdio problems with SCSI cdroms.
1997-10-18avoid "no disklabel" error messagesTheo de Raadt
1997-10-15make it compileNiels Provos
1997-09-11cd_play/acd_play() were replaced a while backTheo de Raadt
1997-08-31* Make scsi_do_ioctl() sane again.Jason Downs
* Use scsi_do_ioctl() in cd.c and uk.c again.
1997-08-08Change the bounds_check_with_label API to also take a cpu_disklabelNiklas Hallqvist
reference for making transferral of meta-information possible from readdisklabel to bounds_check_with_label. The first (and maybe only) thing that will use this is the multi-disklabel-format code on the alpha where the labelsector is passed via cpu_disklabel so the label write-protection can work correctly no matter what label was found. Also use a new macro DKBAD to get at the dkbad field of the cpu_disklabel implementations that contain it. This too is for multi-disklabel architectures where the "bad" field can be inside a union. Use this macro as a means for a driver to check if an architecture supports dkbad constructs. Remove proto of bounds_check_with_label from all MD disklabel.h as it is in sys/disklabel.h. I have not been able to test the changes everywhere, if I break anything I apologize, and promise to fix it as soon as I become aware of it.
1997-04-14Merge in various pieces of current NetBSD scsi code, including but not limitedJason Downs
to: * New changer driver. * Better optical support. * Different `done' semantics. * New quirks for SCSI QIC tape driver, SCSI floppy drives. * Better support for SCSI-I devices. Everybody needs to test this.
1997-03-29Increase timeout by a factor of ten in cd_size().briggs
NetBSD PR#3409 from Koji Imada <koji@imada.math.human.nagoya-u.ac.jp>
1997-03-26deal with CD drives that indicate 2352 bytes per block...Theo de Raadt
1997-01-04readdisklabel() with correct dev_tTheo de Raadt
1996-12-24deal with the 2340 lie in the right place, i thinkTheo de Raadt
1996-12-11b_resid cleanups, pointed out by minoura@kw.netlaputa.or.jp in netbsd pr#3007Theo de Raadt
1996-12-05call readdisklabel() in the same fashion as sd.c doesTheo de Raadt