summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-queue.c
Commit message (Collapse)AuthorAgeFilesLines
* - Make ata_str2mode() static, it's not used outside of ata-all.c.marius2013-04-061-186/+0
| | | | | | | | | | - Move ata_timeout() to ata-all.c so we don't need to expose both this function and ata_cam_end_transaction() but only the former. - Move ata_cmd2str() from ata-queue.c to ata-all.c so we can get rid of the former. - Add some missing prototypes. MFC after: 3 days
* Remove all legacy ATA code parts, not used since options ATA_CAM enabled inmav2013-04-041-639/+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
* Remove remnants of ATA_LOCKING uses in the ATA_CAM case and wrap itmarius2012-03-211-3/+27
| | | | | | | | | | | | | | | along with functions, SYSCTLs and tunables that are not used with ATA_CAM in #ifndef ATA_CAM, similar to the existing #ifdef'ed ATA_CAM code for the other way around. This makes it easier to understand which parts of ata(4) actually are used in the new world order and to later on remove the !ATA_CAM bits. It also makes it obvious that there is something fishy with the C-bus front-end as well as in the ATP850 support, as these used ATA_LOCKING which is defunct in the ATA_CAM case. When fixing the former, ATA_LOCKING probably needs to be brought back in some form or other. Reviewed by: mav MFC after: 1 week
* Fix panic after "WARNING - ATA_IDENTIFY taskqueue timeout"emaste2012-02-131-0/+1
| | | | | | | | | | | | | | | | | | | | When performing a firmware upgrade via atacontrol[1] the subsequent command may time out producing the error message above. When this happens the callout could still be active, and the system would then panic due to a destroyed semaphore. Instead, ensure that the callout is done first, via callout_drain. Note that this fix applies to the "old" ata(4) and so isn't applicable to the default configuration in HEAD. It is still applicable to stable/8. [1] http://lists.freebsd.org/pipermail/freebsd-current/2012-January/031122.html Submitted by: Nima Misaghian Reviewed by: rstone, attilio, mav Obtained from: SVOS MFC after: 3 days
* Convert files to UTF-8uqs2012-01-151-1/+1
|
* Mark ATA channel as idle on timeout in non-ATA_CAM mode.mav2010-04-261-1/+1
| | | | | | This should fix possible duplicate request completion. Submitted by: mjacob
* MFp4:mav2009-12-061-2/+9
| | | | | | | | | | | | | | | | | | 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-3/+3
| | | | | | command timeout. Submitted by: keramida
* MFp4:mav2009-10-311-1/+9
| | | | | | | | - Remove most of direct relations between ATA(4) peripherial and controller levels. It makes logic more transparent and is a mandatory step to wrap ATA(4) controller level into ATA-native CAM SIM. - Tune AHCI and SATA2 SiI drivers memory allocation a bit to allow bigger I/O transaction sizes without additional cost.
* Increase ATA command timeouts. Some drives need more then 5s to spin-up.mav2009-10-261-2/+2
| | | | PR: kern/111023
* MFp4:mav2009-10-231-5/+1
| | | | Do not differentiate 12/16 bytes ATAPI CCB formats when it is not needed.
* Improve kernel dumping reliability for busy ATA channels:mav2009-05-011-9/+24
| | | | | | | | | - Generate fake channel interrupts even if channel busy with previous request to let it finish. Without this, dumping requests were just queued and never processed. - Drop pre-dump requests queue on dumping. ATA code, working in dumping (interruptless) mode, unable to handle long request queue. Actually, to get coherent dump we anyway should do as few unrelated actions as possible.
* Improve clarity: if (a && (b ? b : c)) -> if (a && (b || c))ed2009-04-071-2/+1
| | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
* Revert my ata_identify()/ata_reinit() related changes: r189166, r189091mav2009-02-281-1/+7
| | | | | | | | | | | | | | 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.
* 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
* 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-261-7/+1
| | | | | | | | | | 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.
* 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
* ata_interrupt() does not need to return anything. It is not it's businessmav2009-02-171-1/+3
| | | | 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.
* Fix issue where ata_atapicmd() can never really return EBUSY which isobrien2009-01-121-1/+2
| | | | | | | | | | | expected in acd_fixate(). This should fix various problems folks are having with 'burncd' reporting "burncd: ioctl(CDRIOCFIXATE): Input/output error" during the fixate phase when "fixate" is issued together with the "data" command. PR: 95979 Submitted by: Jaakko Heinonen <jh@saunalahti.fi>
* Don't let ata_completed() dereference a null request->dma pointer topeter2008-11-271-1/+1
| | | | print dma status after a media error.
* Only call dma.unload() if initialized.sos2008-10-271-1/+2
| | | | Reported by: Stanislav Sedov
* Unload DMA slot on device timeouts.sos2008-04-211-0/+1
|
* Go back to preallocating everything possible on init.sos2008-04-171-4/+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-5/+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-3/+8
| | | | | | | 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!
* (ata_completed): When REQUEST SENSE is automatically issued after a failedthomas2007-03-131-1/+1
| | | | | | | | | ATAPI request, do not clear the ATA_R_DEBUG flag. This allows a request marked as requiring debug traces to produce these traces also during the completion of the autosense processing. Reviewed by: sos MFC after: 2 weeks
* Update copyright headers.sos2007-02-211-1/+1
|
* Add the SMART command to the ATA instruction set.remko2007-01-271-0/+1
| | | | | | | | | When the disk has an error, it will now print SMART instead of 'Unknown CMD'. PR: kern/93368 Submitted by: Garry Belka <garry at NetworkPhysics dot COM> Approved by: sos
* Fix a typo in ata-queue.cremko2006-12-231-2/+2
| | | | | | PR: kern/107100 Submitted by: Stephen J. Roznowski <sjr at comcast dot net> Approved by: sos
* If we get an error w/o atapi sense information, just print a newlineimp2006-07-211-0/+2
| | | | | to terminate the message we started. I get non-terminated messages when reading audio tracks w/o this patch.
* Add missing ";"sos2006-04-171-1/+1
| | | | found by: jmg
* Make the ATAPI sense data accessible when using the ioctl interfacesos2006-03-311-30/+33
| | | | MFC candidate.
* Only use the channel in the request given to ata_completed if itssos2006-03-091-3/+7
| | | | still present.
* Get rid of all the "long long"/"maxint" casting around in printf's.sos2006-03-091-6/+5
| | | | | On all our platforms intmax == int64_t so simply using %j to print int64_t's is safe all over, and doesn't pullute the code.
* Only look for ICRC and CORR errors on ATA devices not ATAPI.sos2006-03-071-1/+1
|
* Update atapi-fd to support direct devices such as disks.sos2006-03-051-0/+1
|
* Work around the deadlock that occours when ATA waits for the taskqueuesos2006-03-011-5/+18
| | | | | | | | | | | | | | | to call back for completition and something else is holding the taskqueue waiting for ATA to return data. This should clear up the "semaphore timeout !! DANGER Will Robinson !!" in most situations, and log "taskqueue timeout - completing request directly" instead, with a delayed "WARNING - freeing taskqueue zombie request" when the taskqueue finally calls us back with the now stale request. (It would have been nice if there was a way to remove a scheduled item from a taskqueue, but that is not currently implemented in the kernel). A real fix for this is in the works but wont make it to 6.1RELEASE definite MFC candidate.
* Fix ata_reinit so it does things in the right order to prevent panic's.sos2006-02-251-5/+1
| | | | Lock the channel so master/slave setups wont trash during reinit.
* Keep the parent device (in this case the channel) around in ata_request,sos2006-02-231-17/+26
| | | | | so we dont panic device removal or failure. Clean up ata_fail_requests to prevent the queue munging to fail.
* Whitespace cleanup.sos2006-01-181-3/+3
|
* Add support for using DMA on dump, greatly speeds up the dump process.sos2006-01-181-2/+11
| | | | Add dump support in ataraid.
* Get rid of the advertising clause in the copyright.sos2006-01-051-3/+1
|
* Fix rebuilds of arrays that got stuck.sos2005-12-271-5/+17
| | | | | | Misc minor fixes. Bughunting and initial fixes by Pav@ and Anton.
* Harden the hotplug support for SATA devices.sos2005-09-141-36/+29
| | | | | | This also fixes a few races that was present in the timeout/detach code. Sponsored by: pair.com
* Zero donecount on auto request sense.sos2005-06-281-0/+1
| | | | | PR: 81450 Approved by: re@ (scottl)
* Add back one line that got deleted in the last commit.sos2005-05-111-2/+4
| | | | | | Change the comment there so it better describes whats going on. This should fix the boot problems of late.
* Reshape the dma code to be a bit more flexible so it can cope withsos2005-05-031-2/+1
| | | | | | | new HW that has new and different demands. Fix a few nits in former commit in this cleanup crusade. Sponsored by: pair.com
OpenPOWER on IntegriCloud