Commit Graph

75 Commits (eae07ac607f317ee6781983d3f9d8f77ef144b45)

Author SHA1 Message Date
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 8b316a3973 [libata] ahci: add ATI SB600 PCI IDs
From: Anatoli Antonovitch <antonovi@ati.com>

Signed-off-by: Felix Kuehling <fkuehlin@ati.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-30 17:07:32 -05:00
Tejun Heo 4658f79bec [PATCH] ahci: add softreset
Now that libata is smart enought to handle both soft and hard resets,
add softreset method.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-22 19:56:53 -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
Tejun Heo 4b10e55927 [PATCH] ahci: enable prefetching for PACKET commands
Turn on AHCI_CMD_PREFETCH for PACKET commands.  This hints the
controller that it can prefetch the CDB and the PRD entries.  This
patch is originally from Jeff Garzik.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 21:48:53 -05:00
Jeff Garzik 75deb6fa98 Merge branch 'upstream-fixes' 2006-03-11 19:10:06 -05:00
Tejun Heo 6971ed1fbb [PATCH] ahci: fix NULL pointer dereference detected by Coverity
Fix NULL pointer dereference detected by the Coverity checker.  Kill
dev -> pdev -> dev conversion while at it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 19:06:02 -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
Tejun Heo 6e7846e9c5 [PATCH] libata: move cdb_len for host to device
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>
2006-02-12 14:29:10 -05:00
Tejun Heo beec7dbc6f [PATCH] libata: convert assert(xxx)'s in low-level drivers to WARN_ON(!xxx)'s
This patch converts all assert(xxx)'s in low-level drivers to
WARN_ON(!xxx)'s.  After this patch, there is no in-kernel user of the
libata assert() macro.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-02-11 17:51:57 -05:00
Tejun Heo 4bd00f6a20 [PATCH] ahci: convert to new reset mechanism
Convert ahci ->phy_reset to new reset mechanism.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-02-11 17:51:56 -05:00
Tejun Heo a42fc659ba [PATCH] ahci: make ahci_fill_cmd_slot() take *pp instead of *ap
Make ahci_fill_cmd_slot() take struct ahci_port_priv *pp instead of
struct ata_port *ap as suggested by Jeff Garzik.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-02-11 17:51:56 -05:00
Tejun Heo cc9278ed5e [PATCH] ahci: separate out ahci_fill_cmd_slot()
Separate out ahci_fill_cmd_slot() from ahci_qc_prep().
ahci_fill_cmd_slot() can later be used to issue non-standard commands.
(e.g. softreset)

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-02-10 07:04:31 -05:00
Tejun Heo f637902015 [PATCH] libata: kill NULL qc handling from ->eng_timeout callbacks
->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>
2006-02-10 06:50:47 -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 d6fb89bf6b Merge branch 'upstream-fixes' 2006-01-29 12:41:09 -05:00
Jeff Garzik 9220a2d0da [libata ahci] add another JMicron pci id 2006-01-29 12:40:57 -05:00
Jeff Garzik b1d917739a Merge branch 'upstream-fixes' 2006-01-29 02:47:18 -05:00
Jeff Garzik bd12097c74 [libata ahci] Isolate Intel-ism, add JMicron JMB360 support
Isolate some PCI config register bitbanging to Intel hardware, as it
should have been all along.

Add support for JMicron JMB360.
2006-01-29 02:47:03 -05:00
Tejun Heo 22b49985f5 [PATCH] ahci: add constants for SRST
Add constants needed to perform SRST.  This is preparation for adding
softreset method.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-26 23:08:52 -05:00
Tejun Heo e0bfd14997 [PATCH] ahci: stop engine during hard reset
AHCI spec mandates engine to be stopped during hard resets.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-26 23:07:08 -05:00
Tejun Heo a72ec4ce6d [PATCH] libata: implement and apply ata_eh_qc_complete/retry()
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>
2006-01-26 22:36:28 -05:00
Tejun Heo 9a3d9eb017 [PATCH] libata: return AC_ERR_* from issue functions
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>
2006-01-26 22:36:27 -05:00
Tejun Heo 11a56d2439 [PATCH] libata: add detailed AC_ERR_* flags
Add detailed AC_ERR_* flags and use them.  Long-term goal is to
describe all errors with err_mask and tf combination (tf for failed
sector information, etc...).  After proper error diagnosis is
implemented, sense data should also be generated from err_mask instead
of directly from hardware tf registers as it is currently.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-26 22:36:27 -05:00
Tejun Heo 284b6481cc [PATCH] ahci: fix err_mask setting in ahci_host_intr
In ahci_host_intr err_mask is determined from IRQ status but never
used.  This patch sets qc->err_mask to the determined err_mask.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-26 22:36:27 -05:00
Tejun Heo 422b75956c [PATCH] ahci: separate out ahci_dev_classify
Separate out ahci_dev_classify().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-17 19:49:10 -05:00
Tejun Heo 7c76d1e839 [PATCH] ahci: separate out ahci_stop/start_engine
Separate out ahci_stop/start_engine().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-17 19:49:10 -05:00
Jason Gaston f285757cab [PATCH] ahci: AHCI mode SATA patch for Intel ICH8
This patch adds the Intel ICH8 DID's to the ahci.c file for AHCI mode
SATA support.

Signed-off-by:  Jason Gaston <Jason.d.gaston@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-17 07:54:42 -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
Albert Lee a22e2eb071 [PATCH] libata: move err_mask to ata_queued_cmd
- 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>
2005-12-06 04:49:22 -05:00
Arjan van de Ven 98ac62defe [PATCH] mark several libata datastructures const
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>
2005-12-01 02:29:35 -05:00
Jeff Garzik 7bdd720869 [libata] bump versions 2005-11-16 11:06:59 -05:00
Jeff Garzik c2cd76ff10 [libata ahci] tone down ATAPI errors
ATA devices don't generate many errors, so the preferred method is to
printk() when they occur.

ATAPI devices generate tons of exceptions during the normal course
of operation, so this change skips logging the most common class of
errors.
2005-11-16 09:23:30 -05:00
Jeff Garzik 9f68a24853 [libata ahci] command completion fixes, improved debug msgs
- Fix a regression in command completion, which prevented
  the restart of the DMA engine after the device throws
  an error.
- Pack more hardware info into the port-reset error message.
- Promote "welcome to our timeout" message from debug msg
  to normal printk.
2005-11-15 14:03:47 -05:00
Jeff Garzik ad36d1a533 [libata ahci] error handling fixes
Needed to get ATAPI working.

- dump hardware error bits, if hardware signals an error
- only reset hardware during timeout if a command was active
- call ata_qc_complete() with a fine-grained error mask.
  Needed so that atapi_qc_complete() can distinguish between
  device errors and other errors.
2005-11-14 13:56:37 -05:00
Jeff Garzik 02eaa66629 [libata ahci] set port ATAPI bit correctly
Although according to the documentation this largely only affects
desktop LED control, let's make sure we set the ATAPI bit when we
have an ATAPI device attached to the port.
2005-11-12 01:32:19 -05:00
Jeff Garzik 828d09de4a [libata ahci, qstor] fix miscount of scatter/gather entries
Don't directly reference qc->n_elem, as that might cause an off-by-one
error for misaligned (padded) ATAPI transfers.
2005-11-12 01:27:07 -05:00
Jeff Garzik 3b7d697dfb [libata] constify PCI ID table in several drivers 2005-11-10 11:04:11 -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 6037d6bbdf [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.
2005-11-04 22:08:00 -05:00
Jeff Garzik 95dbf5c4be Merge branch 'master' 2005-10-30 20:24:34 -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 054ee8fd39 Merge branch 'upstream' 2005-10-30 04:50:22 -05:00
Jeff Garzik a7dac447bb [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.
2005-10-30 04:44:42 -05:00
Jeff Garzik f0612bbc41 Merge branch 'upstream' 2005-10-30 01:58:18 -05:00
Jeff Garzik 0169e284f6 [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.
2005-10-29 21:25:10 -04:00
Jeff Garzik 7a9f8f93d2 Merge branch 'master' 2005-10-28 12:29:23 -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 1e4f2a96ae [PATCH] iomem annotations (ahci)
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 c4052da6f0 Merge branch 'upstream' 2005-10-09 11:16:14 -04:00