aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/libata-core.c
AgeCommit message (Collapse)Author
2005-11-05[libata] restore sg on DMA mapping failureTejun Heo
2005-11-04[libata] ATAPI pad allocation fixes/cleanupJeff Garzik
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-30Merge branch 'upstream'Jeff Garzik
2005-10-30[libata] locking rewrite (== fix)Jeff Garzik
A lot of power packed into a little patch. This change eliminates the sharing between our controller-wide spinlock and the SCSI core's Scsi_Host lock. As the locking in libata was already highly compartmentalized, always referencing our own lock, and never scsi_host::host_lock. As a side effect, this change eliminates a deadlock from calling scsi_finish_command() while inside our spinlock.
2005-10-30[libata] ata_tf_to_host cleanupsJeff Garzik
Integrate ata_exec() and ata_tf_to_host() into their only caller, ata_bus_edd(). Rename ata_tf_to_host_nolock() to ata_tf_to_host(). This makes locking a bit easier to review, and may help pave the way for future changes.
2005-10-30Merge branch 'master'Jeff Garzik
2005-10-30[libata] fix legacy IDE probingJeff Garzik
ata_pci_init_one() receives an array of struct ata_port_info. Recent updates to the code had always obtained port information from array element 0, rather than array element N. Change to avoid hardcoding port_info[0], thereby restoring proper hardware information to secondary legacy ports.
2005-10-30Merge branch 'upstream'Jeff Garzik
2005-10-30[libata] change ata_qc_complete() to take error mask as second argJeff Garzik
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 Garzik
2005-10-30Merge branch 'master'Jeff Garzik
2005-10-29[libata] remove ata_chk_err(), ->check_err() hook.Jeff Garzik
We now depend on ->tf_read() to provide us with the contents of the Error shadow register.
2005-10-30[PATCH] Use sg_set_buf/sg_init_one where applicableDavid Hardeman
This patch uses sg_set_buf/sg_init_one in some places where it was duplicated. Signed-off-by: David Hardeman <david@2gen.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Greg KH <greg@kroah.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2005-10-29Merge branch 'master'Jeff Garzik
2005-10-29[PATCH] libata-core cleanups (updated)Randy Dunlap
libata-core cleanups: - use kzalloc() instead of kmalloc() + memset(); - use one exit path in ata_device_add(); Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-29[libata] ensure ->tf_read() hook reads Status and Error registersJeff Garzik
We want ->tf_read() to get a complete snapshot of all taskfile registers, without requiring the callers to manually call ata_chk_status() and ata_chk_err() themselves. This also fixes a minor bug in sata_vsc where the lower bits of the feature register were incorrectly placed in the HOB (high order bits) portion of struct ata_taskfile.
2005-10-28Merge branch 'master'Jeff Garzik
2005-10-26[libata] ata_timing fixAlan Cox
2005-10-25[PATCH] libata kernel-doc fixesRandy Dunlap
Correct some function names in kernel-doc. Add some kernel-doc descriptions. Fix some typos. Remove a few blank lines. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-22libata: const-ification bombing runJeff Garzik
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-21Add ide-timing functionality to libata.Alan Cox
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-21libata: handle early device PIO modes correctlyAlan Cox
2005-10-18Merge branch 'upstream'Jeff Garzik
2005-10-18[PATCH] libata CHS: reread device identify info (revise #6)Albert Lee
problem: id[53-58] might be changed after initializing device CHS settings. changes: - call ata_dev_reread_id() to reread the identify device info, after initializing device CHS settings. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> ============ Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-18[PATCH] libata CHS: calculate read/write commands and protocol on the fly ↵Albert Lee
(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-18[PATCH] libata CHS: move the initialization of taskfile LBA flags (revise #6)Albert Lee
move the initialization of taskfile LBA flags "ATA_TFLAG_LBA" and "ATA_TFLAG_LBA48 flags" to the SCSI translation functions Signed-off-by: Albert Lee <albertcc@tw.ibm.com> ============= Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-09Merge branch 'upstream'Jeff Garzik
2005-10-05libata: minor cleanupsJeff Garzik
A few code shuffles, to make merging future code easier. Add (DRIVER_SENSE << 24) to certain result codes, as noted by Douglas Gilbert.
2005-10-05libata: move atapi_request_sense() to libata-scsi moduleJeff Garzik
No content changes, just moving code around.
2005-10-05libata: fix ATAPI DMA alignment issuesJeff Garzik
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 Garzik
2005-10-04Merge branch 'scsi-scan'Jeff Garzik
2005-10-04libata: bitmask based pci init functions for one or two portsAlan Cox
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-03[libata] improve device scanJeff Garzik
Replace SCSI's legacy "bang at the door" method of probing with one directly controlled by the underlying ATA transport layer. We now only call scsi_scan_target() for devices we find, rather than probing every possible channel/id within a certain range.
2005-09-28/spare/repo/libata-dev branch 'chs-support'Jeff Garzik
2005-09-28[PATCH] libata: rename host statesAlbert Lee
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-28[PATCH] libata: indent and whitespace changeAlbert Lee
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 Garzik
2005-09-23Merge /spare/repo/linux-2.6/Jeff Garzik
2005-09-16[libata] fix PIO completion raceJeff Garzik
Make sure we that completion is the final action we take; prior to this change, another CPU may have changed ap->pio_task_state before we tested it a final time. Spotted by, and original patch by Albert Lee @ IBM. Also includes a minor optimization: eliminate a ton of unnecessary queue_work() calls, simply by jumping to the beginning of the FSM function ata_pio_task().
2005-09-16[PATCH] PATCH: remove function for non-PCI as requestedAlan Cox
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 Garzik
2005-09-07[kernel-doc] fix various DocBook build problems/warningsJeff Garzik
Most serious is fixing include/sound/pcm.h, which breaks the DocBook build. The other stuff is just filling in things that cause warnings.
2005-09-05/spare/repo/libata-dev branch 'iomap-try3'Jeff Garzik
2005-08-30[libata] update several drivers to use pci_iomap()/pci_iounmap()Jeff Garzik
2005-08-30[libata] allow ATAPI to be enabled with new atapi_enabled module optionJeff Garzik
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-29Merge libata branch 'chs-support' to latest upstream kernel.Jeff Garzik
2005-08-29/spare/repo/libata-dev branch 'v2.6.13'Jeff Garzik
2005-08-29Merge /spare/repo/linux-2.6/Jeff Garzik
2005-08-28[libata] license change, other bitsJeff Garzik
- changes license of all code from OSL+GPL to plain ole GPL - except for NVIDIA, who hasn't yet responded about sata_nv - copyright holders were already contacted privately - adds info in each driver about where hardware/protocol docs may be obtained - where I have made major contributions, updated copyright dates