summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/atapi-tape.c
Commit message (Collapse)AuthorAgeFilesLines
* Change the way ioctls are issue to ATA.sos2005-05-161-8/+8
| | | | | | 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.
* Take newbusification one step further, ie use the device_t more consequentlysos2005-04-301-29/+14
| | | | | | | 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-32/+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-283/+347
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Use dynamic major number allocation.phk2005-02-271-1/+0
|
* Add firmware revision to probe printf.sos2004-08-051-2/+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>
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-4/+4
| | | | Bump __FreeBSD_version accordingly.
* Remember to mtx_destroy mutexes.sos2004-03-011-0/+1
|
* Device megapatch 4/6:phk2004-02-211-1/+2
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* Use the biotask functionality in GEOM to put finished requests onsos2004-01-281-2/+2
| | | | | | | 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.
* Use UMA instead of plain malloc for getting ATA request storage.sos2004-01-141-0/+1
| | | | | | | 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-1/+1
|
* Overhaul of the timeout/reinit framework. This should clear up mostsos2004-01-111-1/+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..
* 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.
* Unify prototypes.sos2003-08-251-8/+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-87/+170
| | | | | | | | | | | | | | | | | | | | | | 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.
* Add a missing ~ when clearing flags in close.sos2003-05-051-1/+1
| | | | PR: 35392
* Don't use dkmakeminor(), create our own minor encoding instead.phk2003-04-031-3/+2
|
* Use bioq_flush() to drain a bio queue with a specific error code.phk2003-04-011-5/+1
| | | | | | | | 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.
* Including <sys/stdint.h> is (almost?) universally only to be able to usephk2003-03-181-1/+0
| | | | | %j in printfs, so put a newsted include in <sys/systm.h> where the printf prototype lives and save everybody else the trouble.
* Call devstat_start_transaction_bio() instead of devstat_start_transaction()phk2003-03-151-1/+1
|
* Allocate the devstat structure with devstat_new_entry().phk2003-03-081-4/+4
|
* 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-1/+1
| | | | | | | | | | | | 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
* Use [u]intmax_t and %j instead of long long and %ll to better fix warningsjhb2002-11-071-2/+3
| | | | | | I fixed earlier. Requested by: mux, jake
* Use some long long casts to quiet warnings in debug printf's on alpha.jhb2002-11-061-1/+2
|
* OK, dont rely on the upper layers handling iosize_max correctly,sos2002-07-281-2/+2
| | | | | | 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-2/+2
| | | | | | 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-2/+2
| | | | | | transfer at most 65534 bytes, thats 126 times DEV_BSIZE not 252 :( Pointed out by: Ian Dowse <iedowse@maths.tcd.ie>
* Make the ATA driver compile & work on the sparc64 platform.sos2002-04-051-0/+1
| | | | | | | 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).
* Misc little cleanups.sos2002-03-261-3/+3
|
* Add new support for locking an ATA channel and use that throughoutsos2002-03-111-1/+1
| | | | | | the ATA/ATAPI driver. This solves the concurrency problem with the new GEOM code, and also cuts a good deal of the patch size in the upcoming MFC.
* Minor cosmetic changes to minimise diffs for MFC.sos2002-03-071-1/+0
|
* Added undocumented options AAC_DEBUG, ACD_DEBUG, ACPI_MAX_THREADS,bde2002-02-151-0/+2
| | | | | | | | | | | | | | | | | | | | ACPI_NO_SEMAPHORES, ASR_MEASURE_PERFORMANCE, AST_DEBUG, ATAPI_DEBUG, ATA_DEBUG, BKTR_ALLOC_PAGES, BROOKTREE_ALLOC_PAGES, CAPABILITIES, COMPAT_SUNOS, CV_DEBUG, MAXFILES, METEOR_TEST_VIDEO, NDEVFSINO, NDEVFSOVERFLOW, NETGRAPH_BRIDGE, NETSMB, NETSMBCRYPTO, PFIL_HOOKS, SIMOS, SMBFS, VESA_DEBUG, VGA_DEBUG. Start using #! to comment out negative options and ## to comment out broken options. atapi-all.c: Fixed rotted bits that were hiding under ATAPI_DEBUG. atapi-cd.c: #include "opt_ata.h" so that ACD_DEBUG is actually visible. ata/atapi-tape.c #include "opt_ata.h" so that AST_DEBUG is actually visible.
* Major update of the ATA RAID code, part 1:sos2002-02-041-66/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Overhaul of the attach/detach code and structures, there were some nasty bugs in the old implementation. This made it possible to collapse the ATA/ATAPI device control structures into one generic structure. A note here, the kernel is NOT ready for detach of active devices, it fails all over in random places, but for inactive devices it works. However for ATA RAID this works, since the RAID abstration layer insulates the buggy^H^H^H^H^H^Hfragile device subsystem from the physical disks. Proberly detect the RAID's from the BIOS, and mark critical RAID1 arrays as such, but continue if there is enough of the mirror left to do so. Properly fail arrays on a live system. For RAID0 that means return EIO, and for RAID1 it means continue on the still working part of the mirror if possible, else return EIO. If the state changes, log this to the console. Allow for Promise & Highpoint controllers/arrays to coexist on the same machine. It is not possible to distribute arrays over different makes of controllers though. If Promise SuperSwap enclosures are used, signal disk state on the status LED on the front. Misc fixes that I had lying around for various minor bugs. Sponsored by: Advanis Inc.
* Don't call cdevsw_add().phk2001-11-041-6/+0
|
* Overhaul to minimize stack usage, in some places >2K was usedsos2001-09-201-4/+2
| | | | on the stack *blush*...
* KSE Milestone 2julian2001-09-121-3/+3
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Finally commit some of the minor things I've collected over the last month(s):sos2001-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | Add tagged queueing support for new IBM drives. Add support for Yet Another Promise ATA 100 chip. Flush disk cache on close. Dont flush the disk cache on BIO_ORDERED anymore. Cleanup the tests for DMA on ATAPI devices. Allow to share ALL irq's even the std irg 14 & 15. Fix calculation bug in end of media code on CD's. Add REZERO on opening a CDR/CDRW. Cleanup ataioctl a bit.
* Actually biofinish(struct bio *, struct devstat *, int error) is more generalphk2001-05-061-14/+5
| | | | | | than the bioerror(). Most of this patch is generated by scripts.
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-1/+0
| | | | the bit-bucket.
* Set the device names as early as possible.sos2001-03-211-3/+7
|
* Cosmetic changes.sos2001-03-191-6/+6
|
* Provide the interface to atacontrol and associated logic.sos2001-03-151-26/+34
| | | | | | | | | see atacontrol(8) for more. Also the ATA_ENABLE_ATAPI_DMA, ATA_ENABLE_WC and ATA_ENABLE_TAGS options are gone, use the tuneables listed in ata.4 instead from the loader (this makes it possible to switch off DMA before the driver has to touch the devices on broken hardware).
* Refine the detach/attach code.sos2001-03-141-4/+17
| | | | | | | | | | Proberly fail outstanding bio requests on devices that are detached. This makes it possible to change between disk/cdrom/dvd/whathaveyou in a notebook, just by suspending it, changing the device in the bay (or what you model calls it), unsuspend and the ATA driver will figure out what disappeared and properly fail those, and attach any new devices found.
* Cosmetic change to the probe printf'ssos2001-03-061-1/+1
|
* Introduce busspace instead of the good old in/out instructions.sos2001-02-061-4/+4
| | | | Not pretty but it works (I hope)...
OpenPOWER on IntegriCloud