summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-core.c
Commit message (Collapse)AuthorAgeFilesLines
* [libata] ata_timing fixAlan Cox2005-10-261-1/+1
|
* [PATCH] libata kernel-doc fixesRandy Dunlap2005-10-251-22/+14
| | | | | | | | | | 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>
* libata: const-ification bombing runJeff Garzik2005-10-221-34/+34
| | | | | | | Enforce access rules where appropriate. If the compiler is smart enough, this may buy us an optimization or two as a side effect.
* Add ide-timing functionality to libata.Alan Cox2005-10-211-0/+149
| | | | | | | | | | | 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: handle early device PIO modes correctlyAlan Cox2005-10-211-4/+27
|
* [PATCH] libata CHS: reread device identify info (revise #6)Albert Lee2005-10-181-1/+64
| | | | | | | | | | | | | | 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>
* [PATCH] libata CHS: calculate read/write commands and protocol on the fly ↵Albert Lee2005-10-181-68/+37
| | | | | | | | | | | | | | | (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>
* [PATCH] libata CHS: move the initialization of taskfile LBA flags (revise #6)Albert Lee2005-10-181-7/+0
| | | | | | | | | | | 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>
* libata: minor cleanupsJeff Garzik2005-10-051-3/+3
| | | | | | | A few code shuffles, to make merging future code easier. Add (DRIVER_SENSE << 24) to certain result codes, as noted by Douglas Gilbert.
* libata: move atapi_request_sense() to libata-scsi moduleJeff Garzik2005-10-051-48/+1
| | | | No content changes, just moving code around.
* libata: add ata_ratelimit(), use it in AHCI driver irq handlerJeff Garzik2005-10-051-0/+23
|
* Merge branch 'scsi-scan'Jeff Garzik2005-10-041-1/+1
|\
| * [libata] improve device scanJeff Garzik2005-10-031-1/+1
| | | | | | | | | | | | | | | | 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.
* | libata: bitmask based pci init functions for one or two portsAlan Cox2005-10-041-57/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-25/+115
|\ \
| * \ Merge /spare/repo/linux-2.6/Jeff Garzik2005-09-241-46/+72
| |\ \ | | |/
| * | Merge /spare/repo/linux-2.6/ Jeff Garzik2005-09-081-3/+16
| |\ \
| * \ \ Merge libata branch 'chs-support' to latest upstream kernel.Jeff Garzik2005-08-291-61/+238
| |\ \ \
| * \ \ \ /spare/repo/libata-dev branch 'v2.6.13'Jeff Garzik2005-08-291-29/+6
| |\ \ \ \
| * \ \ \ \ Merge upstream kernel changes into 'C/H/S support' branch of libata.Jeff Garzik2005-06-221-62/+485
| |\ \ \ \ \
| * | | | | | [libata] C/H/S support, for older devicesAlbert Lee2005-05-121-25/+115
| | | | | | |
* | | | | | | [PATCH] libata: rename host statesAlbert Lee2005-09-281-39/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | [PATCH] libata: indent and whitespace changeAlbert Lee2005-09-281-1/+1
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | | | | | Merge /spare/repo/linux-2.6/Jeff Garzik2005-09-231-14/+23
|\ \ \ \ \ \
| * | | | | | [libata] fix PIO completion raceJeff Garzik2005-09-161-14/+23
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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().
* | | | | | [PATCH] PATCH: remove function for non-PCI as requestedAlan Cox2005-09-161-32/+49
|/ / / / / | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | | | | [kernel-doc] fix various DocBook build problems/warningsJeff Garzik2005-09-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most serious is fixing include/sound/pcm.h, which breaks the DocBook build. The other stuff is just filling in things that cause warnings.
* | | | | /spare/repo/libata-dev branch 'iomap-try3'Jeff Garzik2005-09-051-1/+10
|\ \ \ \ \
| * | | | | [libata] update several drivers to use pci_iomap()/pci_iounmap()Jeff Garzik2005-08-301-1/+10
| | |_|_|/ | |/| | |
* | | | | [libata] allow ATAPI to be enabled with new atapi_enabled module optionJeff Garzik2005-08-301-0/+4
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge /spare/repo/linux-2.6/Jeff Garzik2005-08-291-40/+207
|\ \ \ \
| * | | | [PATCH] libata: regularize dma_start/stop argumentsAlan Cox2005-08-261-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Needed for a few PATA drivers. Also fix up a wrong comment. Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
| * | | | [PATCH] libata: typoAlan Cox2005-08-261-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You spelt heuristic wrongly. Also reformatted to 80 columns, ignore the diff and fix the typo if you prefer that. Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
| * | | | libata: fix EH lockingJeff Garzik2005-08-251-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Wrap ata_qc_complete() calls in EH context in spinlocks, to prevent races (mainly in ATAPI code paths).
| * | | | /spare/repo/libata-dev branch 'upstream-fixes'Jeff Garzik2005-08-231-25/+0
| |\ \ \ \ | | | |_|/ | | |/| |
| * | | | [PATCH] libata: implement ata_poll_qc_complete and use it in polling functionsTejun Heo2005-08-231-10/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [PATCH libata-dev-2.6:upstream] implement ata_poll_qc_complete and use it in polling functions Previously, libata polling functions turned irq back on and completed qc commands without holding host lock. This creates a race condition between the polling task and interrupts from other ports on the same host set or spurious interrupt from itself. This patch implements ata_poll_qc_complete which enables irq and completes qc atomically and convert all polling functions. Note: atapi_packet_task() didn't use to turn irq back on or clear ATA_FLAG_NOINTR on error exits. This patch makes it use ata_poll_qc_complete which does both. Note: With this change, ALL invocations of ata_qc_complete() are now done under host_set lock. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
| * | | | [PATCH] fix atapi_packet_task vs. intr race (take 2)Tejun Heo2005-08-231-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Interrupts from devices sharing the same IRQ could cause ata_host_intr to finish commands being processed by atapi_packet_task if the commands are using ATA_PROT_ATAPI_NODATA or ATA_PROT_ATAPI_DMA protocol. This is because libata interrupt handler is unaware that interrupts are not expected during that period. This patch adds ATA_FLAG_NOINTR flag to tell the interrupt handler that we're not expecting interrupts. Note that once proper HSM is implemented for interrupt-driven PIO, this should be merged into it and this flag will be removed. ahci.c is a different kind of beast, so it's left alone. * The following drivers use ata_qc_issue_prot and ata_interrupt, so changes in libata core will do. ata_piix sata_sil sata_svw sata_via sata_sis sata_uli * The following drivers use ata_qc_issue_prot and custom intr handler. They need this change to work correctly. sata_nv sata_vsc * The following drivers use custom issue function and intr handler. Currently all custom issue functions don't support ATAPI, so this change is irrelevant, updated for consistency and to avoid later mistakes. sata_promise sata_qstor sata_sx4 Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
| * | | | [PATCH] libata: Clear ATA_QCFLAG_ACTIVE flag before calling the completion ↵Albert Lee2005-08-231-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | callback Description: After calling the completion callback, the libata error handler might be running and getting atapi sense data. Clearing the ATA_QCFLAG_ACTIVE flag at this point might interfere with the libata error handler. Changes: - Clear the ATA_QCFLAG_ACTIVE flag before calling the completion callback (and also before the error handler) - Add some comment Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
| * | | | /spare/repo/libata-dev branch 'upstream-fixes'Jeff Garzik2005-08-231-6/+133
| |\ \ \ \
| | * | | | [PATCH] libata handle the case when device returns/needs extra dataAlbert Lee2005-08-121-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PATCH 2/2: handle the case when device returns/needs extra data Description: Sometimes the device returns/needs extra data than expected. Changes: Modify __atapi_pio_bytes() to handle the case where device returns/needs extra data. - for read case, discard trailing data from the device - for write case, padding zero data to the device Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
| | * | | | [PATCH] libata ata_data_xfer() fixAlbert Lee2005-08-121-3/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PATCH 1/2: ata_data_xfer() fix Changes: - Modify ata_mmio_data_xfer() and ata_pio_data_xfer() to handle odd-lengthed buffer. - Add some function comments This patch does not reuse ap->pad as alignment buffer since using local variable seems good enough. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
| * | | | | libata: trim trailing whitespace.Jeff Garzik2005-07-311-2/+2
| |/ / / / | | | | | | | | | | | | | | | Also, fixup a tabs-to-spaces block of code in ata_piix.
* | | | | [libata] license change, other bitsJeff Garzik2005-08-281-21/+31
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | | | libata: release prep (bump versions, etc.)Jeff Garzik2005-08-231-25/+0
|/ / / | | | | | | | | | | | | | | | - bump versions where necessary - remove two duplicated+outdated doc comments - add MODULE_VERSION() to AHCI driver
* | | Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6Linus Torvalds2005-07-261-2/+2
|\ \ \
| * | | [SCSI] remove scsi_eh_eflags_ macrosChristoph Hellwig2005-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Just opencoded access to eh_eflags, it's much more readable anyway. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * | | [SCSI] remove scsi_set_deviceChristoph Hellwig2005-06-261-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | scsi_add_host is the proper place to set the device, but people copy the scsi_set_device usage from older drivers again and again. note that this leaves some legacy drivers like qlogicisp/qlogicfc without pci association in sysfs, but they're scheduled to go away soon anyway. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* | | [PATCH] libata: lengthen COMMRESET delayTejun Heo2005-06-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch lengthens the delay between DET setting and clearing for COMMRESET from 400us to 1ms. I couldn't find any requiremen regarding the duration of COMMRESET in SATA I/II specs but AHCI-1.1 10.4.2 states that it should be at least 1ms. Signed-off-by: Tejun Heo <htejun@gmail.com>
* | | libata: update DMA blacklistJeff Garzik2005-06-281-1/+1
|/ / | | | | | | Contributions from Alan Cox and maximilian attems.
* | Merge /spare/repo/linux-2.6/Jeff Garzik2005-06-181-3/+1
|\ \
OpenPOWER on IntegriCloud