aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-core.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2005-12-12[PATCH] libata-core.c: fix parameter bug on kunmap_atomic() callsMark Lord1-2/+2
Fix incorrect pointer usage on two calls to kunmap_atomic(). This seems to happen a lot, because kunmap() wants the struct page *, whereas kunmap_atomic() instead wants the mapped virtual address. Signed-off-by: Mark Lord <liml@rtr.ca> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-17[libata] add timeout to commands for which we call wait_completion()Jeff Garzik1-4/+28
2005-11-16[PATCH] libata: honor the transfer cycle time speficied by the EIDE deviceAlbert Lee1-2/+4
The following code segment is not functional because the transfer cycle time speficied by the EIDE device is later overwritten by ata_timing_quantize(): /* * If the drive is an EIDE drive, it can tell us it needs extended * PIO/MW_DMA cycle timing. */ if (adev->id[ATA_ID_FIELD_VALID] & 2) { /* EIDE drive */ memset(&p, 0, sizeof(p)); (snip) ata_timing_merge(&p, t, t, ATA_TIMING_CYCLE | ATA_TIMING_CYC8B); <== uninitialized "t" is used here } /* * Convert the timing to bus clock counts. */ ata_timing_quantize(s, t, T, UT); <== t is overwritten by quantized s The patch has been submitted for ide-timing.h before: http://marc.theaimsgroup.com/?l=linux-ide&m=110820013425454&w=2 Resubmitted for libata. Changes: - Minor fix to honor the following transfer cycle time speficied by the device - id[65]: Minimum Multiword DMA transfer cycle time per word - id[67]: Minimum PIO transfer cycle time without flow control - id[68]: Minimum PIO transfer cycle time with IORDY Signed-off-by: Albert Lee <albertcc@tw.ibm.com> ======= Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-14[libata] REQUEST SENSE handling fixesJeff Garzik1-22/+0
- 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.
2005-11-14[libata] minor fixes, new helpersJeff Garzik1-8/+3
- in ata_dev_identify(), don't assume that all devices are either ATA or ATAPI. In the future, this code will see port multipliers and other devices. - make a debugging printk less verbose - add new helper ata_qc_reinit() - add new helper BPRINTK() and port flag ATA_FLAG_DEBUGMSG, for fine-grained debugging use.
2005-11-14[libata] fix bugs in ATAPI padding DMA mapping codeJeff Garzik1-5/+26
The ATAPI pad-to-next-32bit-boundary code modifies the scatterlist's length variable, sometimes to zero. x86-64 platform would oops if a zero-length scatterlist entry was asked to be mapped. Work around this by ensuring that we never DMA-map a zero length buffer or SG entry.
2005-11-13[PATCH] libata: fix comments on ata_tf_from_fis()Mark Lord1-2/+1
Fix description on comments for ata_tf_from_fis(). Signed-off-by: Mark Lord <mlord@pobox.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-11[PATCH] libata: propogate host private data from probe functionAlan Cox1-0/+2
This will let me chop the code size of several drivers right down. In many cases the actual private data is very useful and constant for a given host controller so being able to just pass it at probe time would be very useful indeed (eg with the via driver would could pass the udma clocking and reduce the code size, or with the AMD one the UDMA multiplier and the offset) Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-09[PATCH] libata: if condition fix for ata_dev_identify()Albert Lee1-3/+2
- if condition fix for ata_dev_identify() - ata_pio_poll() minor cleanup. Changes: - Use (dev->class == ATA_DEV_ATA) for ata_dev_identify() since "qc->tf.command" has been overwritten by the device status - Use HSM_ST_TMOUT directly in ata_pio_poll() Signed-off-by: Albert Lee <albertcc@tw.ibm.com> ============ Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-09[PATCH] libata kernel-doc fixesRandy Dunlap1-2/+2
Fix all reported kernel-doc errors in libata. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-07[libata] eliminate use of drivers/scsi/scsi.h compatibility header/definesJeff Garzik1-1/+1
2005-11-05[libata] restore sg on DMA mapping failureTejun Heo1-2/+8
2005-11-04[libata] ATAPI pad allocation fixes/cleanupJeff Garzik1-4/+5
Use ata_pad_{alloc,free} in two drivers, to factor out common code. Add ata_pad_{alloc,free} to two other drivers, which needed the padding but had not been updated.
2005-10-30Merge branch 'upstream'Jeff Garzik1-49/+10
2005-10-30[libata] locking rewrite (== fix)Jeff Garzik1-2/+0
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.
2005-10-30[libata] ata_tf_to_host cleanupsJeff Garzik1-47/+10
Integrate ata_exec() and ata_tf_to_host() into their only caller, ata_bus_edd(). Rename ata_tf_to_host_nolock() to ata_tf_to_host(). This makes locking a bit easier to review, and may help pave the way for future changes.
2005-10-30Merge branch 'master'Jeff Garzik1-4/+4
2005-10-30[libata] fix legacy IDE probingJeff Garzik1-4/+4
ata_pci_init_one() receives an array of struct ata_port_info. Recent updates to the code had always obtained port information from array element 0, rather than array element N. Change to avoid hardcoding port_info[0], thereby restoring proper hardware information to secondary legacy ports.
2005-10-30Merge branch 'upstream'Jeff Garzik1-16/+15
2005-10-30[libata] change ata_qc_complete() to take error mask as second argJeff Garzik1-16/+15
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.
2005-10-30Merge branch 'upstream'Jeff Garzik1-35/+11
2005-10-30Merge branch 'master'Jeff Garzik1-8/+2
2005-10-29[libata] remove ata_chk_err(), ->check_err() hook.Jeff Garzik1-32/+9
We now depend on ->tf_read() to provide us with the contents of the Error shadow register.
2005-10-30[PATCH] Use sg_set_buf/sg_init_one where applicableDavid Hardeman1-8/+2
This patch uses sg_set_buf/sg_init_one in some places where it was duplicated. Signed-off-by: David Hardeman <david@2gen.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Greg KH <greg@kroah.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2005-10-29Merge branch 'master'Jeff Garzik1-9/+9
2005-10-29[PATCH] libata-core cleanups (updated)Randy Dunlap1-9/+5
libata-core cleanups: - use kzalloc() instead of kmalloc() + memset(); - use one exit path in ata_device_add(); Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-29[libata] ensure ->tf_read() hook reads Status and Error registersJeff Garzik1-0/+4
We want ->tf_read() to get a complete snapshot of all taskfile registers, without requiring the callers to manually call ata_chk_status() and ata_chk_err() themselves. This also fixes a minor bug in sata_vsc where the lower bits of the feature register were incorrectly placed in the HOB (high order bits) portion of struct ata_taskfile.
2005-10-28Merge branch 'master'Jeff Garzik1-59/+223
2005-10-26[libata] ata_timing fixAlan Cox1-1/+1
2005-10-25[PATCH] libata kernel-doc fixesRandy Dunlap1-22/+14
Correct some function names in kernel-doc. Add some kernel-doc descriptions. Fix some typos. Remove a few blank lines. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-22libata: const-ification bombing runJeff Garzik1-34/+34
Enforce access rules where appropriate. If the compiler is smart enough, this may buy us an optimization or two as a side effect.
2005-10-21Add ide-timing functionality to libata.Alan Cox1-0/+149
This is needed for full AMD and VIA drivers and possibly more. Functions to turn actual clocking and cycle timings into register values. Also to merge shared timings to compute an optimal timing set. Built from the drivers/ide version by Vojtech Pavlik Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-21libata: handle early device PIO modes correctlyAlan Cox1-4/+27
2005-10-18Merge branch 'upstream'Jeff Garzik1-76/+101
2005-10-18[PATCH] libata CHS: reread device identify info (revise #6)Albert Lee1-1/+64
problem: id[53-58] might be changed after initializing device CHS settings. changes: - call ata_dev_reread_id() to reread the identify device info, after initializing device CHS settings. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> ============ Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-18[PATCH] libata CHS: calculate read/write commands and protocol on the fly (revise #6)Albert Lee1-68/+37
- 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>
2005-10-18[PATCH] libata CHS: move the initialization of taskfile LBA flags (revise #6)Albert Lee1-7/+0
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>
2005-10-09Merge branch 'upstream'Jeff Garzik1-174/+259
2005-10-05libata: minor cleanupsJeff Garzik1-3/+3
A few code shuffles, to make merging future code easier. Add (DRIVER_SENSE << 24) to certain result codes, as noted by Douglas Gilbert.
2005-10-05libata: move atapi_request_sense() to libata-scsi moduleJeff Garzik1-48/+1
No content changes, just moving code around.
2005-10-05libata: fix ATAPI DMA alignment issuesJeff Garzik1-17/+106
ATAPI needs to be padded to next 4 byte boundary, if misaligned. Original work by me, many fixes from Tejun Heo.
2005-10-05libata: add ata_ratelimit(), use it in AHCI driver irq handlerJeff Garzik1-0/+23
2005-10-04Merge branch 'scsi-scan'Jeff Garzik1-1/+1
2005-10-04libata: bitmask based pci init functions for one or two portsAlan Cox1-57/+76
This redoes the n_ports logic I proposed before as a bitmask. ata_pci_init_native_mode is now used with a mask allowing for mixed mode stuff later on. ata_pci_init_legacy_port is called with port number and does one port now not two. Instead it is called twice by the ata init logic which cleans both of them up. There are stil limits in the original code left over - IRQ/port mapping for legacy mode should be arch specific values - You can have one legacy mode IDE adapter per PCI root bridge on some systems - Doesn't handle mixed mode devices yet (but is now a lot closer to it)
2005-10-03[libata] improve device scanJeff Garzik1-1/+1
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.
2005-09-28/spare/repo/libata-dev branch 'chs-support'Jeff Garzik1-25/+115
2005-09-28[PATCH] libata: rename host statesAlbert Lee1-39/+39
Changes: s/PIO_ST_/HSM_ST_/ and s/pio_task_state/hsm_task_state/. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-09-28[PATCH] libata: indent and whitespace changeAlbert Lee1-1/+1
Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-09-24Merge /spare/repo/linux-2.6/Jeff Garzik1-46/+72
2005-09-23Merge /spare/repo/linux-2.6/Jeff Garzik1-14/+23