aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ahci.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-08-10Move libata to drivers/ata.Jeff Garzik1-1684/+0
2006-08-10[PATCH] libata: replace pci_module_init() with pci_register_driver()Pavel Roskin1-1/+1
Replace pci_module_init() with pci_register_driver(). Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-08-09[PATCH] ahci: remove IRQ mask clearing from init_controller()Tejun Heo1-2/+1
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>
2006-08-03Merge branch 'upstream-fixes' into upstreamJeff Garzik1-8/+2
2006-08-03[PATCH] ahci: skip protocol test altogether in spurious interrupt codeUnicorn Chang1-8/+2
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>
2006-07-29[libata] ahci: add SiS PCI IDsJeff Garzik1-0/+8
Signed-off-by: David Wang <touch@sis.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-29[PATCH] ahci: implement Power Management supportTejun Heo1-0/+84
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>
2006-07-29[PATCH] ahci: separate out ahci_reset_controller() and ahci_init_controller()Tejun Heo1-77/+94
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>
2006-07-29[PATCH] libata: improve driver initialization and deinitializationTejun Heo1-51/+151
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>
2006-07-29[PATCH] ahci: simplify ahci_start_engine()Tejun Heo1-19/+2
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>
2006-07-29[PATCH] ahci: cosmetic changes to ahci_start/stop_engine()Tejun Heo1-18/+9
* 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>
2006-07-29[PATCH] ahci: relocate several internal functionsTejun Heo1-129/+126
* 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>
2006-07-19[PATCH] The redefinition of ahci_start_engine() and ahci_stop_engine()zhao, forrest1-25/+57
- 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>
2006-07-05[PATCH] ahci: Ensure that we don't grab both functionsroot1-4/+11
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>
2006-07-05[PATCH] libata: add ap->pflags and move core dynamic flags to itTejun Heo1-1/+1
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>
2006-07-02[PATCH] irq-flags: scsi: Use the new IRQF_ constantsThomas Gleixner1-1/+1
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>
2006-06-26[libata] Bump versionsJeff Garzik1-1/+1
Update major version for libata, and several drivers. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-22[PATCH] ahci: disable NCQ support on vt8251Tejun Heo1-2/+4
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>
2006-06-22[libata] ahci: add JMicron PCI IDsJeff Garzik1-0/+6
Originally contributed by Justin @ JMicron. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-22[libata] ahci: Add NVIDIA PCI IDs.Jeff Garzik1-0/+18
Based on a patch by Andrew Chew @ NVIDIA. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-31[PATCH] ahci: convert to new probing mechanism and add hotplug supportTejun Heo1-20/+27
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>
2006-05-31[PATCH] libata-hp: update unload-unplugTejun Heo1-7/+3
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>
2006-05-31[PATCH] libata-hp: hook warmplugTejun Heo1-0/+1
Hook transportt->user_scan() and hostt->slave_destroy(). Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-31[PATCH] libata-hp-prep: add prereset() method and implement ata_std_prereset()Tejun Heo1-1/+2
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>
2006-05-15[PATCH] ahci: implement NCQ suppportTejun Heo1-31/+58
Implement NCQ support. Original implementation is from Jens Axboe. Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15[PATCH] ahci: kill pp->cmd_tbl_sgTejun Heo1-4/+1
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>
2006-05-15[PATCH] ahci: add HOST_CAP_NCQ constantTejun Heo1-0/+1
Add HOST_CAP_NCQ. Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15[PATCH] ahci: clean up AHCI constants in preparation for NCQTejun Heo1-6/+9
* 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>
2006-05-15[PATCH] ahci: add PIOS interim interrupt handlingTejun Heo1-1/+12
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>
2006-05-15[PATCH] ahci: convert to new EHTejun Heo1-100/+137
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>
2006-05-15[PATCH] libata: use ATA printk helpersTejun Heo1-5/+3
Use ATA printk helpers. Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15[PATCH] libata: use dev->apTejun Heo1-1/+1
Use dev->ap where possible and eliminate superflous @ap from functions and structures. Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15[PATCH] libata: use new SCR and on/offline functionsTejun Heo1-3/+3
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>
2006-05-15[PATCH] ahci: hardreset classification fixTejun Heo1-1/+1
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>
2006-04-20[PATCH] ahci: add support for VIA VT8251Bastiaan Jacques1-15/+49
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>
2006-04-11[PATCH] ahci: use ata_wait_register()Tejun Heo1-25/+6
Replace ahci_poll_register() with ata_wait_register(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-04-11[PATCH] libata: kill @verbose from ata_reset_fn_tTejun Heo1-8/+5
@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>
2006-04-11Merge branch 'master'Jeff Garzik1-1/+0
Conflicts: drivers/scsi/libata-scsi.c include/linux/libata.h
2006-04-10[PATCH] move ->eh_strategy_handler to the transport classChristoph Hellwig1-1/+0
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>
2006-04-04[PATCH] ahci: do not fail softreset if PHY reports no deviceTejun Heo1-0/+6
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>
2006-04-02[libata] bump versionsJeff Garzik1-1/+1
2006-03-30[libata] ahci: add ATI SB600 PCI IDsJeff Garzik1-0/+4
From: Anatoli Antonovitch <antonovi@ati.com> Signed-off-by: Felix Kuehling <fkuehlin@ati.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-22[PATCH] ahci: add softresetTejun Heo1-1/+134
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>
2006-03-21[SCSI] libata: implement minimal transport template for ->eh_timed_outTejun Heo1-1/+0
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>
2006-03-11[PATCH] ahci: enable prefetching for PACKET commandsTejun Heo1-1/+2
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>
2006-03-11Merge branch 'upstream-fixes'Jeff Garzik1-10/+4
2006-03-11[PATCH] ahci: fix NULL pointer dereference detected by CoverityTejun Heo1-10/+4
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>
2006-02-12[PATCH] libata: kill sht->max_sectorsTejun Heo1-1/+0
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>
2006-02-12[PATCH] libata: move cdb_len for host to deviceTejun Heo1-1/+2
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>
2006-02-11[PATCH] libata: convert assert(xxx)'s in low-level drivers to WARN_ON(!xxx)'sTejun Heo1-1/+1
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>