Commit Graph

564 Commits

Author SHA1 Message Date
Albert Lee
07506697d1 [PATCH] libata CHS: move the initialization of taskfile LBA flags (revise #6)
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-18 17:16:13 -04:00
Jeff Garzik
5a476deff3 Merge branch 'master' 2005-10-18 17:16:06 -04:00
Jeff Garzik
cc675230a9 [PATCH] Fix and clean up quirk_intel_ide_combined() configuration
This change makes quirk_intel_ide_combined() dependent on the precise
conditions under which it is needed:

* IDE is built in
* IDE SATA option is not set
* ata_piix or ahci drivers are enabled

This fixes an issue where some modular configurations would not cause
the quirk to be enabled.

Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Linus torvalds <torvalds@osdl.org>
2005-10-17 15:01:53 -07:00
Linus Torvalds
f8cc5756de Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2005-10-14 17:17:04 -07:00
Mark Haverkamp
0e7734d3ca [PATCH] aacraid: host_lock not released fix
While doing some testing of error cases I ran into this bug.  In some cases
the reset handler can exit with the host_lock still held.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-14 17:10:13 -07:00
David S. Miller
f75884d28a [QLOGICPTI]: Handle INQUIRY response sniffing correctly.
These days, in 2.6.x, even INQUIRY commands are sent using
scatter gather lists.

Bug reported by Tom 'spot' Callaway.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-10-14 13:44:32 -07:00
Jeff Garzik
9621904012 sata_nv: Fixed bug introduced by 0.08's MCP51 and MCP55 support. 2005-10-11 01:52:39 -04:00
Jeff Garzik
68399bb508 [libata pdc_adma] license update, minor cleanup
from me: change from OSL+GPL to GPL (with approval)

from Mark: Gets rid of an unneeded control bit, slightly increasing
throughput.
2005-10-11 01:44:14 -04:00
Mark Lord
edea3ab58f libata: add new driver pdc_adma for PDC ADMA ATA cards 2005-10-10 17:53:58 -04:00
Jeff Garzik
3d3467f0fd Merge branch 'sil24' 2005-10-09 10:54:30 -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
Tejun Heo
042c21fd2c [libata sata_sil24] add support for 3131/3531
This patch adds support for sil_3131 and sil_3531.  Both are
identical to 3124 except that they have only one port.  Bits 30 and 31
of ata_port_info->host_flags is used to encode available port numbers.
Version number is bumped to 0.22.

Edward Falk supplied all the necessary information and preliminary
patch.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2005-10-09 09:35:46 -04:00
Tejun Heo
1fcce839a5 [libata sata_sil24] nit pickings
This patch removes unused NR_PORTS macro and adds termination entry
to sil24_pci_tbl.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2005-10-09 09:31:33 -04:00
Douglas Gilbert
ae00651020 [libata scsi] improve scsi error handling with ata_scsi_set_sense()
- 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>
2005-10-09 09:09:35 -04:00
Douglas Gilbert
845c5834d0 [libata scsi] add ata_scsi_set_sense helper
- 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>
2005-10-09 08:55:41 -04:00
Jeff Garzik
d95300758b Merge branch 'master' 2005-10-08 03:31:22 -04:00
Tejun Heo
7f726d125d [PATCH] sil24: implement tf_read callback
Hello, guys.

 This patch implements ->tf_read callback for sil24.  It didn't use to
be necessary but new ata_gen_fixed_sense now makes use of ->tf_read
callback.  This patch is taken from Edward Falk's driver.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-06 13:15:02 -04:00
Tejun Heo
6a575fa969 [PATCH] sil24: implement proper TF register reading & caching
03_sil24_add-tf-reading.patch

	This patch implements proper TF register reading back and
	caching and bumps up version to 0.22.  This is taken from
	Edward's driver.

Signed-off-by: Tejun Heo <htejun@gmail.com>

 sata_sil24.c |   50 +++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 45 insertions(+), 5 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-06 05:51:24 -04:00
Tejun Heo
46b93e7bce [PATCH] sil24: remove CMDERR clearing
02_sil24_remove-cmderr-clearing.patch

	CMDERR register doesn't need clearing.  This is from Edward's
	driver.

Signed-off-by: Tejun Heo <htejun@gmail.com>

 sata_sil24.c |    4 ----
 1 file changed, 4 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-06 05:51:24 -04:00
Tejun Heo
ad6e90f6d0 [PATCH] sil24: ignore non-error exception irqs
01_sil24_ignore-non-error-exception-irqs.patch

	Do not error-finish commands for non-error exception irqs -
	just ignore them.  This is taken from Edward's driver.

Signed-off-by: Tejun Heo <htejun@gmail.com>

 sata_sil24.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-06 05:51:24 -04:00
Jeff Garzik
012e060c95 Merge branch 'master' 2005-10-06 05:51:07 -04:00
Jeff Garzik
e12669e774 libata: minor cleanups
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-05 18:39:23 -04:00
Jeff Garzik
8a70f8dc08 [libata sata_mv] fix warning
shuffle ifdef location to fix the following warning:
drivers/scsi/sata_mv.c:471: warning: 'mv_dump_mem' defined but not used
2005-10-05 17:19:47 -04:00
Brett Russ
05b308e1df [PATCH] libata: Marvell function headers
adds helpful function header comments.

Signed-off-by: Brett Russ <russb@emc.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-05 17:16:52 -04:00
Brett Russ
afb0edd922 [PATCH] libata: Marvell spinlock fixes and simplification
This should fix up lockups that people were seeing due to
improper spinlock placement.  Also, the start/stop DMA routines put
guarded trust in the cached state of DMA.

Signed-off-by: Brett Russ <russb@emc.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-05 17:16:52 -04:00
Jeff Garzik
a939c96315 libata: move atapi_request_sense() to libata-scsi module
No content changes, just moving code around.
2005-10-05 17:09:16 -04:00
Jeff Garzik
a15dbeb477 libata: ATAPI command completion tweaks and notes
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.
2005-10-05 15:02:14 -04:00
Jeff Garzik
67846b3017 libata: add ata_ratelimit(), use it in AHCI driver irq handler 2005-10-05 02:58:32 -04:00
Al Viro
433992361c [PATCH] missing include in megaraid_sas
megaraid_sas depends on arch-specific indirect includes pulling
fs.h in; on alpha they do not.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-04 13:22:00 -07:00
Jeff Garzik
643736a58d Merge branch 'scsi-scan' 2005-10-04 14:24:04 -04:00
Albert Lee
9d5b130213 [libata scsi] add CHS support to ata_scsi_start_stop_xlat() 2005-10-04 08:48:17 -04:00
Albert Lee
3aef52311b [libata scsi] tidy up SCSI lba and xfer len calculations
move the redundant SCSI lba and transfer length calculation code from
ata_scsi_verify_xlat() and ata_scsi_rw_xlat() to common functions.
2005-10-04 08:47:43 -04:00
Albert Lee
c187c4b58a libata: minor whitespace, comment, debug message updates 2005-10-04 08:46:51 -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
Brett Russ
31961943e3 [PATCH] libata: Marvell SATA support (DMA mode) (resend: v0.22)
This is my libata compatible low level driver for the Marvell SATA
family.  Currently it runs in DMA mode on a 6081 chip.

The 5xxx series parts are not yet DMA capable in this driver because
the registers have differences that haven't been accounted for yet.
Basically, I'm focused on the 6xxx series right now.  I apologize for
those seeing problems on the 5xxx series, I've not had a chance to
look at those problems yet.

For those curious, the previous bug causing the SCSI timeout and
subsequent panics was caused by an improper clear of hc_irq_cause in
mv_host_intr().

This version is running well in my environment (6081 chips,
with/without SW raid1) and is showing equal or better performance
compared to the Marvell driver (mv_sata) in my initial tests (timed
dd's of reads/writes to/from memory/disk).

I still need to look at the causes of occasional problems such as this:

ata11: translating stat 0x35 err 0x00 to sense
ata11: status=0x35 { DeviceFault SeekComplete CorrectedError Error }
SCSI error : <10 0 0 0> return code = 0x8000002
Current sda: sense key Hardware Error
end_request: I/O error, dev sda, sector 3155010

and this, seen at init time:

ATA: abnormal status 0x80 on port 0xE093911C

but they aren't showstoppers.

Signed-off-by: Brett Russ <russb@emc.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-03 22:08:19 -04:00
Jeff Garzik
3f19ee8cb3 [libata] improve device scan even more
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.
2005-10-03 21:36:41 -04:00
Jeff Garzik
2b23582609 Merge branch 'master' 2005-10-03 19:46:45 -04:00
Jeff Garzik
644dd0cc49 [libata] improve device scan
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-10-03 15:55:19 -04:00
Linus Torvalds
7d6322b465 Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6 2005-10-03 08:07:10 -07:00
James Bottomley
51c928c34f [SCSI] Legacy MegaRAID: Fix READ CAPACITY
Some Legacy megaraid cards can't actually cope with the scatter/gather
version of the READ CAPACITY command (which is what we now send them
since altering all SCSI internal I/O to go via the block layer).  Fix
this (and a few other broken megaraid driver assumptions) by sending
the non-sg version of the command if the sg list only has a single
element.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-03 08:39:48 -05:00
James Bottomley
97af50f60f [SCSI] aic7xxx/aic79xx: fix module removal path not to panic
In these drivers, scsi_remove_host() is called too late, at the point
it is called, the driver has already shut down too far to accept any
I/O that the shutdown might generate.  Any generated I/O actually
triggers a panic.

Fix this by calling scsi_remove_host() as early as possible and not
calling scsi_host_put() until just before we kfree the ahc_softc.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-02 15:32:25 -05:00
James Bottomley
9e70592fcd [SCSI] fix potential panic with proc on module removal
There's a problem in our host release in that it calls
scsi_proc_hostdir_rm(). However, if you hold a reference to the host as
you remove the module, the host template (which proc uses) will be freed
and the system will panic when the host device is finally released.

Fix this by moving scsi_proc_hostdir_rm() to where it should be: in
scsi_remove_host().

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-02 15:20:03 -05:00
Al Viro
666002218d [PATCH] proc_mkdir() should be used to create procfs directories
A bunch of create_proc_dir_entry() calls creating directories had crept
in since the last sweep; converted to proc_mkdir().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-29 08:46:26 -07:00
Jeff Garzik
64f09c98d7 /spare/repo/libata-dev branch 'chs-support' 2005-09-28 12:11:15 -04:00
Albert Lee
14be71f4c5 [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>
2005-09-28 11:58:39 -04:00
Albert Lee
ee500aabf1 [PATCH] libata: indent and whitespace change
Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-09-28 11:57:29 -04:00
Mark Haverkamp
1640a2c385 [SCSI] aacraid: remove aac_insert_entry
Received from Mark Salyzyn from Adaptec.

High Priority Queues have *never* been used in the entire history of the
aac based adapters. Associated with this, aac_insert_entry can be
removed, SavedIrql can be removed & padding variable can be removed.
With the movement of SavedIrql out & replaced with an automatic variable
qflags, the locking can be refined somewhat. The sparse warnings did not
catch the need for byte swapping in the 'dprintk' debugging print
macros, so fixed this up when this code was moved outside of the now
refined locking.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-26 17:49:07 -05:00
Mark Haverkamp
63a70eeaaf [SCSI] aacraid: fib size math fix
Received from Mark Salyzyn from Adaptec.

The size of the command packet's scatter gather list maximum size was
miscalculated in the low range leading to the driver initialization
limiting the maximum i/o size that could go to the Adapter. There were
no negative operational side effects resulting from this bad math, only
a subtle limit in performance of the Adapter at the top end of the
range.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-26 17:48:29 -05:00
Mark Haverkamp
9203344cb8 [SCSI] aacraid: initialization timeout
Received from Mark Salyzyn from Adaptec.

In the rare instances where the adapter, or the motherboard, is
misbehaving; driver initialization or shutdown becomes problematic. By
introducing a 3 minute timeout on the first interrupt driven command
during initialization, or the issuance of the adapter shutdown command
during driver unload, we can resolve the lockup problems induced by
common (but rare) hardware misbehaviors.

The timeout during initialization, should it occur, is accompanied by a
message presented to the console and the logs indicating that the user
should inspect and resolve problems with interrupt routing.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-26 17:46:59 -05:00
Mark Haverkamp
08efb7b611 [SCSI] aacraid: error return checking
This patch adds some additional error return checking and error return
value propagation during initialization. Also, the deprecation of
pci_module_init with pci_register_driver along with the change in return
values.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-26 17:46:18 -05:00