Commit Graph

51 Commits (4311fa60b0d1cb5a2f62f646978294bca7b46cbb)

Author SHA1 Message Date
Jeff Garzik c57c064994 [libata] sata_nv: add PCI IDs
Based on a patch contributed by Andrew Chew @ NVIDIA.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-22 23:12:24 -04:00
Jeff Garzik c5fa46e175 [libata] sata_nv: s/spin_lock_irqsave/spin_lock/ in irq handler
We don't need to use the heavier spin lock in the irq handler.

It's quite possible we can do this in nv_generic_interrupt() as well,
but I didn't take the time to pursue that train of thought.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-20 05:08:44 -04:00
Tejun Heo 5a44efff4f [PATCH] sata_nv: add hotplug support
Add hotplug support.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-20 04:59:22 -04:00
Tejun Heo 39f8758259 [PATCH] sata_nv: convert to new EH
Convert to new EH.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-20 04:59:22 -04:00
Tejun Heo ada364e884 [PATCH] sata_nv: better irq handlers
nf2/3 and ck804 have irq status register.  Implement better irq
handler for those flavors of nv.  This patch makes different flavors
of nv controllers use different irq handlers by using separate
port_info for each flavor.

This change also makes following EH and hotplug updates easier to
integrate.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-20 04:59:22 -04:00
Tejun Heo 27e4b27454 [PATCH] sata_nv: simplify constants
Simplify interrupt constants and make NFORCE3 equal to NFORCE2.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-20 04:59:22 -04:00
Tejun Heo e6faf082cd [PATCH] sata_nv: kill struct nv_host_desc and nv_host
nv_host_desc and nv_host are used to discern different generations of
nv controllers.  Kill those.  New EH/hotplug implementation will use
standard port_info/ata_port_operations for that.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-20 04:59:21 -04:00
Tejun Heo 638ebcc81f [PATCH] sata_nv: kill not-working hotplug code
sata_nv contained hotplug code which is mainly for demonstrating how
hotplug event is handled.  This patch kills the demo code in
prepration for real hotplug implementation.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-20 04:59:21 -04:00
Tejun Heo ccf68c3405 [PATCH] libata-hp: hook warmplug
Hook transportt->user_scan() and hostt->slave_destroy().

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-31 18:28:09 +09:00
Alan Cox a6b2c5d475 [PATCH] PATCH: libata. Add ->data_xfer method
We need to pass the device in order to do per device checks such as
32bit I/O enables. With the changes to include dev->ap we now don't have
to add parameters however just clean them up. Also add data_xfer methods
to the existing drivers except ata_piix (which is in the other block of
patches). If you reject the piix one just add a data_xfer to it...

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-24 01:58:54 -04:00
Andrew Chew 4c5c81613b [PATCH] sata_nv: Add MCP61 support
Added MCP61 SATA support to sata_nv.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-24 01:34:10 -04:00
Jeff Garzik a890b15c09 Merge branch 'upstream' 2006-04-12 16:54:43 -04:00
Jeff Garzik 10a5fd5e6b Merge branch 'master'
Conflicts:

	drivers/scsi/libata-scsi.c
	include/linux/libata.h
2006-04-11 12:51:40 -04:00
Christoph Hellwig 9227c33de8 [PATCH] move ->eh_strategy_handler to the transport class
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-04-10 14:15:47 -04:00
Jeff Garzik 7819d64e31 Merge branch 'upstream' 2006-04-02 20:41:48 -04:00
Jeff Garzik af64371ada [libata] bump versions 2006-04-02 20:41:36 -04:00
Jeff Garzik 029f5468b5 Merge branch 'upstream'
Conflicts:

	drivers/scsi/libata-core.c
	drivers/scsi/pdc_adma.c
	drivers/scsi/sata_mv.c
	drivers/scsi/sata_nv.c
	drivers/scsi/sata_promise.c
	drivers/scsi/sata_qstor.c
	drivers/scsi/sata_sx4.c
	drivers/scsi/sata_vsc.c
	include/linux/libata.h
2006-04-02 10:30:40 -04:00
Tejun Heo 198e0fed9e [PATCH] libata: rename ATA_FLAG_PORT_DISABLED to ATA_FLAG_DISABLED
Rename ATA_FLAG_PORT_DISABLED to ATA_FLAG_DISABLED for consistency.
(ATA_FLAG_* are always about ports).

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-04-02 10:09:19 -04:00
Jeff Garzik 11ed56fb78 Merge branch 'upstream'
Conflicts:

	drivers/scsi/sata_vsc.c
2006-03-24 09:24:04 -05:00
Jeff Garzik 02cbd926e9 [libata sata_nv] eliminate duplicate codepaths with iomap
eliminate a bunch of
	if (mmio)
		writel()
	else
		outl()

code with the pci_iomap() and io{read,write}{8,16,32}() interface.
2006-03-22 23:59:46 -05:00
Jeff Garzik 10ad05df14 [libata sata_nv] cleanups: convert #defines to enums; remove in-file history 2006-03-22 23:50:50 -05:00
Tejun Heo 30afc84cf7 [SCSI] libata: implement minimal transport template for ->eh_timed_out
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-21 13:07:05 -06:00
Jeff Garzik 3875e1945b Merge branch 'upstream' 2006-02-13 00:13:48 -05:00
Tejun Heo 49430f97dd [PATCH] libata: kill sht->max_sectors
The previous dev->max_sectors patch made sht->max_sectors meaningless.
Kill all initializations of sht->max_sectors.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-02-12 14:36:30 -05:00
Jeff Garzik ca7d5e42d7 Merge branch 'upstream' 2006-02-10 07:09:37 -05:00
Tejun Heo 35daeb8f9b [PATCH] libata: use ata_scsi_timed_out()
Make all libata low level drivers use ata_scsi_timed_out().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-02-10 06:50:46 -05:00
Jeff Garzik ea9b395fe2 Merge branch 'upstream' 2006-01-17 10:29:06 -05:00
Andrew Chew b887030aec [PATCH] sata_nv, spurious interrupts at system startup with MAXTOR 6H500F0 drive
This patch works around a problem with spurious interrupts seen at boot time when
a MAXTOR 6H500F0 drive is present.  An ATA interrupt condition is mysteriously
present at start of day.  If we took too long in issuing the first command,
the kernel would basically get tired of the spurious interrupts and turn the interrupt
off.  Issuing the first command essentially causes the interrupt condition to
get acknowledged.

I haven't seen this happen with any other drives.

What I basically do is ack ATA status by reading it regardless of whether we're
expecting to have to handle an interrupt.  This clears the start-of-day anomalous
interrupt condition, and keeps the kernel from disabling that interrupt due to
too many spurious interrupts.

Also, I fixed a bug where hotplug interrupts weren't getting acknowledged as handled
in the ISR.  This was not the cause of the spurious interrupts, but it's the right
thing to do anyway.

Signed-Off-By: Andrew Chew

Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-09 10:42:06 -05:00
Tejun Heo 93c9338713 [BLOCK] update libata to use new blk_ordered for barriers
Reflect changes in SCSI midlayer and updated to use new
ordered request implementation

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-06 09:55:00 +01:00
Jeff Garzik f4256e301d Merge branch 'master' 2005-11-11 23:39:35 -05:00
Jeff Garzik 3b7d697dfb [libata] constify PCI ID table in several drivers 2005-11-10 11:04:11 -05:00
Jeff Garzik c7c6e9494c Merge branch 'upstream' 2005-11-09 01:20:26 -05:00
Jeff Garzik 193515d51c [libata] eliminate use of drivers/scsi/scsi.h compatibility header/defines 2005-11-07 00:59:37 -05:00
Jeff Garzik 122401ce39 Merge branch 'master' 2005-10-30 20:25:28 -05:00
Jeff Garzik a9524a76f7 [libata] use dev_printk() throughout drivers
A few drivers were not following the standard meme of printing out
their driver name and version at module load time; this is fixed
as well.
2005-10-30 14:39:11 -05:00
Jeff Garzik 15dbb5a3f9 Merge branch 'master' 2005-10-28 12:30:16 -04:00
Jeff Garzik 057ace5e79 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.
2005-10-22 14:27:05 -04:00
Al Viro 9ee0c0a2cc [PATCH] iomem annotations (sata_nv)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-21 02:05:31 -04:00
Jeff Garzik f58f8be7f6 Merge branch 'upstream' 2005-10-09 09:44:07 -04:00
Andy Currid e710245bb0 [PATCH] Fix sata_nv handling of NVIDIA MCP51/55
Patch to fix sata_nv handling of NVIDIA MCP51/55

Signed-off-by: Andy Currid <acurrid@nvidia.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-09 09:38:28 -04:00
Alan Cox 47a8659380 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)
2005-10-04 08:09:19 -04:00
Albert Lee e50362eccd [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>
2005-09-28 12:07:13 -04:00
Andy Currid e86ee6682b [PATCH] Add NVIDIA device ID in sata_nv
Signed-off-by: Andy Currid <acurrid@nvidia.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-09-21 22:52:19 -04:00
Jeff Garzik 374b187357 [libata] update several drivers to use pci_iomap()/pci_iounmap() 2005-08-30 05:42:52 -04:00
Jeff Garzik 70d374ea99 Merge /spare/repo/linux-2.6/ 2005-08-29 15:59:42 -04:00
Jeff Garzik aa7e16d6b8 [libata sata_nv] NVIDIA ok'd license change from OSL+GPL to GPL 2005-08-29 15:12:56 -04:00
Jeff Garzik af36d7f0df [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
2005-08-28 20:18:39 -04:00
Tejun Heo c138950371 [PATCH] fix atapi_packet_task vs. intr race (take 2)
Interrupts from devices sharing the same IRQ could cause
ata_host_intr to finish commands being processed by atapi_packet_task
if the commands are using ATA_PROT_ATAPI_NODATA or ATA_PROT_ATAPI_DMA
protocol.  This is because libata interrupt handler is unaware that
interrupts are not expected during that period.  This patch adds
ATA_FLAG_NOINTR flag to tell the interrupt handler that we're not
expecting interrupts.

 Note that once proper HSM is implemented for interrupt-driven PIO,
this should be merged into it and this flag will be removed.

 ahci.c is a different kind of beast, so it's left alone.

* The following drivers use ata_qc_issue_prot and ata_interrupt, so
  changes in libata core will do.

  ata_piix sata_sil sata_svw sata_via sata_sis sata_uli

* The following drivers use ata_qc_issue_prot and custom intr handler.
  They need this change to work correctly.

  sata_nv sata_vsc

* The following drivers use custom issue function and intr handler.
  Currently all custom issue functions don't support ATAPI, so this
  change is irrelevant, updated for consistency and to avoid later
  mistakes.

  sata_promise sata_qstor sata_sx4

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-23 01:05:55 -04:00
Daniel Drake 541134cfe7 [PATCH] sata_nv: Support MCP51/MCP55 device IDs
This is a multi-part message in MIME format.
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-07-31 01:04:43 -04:00
Jeff Garzik aa8f0dc6c3 libata: Fix use-after-iounmap
Jens Axboe pointed out that the iounmap() call in libata was occurring
too early, and some drivers (ahci, probably others) were using ioremap'd
memory after it had been unmapped.

The patch should address that problem by way of improving the libata
driver API:

* move ->host_stop() call after all ->port_stop() calls have occurred.

* create default helper function ata_host_stop(), and move iounmap()
call there.

* add ->host_stop_prewalk() hook, use it in sata_qstor.c (hi Mark).
sata_qstor appears to require the host-stop-before-port-stop ordering
that existed prior to applying the attached patch.
2005-05-26 21:54:27 -04:00