aboutsummaryrefslogtreecommitdiff
path: root/drivers/ata
AgeCommit message (Collapse)Author
2007-08-01pata_sis: fix MWDMA for <= UDMA66 chipsets and UDMA for UDMA33 chipsetsBartlomiej Zolnierkiewicz
* Fix MWDMA timings setup in sis_old_set_dmamode() and sis_66_set_dmamode(). The old timings were overclocked (even worse behavior than sis5513 IDE driver which depends on BIOS to program correct timings), the new timings are taken from the datasheet (they match timings from ATA spec). * Fix UDMA timings setup in sis_old_set_dmamode(). Misplaced pci_write_config_word() call resulted in UDMA timings never being set. * Fix comments for sis_133_early_set_dmamode() and sis_133_set_dmamode(): - only the former function handles early SiS 961 bridges - both functions lack MWDMA timings setup * Fix typos in sis_100_set_piomode() and sis_133_set_piomode() comments. * Bump driver version. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-01libata: blacklist SAMSUNG HD401LJ / ZZ100-15 for NCQTejun Heo
SAMSUNG HD401LJ / ZZ100-15 does spurious completion of NCQ commands. Disable NCQ. Reported by Ulrich in bugzilla #8805. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Ulrich <stellplatz-nr.13a@datenparkplatz.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-01ata_piix: add Tecra M3 to broken suspend blacklistTejun Heo
Add Tecra M3 to the broken suspend blacklist. Tecra M3 doesn't have proper DMI_PRODUCT_NAME but has an OEM_STRING instead. Match it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-01ata_piix: implement piix_borken_suspend()Tejun Heo
Separate out broken suspend blacklist matching into piix_broken_suspend(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-01pci: rename __pci_reenable_device() to pci_reenable_device()Tejun Heo
Rename __pci_reenable_device() to pci_reenable_device(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-01libata-sff; Unbreak non DMA capable controllers againAlan Cox
Seems nobody else is checking/testing this case as it keeps getting horked. If we have no BAR4 mapping on an SFF controller this is *NOT* an error, it just means it isn't doing BMDMA. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-01pata_cmd64x: Correct the speed rangesAlan Cox
I must have been half asleep when doing the original code Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-24Merge branch 'upstream-linus' of ↵Linus Torvalds
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev: pata_hpt37x: Fix 2.6.22 clock PLL regression pata_ali: Correct HP detect ata_piix: fix suspend/resume for some TOSHIBA laptops PCI: export __pci_reenable_device()
2007-07-24pata_hpt37x: Fix 2.6.22 clock PLL regressionAlan Cox
Just one version of Linux ago The PLL code broke - oh no! But set the right mode And fix up the code Makes the PLL timing sync go [whatever happened to the sailor from Nantucket, hero of many limericks? -jg] Closes-bug: #8791 Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-24pata_ali: Correct HP detectAlan Cox
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-24ata_piix: fix suspend/resume for some TOSHIBA laptopsTejun Heo
ACPI implementations in several TOSHIBA laptops are weird and burn cpu cycles for tens of seconds while trying to suspend if the PCI device for the ATA controller is disabled when the ACPI suspend is called. This patch uses DMI to match those machines and bypass device disable on those machines during suspend. As the device needs to be put into enabled state on resume without affecting PCI enable count, matching resume callback uses __pci_reenable_device(). This bug is reported in bugzilla bug 7780. http://bugzilla.kernel.org/show_bug.cgi?id=7780 Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-24[BLOCK] Get rid of request_queue_t typedefJens Axboe
Some of the code has been gradually transitioned to using the proper struct request_queue, but there's lots left. So do a full sweet of the kernel and get rid of this typedef and replace its uses with the proper type. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-07-20pata_cs5520: Fix probe bug regression introduced in 2.6.22Alan Cox
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linux Torvalds <torvalds@linux-foundation.org>
2007-07-20libata: implement EH fast drainTejun Heo
In most cases, when EH is scheduled, all in-flight commands are aborted causing EH to kick in immediately. However, in some cases (especially with PMP), it's unclear which commands are affected by the error condition and although aborting all in-flight commands work, it isn't optimal and may cause unnecessary disruption. On the other hand, waiting for in-flight commands to drain themselves can take up to 30seconds. This patch implements EH fast drain to handle such situations. It gives in-flight commands some time to finish up but doesn't wait for too long. After EH is scheduled, fast drain timer is started and if no other completion occurs in ATA_EH_FASTDRAIN_INTERVAL all in-flight commands are aborted. If any completion occurred in the interval, the port is given another interval to finish up itself. Currently ATA_EH_FASTDRAIN_INTERVAL is 3 secs which should be enough for finishing up most commands. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20libata: schedule probing after SError access failure during autopsyTejun Heo
If SError isn't accessible, EH can't tell whether hotplug has happened or not. Report SError read failure with AC_ERR_OTHER and schedule probing with hardreset. This will be mainly useful for PMPs. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20libata: clear HOTPLUG flag after a resetTejun Heo
ATA_EHI_HOTPLUGGED is a hint for reset functions indicating the the port might have gone through hotplug/unplug just before entering EH. Reset functions modify their behaviors a bit to handle the situation better - e.g. using longer debouncing delay. Currently, once HOTPLUG is set, it isn't cleared till the end of EH. This is unnecessary and makes EH take longer. Clear the HOTPLUGGED flag after a reset try (successful or not). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20libata: improve SCSI scan failure handlingTejun Heo
SCSI scan may fail due to memory allocation failure even if EH is not in progress. Due to use of GFP_ATOMIC in SCSI scan path, allocation failure isn't too rare especially while probing multiple devices at once which is the case when a bunch of devices are connected to PMP. This patch moves SCSI scan failure detetion logic from ata_scsi_hotplug() to ata_scsi_scan_host() and implement synchronous scan behavior. The synchronous path sleeps briefly and repeats SCSI scan if some devices aren't attached properly. It contains robust retry loop to minimize the chance of device misdetection during boot and falls back to async retry if everything fails. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20libata: quickly trigger SATA SPD down after debouncing failedTejun Heo
Debouncing failure is a good indicator of basic link problem. Use -EPIPE to indicate debouncing failure and make ata_eh_reset() invoke sata_down_spd_limit() if the error occurs during reset. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20libata: improve SATA PHY speed down logicTejun Heo
sata_down_spd_limit() first reads the current SPD from SStatus and limit the speed to the lower one of one below the current limit or one below the current SPD in SStatus. SPD may not be accessible or valid when SPD down is requested making sata_down_spd_limit() fail when it's most needed. This patch makes the current SPD cached after each successful reset and forces GEN I speed (1.5Gbps) if neither of SStatus or the cached value is valid, so sata_down_spd_limit() is now guaranteed to lower the speed limit if lower speed is available. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20The SATA controller device ID is different according tosu henry
the onchip SATA type set in the system BIOS: Device Device ID SATA in IDE mode 0x4390 SATA in AHCI mode 0x4391 SATA in non-raid5 driver 0x4392 SATA in raid5 driver 0x4393 Although the device ID is different, they use the same AHCI driver .The attached file is the patch for adding these device IDs for ATI SB700. Signed-off-by: henry.su.ati@gmail.com Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20ahci: implement SCR_NOTIFICATION r/wTejun Heo
Make ahci_scr_read/write() handle SCR_NOTIFICATION if the controller supports it. Also, print "sntf" in the cap line if supported. While at it, convert eight space into a tab in ahci_print_info(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20ahci: make NO_NCQ handling more consistentTejun Heo
ahci_save_initial_config() is responsible for reading, screening the host CAP register and storing the modified result into hpriv->cap for the rest of the driver. Move ATA_FLAG_NO_NCQ handling into ahci_save_initial_config(). It's more consistent this way and the rest of the driver can always refer to hpriv->cap to determine configured capability. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20libata: make ->scr_read/write callbacks return error codeTejun Heo
Convert ->scr_read/write callbacks to return error code to better indicate failure. This will help handling of SCR_NOTIFICATION. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20libata: implement AC_ERR_NCQTejun Heo
When an NCQ command fails, all commands in flight are aborted and the offending one is reported using log page 10h. Depending on controller characteristics and LLD implementation, all commands may appear as having a device error due to shared TF status making it hard to determine what's actually going on. This patch adds AC_ERR_NCQ, marks the command reported by log page 10h with it and print extra "<F>" after the error report for the command to help distinguishing the offending command. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20libata: improve EH report formattingTejun Heo
Requiring LLDs to format multiple error description messages properly doesn't work too well. Help LLDs a bit by making ata_ehi_push_desc() insert ", " on each invocation. __ata_ehi_push_desc() is the raw version without the automatic separator. While at it, make ehi_desc interface proper functions instead of macros. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20sata_sil24: separate out sil24_do_softreset()Tejun Heo
Separate out sil24_do_softreset() which takes @pmp as its last argument. This will be used to implement sil24_pmp_softreset(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20sata_sil24: separate out sil24_exec_polled_cmd()Tejun Heo
Separate out sil24_exec_polled_cmd() from sil24_softreset(). This will be used to implement sil24_pmp_read/write(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20sata_sil24: replace sil24_update_tf() with sil24_read_tf()Tejun Heo
Replace sil24_update_tf() to sil24_read_tf() which reads TF into passed int result TF argument and can read TFs of PMP links. This will be used by PMP support. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20ahci: separate out ahci_do_softreset()Tejun Heo
Separate out ahci_do_softreset() which takes @pmp as its last argument. This will be used to implement ahci_pmp_softreset(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20ahci: separate out ahci_exec_polled_cmd()Tejun Heo
Separate out ahci_exec_polled_cmd() from ahci_softreset(). This will be used to implement ahci_pmp_read/write(). ahci_exec_polled_cmd() performs reset_engine before returning if the command fails (times out). This is to improve robustness. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20ahci: separate out ahci_kick_engine()Tejun Heo
Separate out stop_engine - CLO - start_engine sequence from ahci_softreset() and ahci_clo() into ahci_reset_engine() and use it in ahci_softreset() and ahci_post_internal_cmd(). The function will also be used to prepare for and clean up after PMP register access commands. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20ahci: use deadline instead of fixed timeout for 1st FIS for SRSTTejun Heo
Use deadline instead of fixed timeout for 1st FIS for SRST to improve robustness of SRST. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20libata: add @is_cmd to ata_tf_to_fis()Tejun Heo
Add @is_cmd to ata_tf_to_fis(). This controls bit 7 of the second byte which tells the device whether this H2D FIS is for a command or not. This cleans up ahci a bit and will be used by PMP. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20[libata] Fix reported task file values in sense dataPetr Vandrovec
ata_tf_read was setting HOB bit when lba48 command was submitted, but was not clearing it before reading "normal" data. As it is only place which sets HOB bit in control register, and register reads should not be affected by other bits, let's just clear it when we are done with reading upper bytes so non-48bit commands do not have to touch ctl at all. pata_scc suffered from same problem... Signed-off-by: Petr Vandrovec <petr@vandrovec.name> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20Correct comment in libata-sff.cDave Jones
The filename in the file header is incorrect. Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20pata_scc.c: small fixes (Workaround for errata A308)Akira Iguchi
This patch fixes some issues of the previous patch: - Use mode_filter() hook to limit ATAPI UDMA mode - "data loss" warning message - handling of udma_mask Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Signed-off-by: Akira Iguchi <akira2.iguchi@toshiba.co.jp> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20ahci.c: fix CONFIG_PM=n compilationAlexey Dobriyan
Commit df69c9c5438b4e396a64d42608b2a6c48a3e7475 moved only prototype of out of CONFIG_PM. Move function out as well. Box seems to boot fine. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20libata: add ST9160821AS 3.CLF to NONCQ blacklistTejun Heo
Yay, the first one from Seagate. 3.ALC firmware is okay. This was reported by Sam Freed on bugzilla bug 8759. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Sam Freed <sam@freed.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20pata_platform: Fix NULL pointer dereferenceMagnus Damm
pata_platform: Fix NULL pointer dereference pata_platform currently dereferences a NULL pointer in pata_platform_probe() if pdev->dev.platform_data is set to NULL. This breakage was most likely introduced by commit 5f45bc50976ee1f408f7171af155aec646655a37. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20[libata] sata_mv: minor cleanupsJeff Garzik
* trim trailing whitespace * document some flags, registers, and register bits * fix locking around EDMA on/off and configuration * continue replacing "constant OP var" with "var OP constant" * use new pci_try_set_mwi() Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20[libata] sata_mv: Micro-optimization and cleanupsJeff Garzik
* Micro-optimization in the EDMA interrupt handling code * s/EDMA_ERR_CRBQ_PAR/EDMA_ERR_CRQB_PAR/ * Document EDMA Error Interrupt Cause register bits Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20PCMCIA: Add another MemoryCard to ide-cs/pata_pcmciaMarcin Juszkiewicz
One card submitted by user. Signed-off-by: Marcin Juszkiewicz <openembedded@hrw.one.pl> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-17[libata] sata_mv: use pci_try_set_mwi()Jeff Garzik
Because sometimes in life, it's ok to fail. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-12Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6Linus Torvalds
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (34 commits) PCI: Only build PCI syscalls on architectures that want them PCI: limit pci_get_bus_and_slot to domain 0 PCI: hotplug: acpiphp: avoid acpiphp "cannot get bridge info" PCI hotplug failure PCI: hotplug: acpiphp: remove hot plug parameter write to PCI host bridge PCI: hotplug: acpiphp: fix slot poweroff problem on systems without _PS3 PCI: hotplug: pciehp: wait for 1 second after power off slot PCI: pci_set_power_state(): check for PM capabilities earlier PCI: cpci_hotplug: Convert to use the kthread API PCI: add pci_try_set_mwi PCI: pcie: remove SPIN_LOCK_UNLOCKED PCI: ROUND_UP macro cleanup in drivers/pci PCI: remove pci_dac_dma_... APIs PCI: pci-x-pci-express-read-control-interfaces cleanups PCI: Fix typo in include/linux/pci.h PCI: pci_ids, remove double or more empty lines PCI: pci_ids, add atheros and 3com_2 vendors PCI: pci_ids, reorder some entries PCI: i386: traps, change VENDOR to DEVICE PCI: ATM: lanai, change VENDOR to DEVICE PCI: Change all drivers to use pci_device->revision ...
2007-07-12libata: remove irq_on from ata_bus_reset() and ata_std_postreset()Albert Lee
It seems irq_on() in ata_bus_reset() and ata_std_postreset() are leftover of the EDD reset. Remove them. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-12ata_piix: kill incorrect invalid map value warningTejun Heo
The last two slots of MAP 00b of ich6m was incorrectly marked as reserved. This is left over from converting the entry to allow 00b. This causes no real problem. It only makes the driver print annoying warning message. Fix it. [patch also proferred by Pierre Tardy at the end of 2006 -jg] Signed-off-by: Tejun Heo <htejun@gmail.com> -- drivers/ata/ata_piix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-12libata: add another Maxtor drive with broken NCQ to the listChuck Ebbert
Add another Maxtor 6B200M0 drive with broken NCQ to the list. Signed-off-by: Chuck Ebbert <cebbert@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-12[libata] sata_mv: Fix and clean up per-chip-generation testsJeff Garzik
Due to a mistake in test logic, Gen-IIE chips were being treated as Gen-II chips in some cases. Fix this, and in the process, clean up IS_50XX/IS_60XX tests to the more uniform IS_GEN_{I,II,IIE} tests. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-12[libata] sata_mv: Convert to new exception handling (EH) infrastructureJeff Garzik
This makes hotplug, NCQ, etc. possible, and removes one of the few remaining old-EH drivers. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-12[libata] sata_mv: minor bug fixes, enhancements, and cleanups (prep for new EH)Jeff Garzik
* Continue replacing "CONSTANT & var" tests with "var & CONSTANT" * Don't clear EDMA_CFG_NCQ_GO_ON_ERR on Gen-IIE, where that bit does not exist * Set I/O Id field in descriptor, where present. Appears to work fine on all versions, even though queueing is still disabled. * call pci_set_mwi(), to (a) make sure cacheline size is set properly, and (b) enable MWI transactions * Remove never-used handling of coalescing interrupt bits (these events are always masked) Signed-off-by: Jeff Garzik <jeff@garzik.org>