aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-core.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-06-19Improve SATA core suspend/resumeLinus Torvalds1-0/+1
Doing a full ata_busy_sleep() seems to get suspend and resume working fine on the Apple Mac Mini, at least. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-28[PATCH] the latest consensus libata resume fixMark Lord1-0/+1
Okay, just to sum things up. This forces libata to wait for up to 2 seconds for BUSY|DRQ to clear on resume before continuing. [jgarzik adds...] During testing we never saw DRQ asserted, but nonetheless (a) this works and (b) testing for DRQ won't hurt. Signed-off-by: Mark Lord <liml@rtr.ca> Acked-by: Jens Axboe <axboe@suse.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-24[PATCH] libata: add pio flush for via atapi (was: Re: TR: ASUS A8V Deluxe, x86_64)Albert Lee1-0/+5
Backport the "pio flush" from the libata major update to 2.6.17 for via atapi. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-20[PATCH] libata-core: fix current kernel-doc warningsRandy Dunlap1-0/+6
Fix all current kernel-doc warnings. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
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-03-31[PATCH] libata: fix ata_xfer_tbl terminationTejun Heo1-1/+1
ata_xfer_tbl is terminated by entry with -1 as ->shift. However, ->shift was unsigned int making the termination condition bogus. This patch converts ->shift and ->bits to int. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-31[PATCH] libata: make ata_qc_issue complete failed qcsTejun Heo1-11/+9
There is no reason for the issuer to diddle with a failed qc as the issuer has complete control over when a qc gets freed (usually in ->complete_fn). Make ata_qc_issue() responsible for completing qcs which failed to issue. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-31[PATCH] libata: fix ata_qc_issue failure pathTejun Heo1-3/+3
On sg_err failure path, ata_qc_issue() doesn't mark the qc active before returning. This triggers WARN_ON() in __ata_qc_complete() when the qc gets completed. This patch moves ap->active_tag and QCFLAG_ACTIVE setting to the top of the function. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-29[PATCH] libata: ata_dev_init_params() fixesAlbert Lee1-6/+8
ata_dev_init_params() fixes: - Get the "heads" and "sectors" parameters from caller instead of implicitly from dev->id[]. - Return AC_ERR_INVALID instead of 0 if an invalid parameter is found Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-29[PATCH] libata: Fix interesting use of "extern" and also some bracketingAlan Cox1-2/+2
Signed-off-by: Alan Cox <alan@redhat.com> Last of the set, just clean up some oddments. Assuming the whole set is now ok then the remaining differences are the setup of PIO_0 at reset and the ->data_xfer method. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-29[PATCH] libata: Simplex and other mode filtering logicAlan Cox1-2/+29
Add a field to the host_set called 'flags' (was host_set_flags changed to suit Jeff) Add a simplex_claimed field so we can remember who owns the DMA channel Add a ->mode_filter() hook to allow drivers to filter modes Add docs for mode_filter and set_mode Filter according to simplex state Filter cable in core This provides the needed framework to support all the mode rules found in the PATA world. The simplex filter deals with 'to spec' simplex DMA systems found in older chips. The cable filter avoids duplicating the same rules in each chip driver with PATA. Finally the mode filter is neccessary because drive/chip combinations have errata that forbid certain modes with some drives or types of ATA object. Drive speed setup remains per channel for now and the filters now use the framework Tejun put into place which cleans them up a lot from the older libata-pata patches. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-29[PATCH] libata - ATA is both ATA and CFAAlan Cox1-1/+1
I think this is still needed with the new probe code (which btw seems to be missing docs in upstream ?). Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-29[PATCH] libata: Add ->set_mode hook for odd driversAlan Cox1-1/+5
Some hardware doesn't want the usual mode setup logic running. This allows the hardware driver to replace it for special cases in the least invasive way possible. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-29[PATCH] libata: kill trailing whitespaceTejun Heo1-1/+1
Kill trailing whitespace. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-24[PATCH] libata: add FIXME above ata_dev_xfermask()Tejun Heo1-0/+4
Add FIXME above ata_dev_xfermask noting that the current implementation limits all transfer modes to the fastest of the slowest device on a port which isn't necessary. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-24[PATCH] libata: cosmetic changes in ata_bus_softreset()Tejun Heo1-5/+4
ata_bus_softreset() should return AC_ERR_* on failure not arbitrary positive number. While at it, reformat comment above it. Signed-off-by: Tejun Heo <htejun@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-24[PATCH] libata: kill E.D.D.Tejun Heo1-85/+13
E.D.D. has no user in-tree and mostly useless. Kill it. For possible out-of-tree users, add a nice warning message and error handling if LLDD doesn't report any useable reset mechanism (and thus tries to use E.D.D.). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-24[PATCH] libata: Remove dependence on host_set->dev for SASBrian King1-6/+7
Remove some of the dependence on the host_set struct in preparation for supporting SAS HBAs. Adds a struct device pointer to the ata_port struct. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-24[libata] export ata_dev_pair; trim trailing whitespaceJeff Garzik1-24/+25
Mostly, trim trailing whitespace. Also: * export ata_dev_pair * move ata_dev_classify export closer to ata_dev_pair export
2006-03-24[PATCH] libata: add ata_dev_pair helperAlan Cox1-0/+17
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-24[PATCH] Make libata not powerdown drivers on PM_EVENT_FREEZE.Nigel Cunningham1-2/+3
At the moment libata doesn't pass pm_message_t down ata_device_suspend. This causes drives to be powered down when we just want a freeze, causing unnecessary wear and tear. This patch gets pm_message_t passed down so that it can be used to determine whether to power down the drive. Signed-off-by: Nigel Cunningham <nigel@suspend2.net> drivers/scsi/libata-core.c | 5 +++-- drivers/scsi/libata-scsi.c | 4 ++-- drivers/scsi/scsi_sysfs.c | 2 +- include/linux/libata.h | 4 ++-- include/scsi/scsi_host.h | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-24[PATCH] libata: make ata_set_mode() responsible for failure handlingTejun Heo1-20/+36
Make ata_set_mode() responsible for determining whether to take port or device offline on failure. ata_dev_set_xfermode() and ata_dev_set_mode() indicate error to the caller instead of disabling port directly on failure. Also, for consistency, ata_dev_present() check is done in ata_set_mode() instead of ata_dev_set_mode(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-24[PATCH] libata: use ata_dev_disable() in ata_bus_probe()Tejun Heo1-3/+1
We may or may not disable a device after ata_dev_configure() fails. Kill 'not supported, ignoring' message in ata_dev_configure() and use ata_dev_disable() in ata_bus_probe(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-24[PATCH] libata: implement ata_dev_disable()Tejun Heo1-0/+9
This patch implements ata_dev_disable() which prints a warning message and takes @dev offline. Currently, this is done by explicitly incrementing dev->class with case-by-case warning messages. Giving user clear indication when libata gives up will be more important as libata will be doing more retries. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-24[PATCH] libata: check if port is disabled after internal commandTejun Heo1-0/+16
libata core is being changed to disallow port/device disable on lower layers. However, some LLDDs (sata_mv) directly disable port on command failure. This patch makes ata_exec_internal() check whether a port got disabled after an internal command. If it is, AC_ERR_SYSTEM is added to err_mask and the port gets re-enabled. As internal command failure results in device disable for drivers which don't implement newer reset/EH callbacks, this change results in no behavior change for single device per port controllers. For slave-possible LLDDs which disable port on command failure, (1) such drivers don't exist currently, (2) issuing command to the other device of once-disabled port shouldn't result in catastrophe even if such driver exists. So, this should be enough as a temporary measure. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-24[PATCH] libata: make per-dev transfer mode limits per-devTejun Heo1-1/+1
Now that each ata_device has xfer masks, per-dev limits can be made per-dev instead of per-port. Make per-dev limits per-dev. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-24[PATCH] libata: add per-dev pio/mwdma/udma_maskTejun Heo1-18/+25
Add per-dev pio/mwdma/udma_mask. All transfer mode limits used to be applied to ap->*_mask which unnecessarily restricted other devices sharing the port. This change will also benefit later EH speed down and hotplug. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-24[PATCH] libata: implement ata_unpack_xfermask()Tejun Heo1-0/+23
Implement ata_unpack_xfermask(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-23[libata] Move some bmdma-specific code to libata-bmdma.cJeff Garzik1-234/+0
No code changes, just moving code between files.
2006-03-22[PATCH] libata: do not ignore PIO-only devicesTejun Heo1-7/+0
As libata now can do PIO, don't ignore PIO-only devices. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-22[PATCH] libata: Symbol exportsAlan Cox1-0/+2
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-22[PATCH] Update libata DMA blacklist to cover versions, and resync with IDE layerAlan Cox1-35/+59
Not much to say here except that some drives have fixed and bad firmware Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-22[PATCH] libata: Fix a drive detection problemAlan Cox1-0/+10
The current code follows the spec but uses an overlong delay. This would be great if the hardware did. Several vendors however forget the D7 pulldown. Fortunately 0xFF isnt a sane reset state so we can use it to skip detection as is done in drivers/ide. (ie this is a tested solution over a long time) Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-22Merge branch 'master'Jeff Garzik1-1/+2
2006-03-21[libata] fix oops on non-DMA bmdma hardwareJeff Garzik1-7/+10
Alan noted: "bmdma may be zero but the bmdma_irq_clear function gets called even in this case during pure PIO operation. Check we have a bmdma before we use it." I fixed this by adding a check for zero. While was I there, I fixed the non-standard indentation of the small function's code. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-21[PATCH] libata: make irqtrap mode compileAlan Cox1-1/+1
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-21[PATCH] libata: report which drive is causing mode problemsAlan Cox1-1/+1
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-21[PATCH] libata: Add some dummy noop functionsBrian King1-0/+3
Add some dummy noop functions for use by libata clients that do not need to do anything. Future SAS patches will utilize these functions. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-21[PATCH] libata-dev: Remove ATA_PROT_PIO_MULTAlbert Lee1-1/+0
Remove the ATA_PROT_PIO_MULT protocol. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-21[PATCH] libata-dev: add flush task to ata_exec_internal()Albert Lee1-0/+2
Add ata_port_flush_task() to ata_exec_internal(). Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-21[SCSI] libata: implement minimal transport template for ->eh_timed_outTejun Heo1-1/+2
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-16[PATCH] libata: move IDENTIFY info printing from ata_dev_read_id() to ata_dev_configure()Tejun Heo1-6/+7
Move IDENTIFY info printing from ata_dev_read_id() to ata_dev_configure() and print only if @print_info is non-zero. This kills duplicate IDENTIFY info printing during probing. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-16[PATCH] libata: use local *id instead of dev->id in ata_dev_configure()Tejun Heo1-16/+17
dev->id is used many times in ata_dev_configure(). Use local variable id instead for shorter notation. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-12[PATCH] libata: check Word 88 validity in ata_id_xfer_mask()Tejun Heo1-1/+4
Check bit 2 of Word 53 for Word 88 validity before using Word 88 to determine UDMA mask. Note that the original xfer mask implementation using ata_get_mode_mask() didn't consider bit 2 of Word 53. This patch introduces different (correct) behavior. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-12[PATCH] libata: fix class handling in ata_bus_probe()Tejun Heo1-13/+11
ata_bus_probe() didn't set classes[] properly for port disabled case of ->phy_reset() compatibility path. This patch moves classes[] initialization and normalization out of ->probe_reset block such that it applies to both ->probe_reset and ->phy_reset paths. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11libata: turn on ATAPI by defaultJeff Garzik1-1/+1
2006-03-11[PATCH] libata: fix missing classes[] initialization in ata_bus_probe()Tejun Heo1-0/+3
ata_bus_probe() didn't initialize classes[] properly with ATA_DEV_UNKNOWN. As ->probe_reset() is allowed to leave @classes alone when no device is present, this results in garbage class values. ATM, the only affected driver is ata_piix. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11[PATCH] libata: kill unused xfer_mode functionsTejun Heo1-90/+18
Preceding xfer_mask changes make the following functions unused. ata_pio_modes(), base_from_shift(), ata_pr_blacklisted(), fgb() Kill them. Also, as xfer_mode_str[] is now only used by ata_mode_string(), move it into the function. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11[PATCH] libata: reimplement ata_set_mode() using xfer_mask helpersTejun Heo1-154/+79
Use xfer_mask helpers to determine transfer mode. This rewrite also makes transfer mode determination done before any actual configuration. This patch doesn't result in any functional changes. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11[PATCH] libata: use xfer_mask helpers in ata_dev_set_mode()Tejun Heo1-11/+4
Rewrite hardcoded xfer_mode string determination in ata_dev_set_mode() using xfer_mask helpers. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>