aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
Commit message (Collapse)AuthorAge
* [libata] Add host lock to struct ata_portJeff Garzik2006-06-22
| | | | | | | | | | | | Prepare for changes required to support SATA devices attached to SAS HBAs. For these devices we don't want to use host_set at all, since libata will not be the owner of struct scsi_host. Signed-off-by: Brian King <brking@us.ibm.com> (with slight merge modifications made by...) Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] libata: implement per-dev EH action mask eh_info->dev_action[]Tejun Heo2006-06-22
| | | | | | | | | | | | | | | Currently, the only per-dev EH action is REVALIDATE. EH used to exploit ehi->dev to do selective revalidation on a ATA bus. However, this is a bit hacky and makes it impossible to request selective revalidation from outside of EH or add another per-dev EH action. This patch adds per-dev EH action mask eh_info->dev_action[] and update EH to use this field for REVALIDATE. Note that per-dev actions can still be specified at port-level and it has the same effect of specifying the action for all devices on the port. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] libata: add host_set->next for legacy two host_sets case, take #3Tejun Heo2006-06-12
| | | | | | | | | | | | | | | | | | | | | | For a legacy ATA controller, libata registers two separate host sets. There was no connection between the two hosts making it impossible to traverse all ports related to the controller. This patch adds host_set->next which points to the second host_set and makes ata_pci_remove_one() remove all associated host_sets. * On device removal, all ports hanging off the device are properly detached. Prior to this patch, ports on the first host_set weren't detached casuing oops on driver unloading. * On device removal, both host_sets are properly freed This will also be used by new power management code to suspend and resume all ports of a controller. host_set/port representation will be improved to handle legacy controllers better and this host_set linking will go away with it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: fix build, by adding required workqueue member to port structJeff Garzik2006-06-12
|
* [PATCH] libata: cosmetic change in struct ata_portTejun Heo2006-06-10
| | | | | | Cosmetic change in struct ata_port. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata-hp: killl ops->probe_resetTejun Heo2006-05-31
| | | | | | | Now that all drivers implementing new EH are converted to new probing mechanism, ops->probe_reset doesn't have any user. Kill it. 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: implement warmplugTejun Heo2006-05-31
| | | | | | | | | Implement warmplug. User-initiated unplug can be detected by hostt->slave_destroy() and plug by transportt->user_scan(). This patch only implements the two callbacks. The next function will hook them. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata-hp: implement SCSI part of hotplugTejun Heo2006-05-31
| | | | | | | | | | | Implement SCSI part of hotplug. This must be done in a separate context as SCSI makes use of EH during probing. SCSI scan fails silently if EH is in progress. In such cases, libata pauses briefly and retries until every device is attached. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata-hp: implement hotplugTejun Heo2006-05-31
| | | | | | | | | | | | | | | Implement ATA part of hotplug. To avoid probing broken devices over and over again, disabled devices are not automatically detached. They are detached only if probing is requested for the device or the associated port is offline. Also, to avoid infinite probing loop, Each device is probed only once per EH run. As SATA PHY status is fragile, devices are detached only after it has used up its recovery chances unless explicitly requested by LLDD or user (LLDD may request direct detach if, for example, it supports cold presence detection). Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: export ata_hsm_move()Tejun Heo2006-05-31
| | | | | | | ata_hsm_move() will be used by LLDDs which depend on standard PIO HSM but implement their own interrupt handlers. 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] libata-hp-prep: implement sata_phy_debounce()Tejun Heo2006-05-31
| | | | | | | | | | | | | | | With hotplug, PHY always needs to be debounced before a reset as any reset might find new devices. Extract PHY waiting code from sata_phy_resume() and extend it to include SStatus debouncing. Note that sata_phy_debounce() is superset of what used to be done inside sata_phy_resume(). Three default debounce timing parameters are defined to be used by hot/boot plug. As resume failure during probing will be properly handled as errors, timeout doesn't have to be long as before. probeinit() uses the same timeout to retain the original behavior. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata-hp-prep: store attached SCSI deviceTejun Heo2006-05-31
| | | | | | | | | | | | | Add device persistent field dev->sdev and store the attached SCSI device. With hotplug, libata needs to know the attached SCSI device to offline and detach it, but scsi_device_lookup() cannot be used because libata will reuse SCSI ID numbers - dead but not gone devices (due to zombie opens, etc...) interfere with the lookup. dev->sdev doesn't hold reference to the SCSI device. It's cleared when the SCSI device goes away. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata-hp-prep: implement ap->hw_sata_spd_limitTejun Heo2006-05-31
| | | | | | | | | Add ap->hw_sata_spd_limit and initialize it once during the boot initialization (or driver load initialization). ap->sata_spd_limit is reset to ap->hw_sata_spd_limit on hotplug. This prevents spd limits introduced by earlier devices from affecting new devices. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata-hp-prep: make some ata_device fields persistentTejun Heo2006-05-31
| | | | | | | | | | | | | | | Lifetimes of some fields span over device plugging/unplugging. This patch moves such persistent fields to the top of ata_device and separate them with ATA_DEVICE_CLEAR_OFFSET. Fields above the offset are initialized once during host initializatino while all other fields are cleared before hotplugging. Currently ->ap, devno and part of flags are persistent. Note that flags is partially cleared while holding host_set lock. This is to synchronize with later warm plug implementation which will record hotplug request in dev->flags. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata-hp-prep: add flags and eh_info/context fields for hotplugTejun Heo2006-05-31
| | | | | | Add hotplug related flags and eh_info/context fields. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: implement ata_eh_wait()Tejun Heo2006-05-31
| | | | | | | | | Implement ata_eh_wait(). On return from this function, it's guaranteed that the EH which was pending or in progress when the function was called is complete - including the tailing part of SCSI EH. This will be used by hotplug and others to synchronize with EH. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: shift host flag constantsTejun Heo2006-05-31
| | | | | | | Nudge host flag constants to make a room after ATA_FLAG_EH_PENDING. New EH flag will be added. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: add pio_data_xfer_noirqAlan Cox2006-05-26
| | | | | Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] libata: Remove obsolete flagAlan Cox2006-05-24
| | | | | | | | | | ATA_FLAG_IRQ_MASK was added when I did the original data transfer with IRQ masked bits for PIO. It has since been replaced by ->pio_data_xfer methods so should be removed so nobody uses it by mistake thinking it still works. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] PATCH: libata. Add ->data_xfer methodAlan Cox2006-05-24
| | | | | | | | | | | We need to pass the device in order to do per device checks such as 32bit I/O enables. With the changes to include dev->ap we now don't have to add parameters however just clean them up. Also add data_xfer methods to the existing drivers except ata_piix (which is in the other block of patches). If you reject the piix one just add a data_xfer to it... Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] libata: Fix the HSM error_mask mapping (was: Re: libata-tj and SMART)Albert Lee2006-05-20
| | | | | | | | | | | | | Fix the HSM error_mask mapping. Changes: - Better mapping in ac_err_mask() - In HSM_ST_FIRST ans HSM_ST state, check ATA_ERR|ATA_DF and map it to AC_ERR_DEV instead of AC_ERR_HSM. - In HSM_ST_FIRST and HSM_ST state, map DRQ=1 ERR=1 to AC_ERR_HSM. - For PIO data in and DRQ=1 ERR=1, add check after the junk data block is read. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* Merge branch 'max-sect' into upstreamJeff Garzik2006-05-15
|\
| * Merge branch 'upstream'Jeff Garzik2006-04-12
| |\
| * \ Merge branch 'upstream'Jeff Garzik2006-03-29
| |\ \
| * | | [PATCH] libata: increase LBA48 max sectors to 65535Tejun Heo2006-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | max_hw_sectors/max_sectors separation patch made into the tree, increase max_sectors to its hardware limit. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | | | [PATCH] libata-ncq: implement NCQ device configurationTejun Heo2006-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that all NCQ related stuff are in place, implement NCQ device configuration and bump ATA_MAX_QUEUE to 32 thus activating NCQ support. Original implementation is from Jens Axboe. Signed-off-by: Tejun Heo <htejun@gmail.com>
* | | | [PATCH] libata-ncq: implement ap->qc_active, ap->sactive and complete helperTejun Heo2006-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add ap->qc_active and ap->sactive, mask of all active qcs and libata's view of the SActive register, respectively. Also, implement ata_qc_complete_multiple() which takes new qc_active mask and complete multiple qcs according to the mask. These will be used to track NCQ commands and complete them. The distinction between ap->qc_active and ap->sactive is also useful for later PM implementation. Signed-off-by: Tejun Heo <htejun@gmail.com>
* | | | [PATCH] libata-ncq: rename ap->qactive to ap->qc_allocatedTejun Heo2006-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename ap->qactive to ap->qc_allocated. This is to accomodate addition of ap->qc_active, mask of active qcs. Signed-off-by: Tejun Heo <htejun@gmail.com>
* | | | [PATCH] libata-ncq: add NCQ related ATA/libata constants and macrosTejun Heo2006-05-15
| | | | | | | | | | | | | | | | | | | | | | | | Add NCQ related ATA/libata constants and macros. Signed-off-by: Tejun Heo <htejun@gmail.com>
* | | | Merge branch 'irq-pio'Tejun Heo2006-05-15
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/scsi/libata-core.c include/linux/libata.h
| * \ \ \ Merge branch 'upstream'Jeff Garzik2006-04-12
| |\ \ \ \ | | | |_|/ | | |/| |
| * | | | Merge branch 'upstream'Jeff Garzik2006-04-04
| |\ \ \ \
| * \ \ \ \ Merge branch 'upstream'Jeff Garzik2006-04-02
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/scsi/libata-core.c drivers/scsi/pdc_adma.c drivers/scsi/sata_mv.c drivers/scsi/sata_nv.c drivers/scsi/sata_promise.c drivers/scsi/sata_qstor.c drivers/scsi/sata_sx4.c drivers/scsi/sata_vsc.c include/linux/libata.h
| * \ \ \ \ \ Merge branch 'upstream'Jeff Garzik2006-04-01
| |\ \ \ \ \ \
| * \ \ \ \ \ \ Merge branch 'upstream'Jeff Garzik2006-03-29
| |\ \ \ \ \ \ \ | | | |_|_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/scsi/sata_mv.c
| * | | | | | | [PATCH] libata-dev: Cleanup unused enums/functionsAlbert Lee2006-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup the following unused functions: - ata_pio_poll() - ata_pio_complete() - ata_pio_first_block() - ata_pio_block() - ata_pio_error() ap->pio_task_timeout and other enums. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | | | | | Merge branch 'upstream'Jeff Garzik2006-03-24
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/scsi/libata-core.c
| * \ \ \ \ \ \ \ Merge branch 'upstream'Jeff Garzik2006-03-24
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/scsi/sata_vsc.c
| * \ \ \ \ \ \ \ \ Merge branch 'upstream'Jeff Garzik2006-03-11
| |\ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ Merge branch 'upstream'Jeff Garzik2006-02-20
| |\ \ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ \ Merge branch 'upstream'Jeff Garzik2006-02-20
| |\ \ \ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ \ \ Merge branch 'upstream'Jeff Garzik2006-02-13
| |\ \ \ \ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'upstream'Jeff Garzik2006-02-11
| |\ \ \ \ \ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'upstream'Jeff Garzik2006-02-10
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'upstream'Jeff Garzik2006-02-09
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'upstream-2.6.17'Jeff Garzik2006-01-27
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'tmp'Jeff Garzik2006-01-27
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'tmp'Jeff Garzik2006-01-27
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \