aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
Commit message (Collapse)AuthorAge
* sata_promise: use TF interface for polling NODATA commandsTejun Heo2007-06-08
| | | | | | | | | | | | | | | | | | | | | | sata_promise uses two different command modes - packet and TF. Packet mode is intelligent low-overhead mode while TF is the same old taskfile interface. As with other advanced interface (ahci/sil24), ATA_TFLAG_POLLING has no effect in packet mode. However, PIO commands are issued using TF interface in polling mode, so pdc_interrupt() considers interrupts spurious if ATA_TFLAG_POLLING is set. This is broken for polling NODATA commands because command is issued using packet mode but the interrupt handler ignores it due to ATA_TFLAG_POLLING. Fix pdc_qc_issue_prot() such that ATA/ATAPI NODATA commands are issued using TF interface if ATA_TFLAG_POLLING is set. This patch fixes detection failure introduced by polling SETXFERMODE. Signed-off-by: Tejun Heo <htejun@gmail.com> Acked-by: Mikael Pettersson <mikpe@it.uu.se> Acked-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [ATA]: Back out bogus (SPARC64 && !PCI) Kconfig depends.David S. Miller2007-06-05
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* libata: always use polling SETXFERTejun Heo2007-06-04
| | | | | | | | | | | | | | | | | | | | | | Several people have reported LITE-ON LTR-48246S detection failed because SETXFER fails. It seems the device raises IRQ too early after SETXFER. This is controller independent. The same problem has been reported for different controllers. So, now we have pata_via where the controller raises IRQ before it's ready after SETXFER and a device which does similar thing. This patch makes libata always execute SETXFER via polling. As this only happens during EH, performance impact is nil. Setting ATA_TFLAG_POLLING is also moved from issue hot path to ata_dev_set_xfermode() - the only place where SETXFER can be issued. Note that ATA_TFLAG_POLLING applies only to drivers which implement SFF TF interface and use libata HSM. More advanced controllers ignore the flag. This doesn't matter for this fix as SFF TF controllers are the problematic ones. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [ATA]: Don't allow to enable this for SPARC64 without PCI.David S. Miller2007-06-03
| | | | | | Based upon a report from Meelis Roos. Signed-off-by: David S. Miller <davem@davemloft.net>
* [libata] Add drive to NCQ blacklistJeff Garzik2007-05-28
| | | | | | Contributed by Simon Griph. Signed-off-by: Jeff Garzik <jeff@garzik.org>
* pata_hpt37x: Further improvements based on the IDE updates and vendor driversAlan Cox2007-05-25
| | | | | | | Better DPLL use and calibration Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* pata: TriviaAlan Cox2007-05-25
| | | | | | | Typo/comment fixes Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [libata] sata_via, pata_via: Add PCI IDs.Jeff Garzik2007-05-25
| | | | | | | | | | | Supplied by VIA. Also, convert named constants to hex values in the pata_via PCI ID table. (standard libata policy for PCI device IDs, which are considered simply arbitrary hex numbers, without a need to create a single-use constant in linux/pci_ids.h) Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [libata] Fix decoding of 6-byte commandsJeff Garzik2007-05-25
| | | | | | | The code for parsing 6-byte SCSI command LBAs missed the top 5 bits (the MSB). Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: sata_sis fixesUwe Koziolek2007-05-25
| | | | | | | | The sata_sis driver supports SATA and PATA ports. The broken support of both types in one controller is fixed. Signed-off-by: Uwe Koziolek <uwe.koziolek@gmx.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* Fix build failure for drivers/ata/pata_scc.cTony Breeds2007-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit d4b2bab4f26345ea1803feb23ea92fbe3f6b77bc added deadline support to prereset and reset methods to libbata the pata_scc driver wasn't converted. This patch is a naive attempt to bring this driver up to scratch. Build failures are: drivers/ata/pata_scc.c: In function 'scc_pata_prereset': drivers/ata/pata_scc.c:870: error: too few arguments to function 'ata_std_prereset' drivers/ata/pata_scc.c: In function 'scc_error_handler': drivers/ata/pata_scc.c:916: warning: passing argument 2 of 'ata_bmdma_drive_eh' from incompatible pointer type drivers/ata/pata_scc.c:916: warning: passing argument 3 of 'ata_bmdma_drive_eh' from incompatible pointer type drivers/ata/pata_scc.c: In function 'scc_pata_prereset': drivers/ata/pata_scc.c:871: warning: control reaches end of non-void function On a releated note scc_bus_post_reset() is (AFACT) identical to ata_bus_post_reset(), would a patch to make ata_bus_post_reset() assesable to drivers be accepted? Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Acked-by: Tejun Heo <htejun@gmail.com> Cc: Akira Iguchi <akira2.iguchi@toshiba.co.jp> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [libata] sata_mv: add TODO listJeff Garzik2007-05-24
| | | | Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [libata] sata_promise: fix flags typoJeff Garzik2007-05-24
| | | | | | | A stray comma makes all the difference. Change to '|' as these flags should be or'd together. Signed-off-by: Jeff Garzik <jeff@garzik.org>
* pata_via: Handle laptops via DMIAlan Cox2007-05-24
| | | | | | | | | | | | Oh the joy of saving a fraction of a cent using short 40 wire cables and not faking 80wire Teach the VIA driver that there are some systems we need to know are magically wired for high speeds. Signed-off-by: Alan Cox <alan@redhat.com> Tested-by: Francis Russell <FrancisRussell@btinternet.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: -ENODEV during prereset isn't an errorTejun Heo2007-05-24
| | | | | | | | | | During prereset, -ENODEV return from ata_wait_ready() is not an error. This causes unnecessary bug message on controllers which uses 0xff to indicate empty port. Fix it. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: don't consider 0xff as port empty if SStatus is availableTejun Heo2007-05-24
| | | | | | | | | | | | Some SATA controllers (sata_sil) use 0xff to indicate port not ready status, not port empty. As libata interprets 0xff as port empty, this causes unnecessary reset failure and retry. Don't consider 0xff as port empty if SStatus is available and indicates that port is online. Signed-off-by: tejun Heo <htejun@gmail.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Indan Zupancic <indan@nul.nu> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* ata_piix: add short 40c quirk for Acer Aspire 2030, take #2Tejun Heo2007-05-24
| | | | | | | | Acer Aspire 2023WLMi uses short 40c cable. Add quirk for it. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Steve H. <mail.pandor@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* pata_sis: Fix and clean up some timing setupsAlan Cox2007-05-24
| | | | | | | | | | - Rename sis_port_base to sis_old_port_base() so nobody uses it for new generation controllers in error. - Use byte size operations where it is cleaner for mode setup - Fix a couple of masking errors on certai chip revs when setting speeds Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* hpt3x2n: Correct revision boundaryAlan Cox2007-05-24
| | | | | | | | We have a revision that isn't correctly claimed as two drivers both go for it: Fix the test accordingly. Noticed originally by Bill Nottingham. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: bump versionsJeff Garzik2007-05-21
| | | | Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: Trim trailing whitespaceJeff Garzik2007-05-21
| | | | Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: Kiss post_set_mode goodbyeAlan Cox2007-05-21
| | | | | | | As of the -mm tree we don't have post_set_mode users any more. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* ata_piix: clean upAlan Cox2007-05-21
| | | | | | | | With cable methods in place we don't need a custom error handler for SATA so get rid of it Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* pata_hpt366: Enable bits are unreliable so don't use themAlan Cox2007-05-21
| | | | | | | | | Various people had problems with both old and new IDE when hpt366 enable bits started getting honoured. It turns out they are not reliable so don't rely on them Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: Add Seagate STT20000A to DMA blacklist.Dave Jones2007-05-21
| | | | | | | | | http://bugzilla.kernel.org/show_bug.cgi?id=1044 points out an additional hard disk that doesn't handle DMA transfers correctly. This patch is the libata variant of the earlier patch to drivers/ide/ Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* ahci: disable 64bit dma on sb600Tejun Heo2007-05-21
| | | | | | | SB600 claims it can do 64bit DMA but it can't. Disable it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sata_via: pcim_iomap_regions() conversion missed BAR5Tejun Heo2007-05-17
| | | | | | | pcim_iomap_regions() conversion missed BAR5. Fix it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: remove libata.spindown_compatTejun Heo2007-05-17
| | | | | | | | | | | With STANDBYDOWN tracking added, libata.spindown_compat isn't necessary anymore. If userspace shutdown(8) issues STANDBYNOW, libata warns. If userspace shutdown(8) doesn't issue STANDBYNOW, libata does the right thing. Userspace can tell whether kernel supports spindown by testing whether sysfs node manage_start_stop exists as before. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sata_nv: fix fallout of devres conversionTejun Heo2007-05-17
| | | | | | | | | | | | | As with all other drivers, sata_nv's hpriv is allocated with devm_kzalloc() and there's no need to free it explicitly. Kill nv_remove_one() which incorrectly used kfree() instead of devm_kfree() and use ata_pci_remove_one() directly. Original fix is from Peer Chen. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Peer Chen <pchen@nvidia.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* drivers/ata: remove the wildcard from sata_nv driverPeer Chen2007-05-17
| | | | | | | | | | | | Because nvidia SATA controllers onward base on AHCI, so wildcard in sata_nv driver is unnecessary. Also the wildcard sometimes cause sata_nv driver to be loaded for AHCI controllers,which is not as expected. Signed-off-by: Peer Chen <pchen@nvidia.com> Cc: Tejun Heo <htejun@gmail.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: track spindown status and skip spindown_compat if possibleTejun Heo2007-05-16
| | | | | | | | | | | Our assumption that most distros issue STANDBYNOW seems wrong. The upstream sysvinit and thus many distros including gentoo and opensuse don't take any action for libata disks on spindown. We can skip compat handling for these distros so that they don't need to update anything to take advantage of kernel-side shutdown. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: fix shutdown warning message printingTejun Heo2007-05-16
| | | | | | | | | | | | | | | | Unlocking ap->lock and ssleeping don't work because SCSI commands can be issued from completion path without context. Reimplement delayed completion by allowing translation functions to override qc->scsidone(), storing the original completion function to scmd->scsi_done() and overriding qc->scsidone() with a function which schedules delayed invocation of scmd->scsi_done(). This isn't pretty at all but all the ugly parts are thankfully contained in the stop translation path where the compat feature is implemented. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata-acpi: add ATA_FLAG_ACPI_SATA port flagTejun Heo2007-05-16
| | | | | | | | | | | | Whether a controller needs IDE or SATA ACPI hierarchy is determined by the programming interface of the controller not by whether the controller is SATA or PATA, or it supports slave device or not. This patch adds ATA_FLAG_ACPI_SATA port flags which tells libata-acpi that the port needs SATA ACPI nodes, and sets the flag for ahci and sata_sil24. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: during revalidation, check n_sectors after device is configuredTejun Heo2007-05-16
| | | | | | | | | | | | | | | | | | Device might be resized during ata_dev_configure() due to HPA or (later) ACPI _GTF. Currently it's worked around by caching n_sectors before turning off HPA. The cached original size is overwritten if the device is reconfigured without being hardreset - which always happens after configuring trasnfer mode. If the device gets hardreset for some reason after that, revalidation fails with -ENODEV. This patch makes size checking more robust by moving n_sectors check from ata_dev_reread_id() to ata_dev_revalidate() after the device is fully configured. No matter what happens during configuration, a device must have the same n_sectors after fully configured to be treated as the same device. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: separate out ata_dev_reread_id()Tejun Heo2007-05-16
| | | | | | | | | | Separate out ata_dev_reread_id() from ata_dev_revalidate(). ata_dev_reread_id() reads IDENTIFY page and determines whether the same device is still there. ata_dev_revalidate() reconfigures after reread completes. This will be used by ACPI update. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* pata_scc had been missed by ata_std_prereset() switchAl Viro2007-05-16
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2007-05-12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (30 commits) [ARM] Use new get_irqnr_preamble [ARM] Ensure machine class menu is sorted alphabetically [ARM] 4333/2: KS8695: Micrel Development board [ARM] 4332/2: KS8695: Serial driver [ARM] 4331/3: Support for Micrel/Kendin KS8695 processor [ARM] 4371/1: AT91: Support for Atmel AT91SAM9RL-EK development board [ARM] 4372/1: Define byte sizes in asm-arm/sizes.h [ARM] 4370/3: AT91: Support for Atmel AT91SAM9RL processors. [ARM] Update mach-types [ARM] export symbol csum_partial_copy_from_user [ARM] iop13xx: msi support [ARM] stacktrace fix [ARM] Spinlock initializer cleanup [ARM] remove useless config option GENERIC_BUST_SPINLOCK [ARM] 4303/3: base kernel support for TI DaVinci [ARM] 4369/1: AT91: Fix circular dependency in header files [ARM] 4368/1: S3C24xx: build fix [ARM] 4364/1: AT91: LEDS on AT91SAM9261-EK [ARM] Fix iop32x/iop33x build [ARM] EBSA110: fix build errors caused by missing "const" ...
| * [ARM] pata_icside: fix build errorsRussell King2007-05-11
| | | | | | | | | | | | | | Building on the previous two ecard infrastructure changes, this patch fixes the pata_icside build errors caused by the recent libata changes. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * [ARM] ecard: add ecardm_iomap() / ecardm_iounmap()Russell King2007-05-11
| | | | | | | | | | | | | | Add devres ecardm_iomap() and ecardm_iounmap() for Acorn expansion cards. Convert all expansion card drivers to use them. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * [ARM] ecard: add helper function for setting ecard irq opsRussell King2007-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than having every driver fiddle about setting its private IRQ operations and data, provide a helper function to contain this functionality in one place. Arrange to remove the driver-private IRQ operations and data when the device is removed from the driver, and remove the driver private code to do this. This fixes potential problems caused by drivers forgetting to remove these hooks. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | pata_platform: don't use generic ata_port_startOlof Johansson2007-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have a system where I have a simple IDE controller that sits on a local bus without bus master dma capability, and thus no dma_mapping ops defined for the device/bus. pata_platform works great for me, with the exception of using the generic ata_port_start which tries to do a dmam_alloc_coherent. Looks like it doesn't need to allocate a prd table at all, so replace it with a dummy function instead. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | Use menuconfig objects: libataJan Engelhardt2007-05-11
| | | | | | | | | | | | | | | | | | | | Use menuconfigs instead of menus, so the whole menu can be disabled at once instead of going through all options. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | add the ATI SB700 SATA controller device id to AHCI pci tableHenry Su2007-05-11
| | | | | | | | | | | | | | | | | | | | | | Add the device ID to AHCI pci table for ATI SB700 SATA controller, the subsequent chipset of SB600. Signed-off-by: henry su<henry.su@amd.com> 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>
* | pata_pcmcia: recognize 2GB CompactFlash from TranscendAeschbacher, Fabrice2007-05-11
| | | | | | | | | | | | | | | | | | | | | | | | Allow the pata_pcmcia driver to automatically detect 2GB CompactFlash cards from Transcend. Signed-off-by: Fabrice Aeschbacher <fabrice.aeschbacher@siemens.com> Cc: "Peter Stuge" <stuge-linux-pcmcia@cdy.org> Acked-by: Alan Cox <alan@redhat.com> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | git-libata-all: sata_via build fixAndrew Morton2007-05-11
| | | | | | | | | | | | | | Cc: Tejun Heo <htejun@gmail.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | libata-acpi: clean up parameters and misc stuffTejun Heo2007-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleans up libata-acpi such that it looks similar to other libata files. This patch doesn't introuce any behavior changes. * make libata-acpi functions take ata_device instead of ata_port + device index * s/atadev/dev/ * de-indent local variable declarations Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | libata-acpi: s/CONFIG_SATA_ACPI/CONFIG_ATA_ACPI/Tejun Heo2007-05-11
| | | | | | | | | | | | | | | | ACPI applies to both SATA and PATA. Drop the 'S' from the config variable. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | libata: give devices one last chance even if recovery failed with -EINVALTejun Heo2007-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | After certain errors, some devices report complete garbage on IDENTIFY. This can cause ata_dev_read_id() to fail with -EINVAL resulting in immediate disabling of the device. Give the device one last chance after -EINVAL to allow recovery from such situations. As -EINVAL is triggered very rarely, this shouldn't cause any noticeable affect on more common error paths. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Harald Dunkel <harald.dunkel@t-online.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | libata: fallback to the other IDENTIFY on device error, take#2Tejun Heo2007-05-11
| | | | | | | | | | | | | | | | | | | | | | It seems the world isn't as frank as we thought and some devices lie about who they are. Fallback to the other IDENTIFY if IDENTIFY is aborted by the device. As this is the strategy used by IDE for a long time, it shouldn't cause too much problem. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: William Thompson <wt@electro-mechanical.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | libata: ignore EH scheduling during initializationTejun Heo2007-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libata enables SCSI host during ATA host activation which happens after IRQ handler is registered and IRQ is enabled. All ATA ports are in frozen state when IRQ is enabled but frozen ports may raise limited number of IRQs after being frozen - IOW, ->freeze() is not responsible for clearing pending IRQs. During normal operation, the IRQ handler is responsible for clearing spurious IRQs on frozen ports and it usually doesn't require any extra code. Unfortunately, during host initialization, the IRQ handler can end up scheduling EH for a port whose SCSI host isn't initialized yet. This results in OOPS in the SCSI midlayer. This is relatively short window and scheduling EH for probing is the first thing libata does after initialization, so ignoring EH scheduling until initialization is complete solves the problem nicely. This problem was spotted by Berck E. Nash in the following thread. http://thread.gmane.org/gmane.linux.kernel/519412 Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Berck E. Nash <flyboy@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>