summaryrefslogtreecommitdiff
path: root/include/linux/libata.h
AgeCommit message (Collapse)AuthorFilesLines
2005-12-13[PATCH] libata: implement ata_exec_internal()Tejun Heo1-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>
2005-12-06Merge branch 'upstream'Jeff Garzik1-2/+5
2005-12-06[PATCH] libata: move err_mask to ata_queued_cmdAlbert Lee1-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>
2005-11-18Merge branch 'upstream'Jeff Garzik1-2/+14
2005-11-15[libata] remove two unused fields from struct ata_portJeff Garzik1-2/+0
2005-11-14[libata] minor fixes, new helpersJeff Garzik1-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.
2005-11-12Merge branch 'master'Jeff Garzik1-1/+3
2005-11-12Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6Linus Torvalds1-1/+1
2005-11-11[PATCH] libata: propogate host private data from probe functionAlan Cox1-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>
2005-11-11[PATCH] libata.h needs dma-mapping.hAndrew Morton1-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>
2005-11-09[SCSI] remove Scsi_Host_Template typedefChristoph Hellwig1-3/+3
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-09[PATCH] libata irq-pio: merge the ata_dataout_task workqueue with ↵Albert Lee1-2/+0
ata_pio_task workqueue - remove ap->dataout_task from struct ata_port - let ata_pio_task() handle the HSM_ST_FIRST state. - rename ata_dataout_task() to ata_pio_first_block() - replace the ata_dataout_task workqueue with ata_pio_task workqueue Signed-off-by: Albert Lee <albertcc@tw.ibm.com> ======== Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-09Merge branch 'upstream'Jeff Garzik1-3/+3
2005-11-07[libata] eliminate use of drivers/scsi/scsi.h compatibility header/definesJeff Garzik1-3/+3
2005-11-05Merge branch 'master'Jeff Garzik1-1/+51
2005-11-05[libata] ATAPI pad allocation fixes/cleanupJeff Garzik1-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.
2005-10-31Merge branch 'master'Jeff Garzik1-2/+26
2005-10-30Merge branch 'upstream'Jeff Garzik1-2/+26
2005-10-30[libata] change ata_qc_complete() to take error mask as second argJeff Garzik1-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.
2005-10-30Merge branch 'upstream'Jeff Garzik1-2/+0
2005-10-30Merge branch 'upstream'Jeff Garzik1-2/+0
2005-10-30[libata] remove ata_chk_err(), ->check_err() hook.Jeff Garzik1-2/+0
We now depend on ->tf_read() to provide us with the contents of the Error shadow register.
2005-10-28Merge branch 'master'Jeff Garzik1-17/+56
2005-10-28Merge branch 'master'Jeff Garzik1-17/+56
2005-10-22libata: const-ification bombing runJeff Garzik1-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.
2005-10-22libata: turn on block layer clusteringJeff Garzik1-1/+1
2005-10-22Add ide-timing functionality to libata.Alan Cox1-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>
2005-10-19libata: add ata_sg_is_last() helper, use it in several driversJeff Garzik1-0/+12
2005-10-19Merge branch 'upstream'Jeff Garzik1-4/+2
2005-10-19Merge branch 'upstream'Jeff Garzik1-4/+2
2005-10-19[PATCH] libata CHS: calculate read/write commands and protocol on the fly ↵Albert Lee1-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>
2005-10-09Merge branch 'upstream'Jeff Garzik1-11/+23
2005-10-09Merge branch 'upstream'Jeff Garzik1-1/+7
2005-10-05libata: fix ATAPI DMA alignment issuesJeff Garzik1-1/+26
ATAPI needs to be padded to next 4 byte boundary, if misaligned. Original work by me, many fixes from Tejun Heo.
2005-10-05libata: add ata_ratelimit(), use it in AHCI driver irq handlerJeff Garzik1-0/+2
2005-10-04libata: bitmask based pci init functions for one or two portsAlan Cox1-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)
2005-10-04Merge libata upstream (which includes C/H/S support) include irq-pio branch.Jeff Garzik1-1/+7
Merge branch 'upstream'
2005-09-30[PATCH] libata irq-pio: rename atapi_packet_task() and commentsAlbert Lee1-3/+3
Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-09-30[PATCH] libata irq-pio: add comments and cleanupAlbert Lee1-9/+10
Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-09-28/spare/repo/libata-dev branch 'chs-support'Jeff Garzik1-0/+6
2005-09-28[PATCH] libata: interrupt driven pio for LLDAlbert Lee1-0/+2
libata.h: libata-core: Add ATA_FLAG_PIO_POLLING flag for LLDs that expect interrupt for command completion only. sata_nv.c: sata_vsc.c: irq handler is wrapper around ata_host_intr(), can handle PIO interrupts. sata_promise.c: sata_sx4.c: sata_qstor.c: sata_mv.c: Private irq handler. Polling mode ATA_FLAG_PIO_POLLING used for compatibility. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-09-28[PATCH] libata: interrupt driven pio for libata-coreAlbert Lee1-2/+2
- add PIO_ST_FIRST for the state before sending ATAPI CDB or sending "ATA PIO data out" first data block. - add ATA_TFLAG_POLLING and ATA_DFLAG_CDB_INTR flags - remove the ATA_FLAG_NOINTR flag since the interrupt handler is now aware of the states - modify ata_pio_sector() and atapi_pio_bytes() to work in the interrupt context - modify the ata_host_intr() to handle PIO interrupts - modify ata_qc_issue_prot() to initialize states - atapi_packet_task() changed to handle "ATA PIO data out" first data block - support the pre-ATA4 ATAPI device which raise interrupt when ready to receive CDB Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-09-28[PATCH] libata: rename host statesAlbert Lee1-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>
2005-09-24Merge /spare/repo/linux-2.6/Jeff Garzik1-0/+1
2005-09-16[PATCH] PATCH: remove function for non-PCI as requestedAlan Cox1-0/+1
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-09-08Merge /spare/repo/linux-2.6/ Jeff Garzik1-1/+1
2005-09-05/spare/repo/libata-dev branch 'iomap-try3'Jeff Garzik1-0/+1
2005-08-30[libata] update several drivers to use pci_iomap()/pci_iounmap()Jeff Garzik1-0/+1
2005-08-30[libata] allow ATAPI to be enabled with new atapi_enabled module optionJeff Garzik1-1/+0
ATAPI is getting close to being ready. To increase exposure, we enable the code in the upstream kernel, but default it to off (present behavior). Users must pass atapi_enabled=1 as a module option (if module) or on the kernel command line (if built in) to turn on discovery of their ATAPI devices.
2005-08-30Merge libata branch 'chs-support' to latest upstream kernel.Jeff Garzik1-22/+27