summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata
Commit message (Collapse)AuthorAgeFilesLines
* Check the Disk FUNCE recorded in the CIS to see if we should probe forimp2009-03-121-1/+6
| | | | | | both disks, or if we should suppress the slave drive. Default to suppressing the slave, in the case that this REQIURED tuple turns out to not actually be present...
* Add type specific suspend/resume ata channel functions. Add checks to avoidmav2009-03-093-6/+73
| | | | | crash on detached channel resume. Add placeholder for possible type-specific suspend/resume routines.
* Remove the local management of INTx as this is now taken care of by pci.rnoland2009-03-048-32/+0
| | | | | Reviewed by: jhb MFC after: 3 days
* Set PortMultiplier port only for SATA2 channels, where it is applicable.mav2009-03-031-2/+5
| | | | | | | Doing it on old SATA controllers like Promise PDC20375 SATA150 breaks their operation. Tested by: marcus on PDC20375
* Rename the ushub device class back to uhub as it was in the old usb stack,thompsa2009-03-021-1/+1
| | | | | | moused(8) looks for "uhub/ums" to decide if needs to load the module. Reported by: Garrett Cooper
* Give controller a chance to issue Soft Reset clear command before checkingmav2009-03-011-2/+1
| | | | | | | | | | | ready status. Most of controllers managed to issue coommand and set BUSY bit almost simultaneously, before we will read it, but at least JMicron JMB363 don't. Ignore timeout errors to keep old behavior when error there was impossible. For me this fixes timeout errors on the first command after channel attach or reinit. Boot in my case is not affected, as there is much time passing between reset and next command giving reset time to complete.
* Comment out enabling FIS Based Switching inside ata_ahci_issue_cmd() as itmav2009-03-011-1/+1
| | | | | | | | done in other places. Until we have no support for command queueing we have no any benefit from FBS, while enabling it only here somehow leads to "port not ready" errors on Intel 63XXESB2 controller. Tested by: Larry Rosenman <ler AT lerctr.org>
* Revert my ata_identify()/ata_reinit() related changes: r189166, r189091mav2009-02-289-120/+69
| | | | | | | | | | | | | | 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-287-51/+109
| | | | | | | | | | | 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.
* Merge rev. 188615, 188812 changes from old-USB to USB2 driver.mav2009-02-271-20/+17
|
* Rollback rev. 189093.mav2009-02-261-1/+0
| | | | | | | mtx_lock() is not needed there as callout initialized with callout_init_mtx(). Sorry. Submitted by: Ian Dowse
* Unhide IDENTIFY command timeouts when verbose messages enabled.mav2009-02-261-1/+3
| | | | I think it should be suitable for debugging.
* Restore mtx_lock() call on ata_timeout(), dropped (I think accidentally)mav2009-02-261-0/+1
| | | | during commit 3 years ago.
* Remove direct ata_completed() call options from ata_finish(), except for themav2009-02-264-17/+10
| | | | | | | | | | kernel dumping case. ata_completed() may initiate ata_reinit() on error, that may lead to drives attach or detach. Attach and detach are sending requests to drives and sleep waiting for results. But ata_finish() can be called directly from interrupt handler where sleeping is prohibited, so we must break this chain somewhere. This place seems to fit best.
* Fix non-AHCI channels detection on combined JMicron controllers,mav2009-02-231-0/+2
| | | | broken by r188694.
* Move the uaudio and ata-usb drivers into their correct locations.thompsa2009-02-231-0/+1102
|
* Move two missed usb drivers out to the graveyard location under sys/legacy/dev.thompsa2009-02-231-970/+0
|
* Do not call devices probe/attach if there is nothing new was found.mav2009-02-231-0/+4
|
* Fix spelling.mav2009-02-232-2/+2
| | | | Submitted by: gavin
* Tune AHCI verbose messages to make log more readable.mav2009-02-221-12/+23
|
* Remove one more place of master/slave terms usage.mav2009-02-221-2/+1
|
* Use only higher half of device signature to identify device type. Somemav2009-02-214-15/+15
| | | | | devices return incorrect values in lower part confusing detection, while higher part itself gives enough information for proper detetion.
* Increase initial busy waiting time. If drive was hot-plugged, it may needmav2009-02-211-4/+4
| | | | much time to spin-up.
* Improve ata_reinit():mav2009-02-215-89/+48
| | | | | | | | | | | | | | - protect againtst recursions, - add new devices detection using ata_identify(). Improve ata_identify(): - do not add duplicate device if device already exist. Rework SATA hot-plug events handling. Instead of unsafe duplicate implementation use common ata_reinit() to handle all state changes. All together this gives quite stable and robust cold- and hot-plug operation, invariant to false, lost and duplicate events.
* Teach device drivers' ata_reinit() methods, that there can be more then twomav2009-02-214-14/+13
| | | | devices per channel.
* Disable port hardware on detach. First switch it to slumber mode tomav2009-02-201-0/+16
| | | | | power-down peer transmitter, then disable completely. Side effect of this is saving about 0.5W of power per detached device.
* 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 typo: s/SLUMPER/SLUMBER/mav2009-02-201-1/+1
|
* Reduce soft-reset assertion time from 5ms to 50us.mav2009-02-201-1/+1
| | | | | | ATA specification declares minimal reset time of 5us. SATA keeps it, but requires devices to handle commands transmitted even one by one without any gap.
* Disable port interrupts before doing PHY reset.mav2009-02-201-0/+3
| | | | PHY reset causes drive connect/disconnect events, unwanted at this moment.
* Fix pc98 build error due to missing variable.mav2009-02-201-0/+1
| | | | Submitted by: avg
* Handle nForce MCP67 and MCP73 SATA controllers as AHCI. They report itselfmav2009-02-202-1/+53
| | | | | | | as ATA RAID, but generic ATAPCI driver unable to detect drives there. AHCI driver reported to handle them fine. Linux does the same. Submitted by: Andrey V. Elsukov on stable@
* Add basic support for DDF, often found on Adaptec HostRAID controllers.scottl2009-02-203-1/+743
| | | | | Spares and rebuilds are not supported, so this code should be considered for entertainment purposes only.
* Use channel driver's attach/detach routines instead of ata_attach()/mav2009-02-197-13/+58
| | | | | | ata_detach() to implement IOCATAATTACH/IOCATADETACH ioctls. This will permit channel drivers to properly shutdown port hardware on channel detach and init it on attach.
* Quite mechanical ch_detach implementations for all atapci subdrivers.mav2009-02-1917-31/+171
| | | | Some dmainit call fixes for previous commit.
* As soon as they called in only same one place (ata_pcichannel_attach()),mav2009-02-1816-103/+108
| | | | | | | | join allocate() and dmainit() atapci subdriver's channel initialization methods into single ch_attach() method. As opposite to ch_attach() add new ch_detach() method to deallocate/disable channel.
* Make ch->dma.free() called symmetrically to ch->dma.alloc().mav2009-02-182-3/+5
|
* Implement proper attach/detach routines for ISA driver.mav2009-02-181-5/+55
|
* Remove unused variable.mav2009-02-181-2/+1
| | | | Submitted by: ganbold
* Adaptively increase control command timeout when drive is spun down.mav2009-02-171-1/+8
| | | | | | | This should fix, for example, cache flush timeout error on shutdown, if some drives are not mounted. PR: kern/111023
* Remove useless return, that left from previous commit.mav2009-02-171-1/+0
|
* ata_interrupt() does not need to return anything. It is not it's businessmav2009-02-173-6/+8
| | | | to report request completion, expecially when it is not reliable.
* Make core dumping to ad not to freeze even if interrupts, not disabledmav2009-02-161-1/+1
| | | | for some reason, stealing our events.
* Give atapci knowledge about set of implemented AHCI ports. It is possiblemav2009-02-163-6/+6
| | | | | | to not allocate them after the recent ata channels enumeration changes. It allows to save some resources, not bother user with unexisting hardware and not check unimplemented ports status on every interrupt.
* Remove unneeded AND operation. We have already checked that bit is set.mav2009-02-151-1/+1
|
* Add initial single-vector MSI support into atapci driver.mav2009-02-152-4/+15
| | | | | | | Works fine with AHCI and theoretically other MSI capable devices. At this moment support disabled by default. To enable it, set "hint.atapci.X.msi=1" device hint.
* Add workaround for some ATI chips, failing to soft-resetmav2009-02-151-5/+12
| | | | when port multiplicator supported, but absent.
* Tunes to AHCI reset sequences:mav2009-02-141-34/+71
| | | | | | | | | | | | | | - specification claims that 1 second is just a maximum controller reset time; implement controller reset properly to save almost 1 second of boot, and about half second of resume time; - enable channel interrupts only after channel status reset to fix duplicate device creation on resume due to unwanted device connection event; - as described in specification, wait for disk ready status after channel power-up; it is not so important when disk already touched by BIOS, but solves device not ready problems on resume and probably some other cases. - uncomment channel stop/start on soft-reset as it is declared mandatory by specification; it was commented due to some random drive detection problems on VIA and JMicron controllers, but I hope it is fixed by previous point.
* DEVICE_PROBE(9) claims that we must not initialize softc on probe stage.mav2009-02-143-59/+53
| | | | | | | | Move channel softc initialization from ata_XXX_probe() to ata_XXX_attach(). Instead of calculating ata channel number as position in child device list, pass it's real number directly from controller probe routine using ivars. It is simpler and IMHO more correct.
* Fix shutdown routine to return 0 and change signature from void returnimp2009-02-044-4/+8
| | | | to int.
OpenPOWER on IntegriCloud