aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ahci.c
Commit message (Collapse)AuthorAge
* Move libata to drivers/ata.Jeff Garzik2006-08-10
|
* [PATCH] libata: replace pci_module_init() with pci_register_driver()Pavel Roskin2006-08-10
| | | | | | | Replace pci_module_init() with pci_register_driver(). Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] ahci: remove IRQ mask clearing from init_controller()Tejun Heo2006-08-09
| | | | | | | | | Initial IRQ mask clearing is done by libata-core by freezing all ports prior to requesting IRQ. Remove redundant IRQ clearing from init_controller(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* Merge branch 'upstream-fixes' into upstreamJeff Garzik2006-08-03
|\
| * [PATCH] ahci: skip protocol test altogether in spurious interrupt codeUnicorn Chang2006-08-03
| | | | | | | | | | | | | | | | Skip protocol test altogether in spurious interrupt code. If PIOS is received when it shouldn't, ahci will raise protocol violation. Signed-off-by: Unicorn Chang <uchang@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | [libata] ahci: add SiS PCI IDsJeff Garzik2006-07-29
| | | | | | | | | | Signed-off-by: David Wang <touch@sis.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | [PATCH] ahci: implement Power Management supportTejun Heo2006-07-29
| | | | | | | | | | | | | | | | | | | | Implement power management support. Original implementation is from Zhao, Forrest <forrest.zhao@intel.com> Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Zhao, Forrest <forrest.zhao@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | [PATCH] ahci: separate out ahci_reset_controller() and ahci_init_controller()Tejun Heo2006-07-29
| | | | | | | | | | | | | | | | | | | | Separate out ahci_reset_controller() and ahci_init_controller() from ata_host_init(). These will be used by PM callbacks. This patch doesn't introduce any behavior change. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Zhao, Forrest <forrest.zhao@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | [PATCH] libata: improve driver initialization and deinitializationTejun Heo2006-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement ahci_[de]init_port() and use it during initialization and de-initialization. ahci_[de]init_port() are supersets of what used to be done during driver [de-]initialization. This patch makes the following behavior changes. * Per-port IRQ mask is cleared on driver load as done in other drivers. The mask will be configured properly during probe. * During init_one(), HOST_IRQ_STAT is cleared after masking port IRQs such that there is no race window. * CMD_SPIN_UP is cleared during init_one() instead of being set. It is set in port_start(). This is more consistent with overall structure of initialization. Note that CMD_SPIN_UP simply controls PHY activation. * Slumber and staggered spin-up are handled properly. * All init/deinit operations are done in step-by-step manner as described in the spec instead of issued as single merged command. Original implementation is from Zhao, Forrest <forrest.zhao@intel.com> Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Zhao, Forrest <forrest.zhao@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | [PATCH] ahci: simplify ahci_start_engine()Tejun Heo2006-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify ahci_start_engine() by killing prerequisite condition checks. Rationales are.. * No user checks error return from ahci_start_engine() * Code flow guarantees the prerequisite conditions unless the controller is malfunctioning. In such cases, the driver had chances to learn about the problem _before_ calling this function. * Closely related to the above two, driver calls into this function even when prerequisites fail hoping for the best. Basically, ahci_start_engine() should only do the operation itself. It isn't the right place to check for prerequisites. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Zhao, Forrest <forrest.zhao@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | [PATCH] ahci: cosmetic changes to ahci_start/stop_engine()Tejun Heo2006-07-29
| | | | | | | | | | | | | | | | | | | | | | * fascist-format comments according to comment style used in libata core layer. * if() -> if () Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Zhao, Forrest <forrest.zhao@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | [PATCH] ahci: relocate several internal functionsTejun Heo2006-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | * move ahci_port_start/stop() below EH functions. This makes ahci more consistent with other drivers and makes prototypes for ahci_start/stop_engine() unnecessary. * swap positions between ahci_start_engine() and ahci_stop_engine() for readability. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Zhao, Forrest <forrest.zhao@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | [PATCH] The redefinition of ahci_start_engine() and ahci_stop_engine()zhao, forrest2006-07-19
|/ | | | | | | | | | | | - Make ahci_start_engine() and ahci_stop_engine() more consistent with AHCI spec 1.1 - Change their input parameter from ap to port_mmio - Update the existing users of ahci_start_engine() and ahci_stop_engine() Signed-off-by: Forrest Zhao <forrest.zhao@intel.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Jens Axboe <axboe@suse.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] ahci: Ensure that we don't grab both functionsroot2006-07-05
| | | | | | | | | When we force the chip into dual fn mode so we get PATA and AHCI we must be sure we don't then do anything dumb like try and grab both with the AHCI driver. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] libata: add ap->pflags and move core dynamic flags to itTejun Heo2006-07-05
| | | | | | | | | | ap->flags is way too clamped. Separate out core dynamic flags to ap->pflags. ATA_FLAG_DISABLED is a dynamic flag but left alone as it's referenced by a lot of LLDs and it's gonna be removed once all LLDs are converted to new EH. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] irq-flags: scsi: Use the new IRQF_ constantsThomas Gleixner2006-07-02
| | | | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [libata] Bump versionsJeff Garzik2006-06-26
| | | | | | Update major version for libata, and several drivers. Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] ahci: disable NCQ support on vt8251Tejun Heo2006-06-22
| | | | | | | | | | | | vt8251 chokes on NCQ commands. Two different disks from different vendors are showing the same symptom and it seems that the windows driver from via doesn't support NCQ either. Disable NCQ support on this controller for the time being. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Aalderd Bouwman <boac@wanadoo.nl> Cc: Bastiaan Jacques <b.jacques@planet.nl> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [libata] ahci: add JMicron PCI IDsJeff Garzik2006-06-22
| | | | | | Originally contributed by Justin @ JMicron. Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [libata] ahci: Add NVIDIA PCI IDs.Jeff Garzik2006-06-22
| | | | | | Based on a patch by Andrew Chew @ NVIDIA. Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] ahci: convert to new probing mechanism and add hotplug supportTejun Heo2006-05-31
| | | | | | | | | | | | | | | | | Convert to new probing mechanism and add hotplug support by enabling PORT_IRQ_PHYRDY, marking ehi for hotplug and scheduling EH on CONNECT/PHYRDY interrupts. Unfortunately, ahci cannot reliably wait for the first D2H FIS after hotplug. It sometimes succeeds but times out more often than not, so ATA_FLAG_SKIP_D2H_BSY is used. This patch also fixes ahci_hardreset() such that D2H Register FIS RX area is cleared before issuing COMRESET. Without this, ata_busy_sleep() after COMRESET might prematually finish if the previous TF contains DRDY && !BSY. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata-hp: update unload-unplugTejun Heo2006-05-31
| | | | | | | | | Update unload unplug - driver unloading / PCI removal. This is done by ata_port_detach() which short-circuits EH, disables all devices and freezes the port. With this patch, EH and unloading/unplugging are properly synchronized. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata-hp: hook warmplugTejun Heo2006-05-31
| | | | | | Hook transportt->user_scan() and hostt->slave_destroy(). Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata-hp-prep: add prereset() method and implement ata_std_prereset()Tejun Heo2006-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With hotplug, every reset might be a probing reset and thus something similar to probe_init() is needed. prereset() method is called before a series of resets to a port and is the counterpart of postreset(). prereset() can tell EH to use different type of reset or skip reset by modifying ehc->i.action. This patch also implements ata_std_prereset(). Most controllers should be able to use this function directly or with some wrapping. After hotplug, different controllers need different actions to resume the PHY and detect the newly attached device. Controllers can be categorized as follows. * Controllers which can wait for the first D2H FIS after hotplug. Note that if the waiting is implemented by polling TF status, there needs to be a way to set BSY on PHY status change. It can be implemented by hardware or with the help of the driver. * Controllers which can wait for the first D2H FIS after sending COMRESET. These controllers need to issue COMRESET to wait for the first FIS. Note that the received D2H FIS could be the first D2H FIS after POR (power-on-reset) or D2H FIS in response to the COMRESET. Some controllers use COMRESET as TF status synchronization point and clear TF automatically (sata_sil). * Controllers which cannot wait for the first D2H FIS reliably. Blindly issuing SRST to spinning-up device often results in command issue failure or timeout, causing extended delay. For these controllers, ata_std_prereset() explicitly waits ATA_SPINUP_WAIT (currently 8s) to give newly attached device time to spin up, then issues reset. Note that failing to getting ready in ATA_SPINUP_WAIT is not critical. libata will retry. So, the timeout needs to be long enough to spin up most devices. LLDDs can tell ata_std_prereset() which of above action is needed with ATA_FLAG_HRST_TO_RESUME and ATA_FLAG_SKIP_D2H_BSY flags. These flags are PHY-specific property and will be moved to ata_link later. While at it, this patch unifies function typedef's such that they all have named arguments. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] ahci: implement NCQ suppportTejun Heo2006-05-15
| | | | | | | | Implement NCQ support. Original implementation is from Jens Axboe. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] ahci: kill pp->cmd_tbl_sgTejun Heo2006-05-15
| | | | | | | With NCQ, there are multiple sg tables, so pp->cmd_tbl_sg doesn't cut it. Directly calculate sg table address from pp->cmd_tbl. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] ahci: add HOST_CAP_NCQ constantTejun Heo2006-05-15
| | | | | | Add HOST_CAP_NCQ. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] ahci: clean up AHCI constants in preparation for NCQTejun Heo2006-05-15
| | | | | | | | | | | | | | | | | | | * Rename CMD_TBL_HDR to CMD_TBL_HDR_SZ as it's size not offset. * Define MAX_CMDS and CMD_SZ and use them in calculation of other constants. * Define CMD_TBL_AR_SZ as product of CMD_TBL_SZ and MAX_CMDS, and use it when calculating PRIV_DMA_SZ. * CMD_SLOT_SZ is also dependent on MAX_CMDS but hasn't been changed because I didn't want to change the value used by the original code (32 commands). Later NCQ change will bump MAX_CMDS to 32 anyway and the hard coded 32 can be changed to MAX_CMDS then. * Reorder HOST_CAP_* flags. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] ahci: add PIOS interim interrupt handlingTejun Heo2006-05-15
| | | | | | | | During multiblock PIO, multiple PIOS interrupts are generated before qc compltion. Current code prints unnecessary message for such cases. This is exposed when new EH slows down attached device into PIO mode. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] ahci: convert to new EHTejun Heo2006-05-15
| | | | | | | | | | | | | | | | | | | Convert AHCI to new EH. Unfortunately, ICH7 AHCI reacts badly if IRQ mask is diddled during operation. So, freezing is implemented by unconditionally clearing interrupt conditions while frozen. * Interrupts are categorized according to required action. e.g. Connection status or unknown FIS error requires freezing the port while TF or HBUS_DATA don't. * Only CONNECT (reflects SErr.X) interrupt is taken into account not PHYRDY (SErr.N), as CONNECT is better cue for starting EH. * AHCI may be invoked without any active command. e.g. CONNECT irq occuring while no qc in progress still triggers EH and will reset the port and revalidate attached device. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: use ATA printk helpersTejun Heo2006-05-15
| | | | | | Use ATA printk helpers. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: use dev->apTejun Heo2006-05-15
| | | | | | | Use dev->ap where possible and eliminate superflous @ap from functions and structures. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: use new SCR and on/offline functionsTejun Heo2006-05-15
| | | | | | | | Use new SCR and on/offline functions. Note that for LLDD which know it implements SCR callbacks, SCR functions are guaranteed to succeed and ata_port_online() == !ata_port_offline(). Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] ahci: hardreset classification fixTejun Heo2006-05-15
| | | | | | | AHCI calls ata_dev_classify() even when no device is attached which results in false class code. Fix it. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] ahci: add support for VIA VT8251Bastiaan Jacques2006-04-20
| | | | | | | | | | Adds AHCI support for the VIA VT8251. Includes a workaround for a hardware bug which requires a Command List Override before softreset. Signed-off-by: Bastiaan Jacques <b.jacques@planet.nl> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] ahci: use ata_wait_register()Tejun Heo2006-04-11
| | | | | | | Replace ahci_poll_register() with ata_wait_register(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] libata: kill @verbose from ata_reset_fn_tTejun Heo2006-04-11
| | | | | | | | | | | @verbose was added to ata_reset_fn_t because AHCI complained during probing if no device was attached to the port. However, muting failure message isn't the correct approach. Reset methods are responsible for detecting no device condition and finishing successfully. Now that AHCI softreset is fixed, kill @verbose. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* Merge branch 'master'Jeff Garzik2006-04-11
|\ | | | | | | | | | | | | Conflicts: drivers/scsi/libata-scsi.c include/linux/libata.h
| * [PATCH] move ->eh_strategy_handler to the transport classChristoph Hellwig2006-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | Overriding the whole EH code is a per-transport, not per-host thing. Move ->eh_strategy_handler to the transport class, same as ->eh_timed_out. Downside is that scsi_host_alloc can't check for the total lack of EH anymore, but the transition period from old EH where we needed it is long gone already. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | [PATCH] ahci: do not fail softreset if PHY reports no deviceTejun Heo2006-04-04
| | | | | | | | | | | | | | | | | | | | | | All softreset methods are responsible for detecting device presence and succeed softreset in such cases. AHCI didn't use to check for device presence before proceeding with softreset and this caused unnecessary reset retrials during probing. This patch adds presence detection to AHCI softreset. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | [libata] bump versionsJeff Garzik2006-04-02
|/
* [libata] ahci: add ATI SB600 PCI IDsJeff Garzik2006-03-30
| | | | | | | From: Anatoli Antonovitch <antonovi@ati.com> Signed-off-by: Felix Kuehling <fkuehlin@ati.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] ahci: add softresetTejun Heo2006-03-22
| | | | | | | | Now that libata is smart enought to handle both soft and hard resets, add softreset method. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [SCSI] libata: implement minimal transport template for ->eh_timed_outTejun Heo2006-03-21
| | | | | | | | | | SCSI midlayer has moved hostt->eh_timed_out to transport template. As libata doesn't need full-blown transport support yet, implement minimal transport for libata. No transport class or whatsoever, just empty transport template with ->eh_timed_out hook. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [PATCH] ahci: enable prefetching for PACKET commandsTejun Heo2006-03-11
| | | | | | | | | Turn on AHCI_CMD_PREFETCH for PACKET commands. This hints the controller that it can prefetch the CDB and the PRD entries. This patch is originally from Jeff Garzik. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* Merge branch 'upstream-fixes'Jeff Garzik2006-03-11
|\
| * [PATCH] ahci: fix NULL pointer dereference detected by CoverityTejun Heo2006-03-11
| | | | | | | | | | | | | | | | | | Fix NULL pointer dereference detected by the Coverity checker. Kill dev -> pdev -> dev conversion while at it. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Adrian Bunk <bunk@stusta.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | [PATCH] libata: kill sht->max_sectorsTejun Heo2006-02-12
| | | | | | | | | | | | | | | | The previous dev->max_sectors patch made sht->max_sectors meaningless. Kill all initializations of sht->max_sectors. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] libata: move cdb_len for host to deviceTejun Heo2006-02-12
| | | | | | | | | | | | | | | | | | cdb_len is per-device property. Sharing cdb_len on ap results in inaccurate configuration on revalidation and hotplugging. This patch makes cdb_len per-device. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] libata: convert assert(xxx)'s in low-level drivers to WARN_ON(!xxx)'sTejun Heo2006-02-11
| | | | | | | | | | | | | | | | | | This patch converts all assert(xxx)'s in low-level drivers to WARN_ON(!xxx)'s. After this patch, there is no in-kernel user of the libata assert() macro. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>