summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-all.c
Commit message (Collapse)AuthorAgeFilesLines
* Be more robust in the probe. We dont want to get into a loop withsos2004-01-301-11/+10
| | | | | reinitting when we try to identify devices. If they dont interrupt on identify we retry once. If this fails we simply ignore that device.
* Fix breakage on timeout/retries. The bug cause a sema to be leaked sosos2004-01-191-1/+2
| | | | that the calling process would newer wakeup.
* Use UMA instead of plain malloc for getting ATA request storage.sos2004-01-141-2/+7
| | | | | | | 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).
* Fix ata_getparam to accept the fact that some crappy devices can pose assos2004-01-131-10/+12
| | | | both master and slave at the same time confusing the probe code.
* Overhaul of the timeout/reinit framework. This should clear up mostsos2004-01-111-37/+62
| | | | | | | | | | | | 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..
* Fix ata-card.sos2003-11-301-1/+1
| | | | | | | | | The altio resource magic no longer worked probably due to other changes in the kernel. Redo that part so it also fits better into ATAng. Fix detach so it doesn't panic the system when a pccard device is yanked. Approved by: re@
* Centralise mode setting. Instead of doing it in all subdrivers, dosos2003-11-111-10/+27
| | | | | | it in ata-all.c where it belongs. Prime controller HW by always setting PIO mode first in attach.
* Move sysctl declarations next to the corresponding tunable declarations.des2003-11-031-0/+6
| | | | | | | 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
* Put devices into sleep mode (ie spin down) on detach.sos2003-10-121-0/+2
|
* Use isprint instead of isalpha in determining valid ident string.sos2003-10-121-1/+1
|
* Restore transfermode on devices after reinit.sos2003-10-101-0/+7
|
* Dont store ata_params for devices that return a bogus ident string.sos2003-10-101-0/+3
|
* In case we loose a device during reset in reinit() finish offsos2003-10-071-3/+22
| | | | the request with error instead of loosing it.
* The present defaults for the open and close for device drivers whichphk2003-09-271-2/+0
| | | | | | | | | | | | | | provide no methods does not make any sense, and is not used by any driver. It is a pretty hard to come up with even a theoretical concept of a device driver which would always fail open and close with ENODEV. Change the defaults to be nullopen() and nullclose() which simply does nothing. Remove explicit initializations to these from the drivers which already used them.
* Update the PIO mode gathering code.sos2003-09-081-7/+9
| | | | Reported by: bde
* Rearrange the probe code yet again.sos2003-09-011-4/+9
|
* Return the translated result code from ATA/ATAPI commands.sos2003-08-271-2/+2
|
* Unify prototypes.sos2003-08-251-6/+6
| | | | Cosmetics.
* Only call FLUSH_CACHE on devices that say they can.sos2003-08-251-4/+8
| | | | | | This will get rid of the warnings issued at shutdown (that seems to worry alot of users), but will also no flush cache on lots of devices that can, but doesn't set the right support bits...
* 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-1134/+447
| | | | | | | | | | | | | | | | | | | | | | 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 string for SATA150sos2003-05-181-0/+1
| | | | Approved by: re
* Grap the ATA lock on all channels before suspend, this makes certainsos2003-05-041-0/+13
| | | | | that we have no outstanding ops in transit, which would cause problems on resume.
* Fix locking on reinit.sos2003-05-031-4/+16
|
* Add flushing of devices on shutdown.sos2003-05-021-4/+38
| | | | | | 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-0/+3
| | | | | Fix the discovery of RAID's to not grap unused disks. Change the probe printing of a RAID a bit.
* Third round of updates to the ATA driver.sos2003-04-071-1/+1
| | | | | | More DMA cleanups, including fix for breakage on older Promise controllers. Add more ways of getting to the ATA registers.
* Use bioq_flush() to drain a bio queue with a specific error code.phk2003-04-011-1/+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.
* Fix ATA_DEBUG case breakage.sos2003-03-301-1/+1
|
* Second round of updates to the ATA driver.sos2003-03-291-146/+103
| | | | | | | | | | | | 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
* - Add a new ioctl to get the maximum number of ATA channels.mux2003-03-221-0/+5
| | | | | | | | | | - Use it in atacontrol(8) when listing ATA devices instead of stopping at the first ENXIO received. This makes atacontrol list work on my sparc64 where the two ATA channels I have are numbered 2 and 3. Reviewed by: sos
* 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.
* Dont hang the channel on enclosures without sensors.sos2003-03-121-16/+17
|
* Centralize the devstat handling for all GEOM disk device driversphk2003-03-081-1/+0
| | | | | | | | 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.
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-13/+5
| | | | | | | | | | | | | 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)
* More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).des2003-03-021-2/+2
|
* Revert the probe code change.sos2003-02-251-2/+2
| | | | | It helped those fake devices probe delays to go away, but as a side effect it also made some not so conforming CD/DVD drives go away...
* First round off updates/fixes to the ATA driver.sos2003-02-201-96/+102
| | | | | | | | | | | | 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
* Fix crash dumps on ata and scsi.alfred2003-02-141-1/+2
| | | | | | | | | | | To fix scsi, don't wait for ithreads if we're dumping, it makes the debugger sad. To fix ata, use what appears to be a polling method if we're dumping, I stole this from tmm but added code to ensure that this change is only in effect while dumping. Tested by: des
* Update the code that deals with disk enclosures:sos2003-01-271-62/+121
| | | | | | | | 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.
* Small change to the previous commit, zero out the 48BIT flag in ata_commandsos2003-01-191-0/+1
| | | | instead of in dmadone.
* Fix the 48bit access support for the older Promise 66/100 controllers, thesos2003-01-191-0/+1
| | | | | | first attempt was wrong and could cause r/w timeouts. Add yet another Promise PCI id.
* Fix linking problem when atadisk is not use in ata-all.csos2002-12-061-0/+2
| | | | | | Add dummy intr_func and lock_func to ata-card.c Dont call ad_print if the driver decided there is no disk.
* Add support for the PC98 platform to the ATA driver.sos2002-12-031-17/+53
| | | | | | | | | | | | | | | | This mostly consists of functionality to serialize accesses to the two ATA channels (which can also be used to "fix" certain PCI based controllers). Add support for Acard controllers. Enable the ATA driver in PC98 GENERIC, and add device hints. Update man page with latest support. The PC98 core team has kindly provided me with a PC98 machine that made this all possible, thanks to all that contributed to that effort, without that this would probably newer have been possible.. Approved by: re@
* In ata_reinit, when ata_getparam fails for a new device (indicating thatthomas2002-12-011-4/+5
| | | | | | | | | | | the device is not actually present), clear the corresponding bit in the ch->devices bitmap. This resolves a panic that occurred with ATAPI/CAM after an APM suspend/resume, when the ATA hardware would erroneously report an extra ATAPI device. Approved by: re, sos Reviewed by: roberto MFC after: 7 days
* 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/+1
|
* Fill in missing parts of the ATAPI/CAM XPT: implement XPT_RESET_BUSthomas2002-10-221-12/+4
| | | | | | | | | | | | | | and XPT_RESET_DEV. In order to properly handle reset requests whether they originate in the ATA layer (atacontrol reinit) or from the CAM layer (camcontrol reset) ata_reinit does not cause the SIM to be deallocated anymore. The SIM is now unconditionnally created for each ATAPI bus. This change may cause existing bus ids to change on some setups. Reviewed by: roberto Approved by: sos
* Misc cleanups.sos2002-10-011-1/+1
| | | | Pointed out by: phk/flexelint
* Rearrange where to get the ATAPI magic sequence.sos2002-09-121-6/+8
| | | | Submitted by: Benjamin Close <cisbjc@cs.unisa.edu.au>
OpenPOWER on IntegriCloud