]> err.no Git - linux-2.6/log
linux-2.6
16 years ago[SCSI] qla2xxx: Remove unused member (dma_handle) from srb_t structure.
Andrew Vasquez [Thu, 3 Apr 2008 20:13:27 +0000 (13:13 -0700)]
[SCSI] qla2xxx: Remove unused member (dma_handle) from srb_t structure.

The member is not needed as there's no non-scatter-gather
list I/Os submitted by the upper-layers.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Add ISP84XX support.
Harihara Kadayam [Thu, 3 Apr 2008 20:13:26 +0000 (13:13 -0700)]
[SCSI] qla2xxx: Add ISP84XX support.

Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Additional cleanups and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Assign mailbox command timeout values in a consistent manner.
Ravi Anand [Thu, 3 Apr 2008 20:13:25 +0000 (13:13 -0700)]
[SCSI] qla2xxx: Assign mailbox command timeout values in a consistent manner.

Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Add midlayer target/device reset support.
Andrew Vasquez [Thu, 3 Apr 2008 20:13:24 +0000 (13:13 -0700)]
[SCSI] qla2xxx: Add midlayer target/device reset support.

Now that infrastructure is present within the midlayer and there
is a clear distinction between what is expected from a device and
target reset, convert the current device-reset codes to a
target-reset, and add codes to perform a proper device-reset (LUN
reset).

In the process of adding reset support, collapse and consolidate
large sections of mailbox-command (TMF issuance) codes,
generalize the two 'wait-for-commands-to-complete' functions, and
add a generic-reset routine for use by midlayer reset functions.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Check alternate 'reason' code during GPSC status handling.
Andrew Vasquez [Thu, 3 Apr 2008 20:13:23 +0000 (13:13 -0700)]
[SCSI] qla2xxx: Check alternate 'reason' code during GPSC status handling.

Some switches return 0x09 (Command not supported) as the reason
code for GPSC failure.  Check for this code, and disable
additional GPSC queries if found.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Add Flash Descriptor Table layout support.
Andrew Vasquez [Thu, 3 Apr 2008 20:13:22 +0000 (13:13 -0700)]
[SCSI] qla2xxx: Add Flash Descriptor Table layout support.

The Flash Descriptor Table (FDT) present on many recent HBAs
encodes flash accessing characteristics of the flash-part used on
the HBA.  Use this information during flash manipulation (writes)
rather than using specific hard-coded values based on queried
manufacturer and device IDs.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Use PCI-SIG nomenclature for PCIe bandwidth units.
Andrew Vasquez [Thu, 3 Apr 2008 20:13:21 +0000 (13:13 -0700)]
[SCSI] qla2xxx: Use PCI-SIG nomenclature for PCIe bandwidth units.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Cruft cleanup of functions and structures.
Andrew Vasquez [Thu, 3 Apr 2008 20:13:20 +0000 (13:13 -0700)]
[SCSI] qla2xxx: Cruft cleanup of functions and structures.

Strip unused (DEBUG-ONLY) enabled functions, inlines, useless
wrappers, and unused DPC flags from the code.  Another step in
the migration towards a cleaner (less-crusty) driver.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Add hardware trace-logging support.
Andrew Vasquez [Thu, 3 Apr 2008 20:13:19 +0000 (13:13 -0700)]
[SCSI] qla2xxx: Add hardware trace-logging support.

Recent ISPs have a region within FLASH which acts as a repository
for the logging of serious hardware and software failures.
Currently, the region is large enough to support up to 255
entries.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Add FC-transport Asynchronous Event Notification support.
Andrew Vasquez [Thu, 3 Apr 2008 20:13:18 +0000 (13:13 -0700)]
[SCSI] qla2xxx: Add FC-transport Asynchronous Event Notification support.

Supported events include LIP, LIP reset, RSCN, link up, and link
down.

To support AEN (and additional forthcoming features), we also
introduce a simple deferred-work construct to manage events which
require a non-atomic sleeping-capable context.  This work-list is
processed as part of the driver's standard DPC routine.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Simplify interrupt handler locking.
Andrew Vasquez [Thu, 3 Apr 2008 20:13:17 +0000 (13:13 -0700)]
[SCSI] qla2xxx: Simplify interrupt handler locking.

There's no need to use the heavier (albiet safer)
*_irq[save|restore]() locking primitives within the driver's
interrupt handlers, interrupts are guaranteed to be
non-reentrant.  Use lightweight spin_lock() and spin_unlock()
primitives while acquiring the hardware_lock.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Use an rport's scsi_target_id member consistently throughout driver.
Andrew Vasquez [Thu, 3 Apr 2008 20:13:16 +0000 (13:13 -0700)]
[SCSI] qla2xxx: Use an rport's scsi_target_id member consistently throughout driver.

Rather than using a duplicate/cached value stored in the driver's
internal fcport structure.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Remove unused and obsolete #define's.
Andrew Vasquez [Thu, 3 Apr 2008 20:13:15 +0000 (13:13 -0700)]
[SCSI] qla2xxx: Remove unused and obsolete #define's.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Add support for host supported speeds FC transport attribute.
Andrew Vasquez [Thu, 3 Apr 2008 20:13:14 +0000 (13:13 -0700)]
[SCSI] qla2xxx: Add support for host supported speeds FC transport attribute.

Use generic FC transport #defines for speed values.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Update copyright banner.
Andrew Vasquez [Thu, 3 Apr 2008 20:13:13 +0000 (13:13 -0700)]
[SCSI] qla2xxx: Update copyright banner.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Update firmware filenames for new ISP parts.
Andrew Vasquez [Thu, 3 Apr 2008 20:13:12 +0000 (13:13 -0700)]
[SCSI] qla2xxx: Update firmware filenames for new ISP parts.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] ips: remove spurious cpu_to_leX on outX statements
James Bottomley [Thu, 3 Apr 2008 17:28:20 +0000 (12:28 -0500)]
[SCSI] ips: remove spurious cpu_to_leX on outX statements

These are completely wrong because both outX and writeX do an
automatic reverse of their arguments if necessary, so having an extra
cpu_to_leX gives us the wrong ordering on BE platforms again.

Acked-by: Mark Salyzyn <Mark_Salyzyn@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] libsas: fix missing inlines in header file
James Bottomley [Thu, 3 Apr 2008 14:04:31 +0000 (09:04 -0500)]
[SCSI] libsas: fix missing inlines in header file

Two functions in include/scsi/sas_ata.h don't have static inlines
leading to problems if they're built in:

On Thu, 2008-04-03 at 14:06 +0200, Toralf Förster wrote:
> drivers/scsi/mvsas.o: In function `sas_ata_init_host_and_port':
> mvsas.c:(.text+0x0): multiple definition of `sas_ata_init_host_and_port'
> drivers/scsi/libsas/built-in.o:(.text+0x37f4): first defined here
> drivers/scsi/mvsas.o: In function `sas_ata_task_abort':
> mvsas.c:(.text+0x7): multiple definition of `sas_ata_task_abort'
> drivers/scsi/libsas/built-in.o:(.text+0x37fb): first defined here
> make[2]: *** [drivers/scsi/built-in.o] Error 1
> make[1]: *** [drivers/scsi] Error 2
> make: *** [drivers] Error 2

Add the correct static inline modifiers.

Tested-by: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] transport_class: BUG if we can't release the attribute container
James Bottomley [Wed, 2 Apr 2008 15:05:48 +0000 (10:05 -0500)]
[SCSI] transport_class: BUG if we can't release the attribute container

Every current transport class calls transport_container_release but
ignores the return value.  This is catastrophic if it returns an error
because the containers are part of a global list and the next action of
almost every transport class is to free the memory used by the
container.

Fix this by making transport_container_release a void, but making it BUG
if attribute_container_release returns an error ... this catches the
root cause of a system panic much earlier.  If we don't do this, we get
an eventual BUG when the attribute container list notices the corruption
caused by the freed memory it's still referencing.

Also made attribute_container_release __must_check as a reminder.

Cc: Greg KH <greg@kroah.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] fix barrier failure issue
James Bottomley [Wed, 2 Apr 2008 23:11:52 +0000 (18:11 -0500)]
[SCSI] fix barrier failure issue

Currently, if the barrier command fails, the error return isn't seen
by the block layer and it proceeds on regardless.  The problem is that
SCSI always returns no error for REQ_TYPE_BLOCK_PC ... it expects the
submitter to pick the errors out of req->errors, which the block
barrier functions don't do.

Since it appears that the way SG_IO and scsi_execute_request() work
they discard the block error return and always use req->errors, the
best fix for this is to have the SCSI layer return an error to block
if one actually occurred (this also allows us to filter out spurious
errors, like deferred sense).

This patch is a bug fix that will need backporting to stable, but it's
also quite a big change and in need of testing, so we'll incubate in
the main kernel tree and backport at the -rc2 or so stage if no
problems turn up.

Acked-by: Jens Axboe <jens.axboe@oracle.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Add docbook comments to debug trace.
Martin Peschke [Mon, 31 Mar 2008 09:15:31 +0000 (11:15 +0200)]
[SCSI] zfcp: Add docbook comments to debug trace.

Add missing docbook-comments for functions forming zfcp's internal
trace API.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Cleanup line breaks in debug trace.
Martin Peschke [Mon, 31 Mar 2008 09:15:30 +0000 (11:15 +0200)]
[SCSI] zfcp: Cleanup line breaks in debug trace.

Remove line breaks that do not conform to coding style.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Shorten excessive names in debug trace.
Martin Peschke [Mon, 31 Mar 2008 09:15:29 +0000 (11:15 +0200)]
[SCSI] zfcp: Shorten excessive names in debug trace.

Saving on line breaks, improving readability, by shortening excessive
function names and identifiers, by simplifying some functions call
chains, and by simplifying nesting of some data structure.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Move DBF definitions to private header file
Christof Schmitt [Mon, 31 Mar 2008 09:15:28 +0000 (11:15 +0200)]
[SCSI] zfcp: Move DBF definitions to private header file

Unclutter the global zfcp_def.h header. Move everything required to
call into the debug feature to a new header file.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Simplify zfcp_dbf_tag and related functions in debug trace.
Martin Peschke [Mon, 31 Mar 2008 09:15:27 +0000 (11:15 +0200)]
[SCSI] zfcp: Simplify zfcp_dbf_tag and related functions in debug trace.

Simplify usage of zfcp_dbf_tag() and calling functions.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Simplify usage of hex dump output function for debug trace.
Martin Peschke [Mon, 31 Mar 2008 09:15:26 +0000 (11:15 +0200)]
[SCSI] zfcp: Simplify usage of hex dump output function for debug trace.

Simplify usage of output function for hex dumps.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Remove obsolete output function from debug trace.
Martin Peschke [Mon, 31 Mar 2008 09:15:25 +0000 (11:15 +0200)]
[SCSI] zfcp: Remove obsolete output function from debug trace.

Remove obsolete output function.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Cleanup debug trace view functions.
Martin Peschke [Mon, 31 Mar 2008 09:15:24 +0000 (11:15 +0200)]
[SCSI] zfcp: Cleanup debug trace view functions.

Improve readability of code by using more convenient output function.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: simplify zfcp_dbf_timestamp()
Martin Peschke [Mon, 31 Mar 2008 09:15:23 +0000 (11:15 +0200)]
[SCSI] zfcp: simplify zfcp_dbf_timestamp()

Change zfcp_dbf_timestamp() so that it just calculates timespec from
timestamp. First step to be able to rip this code out of zfcp.
Besides, this change makes it easier to rip out old-style debug view
functions.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] aic94xx: cleanups
Adrian Bunk [Fri, 28 Mar 2008 21:48:34 +0000 (14:48 -0700)]
[SCSI] aic94xx: cleanups

- static functions in .c files shouldn't be marked inline
- make needlessly global code static
- remove the unused aic94xx_seq.c:asd_unpause_lseq()
- #if 0 other unused code

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] ch: fix sparse shadowed variable warnings
Harvey Harrison [Tue, 1 Apr 2008 05:05:30 +0000 (22:05 -0700)]
[SCSI] ch: fix sparse shadowed variable warnings

Replace the global err array with ch_err.
drivers/scsi/ch.c:271:6: warning: symbol 'err' shadows an earlier one
drivers/scsi/ch.c:116:3: originally declared here

Replace the temporary cmd buffer with ch_err to avoid shadowing the cmd
function parameter.
drivers/scsi/ch.c:724:11: warning: symbol 'cmd' shadows an earlier one
drivers/scsi/ch.c:596:20: originally declared here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] make scsi_end_bidi_request() static
Adrian Bunk [Sun, 30 Mar 2008 22:53:55 +0000 (01:53 +0300)]
[SCSI] make scsi_end_bidi_request() static

This patch makes the needlessly global scsi_end_bidi_request() static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] hptiop: fix header.context usage
James Bottomley [Sun, 30 Mar 2008 17:36:26 +0000 (12:36 -0500)]
[SCSI] hptiop: fix header.context usage

header.context is a 64 bit field, but it's deliberately split into
context and context_hi32.  Thus cpu_to_le64 assignments are wrong on
this.  Replace them with the correct settings of both the low and high
words.

Cc: HighPoint Linux Team <linux@highpoint-tech.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] wd33c93: fix up cut and paste error
James Bottomley [Tue, 1 Apr 2008 03:06:50 +0000 (22:06 -0500)]
[SCSI] wd33c93: fix up cut and paste error

The three drivers: a2091, gvp11 and mvme147 have erroneous references
to a3000_host.  Fix these to be references to the proper host
variable.

Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_debug: remove unnecessary function declarations
FUJITA Tomonori [Sat, 29 Mar 2008 15:59:58 +0000 (00:59 +0900)]
[SCSI] scsi_debug: remove unnecessary function declarations

This patch removes function declarations with moving some
functions. This cleans up them a bit to silence checkpatch.pl. There
is no functional change.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_debug: support large non-fake virtual disk
FUJITA Tomonori [Sat, 29 Mar 2008 15:59:57 +0000 (00:59 +0900)]
[SCSI] scsi_debug: support large non-fake virtual disk

Currently, the maximum amount of RAM that scsi_debug can allocate is
4GB. This patch increases it to 2TB; scsi_debug can allocates 2TB
memory and export it as if it were 2TB scsi disk.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_debug: remove the duplicated code in resp_read and resp_write
FUJITA Tomonori [Sat, 29 Mar 2008 15:59:56 +0000 (00:59 +0900)]
[SCSI] scsi_debug: remove the duplicated code in resp_read and resp_write

resp_read and resp_write performs READ_* and WRITE_* commands
respectively. This sweeps up the similar code in them.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_debug: sweep up sdebug_capacity calculation
FUJITA Tomonori [Sat, 29 Mar 2008 15:59:55 +0000 (00:59 +0900)]
[SCSI] scsi_debug: sweep up sdebug_capacity calculation

sdebug_capacity is calculated at five different places. This add a
helper function to calculate sdebug_capacity to sweep up the
duplicatated code.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_debug: remove unnecessary sdebug_store_size
FUJITA Tomonori [Sat, 29 Mar 2008 15:59:54 +0000 (00:59 +0900)]
[SCSI] scsi_debug: remove unnecessary sdebug_store_size

sdebug_store_size doesn't need to be static global. It's used at
startup only.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] hosts.c: removed one unneeded shost->active_mode assignment
Denis Cheng [Wed, 19 Mar 2008 19:10:20 +0000 (03:10 +0800)]
[SCSI] hosts.c: removed one unneeded shost->active_mode assignment

In the following if/else statement, shost->active_mode will always be set,
so this assignment is unneeded.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] aacraid, ips: leX_add_cpu conversion
Marcin Slusarz [Fri, 28 Mar 2008 21:48:35 +0000 (14:48 -0700)]
[SCSI] aacraid, ips: leX_add_cpu conversion

replace all:
little_endian_variable = cpu_to_leX(leX_to_cpu(little_endian_variable) +
expression_in_cpu_byteorder);
with:
leX_add_cpu(&little_endian_variable, expression_in_cpu_byteorder);
generated with semantic patch

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: "Salyzyn, Mark" <Mark_Salyzyn@adaptec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Remove obsolete erp_dbf trace
Martin Peschke [Thu, 27 Mar 2008 13:22:05 +0000 (14:22 +0100)]
[SCSI] zfcp: Remove obsolete erp_dbf trace

This patch removes the now obsolete erp_dbf trace.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Add trace records for recovery actions.
Martin Peschke [Thu, 27 Mar 2008 13:22:04 +0000 (14:22 +0100)]
[SCSI] zfcp: Add trace records for recovery actions.

This patch writes trace records for various phases of a recovery action:
action being created, action being processed, action continueing
asynchronously, action gone, action timed out, action dismissed etc.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Trace all triggers of error recovery activity
Martin Peschke [Thu, 27 Mar 2008 13:22:03 +0000 (14:22 +0100)]
[SCSI] zfcp: Trace all triggers of error recovery activity

This patch allows any recovery event to be traced back to an exact
cause, e.g. a particular request identified by an id (address).

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Add traces for state changes.
Martin Peschke [Thu, 27 Mar 2008 13:22:02 +0000 (14:22 +0100)]
[SCSI] zfcp: Add traces for state changes.

This patch writes a trace record which provides information about state
changes for adapters, ports and units, e.g. target failure, targets becoming
online, targets being temporarily blocked due to pending recovery, targets
which have been recovered successfully etc.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Add trace records for recovery thread and its queues
Martin Peschke [Thu, 27 Mar 2008 13:22:01 +0000 (14:22 +0100)]
[SCSI] zfcp: Add trace records for recovery thread and its queues

This patch writes trace records which provide information about the
operation of the zfcp error recovery thread and the queues it works
on.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Register new recovery trace.
Martin Peschke [Thu, 27 Mar 2008 13:22:00 +0000 (14:22 +0100)]
[SCSI] zfcp: Register new recovery trace.

This patch registers the new recovery trace with the s390 debug
feature.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Introduce printf helper functions for debug trace.
Martin Peschke [Thu, 27 Mar 2008 13:21:59 +0000 (14:21 +0100)]
[SCSI] zfcp: Introduce printf helper functions for debug trace.

Introducing helper functions that allow for code simpfifications.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Add qtcb dump to hba debug trace
Martin Peschke [Thu, 27 Mar 2008 13:21:58 +0000 (14:21 +0100)]
[SCSI] zfcp: Add qtcb dump to hba debug trace

This patch adds per request hardware debugging data to the trace
record which is written per request. It's a replacement for some sad
kernel message based debugging code. Considering the amount of trace
data, printk() is not suitable for this stuff. Writing binary traces
is more efficient. In addition we got all information in one place.

The QTCB trace data is only dumped for requests other than SCSI
requests.  Otherwise we would flood the trace ring buffer. We are
mostly interested in non-SCSI, recovery related requests here anyway.

This patch also works around a known hardware bug. It truncates QTCB
traces so that we do not save unused areas of the hardware trace.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Remove qtcb dump to kernel log
Martin Peschke [Thu, 27 Mar 2008 13:21:57 +0000 (14:21 +0100)]
[SCSI] zfcp: Remove qtcb dump to kernel log

Is not appropriate to printk() tons of hardware trace data.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Clean up _zfcp_san_dbf_event_common_els
Martin Peschke [Thu, 27 Mar 2008 13:21:56 +0000 (14:21 +0100)]
[SCSI] zfcp: Clean up _zfcp_san_dbf_event_common_els

Clean up _zfcp_san_dbf_event_common_els using zfcp_dbf_hexdump()
helper.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Introduce a helper function that dumps hex data to a zfcp trace.
Martin Peschke [Thu, 27 Mar 2008 13:21:55 +0000 (14:21 +0100)]
[SCSI] zfcp: Introduce a helper function that dumps hex data to a zfcp trace.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_debug: fix lba and data length calculation bugs
FUJITA Tomonori [Tue, 25 Mar 2008 08:04:46 +0000 (17:04 +0900)]
[SCSI] scsi_debug: fix lba and data length calculation bugs

For example, `modprobe scsi_debug virtual_gb=1100` gives:

scsi7 : scsi_debug, version 1.81 [20070104], dev_size_mb=8, opts=0x0
scsi 7:0:0:0: Direct-Access     Linux    scsi_debug       0004 PQ: 0 ANSI: 5
sd 7:0:0:0: [sdc] 2306867200 512-byte hardware sectors (1181116 MB)
sd 7:0:0:0: [sdc] Write Protect is off
sd 7:0:0:0: [sdc] Mode Sense: 73 00 10 08
sd 7:0:0:0: [sdc] Write cache: enabled, read cache: enabled, supports DPO and FUA
sd 7:0:0:0: [sdc] 2306867200 512-byte hardware sectors (1181116 MB)
sd 7:0:0:0: [sdc] Write Protect is off
sd 7:0:0:0: [sdc] Mode Sense: 73 00 10 08
sd 7:0:0:0: [sdc] Write cache: enabled, read cache: enabled, supports DPO and FUA
 sdc: unknown partition table
sd 7:0:0:0: [sdc] Attached SCSI disk
sd 7:0:0:0: Attached scsi generic sg6 type 0
end_request: I/O error, dev sdc, sector 2306867072
Buffer I/O error on device sdc, logical block 288358384
end_request: I/O error, dev sdc, sector 2306867072
Buffer I/O error on device sdc, logical block 288358384
end_request: I/O error, dev sdc, sector 2306867192

(snip)

Note that this converts all the calculations (including the correct
calculations) for unification.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] mpt fusion: fix up msi_enable in mpt_suspend
James Bottomley [Sun, 30 Mar 2008 16:38:07 +0000 (11:38 -0500)]
[SCSI] mpt fusion: fix up msi_enable in mpt_suspend

There's a problem with the combination of the upstream power
management fixes and the enabling of MSI by default in that the
suspend path still uses the global variable.  Convert it to check
ioc->msi_enable.

Cc: "Moore, Eric" <Eric.Moore@lsi.com>
Cc: "Prakash, Sathya" <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] ps3rom: use scsi_build_sense_buffer
FUJITA Tomonori [Tue, 25 Mar 2008 00:26:53 +0000 (09:26 +0900)]
[SCSI] ps3rom: use scsi_build_sense_buffer

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] stex: use scsi_build_sense_buffer
FUJITA Tomonori [Tue, 25 Mar 2008 00:26:52 +0000 (09:26 +0900)]
[SCSI] stex: use scsi_build_sense_buffer

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] libata: use scsi_build_sense_buffer
FUJITA Tomonori [Tue, 25 Mar 2008 00:26:51 +0000 (09:26 +0900)]
[SCSI] libata: use scsi_build_sense_buffer

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_debug: use scsi_build_sense_buffer
FUJITA Tomonori [Tue, 25 Mar 2008 00:26:50 +0000 (09:26 +0900)]
[SCSI] scsi_debug: use scsi_build_sense_buffer

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] add scsi_build_sense_buffer helper function
FUJITA Tomonori [Tue, 25 Mar 2008 00:26:49 +0000 (09:26 +0900)]
[SCSI] add scsi_build_sense_buffer helper function

This adds scsi_build_sense_buffer, a simple helper function to build
sense data in a buffer.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] WD33C93: let platform stub override no_sync/fast/dma_mode
Thomas Bogendoerfer [Fri, 21 Mar 2008 21:25:43 +0000 (22:25 +0100)]
[SCSI] WD33C93: let platform stub override no_sync/fast/dma_mode

SGI machines with WD33C93 allow usage of burst mode DMA, which increases
performance noticable. To make this selectable by the sgiwd93 stub,
setting the values for no_sync, fast and dma_mode has been moved to the
individual platform stubs.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] mptsas: do not use ioc->handle to locate hba portinfo structure
Michael Reed [Thu, 20 Mar 2008 22:32:05 +0000 (17:32 -0500)]
[SCSI] mptsas: do not use ioc->handle to locate hba portinfo structure

While performing hardware raid reset testing via the raid's client, I
noticed that sometimes, following the reset, that there would be more
raid targets in the lsscsi output than there actually were raid
targets.  I tracked this down to the following issue.

Fusion cannot always find the mptsas_portinfo structure for the hba
because it uses the handle stored in ioc->handle to locate it.  The
problem is that the firmware can change the handle associated with the
hba when h/w raid is reset (via the raid client).  When this happens,
the driver will allocate another mptsas_portinfo structure and link it
into the chain of said structures.  This ultimately causes confusion
within the driver resulting in targets not being removed when they
should be.

Eric Moore pointed out that the hba's portinfo structure is always the
first structure on the sas_topology list.  This patch modifies
mptsas.c to access the hba's portinfo structure by taking the first
structure on said list.

Signed-off-by: Michael Reed <mdr@sgi.com>
Acked-by: "Moore, Eric" <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla4xxx: fix scsi command completion, lun reset and target reset code
David C Somayajulu [Wed, 19 Mar 2008 18:23:03 +0000 (11:23 -0700)]
[SCSI] qla4xxx: fix scsi command completion, lun reset and target reset code

This patch contains the following:

1. when hba completion status is good, check for iscsi transport
   errors (underflow/overflow) prior to checking the scsi status

2. New firmware requires that one marker iocb be issued for each task
   management command. The patch issues marker iocb immediately
   following a LUN or Target reset.

Signed-off-by: David C Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] megaraid_sas: Add the new controller(1078DE) support to the driver
bo yang [Mon, 17 Mar 2008 08:13:07 +0000 (04:13 -0400)]
[SCSI] megaraid_sas: Add the new controller(1078DE) support to the driver

Add the new Controller (ID: 007C) support to driver.

Signed-off-by Bo Yang<bo.yang@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] megaraid_sas: Fix the frame count calculation
bo yang [Mon, 17 Mar 2008 07:36:43 +0000 (03:36 -0400)]
[SCSI] megaraid_sas: Fix the frame count calculation

When Driver sent wrong frame count to firmware.  As this particular
command is sent to drive, FW is seeing continuous chip resets and so
the command will timeout.

Signed-off-by Bo Yang<bo.yang@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] megaraid_sas: rollback the sense info implementation
bo yang [Tue, 18 Mar 2008 07:13:06 +0000 (03:13 -0400)]
[SCSI] megaraid_sas: rollback the sense info implementation

Sense buffer ptr data type in the ioctl path is reverted back to u32 *
as in previous versions of driver.

Signed-off-by Bo Yang<bo.yang@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] 3w-9xxx, 3w-xxxx: memset not needed in probe
Denis Cheng [Tue, 4 Mar 2008 23:24:23 +0000 (15:24 -0800)]
[SCSI] 3w-9xxx, 3w-xxxx: memset not needed in probe

The memory return from scsi_host_alloc is alloced by kzalloc, which is
already zero initilized, so memset not needed.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Cc: Adam Radford <linuxraid@amcc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] aic7xxx: Test opcode, not definition in aicasm:type_check()
Roel Kluin [Mon, 28 Jan 2008 13:09:54 +0000 (14:09 +0100)]
[SCSI] aic7xxx: Test opcode, not definition in aicasm:type_check()

This fixes a bug that we treat all sequencer operations as ands and
never do the additional invalid bit checks non-and operations require
because the if () to determine this has an operand which is always
true at the end of the or statement.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_debug: remove unnecessary function declarations
FUJITA Tomonori [Thu, 20 Mar 2008 02:09:19 +0000 (11:09 +0900)]
[SCSI] scsi_debug: remove unnecessary function declarations

This patch removes lots of function declarations with moving
scsi_debug_queuecommand. This cleans up scsi_debug_queuecommand a bit
to silence checkpatch.pl

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_debug: use list_for_each_entry_safe
FUJITA Tomonori [Thu, 20 Mar 2008 02:09:18 +0000 (11:09 +0900)]
[SCSI] scsi_debug: use list_for_each_entry_safe

This replaces list_for_each_safe and list_entry with
list_for_each_entry_safe.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_debug: remove unnecessary condition test in devInfoReg
FUJITA Tomonori [Thu, 20 Mar 2008 02:09:17 +0000 (11:09 +0900)]
[SCSI] scsi_debug: remove unnecessary condition test in devInfoReg

open_devip is always non NULL.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_debug: create new scsi_debug devices at a single place
FUJITA Tomonori [Thu, 20 Mar 2008 02:09:16 +0000 (11:09 +0900)]
[SCSI] scsi_debug: create new scsi_debug devices at a single place

Two functions, sdebug_add_adapter and devInfoReg, creates new
scsi_debug devices. To simplify the code, this patch adds a new helper
function to create new scsi_debug devices (sdebug_device_create) and
converts both functions to use it.

I plan to add more to scsi_debug devices (e.g. using a thread for a
scsi_debug device for scalability testings). This patch enable me to
add such to just the new helper function instead of touching two
functions, sdebug_add_adapter and devInfoReg.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_debug: remove temporary hack around sscanf for negative values
FUJITA Tomonori [Thu, 20 Mar 2008 02:09:15 +0000 (11:09 +0900)]
[SCSI] scsi_debug: remove temporary hack around sscanf for negative values

sscanf can handle negative values.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] export command allocation and freeing functions independently of the host
James Bottomley [Thu, 13 Mar 2008 16:19:36 +0000 (11:19 -0500)]
[SCSI] export command allocation and freeing functions independently of the host

This is needed by things like USB storage that want to set up static
commands for later use at start of day.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] consolidate command allocation in a single place
James Bottomley [Thu, 13 Mar 2008 16:16:33 +0000 (11:16 -0500)]
[SCSI] consolidate command allocation in a single place

Since the way we allocate commands with a separate sense buffer is
getting complicated, we should isolate setup and teardown to a single
routine so that if it gets even more complex, there's only one place
in the code that needs to be altered.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] 3w-9xxx: use sg buffer copy helper functions
FUJITA Tomonori [Sun, 9 Mar 2008 04:44:37 +0000 (13:44 +0900)]
[SCSI] 3w-9xxx: use sg buffer copy helper functions

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Adam Radford <linuxraid@amcc.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] 3w-xxxx: use sg buffer copy helper functions
FUJITA Tomonori [Sun, 9 Mar 2008 04:44:36 +0000 (13:44 +0900)]
[SCSI] 3w-xxxx: use sg buffer copy helper functions

This rewrites tw_transfer_internal with scsi_sg_copy_from/to_buffer.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Adam Radford <linuxraid@amcc.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] stex: use sg buffer copy helper functions
FUJITA Tomonori [Sun, 9 Mar 2008 04:44:35 +0000 (13:44 +0900)]
[SCSI] stex: use sg buffer copy helper functions

This replaces stex_internal_copy with scsi_sg_copy_to/from_buffer.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] aacraid: use sg buffer copy helper functions
FUJITA Tomonori [Sun, 9 Mar 2008 04:44:34 +0000 (13:44 +0900)]
[SCSI] aacraid: use sg buffer copy helper functions

This replaces aac_internal_transfer with scsi_sg_copy_to/from_buffer.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Mark Salyzyn <Mark_Salyzyn@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] ips: use sg buffer copy helper funcitons
FUJITA Tomonori [Sun, 9 Mar 2008 04:44:33 +0000 (13:44 +0900)]
[SCSI] ips: use sg buffer copy helper funcitons

This rewrites ips_scmd_buf_write/read with scsi_sg_copy_from/to_buffer
respectively.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Salyzyn, Mark <Mark_Salyzyn@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] simscsi: use sg buffer copy helper funcitons
FUJITA Tomonori [Sun, 9 Mar 2008 04:44:32 +0000 (13:44 +0900)]
[SCSI] simscsi: use sg buffer copy helper funcitons

This replaces simscsi_fillresult with scsi_sg_copy_from_buffer.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] ps3rom: use sg buffer copy helper funcitons
FUJITA Tomonori [Sun, 9 Mar 2008 04:44:31 +0000 (13:44 +0900)]
[SCSI] ps3rom: use sg buffer copy helper funcitons

Note that if scsi_bufflen(cmd) is not zero, the command always has an
sg list. So this patch doesn't do the error checking in
fill_from_dev_buffer and fetch_to_dev_buffer did.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Looks-OK-to: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_debug: use sg buffer copy helper functions
FUJITA Tomonori [Sun, 9 Mar 2008 04:44:30 +0000 (13:44 +0900)]
[SCSI] scsi_debug: use sg buffer copy helper functions

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi: add wrapper functions for sg buffer copy helper functions
FUJITA Tomonori [Sun, 9 Mar 2008 04:44:29 +0000 (13:44 +0900)]
[SCSI] scsi: add wrapper functions for sg buffer copy helper functions

LLDs need to copies data between the SG table in struct scsi_cmnd and
liner buffer. So they use the helper functions like

sg_copy_from_buffer(scsi_sglist(sc), scsi_sg_count(sc), buf, buflen)
sg_copy_to_buffer(scsi_sglist(sc), scsi_sg_count(sc), buf, buflen)

This patch just adds wrapper functions:

scsi_sg_copy_from_buffer(sc, buf, buflen)
scsi_sg_copy_to_buffer(sc, buf, buflen)

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] block: add sg buffer copy helper functions
FUJITA Tomonori [Mon, 17 Mar 2008 15:15:03 +0000 (00:15 +0900)]
[SCSI] block: add sg buffer copy helper functions

This patch adds new three helper functions to copy data between an SG
list and a linear buffer.

- sg_copy_from_buffer copies data from linear buffer to an SG list

- sg_copy_to_buffer copies data from an SG list to a linear buffer

When the APIs copy data from a linear buffer to an SG list,
flush_kernel_dcache_page is called. It's not necessary for everyone
but it's a no-op on most architectures and in general the API is not
used in performance critical path.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] BusLogic: make FlashPoint support x86-32 only
Matthew Wilcox [Thu, 13 Mar 2008 12:55:08 +0000 (06:55 -0600)]
[SCSI] BusLogic: make FlashPoint support x86-32 only

We've verified that there are 64 bit and endianness problems in the
flashpoint driver.  Reverse the logic of CONFIG_OMIT_FLASHPOINT (make
it CONFIG_SCSI_FLASHPOINT) and make it depend on X86_32 so it can't
appear for any other architectures.  Long term, if someone chooses,
they could make FlashPoint 64 bit compliant (it looks like its a
question of fixing up the sizes in some of the packed descriptors)

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Fix handling for boxed port after physical close
Christof Schmitt [Mon, 10 Mar 2008 15:18:54 +0000 (16:18 +0100)]
[SCSI] zfcp: Fix handling for boxed port after physical close

When a FSF physical close returns the status boxed, this means that
another system already closed the port. For our system this is the
same status as in the good path, we have to send the normal close. So,
set the status for the boxed response to the same as for the good
status.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] aic79xx: fix IOMMU mapping failure handling
FUJITA Tomonori [Sun, 9 Mar 2008 13:50:40 +0000 (22:50 +0900)]
[SCSI] aic79xx: fix IOMMU mapping failure handling

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] aic7xxx: fix IOMMU mapping failure handling
FUJITA Tomonori [Sun, 9 Mar 2008 13:50:41 +0000 (22:50 +0900)]
[SCSI] aic7xxx: fix IOMMU mapping failure handling

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] mpt fusion: convert inactive_list_mutex to a mutex
Matthias Kaehlcke [Sun, 9 Mar 2008 11:16:27 +0000 (12:16 +0100)]
[SCSI] mpt fusion: convert inactive_list_mutex to a mutex

the semaphore inactive_list_mutex is used as a mutex, convert it to
the mutex API

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Acked-by: "Moore, Eric" <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] mpt fusion: Enable MSI by default for SAS controllers
Prakash, Sathya [Fri, 7 Mar 2008 10:23:21 +0000 (15:53 +0530)]
[SCSI] mpt fusion: Enable MSI by default for SAS controllers

This patch modifies the driver to enable MSI by default for all SAS chips.

Signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: convert zfcp to use target reset and device reset handler
Christof Schmitt [Mon, 3 Mar 2008 11:19:28 +0000 (12:19 +0100)]
[SCSI] zfcp: convert zfcp to use target reset and device reset handler

[based on proposal from Mike Christie <michaelc@cs.wisc.edu>, this
patch adds some simplifications to the handler functions]

With the new target reset handler callback in the SCSI midlayer, the
device reset handler in zfcp can be split in two parts. Now, zfcp does
not have to track anymore whether the device supports LUN resets, so
remove this flag and let the SCSI midlayer decide what to do.

The device reset handler simply issues a LUN reset and the target
reset handler a target reset.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla4xxx: Add target reset functionality
Mike Christie [Sat, 1 Mar 2008 00:25:20 +0000 (18:25 -0600)]
[SCSI] qla4xxx: Add target reset functionality

This patch adds target reset functionalty.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_error: add target reset handler
Mike Christie [Sat, 1 Mar 2008 00:25:19 +0000 (18:25 -0600)]
[SCSI] scsi_error: add target reset handler

The problem is that serveral drivers are sending a target reset from the
device reset handler, and if we have multiple devices a target reset gets
sent for each device when only one would be sufficient. And if we do a target
reset it affects all the commands on the target so the device reset handler
code only cleaning up one devices's commands makes programming the driver a
little more difficult than it should be.

This patch adds a target reset handler, which drivers can use to send
a target reset. If successful it cleans up the commands for a devices
accessed through that starget.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] ps3rom: Simplify fill_from_dev_buffer()
Geert Uytterhoeven [Mon, 25 Feb 2008 13:24:31 +0000 (14:24 +0100)]
[SCSI] ps3rom: Simplify fill_from_dev_buffer()

As we no longer need to calculate the data length of the whole scatterlist,
we can abort the loop earlier and coalesce req_len and act_len into one
variable, making fill_from_dev_buffer() more similar to fetch_to_dev_buffer().

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_debug: use shost_priv macro
FUJITA Tomonori [Sun, 2 Mar 2008 09:30:18 +0000 (18:30 +0900)]
[SCSI] scsi_debug: use shost_priv macro

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_debug: remove unnecessary checking
FUJITA Tomonori [Sun, 2 Mar 2008 09:30:17 +0000 (18:30 +0900)]
[SCSI] scsi_debug: remove unnecessary checking

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_debug: remove scsi_debug.h
FUJITA Tomonori [Sun, 2 Mar 2008 09:30:16 +0000 (18:30 +0900)]
[SCSI] scsi_debug: remove scsi_debug.h

scsi_debug.h just incldues some function declarations. This patch removes it
with moving the scsi_host_template.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_debug: stop including drivers/scsi/scsi.h
FUJITA Tomonori [Sun, 2 Mar 2008 09:30:15 +0000 (18:30 +0900)]
[SCSI] scsi_debug: stop including drivers/scsi/scsi.h

This converts scsi_debug to include header files in include/scsi/
instead of drivers/scsi/scsi.h.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] Remove random noop unchecked_isa_dma users
Andi Kleen [Sun, 24 Feb 2008 23:35:21 +0000 (00:35 +0100)]
[SCSI] Remove random noop unchecked_isa_dma users

Lots of drivers set it to 0. Remove that. Patch should be a nop.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] aacraid: READ_CAPACITY_16 shouldn't trust allocation length in cdb
FUJITA Tomonori [Sun, 24 Feb 2008 23:25:23 +0000 (15:25 -0800)]
[SCSI] aacraid: READ_CAPACITY_16 shouldn't trust allocation length in cdb

When aacraid spoofs READ_CAPACITY_16, it assumes that the data length
in the sg list is equal to allocation length in cdb. But sg can put
any value in scb so the driver needs to check both the data length in
the sg list and allocation length in cdb.

If allocation length is larger than the response length that the
driver expects, it clears the data buffer in the sg list to zero but
it doesn't need to do. Just setting resid is fine.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Mark Salyzyn <Mark_Salyzyn@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>