aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ahci.c
Commit message (Collapse)AuthorAge
* [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>
* | [PATCH] ahci: convert to new reset mechanismTejun Heo2006-02-11
| | | | | | | | | | | | | | Convert ahci ->phy_reset to new reset mechanism. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] ahci: make ahci_fill_cmd_slot() take *pp instead of *apTejun Heo2006-02-11
| | | | | | | | | | | | | | | | Make ahci_fill_cmd_slot() take struct ahci_port_priv *pp instead of struct ata_port *ap as suggested by Jeff Garzik. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] ahci: separate out ahci_fill_cmd_slot()Tejun Heo2006-02-10
| | | | | | | | | | | | | | | | | | Separate out ahci_fill_cmd_slot() from ahci_qc_prep(). ahci_fill_cmd_slot() can later be used to issue non-standard commands. (e.g. softreset) Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] libata: kill NULL qc handling from ->eng_timeout callbacksTejun Heo2006-02-10
| | | | | | | | | | | | | | | | | | ->eng_timeout cannot be invoked with NULL qc anymore. Add an assertion in ata_scsi_error() and kill NULL qc handling from all ->eng_timeout callbacks. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] libata: use ata_scsi_timed_out()Tejun Heo2006-02-10
| | | | | | | | | | | | | | Make all libata low level drivers use ata_scsi_timed_out(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | Merge branch 'upstream-fixes'Jeff Garzik2006-01-29
|\|
| * [libata ahci] add another JMicron pci idJeff Garzik2006-01-29
| |
* | Merge branch 'upstream-fixes'Jeff Garzik2006-01-29
|\|
| * [libata ahci] Isolate Intel-ism, add JMicron JMB360 supportJeff Garzik2006-01-29
| | | | | | | | | | | | | | Isolate some PCI config register bitbanging to Intel hardware, as it should have been all along. Add support for JMicron JMB360.
* | [PATCH] ahci: add constants for SRSTTejun Heo2006-01-26
| | | | | | | | | | | | | | | | Add constants needed to perform SRST. This is preparation for adding softreset method. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] ahci: stop engine during hard resetTejun Heo2006-01-26
| | | | | | | | | | | | | | AHCI spec mandates engine to be stopped during hard resets. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] libata: implement and apply ata_eh_qc_complete/retry()Tejun Heo2006-01-26
| | | | | | | | | | | | | | | | | | | | | | Implement ata_eh_qc_complete/retry() using scsi_eh_finish_cmd() and scsi_eh_flush_done_q(). This removes all eh scsicmd finish hacks from low level drivers. This change was first suggested by Jeff Garzik. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] libata: return AC_ERR_* from issue functionsTejun Heo2006-01-26
| | | | | | | | | | | | | | | | | | Return AC_ERR_* mask from issue fuctions instead of 0/-1. This enables things like failing a qc with AC_ERR_HSM when the device doesn't set DRDY when the qc is about to be issued. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] libata: add detailed AC_ERR_* flagsTejun Heo2006-01-26
| | | | | | | | | | | | | | | | | | | | | | Add detailed AC_ERR_* flags and use them. Long-term goal is to describe all errors with err_mask and tf combination (tf for failed sector information, etc...). After proper error diagnosis is implemented, sense data should also be generated from err_mask instead of directly from hardware tf registers as it is currently. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] ahci: fix err_mask setting in ahci_host_intrTejun Heo2006-01-26
| | | | | | | | | | | | | | | | In ahci_host_intr err_mask is determined from IRQ status but never used. This patch sets qc->err_mask to the determined err_mask. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] ahci: separate out ahci_dev_classifyTejun Heo2006-01-17
| | | | | | | | | | | | | | Separate out ahci_dev_classify(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>