Commit graph android_kernel_sony_sdm845/include/linux/libata.h
Message SHA1
[libata] remove two unused fields from struct ata_port
Jeff Garzik   commited 2005-11-14 18:16:37 -05:00
e74ac79956
[libata] minor fixes, new helpers
- 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.

Jeff Garzik   commited 2005-11-14 14:14:16 -05:00
2c13b7cee0
Merge branch 'master'
Jeff Garzik   commited 2005-11-11 23:39:35 -05:00
f4256e301d
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6
Linus Torvalds   commited 2005-11-11 14:04:37 -08:00
d72d6f1b56
[PATCH] libata: propogate host private data from probe function
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>

Alan Cox   authored and   Jeff Garzik   commited 2005-11-11 08:19:55 -05:00
e99f8b5efe
[PATCH] libata.h needs dma-mapping.h
On Alpha:

include/linux/libata.h: In function `ata_pad_alloc':
include/linux/libata.h:785: warning: implicit declaration of function `dma_alloc_coherent'
include/linux/libata.h:786: warning: assignment makes pointer from integer without a cast
include/linux/libata.h: In function `ata_pad_free':
include/linux/libata.h:792: warning: implicit declaration of function `dma_free_coherent'

(I have a decouple-some-header-files cleanup in -mm, so it's causing some
fallout of this nature)

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>

Andrew Morton   authored and   Jeff Garzik   commited 2005-11-11 05:48:46 -05:00
1c72d8d90d
[SCSI] remove Scsi_Host_Template typedef
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>

Christoph Hellwig   authored and   James Bottomley   commited 2005-11-09 15:44:09 -05:00
d0be4a7d29
[PATCH] libata irq-pio: merge the ata_dataout_task workqueue with ata_pio_task workqueue
- remove ap->dataout_task from struct ata_port
   - let ata_pio_task() handle the HSM_ST_FIRST state.
   - rename ata_dataout_task() to ata_pio_first_block()
   - replace the ata_dataout_task workqueue with ata_pio_task workqueue

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>

========
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>

Albert Lee   authored and   Jeff Garzik   commited 2005-11-09 01:22:19 -05:00
e27486db89
Merge branch 'upstream'
Jeff Garzik   commited 2005-11-09 01:20:26 -05:00
c7c6e9494c
[libata] eliminate use of drivers/scsi/scsi.h compatibility header/defines
Jeff Garzik   commited 2005-11-07 00:59:37 -05:00
193515d51c
Merge branch 'master'
Jeff Garzik   commited 2005-11-05 15:44:02 -05:00
8cedcfd43a
[libata] ATAPI pad allocation fixes/cleanup
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.

Jeff Garzik   commited 2005-11-04 22:08:00 -05:00
6037d6bbdf
Merge branch 'master'
Jeff Garzik   commited 2005-10-30 20:25:28 -05:00
122401ce39
Merge branch 'upstream'
Jeff Garzik   commited 2005-10-30 04:50:22 -05:00
054ee8fd39
[libata] change ata_qc_complete() to take error mask as second arg
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.

Jeff Garzik   commited 2005-10-30 04:44:42 -05:00
a7dac447bb
Merge branch 'upstream'
Jeff Garzik   commited 2005-10-30 01:58:41 -05:00
fce45c1c8a
Merge branch 'upstream'
Jeff Garzik   commited 2005-10-30 01:58:18 -05:00
f0612bbc41
[libata] remove ata_chk_err(), ->check_err() hook.
We now depend on ->tf_read() to provide us with the contents
of the Error shadow register.

Jeff Garzik   commited 2005-10-29 21:25:10 -04:00
0169e284f6
Merge branch 'master'
Jeff Garzik   commited 2005-10-28 12:30:16 -04:00
15dbb5a3f9
Merge branch 'master'
Jeff Garzik   commited 2005-10-28 12:29:23 -04:00
7a9f8f93d2
libata: const-ification bombing run
Enforce access rules where appropriate.

If the compiler is smart enough, this may buy us an optimization or two
as a side effect.

Jeff Garzik   commited 2005-10-22 14:27:05 -04:00
057ace5e79
libata: turn on block layer clustering
Jeff Garzik   commited 2005-10-22 00:19:33 -04:00
cf482935c6
Add ide-timing functionality to libata.
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>

Alan Cox   authored and   Jeff Garzik   commited 2005-10-21 19:01:32 -04:00
452503f993
libata: add ata_sg_is_last() helper, use it in several drivers
Jeff Garzik   commited 2005-10-18 22:14:54 -04:00
972c26bdd6
Merge branch 'upstream'
Jeff Garzik   commited 2005-10-18 21:52:42 -04:00
b194b4250c
Merge branch 'upstream'
Jeff Garzik   commited 2005-10-18 21:23:11 -04:00
4e0e329d9a
[PATCH] libata CHS: calculate read/write commands and protocol on the fly (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>

Albert Lee   authored and   Jeff Garzik   commited 2005-10-18 17:16:13 -04:00
8cbd6df1f0
Merge branch 'upstream'
Jeff Garzik   commited 2005-10-09 11:16:14 -04:00
c4052da6f0
Merge branch 'upstream'
Jeff Garzik   commited 2005-10-09 09:44:07 -04:00
f58f8be7f6
libata: fix ATAPI DMA alignment issues
ATAPI needs to be padded to next 4 byte boundary, if misaligned.

Original work by me, many fixes from Tejun Heo.

Jeff Garzik   commited 2005-10-05 07:13:30 -04:00
cedc9a478d
libata: add ata_ratelimit(), use it in AHCI driver irq handler
Jeff Garzik   commited 2005-10-05 02:58:32 -04:00
67846b3017
libata: bitmask based pci init functions for one or two ports
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)

Alan Cox   authored and   Jeff Garzik   commited 2005-10-04 08:09:19 -04:00
47a8659380
Merge libata upstream (which includes C/H/S support) include irq-pio branch.
Merge branch 'upstream'

Jeff Garzik   commited 2005-10-03 19:48:49 -04:00
0fbbbf2bde
[PATCH] libata irq-pio: rename atapi_packet_task() and comments
Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>

Albert Lee   authored and   Jeff Garzik   commited 2005-09-30 07:21:06 -04:00
f9997be974
[PATCH] libata irq-pio: add comments and cleanup
Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>

Albert Lee   authored and   Jeff Garzik   commited 2005-09-30 07:21:06 -04:00
c56b14d2a3
/spare/repo/libata-dev branch 'chs-support'
Jeff Garzik   commited 2005-09-28 12:11:15 -04:00
64f09c98d7
[PATCH] libata: interrupt driven pio for LLD
libata.h:
libata-core:
  Add ATA_FLAG_PIO_POLLING flag for LLDs that expect interrupt for
command completion only.

sata_nv.c:
sata_vsc.c:
  irq handler is wrapper around ata_host_intr(), can handle PIO interrupts.

sata_promise.c:
sata_sx4.c:
sata_qstor.c:
sata_mv.c:
  Private irq handler.
  Polling mode ATA_FLAG_PIO_POLLING used for compatibility.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>

Albert Lee   authored and   Jeff Garzik   commited 2005-09-28 12:07:13 -04:00
e50362eccd
[PATCH] libata: interrupt driven pio for libata-core
- add PIO_ST_FIRST for the state before sending ATAPI CDB or sending
"ATA PIO data out" first data block.
- add ATA_TFLAG_POLLING and ATA_DFLAG_CDB_INTR flags
- remove the ATA_FLAG_NOINTR flag since the interrupt handler is now
aware of the states
- modify ata_pio_sector() and atapi_pio_bytes() to work in the interrupt
context
- modify the ata_host_intr() to handle PIO interrupts
- modify ata_qc_issue_prot() to initialize states
- atapi_packet_task() changed to handle "ATA PIO data out" first data block
- support the pre-ATA4 ATAPI device which raise interrupt when ready to
receive CDB

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>

Albert Lee   authored and   Jeff Garzik   commited 2005-09-28 12:07:13 -04:00
312f7da282
[PATCH] libata: rename host states
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>

Albert Lee   authored and   Jeff Garzik   commited 2005-09-28 11:58:39 -04:00
14be71f4c5
Merge /spare/repo/linux-2.6/
Jeff Garzik   commited 2005-09-24 00:26:49 -04:00
98ed72deeb
[PATCH] PATCH: remove function for non-PCI as requested
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>

Alan Cox   authored and   Jeff Garzik   commited 2005-09-16 02:39:01 -04:00
17b14451fd
Merge /spare/repo/linux-2.6/
Jeff Garzik   commited 2005-09-08 05:41:28 -04:00
142e27fc8a
/spare/repo/libata-dev branch 'iomap-try3'
Jeff Garzik   commited 2005-09-05 05:20:33 -04:00
d0bd99299b
[libata] update several drivers to use pci_iomap()/pci_iounmap()
Jeff Garzik   commited 2005-08-30 05:42:52 -04:00
374b187357
[libata] allow ATAPI to be enabled with new atapi_enabled module option
ATAPI is getting close to being ready.  To increase exposure, we enable
the code in the upstream kernel, but default it to off (present
behavior).  Users must pass atapi_enabled=1 as a module option (if
module) or on the kernel command line (if built in) to turn on
discovery of their ATAPI devices.

Jeff Garzik   commited 2005-08-30 03:37:42 -04:00
1623c81eec
Merge libata branch 'chs-support' to latest upstream kernel.
Jeff Garzik   commited 2005-08-29 19:24:43 -04:00
76b2bf9b4d
Merge /spare/repo/linux-2.6/
Jeff Garzik   commited 2005-08-29 15:59:42 -04:00
70d374ea99
[libata] license change, other bits
- changes license of all code from OSL+GPL to plain ole GPL
  - except for NVIDIA, who hasn't yet responded about sata_nv
  - copyright holders were already contacted privately

- adds info in each driver about where hardware/protocol docs may be
  obtained

- where I have made major contributions, updated copyright dates

Jeff Garzik   commited 2005-08-28 20:18:39 -04:00
af36d7f0df
libata: fix a few alan-isms
Jeff Garzik   commited 2005-08-27 04:13:52 -04:00
d18d36b4ed
[PATCH] libata: regularize dma_start/stop arguments
Needed for a few PATA drivers.

Also fix up a wrong comment.
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>

Alan Cox   authored and   Jeff Garzik   commited 2005-08-26 17:36:26 -04:00
b73fc89f6d