summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-disk.c
Commit message (Collapse)AuthorAgeFilesLines
* Dont call ata_finish in ad_dump as that is no longer needed and causes panic.sos2005-06-271-10/+11
| | | | | | | Dont try to enable read/write caching on devices that doesn't support it, this reduces the noise from ATA on flash devices and the like. Approved by: re@ (scottl)
* Change the way ioctls are issue to ATA.sos2005-05-161-0/+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-7/+6
| | | | | | | 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
* CFA (Compact Flash) devices has a special config ID that fails thesos2005-04-191-1/+2
| | | | normal ATA device check in ata-disk.c. Add support for the CFA magic.
* Move the creation of ata_channel child devices to the channel code.sos2005-04-151-30/+7
| | | | | | | | | 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-2/+2
| | | | | 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-228/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 BUS_PROBE_DEFAULT for pci probe return valueimp2005-03-051-0/+30
|
* Compensate for off by one bugs in disk firmware for 48BIT addressing cutover.sos2004-12-091-1/+1
|
* Move the PC98 specific geometry "gunk" to geom_pc98.c where it belongs.sos2004-10-071-5/+1
| | | | | | | | This also adds support for bigger disks on the controller I have access to, and maybe others if I understood the adhoc methods used on those. Those with more PC98 bigdrive controllers it is hereby invited to add/fix support for those in geom_pc98.c and not using #ifdef PC98 all over the place.
* Resurrect dump that broke with the last update.sos2004-09-301-5/+4
|
* Remove the old ATA_*LOCK_CH macros that used atomic ops and usesos2004-09-261-1/+2
| | | | | | | | | | | | | mutexes instead. This closes the last (known) race issues in ATA which should fix the various hangs etc seen on heavy loaded systems. Change from using timeout functions to using callout functions in the timeout code. This together with above closes the race that could happen if timeout and device interrupt occured simultaniously. Also fix the possible recursion in ata_reinit() on very dodgy devices that could take us down in the probe.
* Cleanup the storing and printing of the device transfermode for SATA.sos2004-09-011-8/+3
|
* Rearrange the call to disk_destroy.sos2004-08-271-6/+6
| | | | Suggested by: phk
* Add firmware revision to probe printf.sos2004-08-051-2/+3
|
* Attempt to handle suspend/resume better.sos2004-07-121-1/+0
|
* 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>
* Add support for the Promise command sequencer present on all modern Promisesos2004-04-131-6/+11
| | | | | | | | | | | | | | | | | controllers (PDC203** PDC206**). This also adds preliminary support for the Promise SX4/SX4000 but *only* as a "normal" Promise ATA controller (ATA RAID's are supported though but only RAID0, RAID1 and RAID0+1). This cuts off yet another 5-8% of the command overhead on promise controllers, making them the fastest we have ever had support for. Work is now continuing to add support for this in ATA RAID, to accellerate ATA RAID quite a bit on these controllers, and especially the SX4/SX4000 series as they have quite a few tricks in there.. This commit also adds a few fixes to the SATA code needed for proper support.
* Remember to mtx_destroy mutexes.sos2004-03-011-0/+1
|
* Change the disk(9) API in order to make device removal more robust.phk2004-02-181-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | Previously the "struct disk" were owned by the device driver and this gave us problems when the device disappared and the users of that device were not immediately disappearing. Now the struct disk is allocate with a new call, disk_alloc() and owned by geom_disk and just abandonned by the device driver when disk_create() is called. Unfortunately, this results in a ton of "s/\./->/" changes to device drivers. Since I'm doing the sweep anyway, a couple of other API improvements have been carried out at the same time: The Giant awareness flag has been flipped from DISKFLAG_NOGIANT to DISKFLAG_NEEDSGIANT A version number have been added to disk_create() so that we can detect, report and ignore binary drivers with old ABI in the future. Manual page update to follow shortly.
* Use the biotask functionality in GEOM to put finished requests onsos2004-01-281-3/+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.
* Fix breakage in PIO multisector support.sos2004-01-231-1/+0
|
* Use UMA instead of plain malloc for getting ATA request storage.sos2004-01-141-2/+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).
* Overhaul of the timeout/reinit framework. This should clear up mostsos2004-01-111-21/+35
| | | | | | | | | | | | 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..
* Use the saved params for LBA-CHS conversion. Fixes PC98 bug.sos2004-01-081-4/+3
|
* Centralise mode setting. Instead of doing it in all subdrivers, dosos2003-11-111-6/+0
| | | | | | it in ata-all.c where it belongs. Prime controller HW by always setting PIO mode first in attach.
* Update the dump code to flush buffers at the end of the dumpsos2003-11-111-19/+25
| | | | to avoid loosing evt cached data.
* Move sysctl declarations next to the corresponding tunable declarations.des2003-11-031-7/+0
| | | | | | | Add a sysctl declaration for hw.ata.atapi_dma, which had gone MIA (though setting it in loader.conf still worked, it was not visible at runtime) Approved by: sos
* Change all SYSCTLS which are readonly and have a related TUNABLEsilby2003-10-211-2/+2
| | | | | from CTLFLAG_RD to CTLFLAG_RDTUN so that sysctl(8) can provide more useful error messages.
* Up timeout to 10s (from 5) in r/w commands.sos2003-10-121-1/+1
|
* Unify prototypes.sos2003-08-251-5/+5
| | | | Cosmetics.
* Fix ad_dump top actually produce a dump.sos2003-08-241-3/+9
| | | | Reported by: Tor Egge <Tor.Egge@cvsup.no.freebsd.org>
* 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-636/+149
| | | | | | | | | | | | | | | | | | | | | | 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.
* Print the right position on disk errorssos2003-05-191-3/+4
| | | | Approved by: re@
* Add flushing of devices on shutdown.sos2003-05-021-21/+1
| | | | | | Note: this might print failure messages on some systems, unfortunatly the info from the device, stating if flushing is supported, cannot be trusted so the operation is always issued on all devices, just in case...
* Add ioctl to add a spare disk to a RAID array.sos2003-05-021-7/+5
| | | | | Fix the discovery of RAID's to not grap unused disks. Change the probe printing of a RAID a bit.
* Relax the test for when to use LBA instead of CHS size.sos2003-05-011-2/+2
|
* Minor cleanup of the ATA RAID code.sos2003-04-071-7/+3
|
* Use bioq_flush() to drain a bio queue with a specific error code.phk2003-04-011-6/+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.
* Second round of updates to the ATA driver.sos2003-03-291-20/+19
| | | | | | | | | | | | Clean up the DMA interface too much unneeded stuff crept in with the busdma code back when. Modify the ATA_IN* / ATA_OUT* macros so that resource and offset are gotten from a table. That allows for new chipsets that doesn't nessesarily have things ordered the good old way. This also removes the need for the wierd PC98 resource functions. Tested on: i386, PC98, Alpha, Sparc64
* Biofinish the request if we cannot malloc in ad_start.sos2003-03-271-3/+4
|
* Centralize the devstat handling for all GEOM disk device driversphk2003-03-081-12/+3
| | | | | | | | in geom_disk.c. As a side effect this makes a lot of #include <sys/devicestat.h> lines not needed and some biofinish() calls can be reduced to biodone() again.
* Convert to new disk API.sos2003-02-251-35/+20
| | | | Prodded by: phk
* Temporarily disable tagged queueing while I figure out why it broke.sos2003-02-231-1/+2
|
* NO_GEOM cleanup:phk2003-02-211-3/+6
| | | | | | | | | | | | | Retire the "d_dump_t" and use the "dumper_t" type instead. Dumper_t takes a void * as first arg which is more general than the dev_t taken by d_dump_t. (Remember: we could have net-dumpers if somebody wrote us one!) Define the convention for GEOM controlled disk devices to be that the first argument to the dumper function is the struct disk pointer. Change device drivers accordingly.
* NO_GEOM cleanup:phk2003-02-211-1/+1
| | | | | | | | Change the argument to disk_destroy() to be the same struct disk * as disk_create() takes. This enables drivers to ignore the (now) bogus dev_t which disk_create() returns.
* First round off updates/fixes to the ATA driver.sos2003-02-201-32/+26
| | | | | | | | | | | | 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
* NO_GEOM cleanup: retire disk_invalidate()phk2003-01-301-1/+0
|
* Update the code that deals with disk enclosures:sos2003-01-271-1/+3
| | | | | | | | Properly handle the newer Promise SuperSwap 1000 enclosures. Print out what kind of enclosure was found in the probe. Misc cleanups in the enclosure handling code. Sponsored by: Advanis Inc.
OpenPOWER on IntegriCloud