[go: nahoru, domu]

History log of /drivers/scsi/qla1280.c
Revision Date Author Comments
c5f9ee3d665a7660b296aa1e91949ae3376f0d07 25-Feb-2014 H. Peter Anvin <hpa@linux.intel.com> x86, platforms: Remove SGI Visual Workstation

The SGI Visual Workstation seems to be dead; remove support so we
don't have to continue maintaining it.

Cc: Andrey Panin <pazke@donpac.ru>
Cc: Michael Reed <mdr@sgi.com>
Link: http://lkml.kernel.org/r/530CFD6C.7040705@zytor.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
762a86a901417280b2af9e2004f05d7481f30441 29-Nov-2013 Meelis Roos <mroos@linux.ee> [SCSI] qla1280: Annotate timer on stack so object debug does not complain

Object Debug option in 3.13-rc1 resultsin the following warning, cure
it by annotating the timer to be on stack. The timer is deleted in the
same function so stack seems OK.

ODEBUG: object is on stack, but not annotated
------------[ cut here ]------------
WARNING: CPU: 6 PID: 18 at lib/debugobjects.c:300 __debug_object_init+0x184/0x240()
Modules linked in:
CPU: 6 PID: 18 Comm: kworker/u4:1 Tainted: G W 3.13.0-rc1 #16
Workqueue: events_unbound async_run_entry_fn
Call Trace:
[00000000004585cc] warn_slowpath_common+0x4c/0x80
[0000000000458614] warn_slowpath_null+0x14/0x40
[000000000063d524] __debug_object_init+0x184/0x240
[000000000063d5fc] debug_object_init+0x1c/0x40
[00000000004645ec] init_timer_key+0xc/0x60
[00000000006cca60] qla1280_mailbox_command+0xc0/0x2a0
[00000000006ccdd4] qla1280_set_target_parameters+0x194/0x220
[00000000006cd324] qla1280_slave_configure+0x384/0x3c0
[00000000006a5d48] scsi_add_lun+0x5c8/0x640
[00000000006a62b8] scsi_probe_and_add_lun+0x1b8/0x2e0
[00000000006a6c2c] __scsi_scan_target+0x8c/0x100
[00000000006a6cf4] scsi_scan_channel+0x54/0xa0
[00000000006a7008] scsi_scan_host_selected+0xc8/0x120
[00000000006a70e0] do_scsi_scan_host+0x80/0xa0
[00000000006a7164] do_scan_async+0x4/0x20
[00000000004817b8] async_run_entry_fn+0x58/0x120
---[ end trace 9a1420108ebfd590 ]---

Signed-off-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
6f039790510fd630ff348efe8c4802dbaa041fba 21-Dec-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org> Drivers: scsi: remove __dev* attributes.

CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.

This change removes the use of __devinit, __devexit_p, __devinitdata,
__devinitconst, and __devexit from these drivers.

Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Adam Radford <linuxraid@lsi.com>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
90449e5dee4800721a352af11ae4d65d4a56ba93 09-Apr-2012 Jesper Juhl <jj@chaosbits.net> qla1280: Remove redundant NULL check before release_firmware() call

release_firmware() checks for NULL pointers internally so checking
before calling the function is redundant.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
9ffc93f203c18a70623f21950f1dd473c9ec48cd 28-Mar-2012 David Howells <dhowells@redhat.com> Remove all #inclusions of asm/system.h

Remove all #inclusions of asm/system.h preparatory to splitting and killing
it. Performed with the following command:

perl -p -i -e 's!^#\s*include\s*<asm/system[.]h>.*\n!!' `grep -Irl '^#\s*include\s*<asm/system[.]h>' *`

Signed-off-by: David Howells <dhowells@redhat.com>
5cd049a59913f359e7d30c11d2dc6187822e77b1 04-Apr-2011 Christoph Hellwig <hch@infradead.org> [SCSI] remove cmd->serial_number litter

Stop using cmd->serial_number in printks.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
25985edcedea6396277003854657b5f3cb31a628 31-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi> Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
f281233d3eba15fb225d21ae2e228fd4553d824a 16-Nov-2010 Jeff Garzik <jeff@garzik.org> SCSI host lock push-down

Move the mid-layer's ->queuecommand() invocation from being locked
with the host lock to being unlocked to facilitate speeding up the
critical path for drivers who don't need this lock taken anyway.

The patch below presents a simple SCSI host lock push-down as an
equivalent transformation. No locking or other behavior should change
with this patch. All existing bugs and locking orders are preserved.

Additionally, add one parameter to queuecommand,
struct Scsi_Host *
and remove one parameter from queuecommand,
void (*done)(struct scsi_cmnd *)

Scsi_Host* is a convenient pointer that most host drivers need anyway,
and 'done' is redundant to struct scsi_cmnd->scsi_done.

Minimal code disturbance was attempted with this change. Most drivers
needed only two one-line modifications for their host lock push-down.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Acked-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
421e33d0045ac0aa119c033b78742e0fbf4c3b21 23-Mar-2010 Michael Reed <mdr@sgi.com> [SCSI] qla1280: retain firmware for error recovery

The qla1280 driver acquires its firmware via udev. During boot the firmware
is located in the initrd. If, after root is mounted, the adapter needs to
reload firmware (host reset), the firmware load may fail if the root device
is on the adapter being reset. This patch modifies qla1280 to retain the
firmware loaded via the initial request_firmware() for use during error
recovery.

[jejb: fix up checkpatch issues]
Signed-off-by: Michael Reed <mdr@sgi.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2cec802980727f1daa46d8c31b411e083d49d7a2 23-Jan-2010 Ben Hutchings <ben@decadent.org.uk> [SCSI] qla1280: Drop host_lock while requesting firmware

request_firmware() may sleep and it appears to be safe to release the
spinlock here.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
413e6e18b483de272bdafa56e5c086c75f11d681 08-Apr-2009 Michael Reed <mdr@sgi.com> [SCSI] qla1280: error recovery rewrite

The driver now waits for the scsi commands associated with a
particular error recovery step to be returned to the mid-layer,
and returns the appropriate SUCCESS or FAILED status. Removes
unneeded polling of chip for interrupts.

This patch also bumps the driver version number.

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
fd65e5e93cbd9d2f34bbb0f0b2f46a30a1d20915 08-Apr-2009 Michael Reed <mdr@sgi.com> [SCSI] qla1280: driver clean up

Remove some unneeded, inactive and unused code, make some trivial
corrections to comments and a printk, and return a proper status
in qla1280_queuecommand. No fundamental logic changes are made.

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
0ce49d6da993adf8b17b7f3ed9805ade14a6a6f3 08-Apr-2009 David Woodhouse <David.Woodhouse@intel.com> qla1280: Fix off-by-some error in firmware loading.

We were calculating the wrong address for the start of the data.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Tested-by: Jeremy Higdon <jeremy@sgi.com>
284901a90a9e0b812ca3f5f852cbbfb60d10249d 07-Apr-2009 Yang Hongyang <yanghy@cn.fujitsu.com> dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)

Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
6a35528a8346f6e6fd32ed7e51f04d1fa4ca2c01 07-Apr-2009 Yang Hongyang <yanghy@cn.fujitsu.com> dma-mapping: replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)

Replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1bfa11db712cbf4af1ae037cd25fd4f781f0c215 02-Apr-2009 Jaswinder Singh Rajput <jaswinderrajput@gmail.com> [SCSI] qla1280: use request_firmware

Firmware blob is little endian looks like this...
unsigned char Version1
unsigned char Version2
unsigned char Version3
unsigned char Padding
unsigned short start_address
unsigned short data

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
c3af1715928ce07300595b9e050728787f6a1718 03-Jan-2009 Nick Andrew <nick@nick-andrew.net> trivial: Fix misspelling of "firmware" in qla1280.c

Fix misspelling of "firmware" in qla1280.c

It's spelled "firmware".

Signed-off-by: Nick Andrew <nick@nick-andrew.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
25729a7fb88ef2912fcb869abe3a76b3be07fc06 29-Sep-2008 Arjan van de Ven <arjan@linux.intel.com> [SCSI] advansys, arcmsr, ipr, nsp32, qla1280, stex: use pci_ioremap_bar()

Use the newly introduced pci_ioremap_bar() function in drivers/scsi.
pci_ioremap_bar() just takes a pci device and a bar number, with the goal
of making it really hard to get wrong, while also having a central place
to stick sanity checks.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Matthew Wilcox <willy@linux.intel.com>
Cc: Brian King <brking@us.ibm.com>
Cc: Ed Lin <ed.lin@promise.com>
Cc: Nick Cheng <nick.cheng@areca.com.tw>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
242f9dcb8ba6f68fcd217a119a7648a4f69290e9 14-Sep-2008 Jens Axboe <jens.axboe@oracle.com> block: unify request timeout handling

Right now SCSI and others do their own command timeout handling.
Move those bits to the block layer.

Instead of having a timer per command, we try to be a bit more clever
and simply have one per-queue. This avoids the overhead of having to
tear down and setup a timer for each command, so it will result in a lot
less timer fiddling.

Signed-off-by: Mike Anderson <andmike@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
cadbd4a5e36dde7e6c49b587b2c419103c0b7218 04-Jul-2008 Harvey Harrison <harvey.harrison@gmail.com> [SCSI] replace __FUNCTION__ with __func__

[jejb: fixed up a ton of missed conversions.

All of you are on notice this has happened, driver trees will now
need to be rebased]

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: SCSI List <linux-scsi@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
9bcf091083065c751a4d90317b766370d2497ae9 23-May-2008 Harvey Harrison <harvey.harrison@gmail.com> scsi: fix integer as NULL pointer warning

drivers/scsi/aha152x.c:3585:60: warning: Using plain integer as NULL pointer
drivers/scsi/aha152x.c:3845:56: warning: Using plain integer as NULL pointer
drivers/scsi/qla1280.c:2814:37: warning: Using plain integer as NULL pointer
drivers/scsi/atp870u.c:750:47: warning: Using plain integer as NULL pointer
drivers/scsi/3w-9xxx.c:1281:36: warning: Using plain integer as NULL pointer
drivers/scsi/3w-9xxx.c:1293:36: warning: Using plain integer as NULL pointer
drivers/scsi/3w-9xxx.c:1301:35: warning: Using plain integer as NULL pointer
drivers/scsi/hptiop.c:447:10: warning: Using plain integer as NULL pointer
drivers/scsi/hptiop.c:457:10: warning: Using plain integer as NULL pointer
drivers/scsi/hptiop.c:479:24: warning: Using plain integer as NULL pointer
drivers/scsi/hptiop.c:483:22: warning: Using plain integer as NULL pointer
drivers/scsi/hptiop.c:1213:23: warning: Using plain integer as NULL pointer
drivers/scsi/hptiop.c:1214:23: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
af5741c6de4f4a1d8608b0f00867c77cb7123635 12-May-2008 Jeremy Higdon <jeremy@sgi.com> [SCSI] qla1280: Fix queue depth problem

The qla1280 driver was ANDing the output value of mailbox register
0 with (1 << target-number) to determine whether to enable queueing
on the target in question.

But mailbox register 0 has the status code for the mailbox command
(in this case, Set Target Parameters). Potential values are:
/*
* ISP mailbox command complete status codes
*/

So clearly that is in error. I can't think what the author of that
line was looking for in a mailbox register, so I just eliminated the
AND. flag is used later in the function, and I think that the later
usage was also wrong, though it was used to set values that aren't
used. Oh well, an overhaul of this driver is not what I want to do
now -- just a bugfix.

After the fix, I found that my disks were getting a queue depth of
255, which is far too many. Most SCSI disks are limited to 32 or
64. In any case, there's no point, queueing up a bunch of commands
to the adapter that will just result in queue full or starve other
targets from being issued commands due to running out of internal
memory. So I dropped default queue depth to 32 (from which 1 is
subtracted elsewhere, giving net of 31).

I tested with a Seagate ST336753LC, and results look good, so
I'm satisfied with this patch.

Signed-off-by: Jeremy Higdon <jeremy@sgi.com>
Acked-by: Jes Sorensen <jes@sgi.com>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
64a87b244b9297667ca80264aab849a36f494884 30-Apr-2008 Boaz Harrosh <bharrosh@panasas.com> [SCSI] Let scsi_cmnd->cmnd use request->cmd buffer

- struct scsi_cmnd had a 16 bytes command buffer of its own.
This is an unnecessary duplication and copy of request's
cmd. It is probably left overs from the time that scsi_cmnd
could function without a request attached. So clean that up.

- Once above is done, few places, apart from scsi-ml, needed
adjustments due to changing the data type of scsi_cmnd->cmnd.

- Lots of drivers still use MAX_COMMAND_SIZE. So I have left
that #define but equate it to BLK_MAX_CDB. The way I see it
and is reflected in the patch below is.
MAX_COMMAND_SIZE - means: The longest fixed-length (*) SCSI CDB
as per the SCSI standard and is not related
to the implementation.
BLK_MAX_CDB. - The allocated space at the request level

- I have audit all ISA drivers and made sure none use ->cmnd in a DMA
Operation. Same audit was done by Andi Kleen.

(*)fixed-length here means commands that their size can be determined
by their opcode and the CDB does not carry a length specifier, (unlike
the VARIABLE_LENGTH_CMD(0x7f) command). This is actually not exactly
true and the SCSI standard also defines extended commands and
vendor specific commands that can be bigger than 16 bytes. The kernel
will support these using the same infrastructure used for VARLEN CDB's.
So in effect MAX_COMMAND_SIZE means the maximum size command
scsi-ml supports without specifying a cmd_len by ULD's

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
0e4ff797d7f2f2bb860b8f31dc5d1f2273b2f05a 16-Apr-2008 Adrian Bunk <bunk@kernel.org> [SCSI] qla1280: remove version check

There's no point for an in-kernel driver to check whether it's compiled
under kernel < 2.6.0 .

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Jes Sorensen <jes@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
d3f46f39b7092594b498abc12f0c73b0b9913bde 15-Jan-2008 James Bottomley <James.Bottomley@HansenPartnership.com> [SCSI] remove use_sg_chaining

With the sg table code, every SCSI driver is now either chain capable
or broken (or has sg_tablesize set so chaining is never activated), so
there's no need to have a check in the host template.

Also tidy up the code by moving the scatterlist size defines into the
SCSI includes and permit the last entry of the scatterlist pools not
to be a power of two.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
b80ca4f7ee36c26d300c5a8f429e73372d153379 13-Jan-2008 FUJITA Tomonori <tomof@acm.org> [SCSI] replace sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE

This replaces sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE in
several LLDs. It's a preparation for the future changes to remove
sense_buffer array in scsi_cmnd structure.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
3a43e69ce50d467ded2f17f6e571e831d3677ab5 08-Jan-2008 FUJITA Tomonori <tomof@acm.org> [SCSI] qla1280: fix 32 bit segment code

There's an error remaining in the 32 bit descriptor code after the
conversion to dma accessors: req_cnt is left uninitialised.

qla1280_32bit_start_scsi gives the following warnings:

drivers/scsi/qla1280.c: In function 'qla1280_32bit_start_scsi':
drivers/scsi/qla1280.c:3044: warning: unused variable 'dma_handle'
drivers/scsi/qla1280.c: In function 'qla1280_queuecommand':
drivers/scsi/qla1280.c:3060: warning: 'req_cnt' is used uninitialized in this function
drivers/scsi/qla1280.c:3042: note: 'req_cnt' was declared here

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
5c1da582b3a95123ffb1e70ec7cd60e757c7c8c2 09-Nov-2007 Jes Sorensen <jes@sgi.com> [SCSI] qla1280: convert to use the data buffer accessors

- remove the unnecessary map_single path.
- convert to use the new accessors for the sg lists and the parameters.

Fixed to missing initialization of sg lists before calling
for_each_sg() by Jes Sorensen - sg list needs to be initialized before
trying to pull the elements out of it.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
eb7a1698d24783dd215cb86a12cadebe9b4e7046 03-Oct-2007 Johannes Dickgreber <tanzy@gmx.de> [SCSI] qla1280: uses wrong failure path after failed pci_set_dma_mask

A failure here wouldn't currently free the irq; go to the irq free
path instead.

Signed-off-by: Johannes Dickgreber <tanzy@gmx.de>
Acked-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
633ed113d477c1a8c77d5fe3574c410ea52f58cc 17-Sep-2007 FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> qla1280: enable use_sg_chaining option

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
c0dcffd71d5064efefa620231152c38eca8e066b 10-Sep-2007 FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> qla1280: sg chaining fixes

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
a0441891373fe2db582075a4639fdfcccea470c1 09-May-2007 Jens Axboe <jens.axboe@oracle.com> qla1280: sg chaining support

Interesting hardware setup...

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12a441622b753684cc73d1c6f225e9ac53e0bf77 19-Sep-2007 Matthew Wilcox <matthew@wil.cx> [SCSI] Remove ->pid field from scsi_cmnd

The pid field is a duplicate of the serial_number field and has been
scheduled for removal for a long time. A few drivers were still using
it, so just change them to use serial_number instead.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
b22c9d9bc214d602647c3f94e6072655c36a61db 17-Apr-2007 Matthias Kaehlcke <matthias.kaehlcke@gmail.com> [SCSI] qla1280: use DMA_64BIT_MASK instead of ~ 0ULL

QLA1280: call pci_set_dma_mask with DMA_64BIT_MASK instead of ~ 0ULL

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
cd354f1ae75e6466a7e31b727faede57a1f89ca5 14-Feb-2007 Tim Schmielau <tim@physik3.uni-rostock.de> [PATCH] remove many unneeded #includes of sched.h

After Al Viro (finally) succeeded in removing the sched.h #include in module.h
recently, it makes sense again to remove other superfluous sched.h includes.
There are quite a lot of files which include it but don't actually need
anything defined in there. Presumably these includes were once needed for
macros that used to live in sched.h, but moved to other header files in the
course of cleaning it up.

To ease the pain, this time I did not fiddle with any header files and only
removed #includes from .c-files, which tend to cause less trouble.

Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
configs in arch/arm/configs on arm. I also checked that no new warnings were
introduced by the patch (actually, some warnings are removed that were emitted
by unnecessarily included header files).

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3ef49a3b45c33b055002402f01e5da98cb773086 05-Jan-2007 Jes Sorensen <jes@sgi.com> [SCSI] qla1280: set residual correctly

Jeremy caught a bug in the qla1280 driver where it didn't set the
residual value correctly.

Signed-off-by: Jeremy Higdon <jeremy@sgi.com>
Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
cd00b7f5d814ba87b36371f122ce36ba4a88ba69 17-Oct-2006 Jes Sorensen <jes@sgi.com> [SCSI] qla1280 bus reset typo

Fix typo in check of return value of qla1280_bus_reset() which would
result in an adapter reset in addition to the bus reset.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
7d12e780e003f93433d49ce78cfedf4b4c52adc5 05-Oct-2006 David Howells <dhowells@redhat.com> IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.

(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.

(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
6e9a4738c9fadb7cbdcabc1e3b415159f3741ed9 01-Oct-2006 Peter Zijlstra <a.p.zijlstra@chello.nl> [PATCH] completions: lockdep annotate on stack completions

All on stack DECLARE_COMPLETIONs should be replaced by:
DECLARE_COMPLETION_ONSTACK

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
dcbccbde00b85b4d4a1c206b419e7a3d2ab2b1cd 26-Sep-2006 Henrik Kretzschmar <henne@nachtwindheim.de> [SCSI] pci_module_init conversion in scsi subsystem

Converts pci_module_init() to pci_register_driver() in the scsi subsys on
23 drivers which only return the value of pci_module_init().

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
15d1f53fc7654d62af7e9b23049ae3b71f5b161c 25-Sep-2006 Jes Sorensen <jes@sgi.com> [SCSI] qla1280 command timeout

Original patch from Ian Dall in bugzilla. Set command timeout as
specified by the SCSI layer rather than hardcode it to 30 seconds. I
have received a couple of reports of people hitting this one with
various tape configurations and the patch looks obviously correct.
- Jes

From http://bugzilla.kernel.org/show_bug.cgi?id=6275

ian@beware.dropbear.id.au (Ian Dall):

The command sent to the card was using a 30second timeout regardless of the
timeout requested in the scsi command passed down from higher levels.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
1d6f359a2e06296418481239f8054a878f36e819 02-Jul-2006 Thomas Gleixner <tglx@linutronix.de> [PATCH] irq-flags: scsi: Use the new IRQF_ constants

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: 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>
f58f8313a6f552d1e7889926a29f0cf91c02f55d 30-Jun-2006 Randy Dunlap <rdunlap@xenotime.net> [SCSI] qla1280: fix section mismatch warnings

Fix section mismatch warnings:
WARNING: drivers/scsi/qla1280.o - Section mismatch: reference to
.init.data: from .text between 'qla1280_get_token' (at offset 0x2a16)
and 'qla1280_probe_one'
WARNING: drivers/scsi/qla1280.o - Section mismatch: reference to
.init.data: from .text between 'qla1280_get_token' (at offset 0x2a3c)
and 'qla1280_probe_one'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
6ab3d5624e172c553004ecc862bfeac16d9d68b7 30-Jun-2006 Jörn Engel <joern@wohnheim.fh-wedel.de> Remove obsolete #include <linux/config.h>

Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
74d0a988d3aa359b6b8a8536c8cb92cce02ca5d5 10-May-2006 Brent Casavant <bcasavan@sgi.com> [PATCH] PCI: Move various PCI IDs to header file

Move various QLogic, Vitesse, and Intel storage controller PCI IDs to the
main header file.

Signed-off-by: Brent Casavant <bcasavan@sgi.com>
Acked-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
6391a11375de5e2bb1eb8481e54619761dc65d9f 09-Jun-2006 Tobias Klauser <tklauser@nuerscht.ch> [SCSI] drivers/scsi: Use ARRAY_SIZE macro

Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove
duplicates of the macro.

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
910638ae7ed4be27d6af55f6c9b5bf54b838e78b 28-Mar-2006 Matthias Gehre <M.Gehre@gmx.de> [PATCH] Replace 0xff.. with correct DMA_xBIT_MASK

Replace all occurences of 0xff.. in calls to function pci_set_dma_mask()
and pci_set_consistant_dma_mask() with the corresponding DMA_xBIT_MASK from
linux/dma-mapping.h.

Signed-off-by: Matthias Gehre <M.Gehre@gmx.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2dbb04c65561122cc53b22dbea9aa59f9609215b 16-Jan-2006 Jes Sorensen <jes@sgi.com> [SCSI] qla1280: remove < 2.6.0 support

Remove support for kernels older than 2.6.0.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
d0be4a7d29ad0bd3ce2209dd9e46d410b632db59 31-Oct-2005 Christoph Hellwig <hch@lst.de> [SCSI] remove Scsi_Host_Template typedef

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
d6933df97a486d9c73a6bb4fed75154343c8638f 01-Nov-2005 Adrian Bunk <bunk@stusta.de> [SCSI] remove the obsolete SCSI qlogicisp driver

The SCSI qlogicisp driver is both marked BROKEN and superseded by the
qla1280 driver.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
8d6810d33e5e43b11675190318a81303c601a568 04-Jul-2005 Christoph Hellwig <hch@lst.de> [SCSI] qla1280: endianess annotations

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
7a34766fdcec0c619aa68ace203b934dd7cf9dbc 04-Jul-2005 Christoph Hellwig <hch@lst.de> [SCSI] qla1280: don't use bitfields for hardware access, parameters

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Thiemo Seufer <ths@linux-mips.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
0888f4c3312847eec4814a6d7cdcaaaa9fbd3345 04-Jul-2005 Christoph Hellwig <hch@lst.de> [SCSI] qla1280: don't use bitfields for hardware access in isp_config

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Thiemo Seufer <ths@linux-mips.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
5c79d6154f335543ea4c4a555f645a1f76b5d117 04-Jul-2005 Christoph Hellwig <hch@lst.de> [SCSI] qla1280: always load microcode

we have the most recent microcode, make sure to always load it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
d6db3e8d5fe3178776d0a0314e612c3f55e55fb4 04-Jul-2005 Christoph Hellwig <hch@lst.de> [SCSI] qla1280: use SAM_ constants

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Thiemo Seufer <ths@linux-mips.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2b55cac3d2d9f545c141748d00eae86e2c042ca5 04-Jul-2005 Christoph Hellwig <hch@lst.de> [SCSI] qla1280: misc cleanups

print message tidy ups and some excess brace removal.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Thiemo Seufer <ths@linux-mips.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
8af50dcd22aa0a5840f18276ff10a6977abc3853 04-Jul-2005 Christoph Hellwig <hch@lst.de> [SCSI] qla1280: interupt posting for irq disabling/enabling

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Thiemo Seufer <ths@linux-mips.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
a6c42741ace2fee235b6902e76f3c86a01d32146 04-Jul-2005 Christoph Hellwig <hch@lst.de> [SCSI] qla1280: remove dead per-host flag variables

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Thiemo Seufer <ths@linux-mips.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
117e4b27ebb1133072b1453145e60e576569e8af 20-Jun-2005 Nishanth Aravamudan <nacc@us.ibm.com> [SCSI] scsi/qla1280: replace schedule_timeout() with ssleep()

Use ssleep() instead of schedule_timeout to guarantee the task
delays as expected.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
df0ae2497ddefd72a87f3a3b34ff32455d7d4ae0 28-May-2005 Jeff Garzik <jgarzik@pobox.com> [SCSI] allow sleeping in ->eh_host_reset_handler()

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
68b3aa7c9805aee9005a8ca53c5e99177961fbb9 28-May-2005 Jeff Garzik <jgarzik@pobox.com> [SCSI] allow sleeping in ->eh_bus_reset_handler()

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
94d0e7b805961c44e4dc486ffc21075084bb7175 28-May-2005 Jeff Garzik <jgarzik@pobox.com> [SCSI] allow sleeping in ->eh_device_reset_handler()

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
8fa728a26886f56a9ee10a44fea0ddda301d21c3 28-May-2005 Jeff Garzik <jgarzik@pobox.com> [SCSI] allow sleeping in ->eh_abort_handler()

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
7d0e11fb20b08790c71f5336b493662f952641c9 01-May-2005 Jeremy Higdon <jeremy@sgi.com> [SCSI] qla1280.c - fix result for device Busy and Queue Full

I discovered that the qla1280 driver does not send the correct status
to the midlayer when it gets Queue Full or Busy from a device.

Signed-off-by: Jeremy Higdon <jeremy@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!