aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/ahci.c
Commit message (Collapse)AuthorAgeFilesLines
* ahci: Add identifiers for ASM106x devicesAlan Cox2013-01-271-0/+6
| | | | | | | | | | | | | | | commit 7b4f6ecacb14f384adc1a5a67ad95eb082c02bd1 upstream. They don't always appear as AHCI class devices but instead as IDE class. Based on an initial patch by Hiroaki Nito Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=42804 Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Abdallah Chatila <abdallah.chatila@ericsson.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ahci: Add alternate identifier for the 88SE9172Alan Cox2012-10-021-0/+2
| | | | | | | | | | | | | commit 17c60c6b763cb5b83b0185e7d38d01d18e55a05a upstream. This can also appear as 0x9192. Reported in bugzilla and confirmed with the board documentation for these boards. Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=42970 Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ahci: Detect Marvell 88SE9172 SATA controllerMatt Johnson2012-06-011-0/+2
| | | | | | | | | | | | | | commit 642d89252201c4155fc3946bf9cdea409e5d263e upstream. The Marvell 88SE9172 SATA controller (PCI ID 1b4b 917a) already worked once it was detected, but was missing an ahci_pci_tbl entry. Boot tested on a Gigabyte Z68X-UD3H-B3 motherboard. Signed-off-by: Matt Johnson <johnso87@illinois.edu> Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ahci: Enable SB600 64bit DMA on Asus M3AMark Nelson2011-10-161-0/+12
| | | | | | | | | | | | | | | commit 3c4aa91f21f65b7b40bdfb015eacbcb8453ccae2 upstream. Like e65cc194f7628ecaa02462f22f42fb09b50dcd49 this patch enables 64bit DMA for the AHCI SATA controller of a board that has the SB600 southbridge. In this case though we're enabling 64bit DMA for the Asus M3A motherboard. It is a new enough board that all of the BIOS releases since the initial release (0301 from 2007-10-22) work correctly with 64bit DMA enabled. Signed-off-by: Mark Nelson <mdnelson8@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* ahci: RAID-mode SATA patch for Intel Panther Point DeviceIDsSeth Heasley2011-10-031-0/+1
| | | | | | | | | | | commit 2cab7a4c5ccf96e0954e767af490ba9aee2c9b6f upstream. This patch adds an additional SATA RAID controller DeviceID for the Intel Panther Point PCH. Signed-off-by: Seth Heasley <seth.heasley@intel.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* ahci: AHCI-mode SATA patch for Intel Panther Point DeviceIDsSeth Heasley2011-04-241-0/+6
| | | | | | | | | The previously submitted patch was word-wrapped. This patch adds the AHCI-mode SATA DeviceIDs for the Intel Panther Point PCH. Signed-off-by: Seth Heasley <seth.heasley@intel.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* libata: Implement ATA_FLAG_NO_DIPM and apply it to mcp65Tejun Heo2011-04-241-1/+1
| | | | | | | | | | | | | | | | NVIDIA mcp65 familiy of controllers cause command timeouts when DIPM is used. Implement ATA_FLAG_NO_DIPM and apply it. This problem was reported by Stefan Bader in the following thread. http://thread.gmane.org/gmane.linux.ide/48841 stable: applicable to 2.6.37 and 38. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Stefan Bader <stefan.bader@canonical.com> Cc: stable@kernel.org Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* Fix common misspellingsLucas De Marchi2011-03-311-1/+1
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* ahci: add another PCI ID for marvellTejun Heo2011-03-151-0/+2
| | | | | | | | | | | | 1b4b:91a3 seems to be another PCI ID for marvell ahci. Add it. Reported and tested in the following thread. http://thread.gmane.org/gmane.linux.kernel/1068354 Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Borislav Petkov <bp@alien8.de> Reported-by: Alessandro Tagliapietra <tagliapietra.alessandro@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* ahci: AHCI mode SATA patch for Intel Patsburg SATA RAID controllerSeth Heasley2011-03-141-0/+1
| | | | | | | This patch adds an updated SATA RAID DeviceID for the Intel Patsburg PCH. Signed-off-by: Seth Heasley <seth.heasley@intel.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* ahci: recognize Marvell 88se9125 PCIe SATA 6.0 Gb/s controllerPer Jessen2011-03-021-0/+2
| | | | | | | Recognize Marvell 88SE9125 PCIe SATA 6.0 Gb/s controller. Signed-off-by: Per Jessen <per@computer.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* libata: remove ATA_FLAG_NO_LEGACYSergei Shtylyov2011-03-021-2/+1
| | | | | | | | | | | All checks of ATA_FLAG_NO_LEGACY have been removed by the commits c791c30670ea61f19eec390124128bf278e854fe ([libata] minor PCI IDE probe fixes and cleanups) and f0d36efdc624beb3d9e29b9ab9e9537bf0f25d5b (libata: update libata core layer to use devres), so I think it's time to finally get rid of this flag... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* libata: remove ATA_FLAG_MMIOSergei Shtylyov2011-03-021-1/+1
| | | | | | | | | Commit 0d5ff566779f894ca9937231a181eb31e4adff0e (libata: convert to iomap) removed all checks of ATA_FLAG_MMIO but neglected to remove the flag itself. Do it now, at last... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: add HFLAG_YES_FBS and apply it to 88SE9128Anssi Hannula2011-01-281-0/+2
| | | | | | | | | | | | | | | Commit 5f173107ecad83a50 added HFLAG_YES_FBS workaround for 88SE9128 (1b4b:9123). However, that change inadvertently caused the legacy IDE interface of the controller (with the same pci id) to become associated with the AHCI driver as well, causing the driver to try to bring the interface up in vain. Fix that by matching against class as well. Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: AHCI mode SATA patch for Intel DH89xxCC DeviceIDsSeth Heasley2011-01-281-0/+1
| | | | | | | This patch adds the AHCI-mode SATA DeviceID for the Intel DH89xxCC PCH. Signed-off-by: Seth Heasley <seth.heasley@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* libata: reimplement link power managementTejun Heo2010-10-211-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current LPM implementation has the following issues. * Operation order isn't well thought-out. e.g. HIPM should be configured after IPM in SControl is properly configured. Not the other way around. * Suspend/resume paths call ata_lpm_enable/disable() which must only be called from EH context directly. Also, ata_lpm_enable/disable() were called whether LPM was in use or not. * Implementation is per-port when it should be per-link. As a result, it can't be used for controllers with slave links or PMP. * LPM state isn't managed consistently. After a link reset for whatever reason including suspend/resume the actual LPM state would be reset leaving ap->lpm_policy inconsistent. * Generic/driver-specific logic boundary isn't clear. Currently, libahci has to mangle stuff which libata EH proper should be handling. This makes the implementation unnecessarily complex and fragile. * Tied to ALPM. Doesn't consider DIPM only cases and doesn't check whether the device allows HIPM. * Error handling isn't implemented. Given the extent of mismatch with the rest of libata, I don't think trying to fix it piecewise makes much sense. This patch reimplements LPM support. * The new implementation is per-link. The target policy is still port-wide (ap->target_lpm_policy) but all the mechanisms and states are per-link and integrate well with the rest of link abstraction and can work with slave and PMP links. * Core EH has proper control of LPM state. LPM state is reconfigured when and only when reconfiguration is necessary. It makes sure that LPM state is reset when probing for new device on the link. Controller agnostic logic is now implemented in libata EH proper and driver implementation only has to deal with controller specifics. * Proper error handling. LPM config failure is attributed to the device on the link and LPM is disabled for the link if it fails repeatedly. * ops->enable/disable_pm() are replaced with single ops->set_lpm() which takes @policy and @hints. This simplifies driver specific implementation. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* libata: clean up lpm related symbols and sysfs show/store functionsTejun Heo2010-10-211-1/+1
| | | | | | | | | | | | | | | | | | | Link power management related symbols are in confusing state w/ mixed usages of lpm, ipm and pm. This patch cleans up lpm related symbols and sysfs show/store functions as follows. * lpm states - NOT_AVAILABLE, MIN_POWER, MAX_PERFORMANCE and MEDIUM_POWER are renamed to ATA_LPM_UNKNOWN and ATA_LPM_{MIN|MAX|MED}_POWER. * Pre/postfixes are unified to lpm. * sysfs show/store functions for link_power_management_policy were curiously named get/put and unnecessarily complex. Renamed to show/store and simplified. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: fix module refcount breakage introduced by libahci splitTejun Heo2010-09-281-0/+4
| | | | | | | | | | | | | | | | | | | libata depends on scsi_host_template for module reference counting and sht's should be owned by each low level driver. During libahci split, the sht was left with libahci.ko leaving the actual low level drivers not reference counted. This made ahci and ahci_platform always unloadable even while they're being actively used. Fix it by defining AHCI_SHT() macro in ahci.h and defining a sht for each low level ahci driver. stable: only applicable to 2.6.35. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Pedro Francisco <pedrogfrancisco@gmail.com> Tested-by: Michael Tokarev <mjt@tls.msk.ru> Cc: stable@kernel.org Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: AHCI and RAID mode SATA patch for Intel Patsburg DeviceIDsSeth Heasley2010-09-091-0/+3
| | | | | | | | This patch adds the Intel Patsburg (PCH) SATA AHCI and RAID Controller DeviceIDs. Signed-off-by: Seth Heasley <seth.heasley@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: add HFLAG_YES_FBS and apply it to 88SE9128Tejun Heo2010-08-251-0/+11
| | | | | | | | 88SE9128 can do FBS and sets it in HOST_CAP but forgets to set FBSCP in PORT_CMD. Implement AHCI_HFLAG_YES_FBS and apply it to 88SE9128. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* [libata] ahci: Fix warning: comparison between 'enum <anonymous>' and 'enum ↵Justin P. Mattock2010-08-011-1/+1
| | | | | | | | | | | | | <anonymous>' The below patch casts ATA_MAX_QUEUE to int because GCC will give a warning message about the two different enum blocks: CC drivers/ata/ahci.o drivers/ata/ahci.c: In function 'ahci_init_one': drivers/ata/ahci.c:1045:2: warning: comparison between 'enum <anonymous>' and 'enum <anonymous>' Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci,ata_generic: let ata_generic handle new MBP w/ MCP89Tejun Heo2010-07-011-0/+10
| | | | | | | | | | | | | | | | | | | | | | | For yet unknown reason, MCP89 on MBP 7,1 doesn't work w/ ahci under linux but the controller doesn't require explicit mode setting and works fine with ata_generic. Make ahci ignore the controller on MBP 7,1 and let ata_generic take it for now. Reported in bko#15923. https://bugzilla.kernel.org/show_bug.cgi?id=15923 NVIDIA is investigating why ahci mode doesn't work. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Peer Chen <pchen@nvidia.com> Cc: stable@kernel.org Reported-by: Anders Østhus <grapz666@gmail.com> Reported-by: Andreas Graf <andreas_graf@csgraf.de> Reported-by: Benoit Gschwind <gschwind@gnu-log.net> Reported-by: Damien Cassou <damien.cassou@gmail.com> Reported-by: tixetsal@juno.com Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: EM message type auto detectHarry Zhang2010-05-141-1/+1
| | | | | | | | Detect enclosure management message type automatically at driver initialization, instead of using module parameter "ahci_em_messages". Signed-off-by: Harry Zhang <harry.zhang@amd.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: implement AHCI_HFLAG_NO_FPDMA_AA and update NV quirksTejun Heo2010-05-141-10/+28
| | | | | | | | | | | | | | | | | | | | It turns out different generations of MCPs have differing quirks. * MCP 65-73 : FPDMA AA broken, lies about PMP support, forgets to report NCQ * MCP 77-79 : FPDMA AA broken, lies about PMP support * MCP 89 : FPDMA AA broken Instead of turngin off FPDMA AA on all NVIDIAs, implement HFLAG_NO_FPDMA_AA, define additional board IDs and apply necessary quirks. This fixes bko#15481 and the list of quirks is verified by Peer Chen. http://bugzilla.kernel.org/show_bug.cgi?id=15481 Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Peer Chen <pchen@nvidia.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: clean up board IDsTejun Heo2010-05-141-120/+117
| | | | | | | | | | | | | | | | | | | | | | | | | ahci over time has grown a number of board IDs and it's a bit of mess right now. Clean it up such that, * board_id_* now live in a separate enum board_ids and numbers are assigned automatically. * Board IDs assigned to features are separated from the ones assigned to specific implementations and both are ordered alphabetically. * For NV MCPs, define per-generation alias board_ids and assign matching aliases in the pci id table. This makes mcp_linux, 67-73 use board_ahci_mcp65 instead of board_ahci_yesncq. Both are identical in content. * Kill now unused board_ahci_nopmp and board_ahci_yesncq. This patch doesn't cause any functional change but will make future changes to board_ids and quirks much less painful. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Peer Chen <pchen@nvidia.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: Move generic code into libahciAnton Vorontsov2010-05-141-2279/+1
| | | | | | | | This patch should contain no functional changes, just moves code around. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: Introduce ahci_set_em_messages()Anton Vorontsov2010-05-141-17/+24
| | | | | | | | Factor out some ahci_em_messages handling code from ahci_init_one(). We would like to reuse it for non-PCI devices. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: Factor out PCI specifics from ahci_print_info()Anton Vorontsov2010-05-141-17/+23
| | | | | | | Introduce ahci_pci_print_info() that now handles PCI stuff. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: Factor out PCI specifics from ahci_init_controller()Anton Vorontsov2010-05-141-18/+27
| | | | | | | Move PCI stuff into ahci_pci_init_controller(). Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: Get rid of pci_dev argument in ahci_port_init()Anton Vorontsov2010-05-141-4/+3
| | | | | | | | To make the function bus-independand we have to get rid of "struct pci_dev *", so let's pass just "struct devce *". Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: Factor out PCI specifics from ahci_reset_controller()Anton Vorontsov2010-05-141-3/+12
| | | | | | | Move PCI stuff into ahci_pci_reset_controller(). Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: Get rid of pci_dev argument in ahci_save_initial_config()Anton Vorontsov2010-05-141-14/+13
| | | | | | | | To make the function generic we have to get rid of "struct pci_dev *", so let's pass just a "struct devce *". Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: Factor out PCI specifics from ahci_save_initial_config()Anton Vorontsov2010-05-141-24/+42
| | | | | | | | | | Make ahci_save_initial_config() a bit more generic by introducing force_port_map and mask_port_map arguments. Move PCI stuff into ahci_pci_save_initial_config(). Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: Get rid of host->iomap usageAnton Vorontsov2010-05-141-14/+20
| | | | | | | | | | | | | | | | | | | Currently the driver uses host->iomap to store all the iomapped BARs of a PCI device (while AHCI devices actually use just a single memory window). We're going to teach AHCI to work with non-PCI buses, so there are two options to make this work: 1. "fake" host->iomap array for non-PCI devices, and place the needed address at iomap[AHCI_PCI_BAR]; 2. Get rid of host->iomap usage, instead introduce a private mmio field. This patch implements the second option. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* ahci: pp->active_link is not reliable when FBS is enabledShane Huang2010-03-171-6/+17
| | | | | | | | | pp->active_link is not reliable when FBS is enabled. Both PORT_SCR_ACT and PORT_CMD_ISSUE should be checked because mixed NCQ and non-NCQ commands may be in flight. Signed-off-by: Shane Huang <shane.huang@amd.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: use BIOS date in broken_suspend listTejun Heo2010-03-171-8/+20
| | | | | | | | | | | | | | HP is recycling both DMI_PRODUCT_NAME and DMI_BIOS_VERSION making ahci_broken_suspend() trigger for later products which are not affected by the original problems. Match BIOS date instead of version and add references to bko's so that full information can be found easier later. This fixes http://bugzilla.kernel.org/show_bug.cgi?id=15462 Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: tigerfishdaisy@gmail.com Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: add missing nv IDsTejun Heo2010-03-171-0/+15
| | | | | | | | | | | | | bko#15481 shows that we're missing some NVIDIA ahci PCI IDs. Peer Chen confirms that IDs 0x580-0x58f are reserved for cases where Linux ID option is selected in the BIOS and are only used for mcp65-73. Add 0x0581-0x058f. http://bugzilla.kernel.org/show_bug.cgi?id=15481 Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Peer Chen <pchen@nvidia.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* libata: make functions/variables staticRobert Hancock2010-03-011-4/+4
| | | | | | | | Make some variables in ahci and a function in pata_pcmcia static, as found using sparse. Signed-off-by: Robert Hancock <hancockrwd@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: AHCI and RAID mode SATA patch for Intel Cougar Point DeviceIDsSeth Heasley2010-03-011-0/+6
| | | | | Signed-off-by: Seth Heasley <seth.heasley@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: Implement SATA AHCI FIS-based switching supportShane Huang2010-03-011-18/+203
| | | | | | | | Tested on AMD internal reference board. Signed-off-by: Shane Huang <shane.huang@amd.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: disable FPDMA auto-activate optimization on NVIDIA AHCIRobert Hancock2010-02-241-2/+10
| | | | | | | | | | | | | | | | | | | Mike Cui reported that his system with an NVIDIA MCP79 (aka MCP7A) chipset stopped working with 2.6.32. The problem appears to be that 2.6.32 now enables the FPDMA auto-activate optimization in the ahci driver. The drive works fine with this enabled on an Intel AHCI so this appears to be a chipset bug. Since MCP79 is a fairly recent NVIDIA chipset and we don't have any info on whether any other NVIDIA chipsets have this issue, disable FPDMA AA optimization on all NVIDIA AHCI controllers for now. Should address http://bugzilla.kernel.org/show_bug.cgi?id=14922 Signed-off-by: Robert Hancock <hancockrwd@gmail.com> While-we-investigate-issue-this-patch-looks-good-to-me-by: Prajakta Gudadhe <pgudadhe@nvidia.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Cc: stable@kernel.org
* ahci: add Acer G725 to broken suspend listTejun Heo2010-02-041-0/+15
| | | | | | | | | | | | | | | Acer G725 shares the same suspend problem with the HP laptops which lose ATA devices on resume. New firmware which fixes the problem is already available. Add G725 with old firmwares to the broken suspend list. This problem has been reported in bko#15104. http://bugzilla.kernel.org/show_bug.cgi?id=15104 Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Jani-Matti Hätinen <jani-matti.hatinen@iki.fi> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: let users know that Promise PDC42819 support is limited to SATA devicesMark Nelson2009-12-031-0/+8
| | | | | | | | | | | | ahci can drive the Promise PDC42819, but obviously it can only use SATA disks connected to this controller. The controller can actually support SAS disks as well, but we only know how to use it in it's AHCI mode. Add a message to let users know that because ahci is driving their chip they can only use the SATA disks connected to this controller. Signed-off-by: Mark Nelson <mdnelson8@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: disable SNotification capability for ich8Shaohua Li2009-12-031-2/+18
| | | | | | | | | | | | | | | | | | I obseved there is a sata_async_notification() for every ahci interrupt. But the async notification does nothing (this is hard disk drive and no pmp). This cause cpu wastes some time on sntf register access. It appears ICH AHCI doesn't support SNotification register, but the controller reports it does. After quirking it, the async notification disappears. PS. it appears all ICH don't support SNotification register from ICH manual, don't know if we need quirk all ICH. I don't have machines with all kinds of ICH. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: Enable SB600 64bit DMA on MSI K9A2 Platinum v2Mark Nelson2009-11-031-5/+35
| | | | | | | | | Like the Asus M2A-VM, MSI's K9A2 Platinum (MS-7376) can also support 64bit DMA. It is a new enough board that all the BIOS releases work correctly with 64bit DMA enabled. Signed-off-by: Mark Nelson <mdnelson8@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci / atiixp / pci quirks: rename AMD SB900 into Hudson-2Shane Huang2009-10-161-1/+1
| | | | | | | This patch renames the code name SB900 into Hudson-2 Signed-off-by: Shane Huang <shane.huang@amd.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: Add the AHCI controller Linux Device ID for NVIDIA chipsets.peer chen2009-10-161-0/+1
| | | | | | | Add the generic device ID for NVIDIA AHCI controller. Signed-off-by: Peer Chen <peerchen@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: Add ifdef wrapper to ahci_gtf_filter_workaroundMarkus Trippelsdorf2009-10-091-0/+5
| | | | | | | | | | | | Commit f80ae7e45a0e03da188494c6e947a5c8b0cdfb4a ahci: filter FPDMA non-zero offset enable for Aspire 3810T breaks the current git build for configurations that don't define CONFIG_ATA_ACPI. This adds an ifdef wrapper to ahci_gtf_filter_workaround. Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ahci: filter FPDMA non-zero offset enable for Aspire 3810TTejun Heo2009-10-061-0/+47
| | | | | | | | | | | | | | | | | | | | | | Curiously, Aspire 3810T issues many SATA feature enable commands via _GTF, of which one is invalid and another is not supported by the drive. In the process, it also enables FPDMA non-zero offset. However, the feature also needs to be supported and enabled from the controller and it's wrong to enable it from _GTF unless the controller can do it by default. Currently, this ends up enabling FPDMA non-zero offset only on the drive side leading to NCQ command failures and eventual disabling of NCQ. This patch makes libata filter out FPDMA non-zero offset enable for the machine. This was reported by Marcus Meissner in bnc#522790. https://bugzilla.novell.com/show_bug.cgi?id=522790 Reported-by: Marcus Meissner <meissner@novell.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>