aboutsummaryrefslogtreecommitdiff
path: root/drivers/ata
AgeCommit message (Collapse)Author
2007-08-23Merge 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: libata: don't check n_sectors during revalidation if zero pata_via: Add Arima W730-K8 and other rebadgings pata_sis: Add the FSC Amilo and friends pata_pdc2027x: PLL detection fixes libata: fix n_sectors failure handling during revalidation
2007-08-23pata_it821x: Fix regression/corruptorAlan Cox
Whoever did the PCI revision patch slipped up on the it821x, and I didn't spot this at the time either. They moved the check for the errata from the 0x10 revision to 0x11. Put it back This one is important for 2.6.23 final as in some cases bad things will occur if 0x10 revision boards don't get the fixups. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-23libata: don't check n_sectors during revalidation if zeroTejun Heo
If the initial configuration fails early, n_sectors is left at zero. Checking against it during revalidation makes retried configuration fail due to n_sectors mismatch. Ignore zero n_sectors during revalidation. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-23pata_via: Add Arima W730-K8 and other rebadgingsAlan Cox
More cable funnies Signed-off-by: Alan Cox <alan@redhat.com> Tested-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-23pata_sis: Add the FSC Amilo and friendsAlan Cox
More short cables Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-23pata_pdc2027x: PLL detection fixesMikael Pettersson
Previously I reported that the pata_pdc2027x PLL detection changes in kernel 2.6.22 broke the driver on my PowerMac: >pata_pdc2027x: Invalid PLL input clock 1691742kHz, give up! This is followed by a number of errors and speed reduction steps on the affected ports. There are two bugs in pata_pdc2027x's PLL detection code: 1. The PLL counter's start value is read before the chip is put in "test mode". Outside of test mode the counter is halted, and on the PowerMac the counter is zero because the chip hasn't been initialised by its BIOS. The fix is to move the read of the start value to after test mode is started, but before the mdelay() in test mode. This also improves the precision of the PLL detection. 2. The code to compute the number of PLL decrements during the mdelay() in test mode fails to consider that the PLL counter only is 30 bits wide. If there is a wraparound, it will compute an incorrect and much too large value. On the PowerMac, the start count is zero, the end count is a large 30-bit value, so wraparound occurs and an out of bounds PLL clock is detected. The fix is to mask the (start - end) computation to 30 bits. While debugging this I also noticed that pdc_read_counter() reads the two halves of the 30-bit PLL counter as 16-bit values, and then combines them as if the halves only are 15 bits wide. To avoid confusion, the halves should be read as 15-bit values. This patch implements all three changes. It fixes the PLL detection failure on my PowerMac, and doesn't cause any regressions on an x86 with an identical card. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-23libata: fix n_sectors failure handling during revalidationTejun Heo
If revalidation fails because device has different n_sectors after configuration the original n_sectors should be restored before failing revalidation. Without this fix, n_sectors difference will incorrectly and silently pass revalidation when revalidation is retried. Signed-off-by: Tejun Heo <htejun@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-15libata: adjust libata to ignore errors after spinupRyan Power
Adjust libata to ignore errors after spinup This patch is to ignore errors from the spinup attempt if the drive is in the "standby id" state. Signed-off-by: Ryan Power <rpower@sysreset.com> Acked-by: Mark Lord <liml@rtr.ca> Cc: Jeff Garzik <jeff@garzik.org> Cc: Tejun Heo <htejun@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-15ata_piix: add TECRA M7 to broken suspend listTejun Heo
Add TECRA M7 to broken suspend list. Reported by Marie Koreen. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Marie Koreen <kbug@koreen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-15pata_hpt{37x|3x2n}: fix clock reporting (take 2)Sergei Shtylyov
Fix several inconsistencies in these drivers WRT reporting the clocks: - when using DPLL mode, 'pata_hpt37x' driver reported the DPLL frequency as the PCI clock -- make it properly report both clocks and add the same ability to the 'pata_hpt3x2n' driver; - both drivers sometimes use "pata_hpt3*:" and sometimes "hpt3*:" in the messages -- make them use only the former one; - the message about failed DPLL stablizatios deserves KERN_ERR and a bang. :-) Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-15pata_hpt37x: actually clock HPT374 with 50 MHz DPLL (take 2)Sergei Shtylyov
The DPLL tuning code always set up it for 66 MHz due to wrong UltraDMA mask including mode 5 used to check for the necessity of 66 MHz clocking -- this caused 66 MHz clock to be used for HPT374 chip that does not tolerate it. While fixing this, also remove PLL mode from the TODO list -- I don't think it's still a relevant item. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-15pata_artop: fix UDMA5 for AEC6280[R] and UDMA6 for AEC6880[R]Bartlomiej Zolnierkiewicz
Maximum supported UDMA mode for AEC6280[R] is UDMA5 (not UDMA4) and for AEC6880[R] it is UDMA6 (not UDMA5): * Fix the problem by adding missing struct ata_port_info to artop_init_one(). * Use the right naming (s/626/628/). * Bump driver version. Fixes IDE->libata regression, problem was never present in IDE aec62xx driver. 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-15ata_piix: update map 10b for ich8mTejun Heo
Fix map entry 10b for ich8. It's [P0 P2 IDE IDE] like ich6 / ich6m. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: <Kristen Carlson Accardi> kristen.c.accardi@intel.com Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-15sata_mv: PCI IDs for Hightpoint RocketRaid 1740/1742Alan Cox
Underneath all the HPT packaging, PCI identifiers, binary driver modules and stuff you find that ... Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-15[libata] pata_isapnp: replace missing module device tableJeff Garzik
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-06[ARM] pata_icside: fix the FIXMEsRussell King
Alan Cox suggested that the solution to the FIXMEs in pata_icside is to use a private postreset method to detect the lack of devices on a port, and in such a case, disable the interrupt for the port. This patch implements such a method, and removes the hard coded disable of port 0. Tested as working. Acked-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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>