summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-scsi.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] move ->eh_strategy_handler to the transport classChristoph Hellwig2006-04-101-5/+3
| | | | | | | | | | | | | 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] libata: make ata_qc_issue complete failed qcsTejun Heo2006-03-311-6/+2
| | | | | | | | | | 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>
* [PATCH] libata: ata_scsi_ioctl cleanupBrian King2006-03-241-13/+0
| | | | | | | | | In preparation for SAS, kill some unnecessary code in ata_scsi_ioctl to find the ATA port and device given the scsi_device. Neither local is used in the function. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] libata: ata_scsi_queuecmd cleanupBrian King2006-03-241-14/+18
| | | | | | | | Encapsulate part of ata_scsi_queuecmd so that it can be reused by future SAS patches. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [libata] export ata_dev_pair; trim trailing whitespaceJeff Garzik2006-03-241-15/+15
| | | | | | | | Mostly, trim trailing whitespace. Also: * export ata_dev_pair * move ata_dev_classify export closer to ata_dev_pair export
* [PATCH] Make libata not powerdown drivers on PM_EVENT_FREEZE.Nigel Cunningham2006-03-241-2/+2
| | | | | | | | | | | | | | | | | | 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>
* Merge branch 'master'Jeff Garzik2006-03-231-0/+10
|\
| * [SCSI] libata: implement minimal transport template for ->eh_timed_outTejun Heo2006-03-211-0/+10
| | | | | | | | | | | | | | | | | | | | 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] libata: pick a less confusion "um dunno" errorAlan Cox2006-03-221-7/+5
| | | | | | | | Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | [PATCH] libata: ata_scsi_slave_config cleanupBrian King2006-03-221-25/+37
| | | | | | | | | | | | | | | | Encapsulate some of ata_scsi_slave_config so that parts can be reused in future SAS patches. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | [PATCH] libata-dev: Remove ATA_PROT_PIO_MULTAlbert Lee2006-03-221-3/+4
| | | | | | | | | | | | | | Remove the ATA_PROT_PIO_MULT protocol. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | [libata] SCSI VPD page 0x83 fixesJeff Garzik2006-03-221-18/+41
|/ | | | | | | | | | | | | | | | | | | Original patch (and description) by Douglas Gilbert, with minor fixes and API updates from me. Changelog: - make existing libata VPD device identification page (0x83) supply the ATA serial number in the libata "vendor specific" designator (from Chris Paulson-Ellis) - add a "t10 vendor id based" designator as defined in SAT rev 08 (section 10.3.4.2.3) that supplies ATA model and serial numbers - make the libata VPD page 0x83 more extensible (for adding more designators in the future). - rename EVPD to VPD in various places. Enable Vital Product Data (EVPD) is a bit in the INQUIRY cdb. Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] libata: implement port_taskTejun Heo2006-03-111-0/+2
| | | | | | | | | | Implement port_task. LLDD's can schedule a function to be executed with context after specified delay. libata core takes care of synchronization against EH. This is generalized form of pio_task and packet_task which are tied to PIO hsm implementation. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* Merge branch 'master'Jeff Garzik2006-03-011-0/+2
|\
| * [libata] Disable FUAJeff Garzik2006-02-281-0/+2
| | | | | | | | Until problems are sorted.
* | [PATCH] libata: rename ata_dev_id_[c_]string()Tejun Heo2006-02-201-6/+6
| | | | | | | | | | | | | | | | | | This patch renames ata_dev_id_[c_]string() to ata_id_[c_]string(). All other functions which read data from ATA ID data start with ata_id and those two function names were getting too long. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] libata: add per-device max_sectorsTejun Heo2006-02-121-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a low level driver wants to control max_sectors, it had to adjust ap->host->max_sectors and set ATA_DFLAG_LOCK_SECTORS to tell ata_scsi_slave_config not to override the limit. This is not only cumbersome but also incorrect for hosts which support more than one devices per port. This patch adds per-device ->max_sectors. If the field is unset (zero), libata core layer will adjust ->max_sectors according to default rules. If the field is set, libata honors the setting. 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-121-2/+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>
* | [PATCH] libata: use ata_dev_id_c_string()Tejun Heo2006-02-121-7/+4
| | | | | | | | | | | | | | Use ata_dev_id_c_string() Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] libata: convert assert(X)'s in libata core layer to WARN_ON(!X)'sTejun Heo2006-02-111-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In an effort to kill libata-specific assert() and use generic WARN_ON(), this patch converts all assert(X)'s in libata core layer to WARN_ON(!X)'s. Most conversions are straight-forward logical negation exception for the followings. * In libata-core.c:ata_fill_sg(), assert(qc->n_elem > 0) is converted to WARN_ON(qc->n_elem == 0) because qc->n_elem is unsigned and unsigned <= 0 is weird. * In libata-scsi.c:ata_gen_ata_desc/fixed_sense(), assert(NULL != qc->ap->ops->tf_read) is converted to WARN_ON(qc->ap->ops->tf_read == NULL), as there are no other users of 'constant cond var' style in libata. 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-101-0/+1
| | | | | | | | | | | | | | | | | | ->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: implement ata_scsi_timed_out()Tejun Heo2006-02-101-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement ata_scsi_timed_out(), to be used as scsi_host_template->eh_timed_out callback for all libata drivers. Without this function, the following race exists. If a qc completes after SCSI timer expires but before libata EH kicks in, the qc gets completed but the scsicmd still gets passed to libata EH resulting in ->eng_timeout invocation with NULL qc, which none is handling properly. This patch makes sure that scmd and qc share the same lifetime. Original idea from Jeff Garzik <jgarzik@pobox.com>. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] libata: add ATA_QCFLAG_EH_SCHEDULEDTejun Heo2006-02-101-1/+1
| | | | | | | | | | | | | | | | | | Add ATA_QCFLAG_EH_SCHEDULED. If this flag is set, the qc is owned by EH and normal completion path is not allowed to finish it. This patch doesn't actually use this flag. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [libata scsi] build fix for ATA_FLAG_IN_EH changeJeff Garzik2006-02-091-1/+3
| |
* | [PATCH] libata: implement ATA_FLAG_IN_EH port flagTejun Heo2006-02-091-0/+9
| | | | | | | | | | | | | | | | | | ATA_FLAG_IN_EH flag is set on entry to EH and cleared on completion. This patch just sets and clears the flag. Following patches will build normal qc execution / EH synchronization aroung this flag. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | Merge branch 'master'Jeff Garzik2006-02-021-1/+26
|\|
| * [LIBATA] Blacklist certain Maxtor firmware revisions for FUA supportJens Axboe2006-01-301-1/+26
| | | | | | | | | | | | | | It looks like they are either discarding or corrupting data when the FUA command is used, bad. Signed-off-by: Jens Axboe <axboe@suse.de>
* | Various libata documentation updates.Randy Dunlap2006-01-281-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a merger of libata docs + cleanups from Martin Waitz <tali@admingilde.org> and me. From: Randy Dunlap <rdunlap@xenotime.net> From: Martin Waitz <tali@admingilde.org> Fix libata kernel-doc comments to match code. Add some function parameters to kernel-doc. Fix some typos/spellos. Put comments in <= 80 columns. Make one DPRINTK string unique. Fix sparse cast warnings. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] libata: implement and apply ata_eh_qc_complete/retry()Tejun Heo2006-01-271-6/+53
| | | | | | | | | | | | | | | | | | | | | | 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-271-6/+4
| | | | | | | | | | | | | | | | | | 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: fix ata_qc_issue() error handlingTejun Heo2006-01-271-2/+4
| | | | | | | | | | | | | | | | | | | | When ata_qc_issue() fails, the qc might have been dma mapped or not. So, performing only ata_qc_free() results in dma map leak. This patch makes ata_qc_issue() mark dma map flags correctly on failure and calls ata_qc_complete() after ata_qc_issue() fails. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] libata: make the owner of a qc responsible for freeing itTejun Heo2006-01-271-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | qc used to be freed automatically on command completion. However, as a qc can carry information about its completion status, it can be useful to its owner/issuer after command completion. This patch makes freeing qc responsibility of its owner. This simplifies ata_exec_internal() and makes command turn-around for atapi request sensing less hackish. This change was originally suggested by Jeff Garzik. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | Merge branch 'upstream'Jeff Garzik2006-01-171-6/+42
|\|
| * Merge branch 'post-2.6.15' of git://brick.kernel.dk/data/git/linux-2.6-blockLinus Torvalds2006-01-061-6/+26
| |\ | | | | | | | | | | | | | | | | | | Manual fixup for merge with Jens' "Suspend support for libata", commit ID 9b847548663ef1039dd49f0eb4463d001e596bc3. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| | * [BLOCK] add FUA support to libataTejun Heo2006-01-061-6/+26
| | | | | | | | | | | | | | | Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jens Axboe <axboe@suse.de>
| * | [PATCH] Suspend support for libataJens Axboe2006-01-061-0/+16
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds suspend patch to libata, and ata_piix in particular. For most low level drivers, they should just need to add the 4 hooks to work. As I can only test ata_piix, I didn't enable it for more though. Suspend support is the single most important feature on a notebook, and most new notebooks have sata drives. It's quite embarrassing that we _still_ do not support this. Right now, it's perfectly possible to suspend the drive in mid-transfer. Signed-off-by: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | Merge branch 'upstream'Jeff Garzik2006-01-031-4/+1
|\|
| * Merge branch 'master'Jeff Garzik2006-01-031-4/+1
| |\
| | * [PATCH] fix libata inquiry VPD for ATAPI devicesTony Battersby2005-12-241-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following patch prevents libata from incorrectly modifying inquiry VPD pages and command support data from ATAPI devices. I have tested the patch with a SATA ATAPI tape drive on an AHCI controller. Patch is against kernel 2.4.32 with 2.4.32-libata1.patch applied. Anthony J. Battersby Cybernetics Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | | Merge branch 'upstream'Jeff Garzik2005-12-141-2/+5
|\| |
| * | Merge branch 'upstream-fixes'Jeff Garzik2005-12-131-2/+5
| |\|
| | * [libata] mark certain hardware (or drivers) with a no-atapi flagJeff Garzik2005-12-131-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some hardware does not support the PACKET command at all. Other hardware supports ATAPI, but the driver does something nasty such as calling BUG() when an ATAPI command is issued. For these such cases, we mark them with a new flag, ATA_FLAG_NO_ATAPI. Initial version contributed by Ben Collins.
* | | Merge branch 'upstream'Jeff Garzik2005-12-131-11/+13
|\| |
| * | [PATCH] libata: move err_mask to ata_queued_cmdAlbert Lee2005-12-061-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - remove err_mask from the parameter list of the complete functions - move err_mask to ata_queued_cmd - initialize qc->err_mask when needed - for each function call to ata_qc_complete(), replace the err_mask parameter with qc->err_mask. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> =============== Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
| * | Merge branch 'upstream-fixes'Jeff Garzik2005-12-041-2/+7
| |\|
| * | [PATCH] mark several libata datastructures constArjan van de Ven2005-12-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi, the patch below marks several libata (and libata-driver) structures const so that they end up in the .rodata segment and don't false-share cachelines with things that get dirtied often. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | | Merge branch 'master'Jeff Garzik2005-12-061-2/+7
|\ \ \ | | |/ | |/|
| * | [PATCH] libata: fix ata_scsi_pass_thru error handlingTejun Heo2005-12-041-2/+7
| |/ | | | | | | | | | | | | | | This patch makes ata_scsi_pass_thru() properly set result code and sense data on translation failures. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | Merge branch 'upstream'Jeff Garzik2005-11-181-34/+49
|\|
| * [libata] REQUEST SENSE handling fixesJeff Garzik2005-11-141-34/+43
| | | | | | | | | | | | | | | | - Move ATAPI check-condition handling out of the timeout handler - Use multi-qc-issue feature to issue REQUEST SENSE ATAPI PACKET command upon receiving an ATAPI check-condition. This cleans things up a lot, and eliminates a nasty recursion bug.