summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/atapi-cd.c
Commit message (Collapse)AuthorAgeFilesLines
* Dont alloc size 0 buffers.sos2004-02-211-3/+5
|
* Use the biotask functionality in GEOM to put finished requests onsos2004-01-281-1/+1
| | | | | | | instead of taskqueue_swi. This shaves from 1 to 10% of the overhead. Overhaul the locking once more, there was a few possible races that are now closed.
* Fix breakage on timeout/retries. The bug cause a sema to be leaked sosos2004-01-191-1/+1
| | | | that the calling process would newer wakeup.
* Use UMA instead of plain malloc for getting ATA request storage.sos2004-01-141-2/+2
| | | | | | | This gives +10% performance on simple tests, so definitly worth it. A few percent more could be had by not using M_ZERO'd alloc's, but we then need to clear fields all over the place to be safe, and that was deemed not worth the trouble (and it makes life dangerous).
* Always return ENOMEM if ata_request_alloc fails so GEOM can dtrt.sos2004-01-121-3/+3
|
* Overhaul of the timeout/reinit framework. This should clear up mostsos2004-01-111-2/+2
| | | | | | | | | | | | of the leftovers from the old version that really doesn't work anymore. Add a reset function for host-end of the ATA channel. This is needed for the SiI3112 in order to whack it back to reality if a device locks up the SATA interface (thereby preventing that we can reset the device). The result is that ATA now recovers from the timeouts that happens with the SiI3112A and more or less all disks based on old PATA electronics with a Marvell PATA->SATA converter. This includes lots of the popular SATA dongles and the WDC Raptor disks..
* Try a little harder to catch when fixate finishes.sos2003-12-071-2/+4
| | | | | On the <QSI CD-RW/DVD-ROM SBW-242> that failed causing burncd to wait forever...
* Be less noisy when GEOM probes around during boot if drive containssos2003-11-241-0/+5
| | | | | | invalid media (ie empty CD/DVD) Approved by: re@
* Work around the problem that some CDROM drives might return differentsos2003-11-181-3/+5
| | | | | | | | TOC's for the same media!! that borks up GEOM. Although this looks like bad HW the following patch removes the chance for GEOM panic'ing. Approved by: re@
* Centralise mode setting. Instead of doing it in all subdrivers, dosos2003-11-111-7/+0
| | | | | | it in ata-all.c where it belongs. Prime controller HW by always setting PIO mode first in attach.
* Fix typo in breaking up requests to size limit.sos2003-11-091-1/+1
| | | | Found by: Peter Edwards <pmedwards@eircom.net>
* Better attempt at fooling GEOM into working with burnable media.sos2003-11-071-1/+1
|
* Fix burning of CD's that got broken by the GEOM'ification.sos2003-11-021-9/+5
| | | | | | | | | | | | | | GEOM was not designed to handle media that does not have a size. Blank CD's are of that type, so cheat and set the media size to -1. This allows burning to work, but makes GEOM issue outofrange reads that makes the ATAPI subsystem spew out a few warnings. GEOM should be tought about this. GEOM was not designed to handle changing the sectorsize between opens. Writing multitack CD's with both audio and data tracks needs to change sector size on the fly. We cheat here and stuff the current sectorsize into GEOM private internals. GEOM should grow some clean way for this.
* GEOM'ify atapi-cd. Original patch by phk, subtle changes by me.sos2003-11-011-172/+125
|
* No need to initialize bio_pblkno from bio_blkno, disksort uses bio_offset.phk2003-10-181-1/+0
|
* Redo the code that handles eject/close.sos2003-10-121-23/+22
|
* Fix inverted BURN_BRIDGES and GONE_IN_5 #ifdefs.tmm2003-09-221-5/+5
|
* Make the clone handler BURN_BRIDGES but the actual 'a' and 'c' partitionphk2003-09-211-3/+8
| | | | | | check GONE_IN_5: We need the clone handler for root filesystem case. Once under GEOM, we can remove the clone handler as GEOM provides one.
* Properly cast longs to off_t so we dont loose precision.sos2003-09-161-1/+1
|
* Disable the use of cloning use in floppy and CD drivers.phk2003-09-111-3/+3
| | | | | | | | | | This commit puts the relevant code snippets under #ifdef GONE_IN_5 (rather than #ifndef BURN_BRIDGES) thereby disabling the code now. The code wil be entirely removed before 5.2 unless we find reasons why this would be a bad idea. Approach suggested by: imp
* Add support of the DIOCGSECTORSIZE & DIOCGMEDIASIZE ioctl'ssos2003-09-111-0/+9
| | | | so that newfs works on dvd-rw/dvd-ram again..
* Put the device cloning functions for disk-drivers under #ifndef BURN_BRIDGES.phk2003-09-051-0/+6
| | | | | | | | | | | For the floppy driver, use fdcontrol to manipulate density selection. For the CD drivers, the 'a' and 'c' suffix is without actual effect and any applications insisting on it can be satisfied with a symlink: ln -s /dev/cd0 /dev/cd0a Ongoing discussion may result in these pieces of code being removed before the 5-stable branch as opposed to after.
* cosmeticssos2003-09-021-2/+2
|
* Unify prototypes.sos2003-08-251-12/+14
| | | | Cosmetics.
* Use __FBSDID().obrien2003-08-241-2/+3
| | | | Also some minor style cleanups.
* This is a major rework of the ATA driver (ATAng)sos2003-08-241-272/+290
| | | | | | | | | | | | | | | | | | | | | | Restructure the way ATA/ATAPI commands are processed, use a common ata_request structure for both. This centralises the way requests are handled so locking is much easier to handle. The driver is now layered much more cleanly to seperate the lowlevel HW access so it can be tailored to specific controllers without touching the upper layers. This is needed to support some of the newer semi-intelligent ATA controllers showing up. The top level drivers (disk, ATAPI devices) are more or less still the same with just corrections to use the new interface. Pull ATA out from under Gaint now that locking can be done in a sane way. Add support for a the National Geode SC1100. Thanks to Soekris engineering for sponsoring a Soekris 4801 to make this support. Fixed alot of small bugs in the chipset code for various chips now we are around in that corner anyways.
* Use bioq_flush() to drain a bio queue with a specific error code.phk2003-04-011-8/+3
| | | | | | | | Retain the mistake of not updating the devstat API for now. Spell bioq_disksort() consistently with the remaining bioq_*(). #include <geom/geom_disk.h> where this is more appropriate.
* Call devstat_start_transaction_bio() instead of devstat_start_transaction().phk2003-03-151-1/+1
|
* Remove the check for more than one open if one is a write op.sos2003-03-131-5/+0
| | | | | | This allows using DVD+RW and DVD-RW as random storage, provided the 32K blocksize is honoured for DVD-RW (DVD+RW has built in read-modify-write).
* Dont free the stats struct, this has been changed by the new stat code.sos2003-03-131-2/+0
| | | | Spotted by: Ian Dowse <iedowse@maths.tcd.ie>
* Allocate the devstat structure with devstat_new_entry().phk2003-03-081-7/+2
|
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-13/+9
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* First round off updates/fixes to the ATA driver.sos2003-02-201-4/+4
| | | | | | | | | | | | This moves all chipset specific code to a new file 'ata-chipset.c'. Extensive use of tables and pointers to avoid having the same switch on chipset type in several places, and to allow substituting various functions for different HW arch needs. Added PIO mode setup and all DMA modes. Support for all known SiS chipsets. Thanks to Christoph Kukulies for sponsoring a nice ASUS P4S8X SiS648 based board for this work! Tested on: i386, PC98, alpha and sparc64
* Add a missing '{'phk2003-01-211-1/+1
|
* Remove the fake disklabel, no longer needed.sos2003-01-211-46/+7
| | | | | | Fix potential malloc panic. Prodded by: phk
* Try to fix the problem with burncd blank not seeing the end ofsos2002-12-171-14/+9
| | | | the blank operation.
* Allow acd(4) and cd(4) to support old behavior for CDRIOC*SPEED ioctls.njl2002-11-231-2/+15
| | | | | | | | | | If the value from the user is less than 177, assume it is a multiple of a single speed CDROM and convert to KB/sec. No complaints from: sos Reviewed by: ken Approved by: re MFC after: 1 day
* * Add CDRIOC{READ,WRITE}SPEED ioctls to cd(4). Units are in KB/sec.njl2002-10-181-2/+2
| | | | | | | | | | | | | | | * Change atapi-cd ioctls to use the same units. * Change burncd, cdcontrol to convert CDROM speed to KB/sec before calling the ioctl. Add a "max" speed option for their command lines. This change does not break ABI but does change the units passed through the ioctl so 3rd party software that uses cdrio.h will have to convert (most likely by multiplying CDROM speed by 177 to get KB/s). PR: kern/36845 Submitted by: Philipp Mergenthaler <p@i609a.hadiko.de> (CAM ioctls) Reviewed by: sos, ken MFC after: 1 month
* Misc cleanups.sos2002-10-011-13/+15
| | | | Pointed out by: phk/flexelint
* Wait for drive to become ready if its in progress of loading..sos2002-09-121-0/+14
| | | | | | Based on patch in PR-42659, but done somewhat differently. PR: 42659
* Add DVD+RW support to the ATA driver and burncd. This also closessos2002-08-081-12/+50
| | | | | | | | | PR40430 by "Peter Haight <peterh@sapros.com>" that has semilar patches included and which I merged with my own work. HW sponsored by: FreeBSD Foundation & FreeBSD Mall Inc Enjoy!
* OK, dont rely on the upper layers handling iosize_max correctly,sos2002-07-281-1/+1
| | | | | | instead rely on ATAPI devices ability to do the work instead. MFC material.
* Properly change the block_size on different CD media, and use thatsos2002-07-271-3/+12
| | | | | | to calculate the max amount of data in one IO request. Correct the max size on atapi floppies/tapes as well.
* Fix the max transfer size for ATAPI devices. The spec says tosos2002-07-261-1/+1
| | | | | | transfer at most 65534 bytes, thats 126 times DEV_BSIZE not 252 :( Pointed out by: Ian Dowse <iedowse@maths.tcd.ie>
* Use %02d in track numbers, so that 1 is 01, much easier for scriptssos2002-05-281-1/+1
|
* Cleanups.sos2002-04-051-6/+1
|
* Make the ATA driver compile & work on the sparc64 platform.sos2002-04-051-0/+25
| | | | | | | Initial work & code by tmm. Lots of changes and rearrangements by yours truely to make busdma be a little less a PITA (but I still dont like it).
* Retire the bogus ioctl DIOCGPART in toto.phk2002-04-021-5/+0
| | | | | | | Once again we can notice that badly thought out hacks ferment and infect far more code than initially expected. Sponsored by: DARPA and NAI Labs.
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-011-1/+1
| | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@
* Fix support for multi CD changers, it was as broken as my old NEC :)sos2002-03-271-16/+13
| | | | | | MFC: ASAP :
OpenPOWER on IntegriCloud