summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/atapi-cd.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove all legacy ATA code parts, not used since options ATA_CAM enabled inmav2013-04-041-1921/+0
| | | | | | | | | most kernels before FreeBSD 9.0. Remove such modules and respective kernel options: atadisk, ataraid, atapicd, atapifd, atapist, atapicam. Remove the atacontrol utility and some man pages. Remove useless now options ATA_CAM. No objections: current@, stable@ MFC after: never
* - First pass at const'ifying ata(4) as appropriate.marius2012-03-211-1/+1
| | | | | | | - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers MFC after: 1 week
* Convert files to UTF-8uqs2012-01-151-1/+1
|
* Specify the capability and media bits of the capabilities page inmarius2009-12-131-2/+8
| | | | | | | | | | | | native, i.e. big-endian, format and convert as appropriate like we also do with the multibyte fields of the other pages. This fixes the output of acd_describe() to match reality on big-endian machines without breaking it on little-endian ones. While at it, also convert the remaining multibyte fields of the pages read although they are currently unused for consistency and in order to prevent possible similar bugs in the future. MFC after: 1 week
* MFp4:mav2009-12-061-5/+7
| | | | | | | | | | | | | | | | | | Introduce ATA_CAM kernel option, turning ata(4) controller drivers into cam(4) interface modules. When enabled, this options deprecates all ata(4) peripheral drivers (ad, acd, ...) and interfaces and allows cam(4) drivers (ada, cd, ...) and interfaces to be natively used instead. As side effect of this, ata(4) mode setting code was completely rewritten to make controller API more strict and permit above change. While doing this, SATA revision was separated from PATA mode. It allows DMA-incapable SATA devices to operate and makes hw.ata.atapi_dma tunable work again. Also allow ata(4) controller drivers (except some specific or broken ones) to handle larger data transfers. Previous constraint of 64K was artificial and is not really required by PCI ATA BM specification or hardware. Submitted by: nwitehorn (powerpc part)
* Introduce define and kernel option ATA_REQUEST_TIMEOUT to control ATA(4)mav2009-11-081-1/+1
| | | | | | command timeout. Submitted by: keramida
* Don't ignore the return value of g_modevent() in acd_modevent().jh2009-10-271-2/+1
| | | | Approved by: trasz (mentor)
* Increase ATA command timeouts. Some drives need more then 5s to spin-up.mav2009-10-261-1/+1
| | | | PR: kern/111023
* MFp4:mav2009-10-231-3/+1
| | | | Do not differentiate 12/16 bytes ATAPI CCB formats when it is not needed.
* Revert revisions 188839 and 188868. Use of the ioctl in geom_dev.cmarcel2009-07-081-4/+1
| | | | | | | | | | | | is invalid because the ioctl happens without prior open. The ioctl got introduced to provide backward compatibility for extended partitions, but it ended up not being used because it didn't work as expected. Since there are no consumers of the ioctl and the implementation is broken, the best fix is to remove the code entirely. Spotted by: phk Approved by: re (kensmith)
* Revert my ata_identify()/ata_reinit() related changes: r189166, r189091mav2009-02-281-12/+0
| | | | | | | | | | | | | | and partially r188903. Revert breaks new drives detection on reinit to the state as it was before me, but fixes series of new bugs reported by some people. Unconditional queueing of ata_completed() calls can lead to deadlock if due to timeout ata_reinit() was called at the same thread by previous ata_completed(). Calling of ata_identify() on ata_reinit() in current implementation opens numerous races and deadlocks. Problems I was touching here are still exist and should be addresed, but probably in different way.
* Rework device probing by moving ata_getparam() call from ata_identify() tomav2009-02-281-0/+12
| | | | | | | | | | | drivers' probe routines. It allows not to sleep and so not drop Giant inside ata_identify() critical section and so avoid crash if it reentered on request timeout. Reentering of probe call checked inside of it. Give device own knowledge about it's type (ata/atapi/atapicam). It is not a good idea to ask channel status for device type inside ata_getparam(). Add softc memory deallocation on device destruction.
* Teach device drivers' ata_reinit() methods, that there can be more then twomav2009-02-211-4/+4
| | | | devices per channel.
* Don't read the TOC for DIOCGPROVIDERALIAS. This causes themarcel2009-02-201-1/+4
| | | | | acd code to create new provider (?), but not from an expected context, which results in a panic (GEOM topology not held).
* Fix shutdown routine to return 0 and change signature from void returnimp2009-02-041-1/+2
| | | | to int.
* Fix panic and breakage for non-DMA ATA devices e.g. powermac macio cells.grehan2008-05-081-1/+4
| | | | | | | | | | Handle cases where dma function pointers may be NULL, and where the max_iosize can't be derived from a DMA data structure. For the latter, revert to the prior behaviour of using DFLTPHYS for the max i/o size when there is no other data. Reviewed by: marcel No objection by: sos
* Go back to preallocating everything possible on init.sos2008-04-171-3/+6
| | | | | This avoids calling busdma in the request processing path which caused a traumatic performance degradation. Allocation has be postponed to after we know how many devices we possible can have on portmulitpliers to save some space.
* Fix the brokenness in the former commit, sorry for the mess.sos2008-04-111-7/+3
| | | | | | | | The problem is that the PM support is part of a much larger WIP here, but due to popular demand I decided to get some of it imported. Also I forgot the mention: HW sponsored by: Vitsch Electronics / VEHosting
* Add experimental support for SATA Port Multiplierssos2008-04-101-9/+4
| | | | | | | Support is working on the Silicon Image SiI3124/3132. Support is working on some AHCI chips but far from all. Remember this is WIP, so test reports and (constructive) suggestions are welcome!
* Dont fumble the ivars on reinit, avoids panic on suspend/resume om some ↵sos2007-11-191-3/+0
| | | | | | systems that looses thier devices. Patch by: jhb@
* Fix the problem with certain ATAPI commands on AHCI devices.sos2007-11-191-15/+22
| | | | | | | Revert the probe in atapi-cd.c to the old usage now its fixed on AHCI. THis change also fixes using virtual CD's om fx parallels. Still leaves the GEOM problem of telling media vs device access apart in the access function.
* Update the way we get the mode pages on probe.sos2007-10-261-25/+22
|
* Use 'pause' in several places rather than trying to tsleep() on NULL (whichjhb2007-02-231-3/+3
| | | | | | triggers a KASSERT) or local variables. In the case of kern_ndis, the tsleep() actually used a common sleep address (curproc) making it susceptible to a premature wakeup.
* Update copyright headers.sos2007-02-211-1/+1
|
* Be a little less stringent in getting progress report data.sos2007-02-211-1/+2
|
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningrwatson2006-11-061-1/+5
| | | | | | | | | | | | | specific privilege names to a broad range of privileges. These may require some future tweaking. Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net>
* Dont call free on non-alloc'd items.sos2006-06-281-2/+4
|
* Make the ATAPI sense data accessible when using the ioctl interfacesos2006-03-311-8/+8
| | | | MFC candidate.
* Always read the TOC in acd_read_toc even if MEDIA_CHANGED wasn't set.sos2006-03-081-3/+0
| | | | | Since we cannot (reliably) detect when media has been removed before we try to touch it, this could leave stale TOC's around.
* Get rid of the advertising clause in the copyright.sos2006-01-051-3/+1
|
* Return the proper rmi field in DVDIOCREADSTRUCTURE.sos2006-01-041-1/+1
| | | | PR: 89650
* Normalize a significant number of kernel malloc type names:rwatson2005-10-311-1/+1
| | | | | | | | | | | | | | | | | | | - Prefer '_' to ' ', as it results in more easily parsed results in memory monitoring tools such as vmstat. - Remove punctuation that is incompatible with using memory type names as file names, such as '/' characters. - Disambiguate some collisions by adding subsystem prefixes to some memory types. - Generally prefer lower case to upper case. - If the same type is defined in multiple architecture directories, attempt to use the same name in additional cases. Not all instances were caught in this change, so more work is required to finish this conversion. Similar changes are required for UMA zone names.
* Return the right format (LBA/MSF) in TOC entries.sos2005-10-281-5/+7
| | | | | | Null the TOC on media change even if no media present. Reported by: des
* Correct the former patch to the way it would have looked after review.sos2005-10-101-13/+13
|
* When breaking up a large request into smaller ones for the strategypeadar2005-10-091-1/+7
| | | | | | | | routine, create all the child bio objects before starting the requests, rather than starting them as created. This closes a race whereby some number of child operations could complete before the rest were ever created, and prematurely freeing the parent bio. This fixes the panics installing in VMWare and qemu
* Use the bio field instead of the driver field as intended.sos2005-08-171-2/+2
|
* Change the way ioctls are issue to ATA.sos2005-05-161-2/+1
| | | | | | The most prominent part is that its now possible to issue ata_requests directly to say acd0, instead of going through the cumbersome /dev/ata device.
* Reshape the dma code to be a bit more flexible so it can cope withsos2005-05-031-22/+4
| | | | | | | new HW that has new and different demands. Fix a few nits in former commit in this cleanup crusade. Sponsored by: pair.com
* Take newbusification one step further, ie use the device_t more consequentlysos2005-04-301-46/+27
| | | | | | | all way through the code down the layers, instead of the mix'n'match that resulted from the conversion done earlier. Sponsored by: pair.com
* Move the creation of ata_channel child devices to the channel code.sos2005-04-151-28/+8
| | | | | | | | | This allows to attach to the children (ATA devices) even without a driver being attached. This allows atapi-cam to do its work both with and without the pure ATAPI driver being present. ATA patches by /me ATAPI-cam pathes by Thomas
* Change the ata_* methods to use a channel device instead of asos2005-03-311-3/+3
| | | | | controller device. This helps when there is no controller parent to a channel (PPC port).
* This is the much rumoured ATA mkIII update that I've been working on.sos2005-03-301-690/+616
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o ATA is now fully newbus'd and split into modules. This means that on a modern system you just load "atapci and ata" to get the base support, and then one or more of the device subdrivers "atadisk atapicd atapifd atapist ataraid". All can be loaded/unloaded anytime, but for obvious reasons you dont want to unload atadisk when you have mounted filesystems. o The device identify part of the probe has been rewritten to fix the problems with odd devices the old had, and to try to remove so of the long delays some HW could provoke. Also probing is done without the need for interrupts, making earlier probing possible. o SATA devices can be hot inserted/removed and devices will be created/ removed in /dev accordingly. NOTE: only supported on controllers that has this feature: Promise and Silicon Image for now. On other controllers the usual atacontrol detach/attach dance is still needed. o Support for "atomic" composite ATA requests used for RAID. o ATA RAID support has been rewritten and and now supports these metadata formats: "Adaptec HostRAID" "Highpoint V2 RocketRAID" "Highpoint V3 RocketRAID" "Intel MatrixRAID" "Integrated Technology Express" "LSILogic V2 MegaRAID" "LSILogic V3 MegaRAID" "Promise FastTrak" "Silicon Image Medley" "FreeBSD PseudoRAID" o Update the ioctl API to match new RAID levels etc. o Update atacontrol to know about the new RAID levels etc NOTE: you need to recompile atacontrol with the new sys/ata.h, make world will take care of that. NOTE2: that rebuild is done differently from the old system as the rebuild is now done piggybacked on read requests to the array, so atacontrol simply starts a background "dd" to rebuild the array. o The reinit code has been worked over to be much more robust. o The timeout code has been overhauled for races. o Support of new chipsets. o Lots of fixes for bugs found while doing the modulerization and reviewing the old code. Missing or changed features from current ATA: o atapi-cd no longer has support for ATAPI changers. Todays its much cheaper and alot faster to copy those CD images to disk and serve them from there. Besides they dont seem to be made anymore, maybe for that exact reason. o ATA RAID can only read metadata from all the above metadata formats, not write all of them (Promise and Highpoint V2 so far). This means that arrays can be picked up from the BIOS, but they cannot be created from FreeBSD. There is more to it than just the missing write metadata support, those formats are not unique to a given controller like Promise and Highpoint formats, instead they exist for several types, and even worse, some controllers can have different formats and its impossible to tell which one. The outcome is that we cannot reliably create the metadata of those formats and be sure the controller BIOS will understand it. However write support is needed to update/fail/rebuild the arrays properly so it sits fairly high on the TODO list. o So far atapicam is not supported with these changes. When/if this will change is up to the maintainer of atapi-cam so go there for questions. HW donated by: Webveveriet AS HW donated by: Frode Nordahl HW donated by: Yahoo! HW donated by: Sentex Patience by: Vife and my boys (and even the cats)
* Boot away another stackgap (one of the lest ones in linuxlator/i386) bysobomax2005-01-301-2/+11
| | | | | | | | | | providing special version of CDIOCREADSUBCHANNEL ioctl(), which assumes that result has to be placed into kernel space not user space. In the long run more generic solution has to be designed WRT emulating various ioctl()s that operate on userspace buffers, but right now there is only one such ioctl() is emulated, so that it makes little sense. MFC after: 2 weeks
* Pass the file->flags down to geom ioctl handlers.phk2004-12-121-2/+2
| | | | | | | | Reject certain ioctls if write permission is not indicated. Bump geom API version. Reported by: Ruben de Groot <mail25@bzerk.org>
* Properly check malloc returns.sos2004-08-241-10/+19
|
* Tag all geom classes in the tree with a version number.phk2004-08-081-3/+4
|
* Add firmware revision to probe printf.sos2004-08-051-1/+2
|
* Use the right ordering of args on mtx_init(). No functional changessos2004-06-221-1/+1
| | | | | | since the args in question was all zero's. Found by: Jimmy Olgeni <olgeni@FreeBSD.org>
* Call the detach function with g_waitfor_event() so that it can accessgreen2004-06-211-1/+8
| | | | | | | | the GEOM topology. There are still issues with not detaching from cam correctly such that upon a device detach there's an invalid pointer dereference from the later call to cam_rescan().
* When waiting for drive to become ready, reinit the request params as theysos2004-06-011-7/+8
| | | | might get trashed by autosensing.
OpenPOWER on IntegriCloud