Commit graph

646 commits

Author SHA1 Message Date
Al Viro
0420dd121d [PATCH] enum safety (sata_qstor)
sata_qstor strays into a nasty area - gcc handling of wide enums is
full of bugs that got fixed between gcc versions creating portability
nightmare.  Single-member enums are safe, so are ones that stay within
the range of int or unsigned int.  Anything beyond that is asking for
trouble.

Declaration of constants split in two enums, taking the ~0UL one into
a separate enum.
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
Al Viro
b181d3b012 [PATCH] iomem annotations (sata_promise)
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
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
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
Brett Russ
7e6c120859 [PATCH] libata: Marvell endian fix
Jeff found an endian bug in the Marvell driver (thanks!).  Here's the
fix for it.

Signed-off-by: Brett Russ <russb@emc.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-20 16:04:22 -04:00
Jeff Garzik
323cb3ce6e Merge branch 'master' 2005-10-20 10:11:25 -04:00
Steven Rostedt
461a0ffbec [PATCH] scsi_error thread exits in TASK_INTERRUPTIBLE state.
Found in the -rt patch set.  The scsi_error thread likely will be in the
TASK_INTERRUPTIBLE state upon exit.  This patch fixes this bug.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-19 23:16:21 -07:00
Steven Rostedt
055787e447 [SCSI] scsi_error thread exits in TASK_INTERRUPTIBLE state.
Found in the -rt patch set.  The scsi_error thread likely will be in the
TASK_INTERRUPTIBLE state upon exit.  This patch fixes this bug.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-19 09:53:59 -04:00
Jeff Garzik
77501f3cb6 Merge branch 'upstream' 2005-10-18 18:30:58 -04:00
Albert Lee
59a10b172f [PATCH] libata CHS: reread device identify info (revise #6)
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 17:16:14 -04:00
Albert Lee
8cbd6df1f0 [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>
2005-10-18 17:16:13 -04:00
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
Karl Magnus Kolstoe
f4fd20bf31 [SCSI] 2.6.13.3; add Pioneer DRM-624x to drivers/scsi/scsi_devinfo.c
The patch below should make the Pioneer DRM-624X automatically
be set up with all 6 "drives". (6 slot SCSI CD changer)

Signed-off-by: Karl Magnus Kolst <karl.kolsto@uib.no>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-17 12:24:04 -04:00
Alan Stern
7c72ce8187 [SCSI] Fix leak of Scsi_Cmnds
When a request is deferred in scsi_init_io because the sg table could not
be allocated, the associated scsi_cmnd is not released and the request is
not marked with REQ_DONTPREP.  When the command is retried, if
scsi_prep_fn decides to kill it then the scsi_cmnd will never be released.

This patch (as573) changes scsi_init_io so that it calls scsi_put_command
before deferring a request.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-16 15:35:11 -05:00
James.Smart@Emulex.Com
d16794f6ac [SCSI] FW: [PATCH] for Deadlock in transport_fc
Cannot call fc_rport_terminate() under the host lock, so drop the
lock.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-16 12:04:22 -05:00
Salyzyn, Mark
7a9366e46c [SCSI] Fix aacraid regression
Juan was kind enough to linger on site, and work on a production
machine, to try the parameter to make the system stable. He discovered
that reducing the maximum transfer size issued to the adapter to 128KB
stabilized his system. This is related to an earlier change for the
2.6.13 tree resulting from Martin Drab's testing where the transfer size
was reduced from 4G to 256KB; we needed to go still further in scaling
back the request size.

Here is the patch that tames this regression.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-16 12:00:36 -05:00
Randy Dunlap
f566a576bc [SCSI] NCR5380: fix undefined preprocessor identifier
Fix 12 undefined preprocessor identifier warnings (4 each in 3 driver builds):
drivers/scsi/NCR5380.c:2744:16: warning: undefined preprocessor identifier 'NDEBUG_ABORT'
drivers/scsi/NCR5380.c:2744:16: warning: "NDEBUG_ABORT" is not defined

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-16 11:50:21 -05: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
Jeff Garzik
422fa08e53 [libata passthru] update ATAPI completion for new error handling 2005-10-09 10:49:34 -04:00
Jeff Garzik
ffe75ef650 Merge branch 'upstream' 2005-10-09 10:40:44 -04:00
Jeff Garzik
9dc263239b Merge branch 'master' 2005-10-09 10:33:02 -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
Jeff Garzik
0e5dec478c [libata passthru] add (DRIVER_SENSE << 24) to all check-conditions 2005-10-06 09:40:20 -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
Jeff Raubitschek
54dac83c42 [libata passthru] fix leak on error 2005-10-04 10:21:19 -04:00
Jeff Garzik
2ee73cc2d5 Merge /spare/repo/linux-2.6/ 2005-10-04 10:16:31 -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
Mark Haverkamp
131256cf20 [SCSI] aacraid: handle AIF hotplug events (update)
Received from Mark Salyzyn from Adaptec.

Hotplug sniffs the AIFs (events) from the adapter and if a container
change resulting in the device going offline (container zero), online
(container zero completed) or changing capacity (morph) it will take
actions by calling the appropriate API.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-26 17:42:50 -05:00
Mark Haverkamp
2f130980d1 [SCSI] aacraid: aacraid: AIF preallocation (update)
Recevied from Mark Salyzyn from Adaptec.

Aif pre-allocation is used to pull the kmalloc outside of the locks.

Applies to the scsi-misc-2.6 git tree.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-26 17:41:49 -05:00
Mark Haverkamp
7a8cf29d69 [SCSI] aacraid: Greater than 2TB capacity support
Received from Mark Salyzyn from Adaptec.

There are a few adapters that are capable of creating devices with this large
of a capacity, but now that we have the large fib support in, the management
applications will be capable of generating them.  The problem is, once they are
created, the driver will not be able to access the devices correctly without
this patch.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-26 17:41:13 -05:00
Bagalkote, Sreenivas
c4a3e0a529 [SCSI] MegaRAID SAS RAID: new driver
Signed-off-by: Sreenivas Bagalkote <Sreenivas.Bagalkote@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-26 17:32:44 -05:00
Christoph Hellwig
fe8b2304e5 [SCSI] sas: fix remote phy removal
Brown paperbag bug:  sas_rphy_delete was ordered completely
wrong.  Fix it up to be the same order as sas_phy_delete or
fc_rport_terminate and fix rphy objects that leaked after module
removal.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-25 17:19:35 -05:00
Andrew Vasquez
44550322cb [SCSI] qla2xxx: fix remote port timeout with qla2xxx driver
This patch fixes a hole in the rport unblock handling when processing
fabric events via the ADISC/PLOGI device state machine.  Original code
would not properly 'unblock' the port upon the port reloging into the
fabric.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-25 12:11:35 -05:00
James Bottomley
6f3a20242d [SCSI] allow REPORT LUN scanning even for LUN 0 PQ of 3
Currently we just ignore the device, which means there are a few
arrays out there that we don't find.

This patch updates the scsi_report_lun_scan() to take a target instead
of a device so it can be called on a return of
SCSI_SCAN_TARGET_PRESENT, which is what a PQ 3 device returns.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-25 12:01:48 -05:00
adam radford
49bfd8db4a [SCSI] 3ware 9000: Add support for 9550SX controllers
Signed-off-by: Adam Radford <linuxraid@amcc.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-25 09:36:26 -05:00
Jeff Garzik
98ed72deeb Merge /spare/repo/linux-2.6/ 2005-09-24 00:26:49 -04:00
Jeff Garzik
c1d9728ecc Merge /spare/repo/linux-2.6/ 2005-09-24 00:25:02 -04:00
Linus Torvalds
87e807b6c4 Merge branch 'upstream' from master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2005-09-23 16:44:52 -07:00
Jeff Garzik
536f809802 Merge /spare/repo/linux-2.6/ 2005-09-23 19:03:21 -04:00
Benjamin Herrenschmidt
0cdc82ee1a [PATCH] mesh scsi: fix error handling
The PowerMac mesh SCSI driver had some missing error handling which would
trigger warnings due to lack of handling of return value from
scsi_add_host.  This fixes it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.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-09-22 22:17:36 -07: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
Andrew Morton
68ce1eb540 [SCSI] lpfc build fix
gcc-2.95.x doesn't do anonymous unions.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-21 16:25:46 -05:00
Linus Torvalds
9600c11ba3 Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6 2005-09-20 08:50:49 -07:00
James Bottomley
3ed7a4704b [SCSI] Fix thread termination for the SCSI error handle
From: 	Alan Stern <stern@rowland.harvard.edu>

This patch (as561) fixes the error handler's thread-exit code.  The
kthread_stop call won't wake the thread from a down_interruptible, so
the patch gets rid of the semaphore and simply does

        set_current_state(TASK_INTERRUPTIBLE);

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>

Modified to simplify the termination loop and correct the sleep condition.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-19 09:50:04 -05:00
James Bottomley
939647ee30 [SCSI] fix oops on usb storage device disconnect
We fix the oops by enforcing the host state model.  There have also
been two extra states added: SHOST_CANCEL_RECOVERY and
SHOST_DEL_RECOVERY so we can take the model through host removal while
the recovery thread is active.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-19 09:24:52 -05:00
Alan Stern
a64358db12 [SCSI] SCSI scanning and removal fixes
This patch (as545) fixes the list traversals in __scsi_remove_target and
scsi_forget_host.  In each case the existing code list_for_each_entry_safe
in an _unsafe_ manner, because the list was not protected from outside
modification while the iteration was running.

The new scsi_forget_host routine takes the moderately controversial step
of iterating over devices for removal rather than iterating over targets.
This makes more sense to me because the current scheme treats targets as
second-class citizens, created and removed on demand, rather than as
objects corresponding to actual hardware.  (Also I couldn't figure out any
safe way to iterate over the target list, since it's not so easy to tell
when a target has already been removed.)

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-18 15:22:06 -05:00
Alan Stern
b95be99d52 [SCSI] fix oops in scsi_release_buffers()
I found one other thing that needs to be fixed.  The call to
scsi_release_buffers in scsi_unprep_request causes an oops, because the
sgtable has already been freed in scsi_io_completion.  The following patch
is needed.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-17 15:24:53 -05:00
Adam Kropelin
27b2f6792f [PATCH] qla2xxx: Use dword accessors for PCI_ROM_ADDRESS
PCI_ROM_ADDRESS is a 32 bit register and as such should be accessed using
pci_bus_{read,write}_config_dword().  A recent audit of drivers/ turned up
several cases of byte- and word-sized accesses.  The harmful ones were fixed
by Linus directly.  This patches up one of the remaining
harmless-but-still-wrong cases caught in the dragnet.

Signed-off-by: Adam Kropelin <akropel1@rochester.rr.com>
Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-17 11:50:03 -07:00
Jeff Garzik
7fb6ec287a [libata] fix PIO completion race
Make sure we that completion is the final action we take; prior to this
change, another CPU may have changed ap->pio_task_state before we tested
it a final time.

Spotted by, and original patch by Albert Lee @ IBM.

Also includes a minor optimization:  eliminate a ton of unnecessary
queue_work() calls, simply by jumping to the beginning of the FSM
function ata_pio_task().
2005-09-16 06:01:48 -04:00
Alan Cox
17b14451fd [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>
2005-09-16 02:39:01 -04:00
Alan Cox
7a83e90b32 [PATCH] PATCH: silly in piix driver
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-09-16 02:37:47 -04:00
Alan Stern
541950027f [SCSI] fix use after potential free in scsi_remove_device
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-15 22:03:54 -04:00
James Bottomley
b568355733 [SCSI] atp870u: fix memory addressing bug
From: Alan Cox <alan@redhat.com>

The virt_to_bus() wasn't correctly taken out of this driver.  It needs
to be able to track both physical and virtual addresses for its prd table.
Update the driver to do this with separate tracking entries.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-15 08:59:36 -05:00
James Bottomley
59897dad98 [SCSI] fix sym scsi boot hang
On Wed, 2005-09-14 at 18:06 +1000, Anton Blanchard wrote:
> And in particular it looks like the scsi_unprep_request in
> scsi_queue_insert is causing it. The following patch fixes the boot
> problems on the vscsi machine:

OK, my fault.  Your fix is almost correct .. I was going to do this
eventually, honest, because there's no need to unprep and reprep a
command that comes in through scsi_queue_insert().

However, I decided to leave it in to exercise the scsi_unprep_request()
path just to make sure it was working.  What's happening, I think, is
that we also use this path for retries.  Since we kill and reget the
command each time, the retries decrement is never seen, so we're
retrying forever.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-14 16:59:03 -04:00
Randy.Dunlap
d39a942c3f [SCSI] scsi: 2 drivers need MODULE_LICENSE()
Modules need a license to prevent kernel tainting.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-14 16:58:26 -04:00