summaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] libata: implement standard reset component operations and ->probe_resetTejun Heo2006-01-271-0/+6
| | | | | | | | | Implement SRST, COMRESET and standard postreset component operations for ata_drive_probe_reset(), and use these three functions to implement ata_std_probe_reset. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] libata: implement ata_drive_probe_reset()Tejun Heo2006-01-271-0/+5
| | | | | | | | | | | | Most low level drivers share supported reset/classify actions and sequence. This patch implements ata_drive_probe_reset() which helps constructing ->probe_reset from three component operations - softreset, hardreset and postreset. This minimizes duplicate code and yet allows flexibility if needed. The three component operations can also be shared by EH later. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] libata: new ->probe_reset operationTejun Heo2006-01-261-3/+5
| | | | | | | | | | | | | | | Add new ->probe_reset operation to ata_port_operations obsoleting ->phy_reset. The main difference from ->phy_reset is that the new operation is not allowed to manipulate libata internals directly. It's not allowed to configure or disable the port or devices. It can only succeed or fail and classify attached devices into passed @classes. This change gives more control to higher level and eases sharing reset methods with EH. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] libata: export ata_busy_sleepTejun Heo2006-01-261-0/+3
| | | | | | | Export ata_busy_sleep(), to be used by low level driver reset functions. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] libata: implement and apply ata_eh_qc_complete/retry()Tejun Heo2006-01-261-0/+3
| | | | | | | | | | | Implement ata_eh_qc_complete/retry() using scsi_eh_finish_cmd() and scsi_eh_flush_done_q(). This removes all eh scsicmd finish hacks from low level drivers. This change was first suggested by Jeff Garzik. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] libata: return AC_ERR_* from issue functionsTejun Heo2006-01-261-2/+2
| | | | | | | | | Return AC_ERR_* mask from issue fuctions instead of 0/-1. This enables things like failing a qc with AC_ERR_HSM when the device doesn't set DRDY when the qc is about to be issued. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] libata: add detailed AC_ERR_* flagsTejun Heo2006-01-261-5/+10
| | | | | | | | | | | Add detailed AC_ERR_* flags and use them. Long-term goal is to describe all errors with err_mask and tf combination (tf for failed sector information, etc...). After proper error diagnosis is implemented, sense data should also be generated from err_mask instead of directly from hardware tf registers as it is currently. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] libata: make the owner of a qc responsible for freeing itTejun Heo2006-01-261-1/+1
| | | | | | | | | | | | | | qc used to be freed automatically on command completion. However, as a qc can carry information about its completion status, it can be useful to its owner/issuer after command completion. This patch makes freeing qc responsibility of its owner. This simplifies ata_exec_internal() and makes command turn-around for atapi request sensing less hackish. This change was originally suggested by Jeff Garzik. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* Merge branch 'debug'Jeff Garzik2006-01-171-7/+45
|\
| * From: Borislav Petkov <petkov@uni-muenster.de>Randy Dunlap2006-01-171-7/+45
| | | | | | | | | | | | | | libata new debugging macro definitions Signed-off-by: Borislav Petkov <petkov@uni-muenster.de> Signed-off-by: Randy Dunlap <randy_d_dunlap@linux.intel.com>
* | [PATCH] libata: Fix heuristic typos add LBA48PIO flag and support code, add ↵Alan Cox2006-01-171-3/+6
| | | | | | | | | | | | | | IRQ flag for next diff Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] libata: add a function to decide if we need iordyAlan Cox2006-01-171-0/+2
|/ | | | | | | This ought to be simple but for PIO2 we have to poke around the drive data to get it 100% correct. Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* Merge branch 'post-2.6.15' of git://brick.kernel.dk/data/git/linux-2.6-blockLinus Torvalds2006-01-061-1/+2
|\ | | | | | | | | | | | | Manual fixup for merge with Jens' "Suspend support for libata", commit ID 9b847548663ef1039dd49f0eb4463d001e596bc3. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [BLOCK] add FUA support to libataTejun Heo2006-01-061-1/+2
| | | | | | | | | | Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jens Axboe <axboe@suse.de>
* | [PATCH] Suspend support for libataJens Axboe2006-01-061-0/+8
|/ | | | | | | | | | | | | | | | This patch adds suspend patch to libata, and ata_piix in particular. For most low level drivers, they should just need to add the 4 hooks to work. As I can only test ata_piix, I didn't enable it for more though. Suspend support is the single most important feature on a notebook, and most new notebooks have sata drives. It's quite embarrassing that we _still_ do not support this. Right now, it's perfectly possible to suspend the drive in mid-transfer. Signed-off-by: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Merge branch 'upstream-fixes'Jeff Garzik2005-12-131-0/+1
|\
| * [libata] mark certain hardware (or drivers) with a no-atapi flagJeff Garzik2005-12-131-0/+1
| | | | | | | | | | | | | | | | | | | | Some hardware does not support the PACKET command at all. Other hardware supports ATAPI, but the driver does something nasty such as calling BUG() when an ATAPI command is issued. For these such cases, we mark them with a new flag, ATA_FLAG_NO_ATAPI. Initial version contributed by Ben Collins.
* | [PATCH] libata: remove unused qc->waitingTejun Heo2005-12-131-2/+0
| | | | | | | | | | | | | | | | There is no user of qc->waiting left after ata_exec_internal() changes. Kill the field. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] libata: implement ata_exec_internal()Tejun Heo2005-12-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements ata_exec_internal() function which performs libata internal command execution. Previously, this was done by each user by manually initializing a qc, issueing it, waiting for its completion and handling errors. In addition to obvious code factoring, using ata_exec_internal() fixes the following bugs. * qc not freed on issue failure * ap->qactive clearing could race with the next internal command * race between timeout handling and irq * ignoring error condition not represented in tf->status Also, qc & hardware are not accessed anymore once it's completed, making internal commands more conformant with general semantics. ata_exec_internal() also makes it easy to issue internal commands from multiple threads if that becomes necessary. This patch only implements ata_exec_internal(). A following patch will convert all users. Signed-off-by: Tejun Heo <htejun@gmail.com> -- Jeff, all patches have been regenerated against upstream branch as of today. (575ab52a218e4ff0667a6cbd972c3af443ee8713) Also, I took out a debug printk from ata_exec_internal (don't know how that one got left there). Other than that, all patches are identical to the previous posting. Thanks. :-) Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] libata: move err_mask to ata_queued_cmdAlbert Lee2005-12-061-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | - remove err_mask from the parameter list of the complete functions - move err_mask to ata_queued_cmd - initialize qc->err_mask when needed - for each function call to ata_qc_complete(), replace the err_mask parameter with qc->err_mask. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> =============== Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [libata] remove two unused fields from struct ata_portJeff Garzik2005-11-141-2/+0
|/
* [libata] minor fixes, new helpersJeff Garzik2005-11-141-0/+14
| | | | | | | | | | - in ata_dev_identify(), don't assume that all devices are either ATA or ATAPI. In the future, this code will see port multipliers and other devices. - make a debugging printk less verbose - add new helper ata_qc_reinit() - add new helper BPRINTK() and port flag ATA_FLAG_DEBUGMSG, for fine-grained debugging use.
* Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6Linus Torvalds2005-11-111-1/+1
|\
| * [SCSI] remove Scsi_Host_Template typedefChristoph Hellwig2005-11-091-3/+3
| | | | | | | | Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* | [PATCH] libata: propogate host private data from probe functionAlan Cox2005-11-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This will let me chop the code size of several drivers right down. In many cases the actual private data is very useful and constant for a given host controller so being able to just pass it at probe time would be very useful indeed (eg with the via driver would could pass the udma clocking and reduce the code size, or with the AMD one the UDMA multiplier and the offset) Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] libata.h needs dma-mapping.hAndrew Morton2005-11-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Alpha: include/linux/libata.h: In function `ata_pad_alloc': include/linux/libata.h:785: warning: implicit declaration of function `dma_alloc_coherent' include/linux/libata.h:786: warning: assignment makes pointer from integer without a cast include/linux/libata.h: In function `ata_pad_free': include/linux/libata.h:792: warning: implicit declaration of function `dma_free_coherent' (I have a decouple-some-header-files cleanup in -mm, so it's causing some fallout of this nature) Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [libata] eliminate use of drivers/scsi/scsi.h compatibility header/definesJeff Garzik2005-11-071-3/+3
|/
* [libata] ATAPI pad allocation fixes/cleanupJeff Garzik2005-11-041-0/+13
| | | | | | | Use ata_pad_{alloc,free} in two drivers, to factor out common code. Add ata_pad_{alloc,free} to two other drivers, which needed the padding but had not been updated.
* Merge branch 'upstream'Jeff Garzik2005-10-301-2/+26
|\
| * [libata] change ata_qc_complete() to take error mask as second argJeff Garzik2005-10-301-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The second argument to ata_qc_complete() was being used for two purposes: communicate the ATA Status register to the completion function, and indicate an error. On legacy PCI IDE hardware, the latter is often implicit in the former. On more modern hardware, the driver often completely emulated a Status register value, passing ATA_ERR as an indication that something went wrong. Now that previous code changes have eliminated the need to use drv_stat arg to communicate the ATA Status register value, we can convert it to a mask of possible error classes. This will lead to more flexible error handling in the future.
* | Merge branch 'upstream'Jeff Garzik2005-10-301-2/+0
|\ \ | |/
| * [libata] remove ata_chk_err(), ->check_err() hook.Jeff Garzik2005-10-291-2/+0
| | | | | | | | | | We now depend on ->tf_read() to provide us with the contents of the Error shadow register.
* | Merge branch 'master'Jeff Garzik2005-10-281-17/+56
|\ \ | |/
| * libata: const-ification bombing runJeff Garzik2005-10-221-16/+16
| | | | | | | | | | | | | | Enforce access rules where appropriate. If the compiler is smart enough, this may buy us an optimization or two as a side effect.
| * libata: turn on block layer clusteringJeff Garzik2005-10-221-1/+1
| |
| * Add ide-timing functionality to libata.Alan Cox2005-10-211-0/+39
| | | | | | | | | | | | | | | | | | | | | | This is needed for full AMD and VIA drivers and possibly more. Functions to turn actual clocking and cycle timings into register values. Also to merge shared timings to compute an optimal timing set. Built from the drivers/ide version by Vojtech Pavlik Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | libata: add ata_sg_is_last() helper, use it in several driversJeff Garzik2005-10-181-0/+12
| |
* | Merge branch 'upstream'Jeff Garzik2005-10-181-4/+2
|\ \ | |/
| * [PATCH] libata CHS: calculate read/write commands and protocol on the fly ↵Albert Lee2005-10-181-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (revise #6) - merge ata_prot_to_cmd() and ata_dev_set_protocol() as ata_rwcmd_protocol() - pave road for read/write multiple support - remove usage of pre-cached command and protocol values and call ata_rwcmd_protocol() instead Signed-off-by: Albert Lee <albertcc@tw.ibm.com> ============== Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | Merge branch 'upstream'Jeff Garzik2005-10-091-11/+23
|\ \ | |/
| * libata: add ata_ratelimit(), use it in AHCI driver irq handlerJeff Garzik2005-10-051-0/+2
| |
| * libata: bitmask based pci init functions for one or two portsAlan Cox2005-10-041-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This redoes the n_ports logic I proposed before as a bitmask. ata_pci_init_native_mode is now used with a mask allowing for mixed mode stuff later on. ata_pci_init_legacy_port is called with port number and does one port now not two. Instead it is called twice by the ata init logic which cleans both of them up. There are stil limits in the original code left over - IRQ/port mapping for legacy mode should be arch specific values - You can have one legacy mode IDE adapter per PCI root bridge on some systems - Doesn't handle mixed mode devices yet (but is now a lot closer to it)
| * /spare/repo/libata-dev branch 'chs-support'Jeff Garzik2005-09-281-0/+6
| |\
| | * Merge /spare/repo/linux-2.6/Jeff Garzik2005-09-241-0/+1
| | |\
| | * \ Merge /spare/repo/linux-2.6/ Jeff Garzik2005-09-081-1/+1
| | |\ \
| | * \ \ Merge libata branch 'chs-support' to latest upstream kernel.Jeff Garzik2005-08-291-22/+27
| | |\ \ \
| | * \ \ \ Merge upstream kernel changes into 'C/H/S support' branch of libata.Jeff Garzik2005-06-221-0/+67
| | |\ \ \ \
| | * | | | | [libata] C/H/S support, for older devicesAlbert Lee2005-05-121-0/+6
| | | | | | |
| * | | | | | [PATCH] libata: rename host statesAlbert Lee2005-09-281-10/+10
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: s/PIO_ST_/HSM_ST_/ and s/pio_task_state/hsm_task_state/. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | | | | | libata: fix ATAPI DMA alignment issuesJeff Garzik2005-10-051-1/+26
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | ATAPI needs to be padded to next 4 byte boundary, if misaligned. Original work by me, many fixes from Tejun Heo.
OpenPOWER on IntegriCloud