summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-scsi.c
Commit message (Collapse)AuthorAgeFilesLines
* 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-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.
* | [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-031-2/+7
|\ \ | |/
| * [PATCH] libata: fix ata_scsi_pass_thru error handlingTejun Heo2005-12-031-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>
* | [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>
* [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.
* [libata passthru] address slave devices correctlyMark Lord2005-11-131-0/+6
|
* [PATCH] kill libata scsi_wait_req usage (make libata compile with scsi-misc ↵Mike Christie2005-11-111-29/+11
| | | | | | | | | | changes) scsi_wait_req does not exist any more in the SCSI layer. This patch makes it so libata can compile again. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] libata: Note a nasty ATA quirkAlan Cox2005-11-101-0/+2
| | | | | Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] libata kernel-doc fixesRandy Dunlap2005-11-091-3/+4
| | | | | | | Fix all reported kernel-doc errors in libata. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [libata] eliminate use of drivers/scsi/scsi.h compatibility header/definesJeff Garzik2005-11-071-1/+1
|
* Merge branch 'upstream'Jeff Garzik2005-10-301-1/+8
|\
| * [libata] locking rewrite (== fix)Jeff Garzik2005-10-301-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | A lot of power packed into a little patch. This change eliminates the sharing between our controller-wide spinlock and the SCSI core's Scsi_Host lock. As the locking in libata was already highly compartmentalized, always referencing our own lock, and never scsi_host::host_lock. As a side effect, this change eliminates a deadlock from calling scsi_finish_command() while inside our spinlock.
* | Merge branch 'upstream'Jeff Garzik2005-10-301-18/+28
|\ \ | |/
| * [libata] change ata_qc_complete() to take error mask as second argJeff Garzik2005-10-301-18/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The second argument to ata_qc_complete() was being used for two purposes: communicate the ATA Status register to the completion function, and indicate an error. On legacy PCI IDE hardware, the latter is often implicit in the former. On more modern hardware, the driver often completely emulated a Status register value, passing ATA_ERR as an indication that something went wrong. Now that previous code changes have eliminated the need to use drv_stat arg to communicate the ATA Status register value, we can convert it to a mask of possible error classes. This will lead to more flexible error handling in the future.
* | Merge branch 'upstream'Jeff Garzik2005-10-281-130/+656
|\ \ | |/
| * [libata scsi] MODE SELECT, strengthen mode senseDouglas Gilbert2005-10-281-41/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - move default mode pages to the front of libata-scsi.c so various functions can access them - partial annotation of these pages, point out divergence from sat-r06 - replace various mode page magic numbers with defines - strengthen MODE SENSE command decoding: handle DBD bit in cdb, yield block descriptor (per sat-r06) and handle mode sub pages Signed-off-by: Douglas Gilbert <dougg@torque.net> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
| * Merge branch 'master'Jeff Garzik2005-10-281-12/+12
| |\
| * \ Merge branch 'upstream'Jeff Garzik2005-10-181-24/+31
| |\ \
| * | | [libata passthru] update ATAPI completion for new error handlingJeff Garzik2005-10-091-1/+6
| | | |
| * | | Merge branch 'upstream'Jeff Garzik2005-10-091-170/+494
| |\ \ \
| * | | | [libata passthru] add (DRIVER_SENSE << 24) to all check-conditionsJeff Garzik2005-10-061-3/+3
| | | | |
| * | | | [libata passthru] fix leak on errorJeff Raubitschek2005-10-041-2/+4
| | | | |
| * | | | Merge /spare/repo/linux-2.6/ Jeff Garzik2005-09-081-4/+4
| |\ \ \ \
| * \ \ \ \ Merge upstream kernel into libata 'passthru' branchJeff Garzik2005-08-291-21/+100
| |\ \ \ \ \
| * \ \ \ \ \ Merge /spare/repo/linux-2.6/Jeff Garzik2005-08-101-5/+11
| |\ \ \ \ \ \
| * | | | | | | libata: Update 'passthru' branch for latest libataJeff Garzik2005-06-221-6/+10
| | | | | | | |
| * | | | | | | Merge /spare/repo/linux-2.6/Jeff Garzik2005-06-221-1/+1
| |\ \ \ \ \ \ \
| * \ \ \ \ \ \ \ Automatic merge of ↵2005-05-261-1/+4
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git branch HEAD
| * | | | | | | | | [libata] ATA passthru (arbitrary ATA command execution)Jeff Garzik2005-05-121-104/+547
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Authors: Brett Russ <russb@emc.com> John W. Linville <linville@tuxdriver.com> Andy Warner <andyw@pobox.com>
* | | | | | | | | | Merge branch 'master'Jeff Garzik2005-10-281-12/+12
|\ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|_|/ | |/| | | | | | | |
| * | | | | | | | | libata: const-ification bombing runJeff Garzik2005-10-221-12/+12
| | |_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enforce access rules where appropriate. If the compiler is smart enough, this may buy us an optimization or two as a side effect.
* | | | | | | | | Merge branch 'upstream'Jeff Garzik2005-10-181-24/+31
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / /
| * | | | | | | | [PATCH] libata CHS: calculate read/write commands and protocol on the fly ↵Albert Lee2005-10-181-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (revise #6) - merge ata_prot_to_cmd() and ata_dev_set_protocol() as ata_rwcmd_protocol() - pave road for read/write multiple support - remove usage of pre-cached command and protocol values and call ata_rwcmd_protocol() instead Signed-off-by: Albert Lee <albertcc@tw.ibm.com> ============== Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
| * | | | | | | | [PATCH] libata CHS: move the initialization of taskfile LBA flags (revise #6)Albert Lee2005-10-181-17/+25
| | |_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | move the initialization of taskfile LBA flags "ATA_TFLAG_LBA" and "ATA_TFLAG_LBA48 flags" to the SCSI translation functions Signed-off-by: Albert Lee <albertcc@tw.ibm.com> ============= Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | | | | | | | Merge branch 'upstream'Jeff Garzik2005-10-091-187/+502
|\ \ \ \ \ \ \ \ | |/ / / / / / /
| * | | | | | | [libata scsi] improve scsi error handling with ata_scsi_set_sense()Douglas Gilbert2005-10-091-63/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - change "xlat" and "fill" actors in libata-scsi so they are responsible for SCSI status and sense data when they return 1. This allows GOOD status or a specialized error to be set. - yield an error for mode sense requests for saved values [sat-r06] - remove static inlines for ata_bad_scsiop() and ata_bad_cdb() which are no longer used Signed-off-by: Douglas Gilbert <dougg@torque.net> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
| * | | | | | | [libata scsi] add ata_scsi_set_sense helperDouglas Gilbert2005-10-091-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - add extern ata_scsi_set_sense() to build SCSI fixed sense data and corresponding SCSI status Signed-off-by: Douglas Gilbert <dougg@torque.net> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
| * | | | | | | libata: minor cleanupsJeff Garzik2005-10-051-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few code shuffles, to make merging future code easier. Add (DRIVER_SENSE << 24) to certain result codes, as noted by Douglas Gilbert.
| * | | | | | | libata: move atapi_request_sense() to libata-scsi moduleJeff Garzik2005-10-051-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No content changes, just moving code around.
| * | | | | | | libata: ATAPI command completion tweaks and notesJeff Garzik2005-10-051-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) note urgent bug, that completes command twice 2) only fix up INQUIRY data if the SCSI version is zero (typically indicates ATAPI MMC-ish device) 3) if there is a problem on the ATA bus, don't bother with REQUEST SENSE, just directly handle the error based on Status/Error registers.
| * | | | | | | Merge branch 'scsi-scan'Jeff Garzik2005-10-041-0/+16
| |\ \ \ \ \ \ \
| | * | | | | | | [libata] improve device scan even moreJeff Garzik2005-10-031-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since our max_lun is unconditionally set to 1, we might as well hardcode a LUN 0 probe, rather than a wildcard LUN scan. The ide-scsi driver sets max_lun to a value greater than under certain conditions: if ((drive->id->last_lun & 0x7) != 7) host->max_lun = (drive->id->last_lun & 0x7) + 1; else host->max_lun = 1; last_lun is Word 126 of IDENTIFY PACKET DEVICE, marked as obsolete and undocumented in non-ancient specs. We'll leave it out for now. Should the need arise to support multi-LUN ATAPI devices, we'll probably want to add the above code. Finally, there have been reports of REPORT LUNS commands locking up ATAPI drives. Eliminating the wildcard LUN scan could help reduce the trouble from problematic drives.
| | * | | | | | | [libata] improve device scanJeff Garzik2005-10-031-0/+12
| | | |_|_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace SCSI's legacy "bang at the door" method of probing with one directly controlled by the underlying ATA transport layer. We now only call scsi_scan_target() for devices we find, rather than probing every possible channel/id within a certain range.
| * | | | | | | [libata scsi] add CHS support to ata_scsi_start_stop_xlat()Albert Lee2005-10-041-4/+15
| | | | | | | |
| * | | | | | | [libata scsi] tidy up SCSI lba and xfer len calculationsAlbert Lee2005-10-041-64/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | move the redundant SCSI lba and transfer length calculation code from ata_scsi_verify_xlat() and ata_scsi_rw_xlat() to common functions.
| * | | | | | | libata: minor whitespace, comment, debug message updatesAlbert Lee2005-10-041-8/+17
| | | | | | | |
OpenPOWER on IntegriCloud