summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-core.c
Commit message (Collapse)AuthorAgeFilesLines
* /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
|\
| * [PATCH] sg traverse fix for __atapi_pio_bytes()Albert Lee2005-06-091-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Incorrect md5sum when using ATAPI PIO mode to verify a distro CD. Root cause: sg traverse problem. In __atapi_pio_bytes(), if qc->cursg++ is increased and "goto next_page" is executed, then sg is not updated to the new qc->cursg and the old sg is overwritten with the new data. Changes: - Replace "goto next_page" with "goto next_sg" to make sg updated. Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
* | Automatic merge of /spare/repo/linux-2.6/.git branch HEAD2005-06-031-58/+452
|\ \ | |/
| * Automatic merge of /spare/repo/linux-2.6/.git branch HEAD2005-06-021-4/+11
| |\
| | * Automatic merge of /spare/repo/netdev-2.6 branch use-after-unmap2005-05-291-4/+11
| | |\
| | | * libata: Fix use-after-iounmapJeff Garzik2005-05-261-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jens Axboe pointed out that the iounmap() call in libata was occurring too early, and some drivers (ahci, probably others) were using ioremap'd memory after it had been unmapped. The patch should address that problem by way of improving the libata driver API: * move ->host_stop() call after all ->port_stop() calls have occurred. * create default helper function ata_host_stop(), and move iounmap() call there. * add ->host_stop_prewalk() hook, use it in sata_qstor.c (hi Mark). sata_qstor appears to require the host-stop-before-port-stop ordering that existed prior to applying the attached patch.
| * | | libata: kernel-doc warning fixesJeff Garzik2005-06-021-3/+3
| | | |
| * | | libata: update inline source docsEdward Falk2005-06-021-7/+276
| | | |
| * | | libata: doc updatesJeff Garzik2005-05-301-33/+117
| | | |
| * | | libata: more doc updatesJeff Garzik2005-05-301-13/+44
| |/ / | | | | | | | | | | | | | | | Document recently-added ata_port_operations hooks. Fill several doc stubs in libata-core.c.
| * | [PATCH] libata: Fix zero sg_dma_len() on 64-bit platformAlbert Lee2005-05-261-6/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When testing ATAPI PIO data transfer on the ppc64 platform, __atapi_pio_bytes() got zero when sg_dma_len() is used. I checked the <asm-ppc64/scatterlish.h>, the struct scatterlist is defined as: struct scatterlist { struct page *page; unsigned int offset; unsigned int length; /* For TCE support */ u32 dma_address; u32 dma_length; }; #define sg_dma_address(sg) ((sg)->dma_address) #define sg_dma_len(sg) ((sg)->dma_length) So, if the scatterlist is not DMA mapped, sg_dma_len() will return zero on ppc64. The same problem should occur on the x86-64 platform. On the i386 platform, sg_dma_len() returns sg->length, that's why the problem does not occur on an i386. Changes: - Use sg->length if the scatterlist is not DMA mapped (yet). Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
| * [PATCH] libata: flush COMRESET set and clearBrett Russ2005-05-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Updated patch to fix erroneous flush of COMRESET set and missing flush of COMRESET clear. Created a new routine scr_write_flush() to try to prevent this in the future. Also, this patch is based on libata-2.6 instead of the previous libata-dev-2.6 based patch. Signed-off-by: Brett Russ <russb@emc.com> Index: libata-2.6/drivers/scsi/libata-core.c ===================================================================
| * [PATCH] libata: Prevent the interrupt handler from completing a command twiceAlbert Lee2005-05-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: During the libata CD-ROM stress test, sometimes the "BUG: timeout without command" error is seen. Root cause: Unexpected interrupt occurs after the ata_qc_complete() is called, but before the SCSI error handler. The interrupt handler is invoked before the SCSI error handler, and it clears the command by calling ata_qc_complete() again. Later when the SCSI error handler is run, the ata_queued_cmd is already gone, causing the "BUG: timeout without command" error. Changes: - Use the ATA_QCFLAG_ACTIVE flag to prevent the interrupt handler from completing the command twice, before the scsi_error_handler. Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
* | [PATCH] libata basic detection and errata for PATA->SATA bridgesBrad Campbell2005-05-121-2/+33
|/ | | | | | | | This patch works around an issue with WD drives (and possibly others) over SiL PATA->SATA Bridges on SATA controllers locking up with transfers > 200 sectors. Signed-off-by: Brad Campbell <brad@wasp.net.au>
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-161-0/+4024
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
OpenPOWER on IntegriCloud