History log of /drivers/scsi/aacraid/linit.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
116046127d1a3bad2853d02781ad9fee33f05e5a 09-Feb-2012 Mahesh Rajashekhara <Mahesh_Rajashekhara@pmc-sierra.com> [SCSI] aacraid: Added Sync.mode to support series 7/8/9 controllers

Added Sync. mode to support Series 7/8/9 controller families: This is a
compatibility mode for all these controller families. The Async. (Performance)
mode can be changed in the future. First Async. mode version added for Series
7; Controller parameter aac_sync_mode added

Signed-off-by: Mahesh Rajashekhara <aacraid@pmc-sierra.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
/drivers/scsi/aacraid/linit.c
cf16123c9c8e346ed1dd171295a678d77648d7f8 11-Nov-2011 Vasily Averin <vvs@parallels.com> [SCSI] aacraid: controller hangs if kernel uses non-default ASPM policy

Aacraid controller can hang on some nodes if kernel uses non-default
(powersave) ASPM policy. Controller hangs shortly after successful load and
hardware detection. Scsi error handler detects this hang and tries to restart
hardware but it does not help.

Initially it was noticed on RHEL6-based openVZ kernel after backporting
aacraid driver from mainline (RHEL6 kernel with original driver works well)
http://bugzilla.openvz.org/show_bug.cgi?id=2043

This issue happens because default ASPM policy was changed in Red Hat
kernels. Therefore guys from Red Hat have noticed this problem long time ago:
on Fedora 12
https://bugzilla.redhat.com/show_bug.cgi?id=540478
on Fedora 14
https://bugzilla.redhat.com/show_bug.cgi?id=679385

In RHEL6 kernel this issue was fixed, ASPM was disabled in aacraid driver. In
kernel changelog I've found that seems it was done by Matthew Garrett: -
[scsi] aacraid: Disable ASPM by default (Matthew Garrett) [599735]

However seems this patch was not submitted to mainline. I've reproduced this
issue on vanilla 3.1.0 kernel booted with "pcie_aspm.policy=powersave" option,
So I believe it makes sense to do it now.

Signed-off-by: Vasily Averin <vvs@sw.ru>
[mjg: Checking the Windows drivers indicates that they disable ASPM under all
circumstances, so:]
Acked-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Achim Leubner <Achim_Leubner@pmc-sierra.com>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
/drivers/scsi/aacraid/linit.c
dc55b8274daddffefc34026ed7924138c8c5df17 08-Oct-2011 Dan Carpenter <dan.carpenter@oracle.com> [SCSI] aacraid: use lower snprintf() limit

This is just a cleanup, to silence static checker warnings. It
doesn't change how the code works.

buf[] can either be BUF_SIZE if this is called from sysfs, or it can
be 16 if it's called from aac_get_adapter_info() via
aac_get_serial_number(). We use the smaller limit here.

sizeof(dev->supplement_adapter_info.MfgPcbaSerialNo) is 12 so there
is actually no chance of hitting either limit.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Achim Leubner <Achim_Leubner@pmc-sierra.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
/drivers/scsi/aacraid/linit.c
571b16da39922cf71db41c10852d798a44686c15 01-Apr-2011 Michal Marek <mmarek@suse.cz> aacraid: Drop __TIME__ usage

The kernel already prints its build timestamp during boot, no need to
repeat it in random drivers and produce different object files each
time.

Cc: Adaptec OEM Raid Solutions <aacraid@adaptec.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Michal Marek <mmarek@suse.cz>
/drivers/scsi/aacraid/linit.c
e8b12f0fb8352237525961f14ec933e915848840 17-Mar-2011 Mahesh Rajashekhara <Mahesh_Rajashekhara@pmc-sierra.com> [SCSI] aacraid: Add new code for PMC-Sierra's SRC based controller family

Added new hardware device 0x28b interface for PMC-Sierra's SRC based
controller family.

- new src.c file for 0x28b specific functions
- new XPORT header required
- sync. command interface: doorbell bits shifted (SRC_ODR_SHIFT, SRC_IDR_SHIFT)
- async. Interface: different inbound queue handling, no outbound I2O
queue available, using doorbell ("PmDoorBellResponseSent") and
response buffer on the host ("host_rrq") for status
- changed AIF (adapter initiated FIBs) interface: "DoorBellAifPending"
bit to inform about pending AIF, "AifRequest" command to read AIF,
"NoMoreAifDataAvailable" to mark the end of the AIFs

Signed-off-by: Mahesh Rajashekhara <aacraid@pmc-sierra.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/aacraid/linit.c
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>
/drivers/scsi/aacraid/linit.c
229aebb873e29726b91e076161649cf45154b0bf 24-Oct-2010 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
Update broken web addresses in arch directory.
Update broken web addresses in the kernel.
Revert "drivers/usb: Remove unnecessary return's from void functions" for musb gadget
Revert "Fix typo: configuation => configuration" partially
ida: document IDA_BITMAP_LONGS calculation
ext2: fix a typo on comment in ext2/inode.c
drivers/scsi: Remove unnecessary casts of private_data
drivers/s390: Remove unnecessary casts of private_data
net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
drivers/infiniband: Remove unnecessary casts of private_data
drivers/gpu/drm: Remove unnecessary casts of private_data
kernel/pm_qos_params.c: Remove unnecessary casts of private_data
fs/ecryptfs: Remove unnecessary casts of private_data
fs/seq_file.c: Remove unnecessary casts of private_data
arm: uengine.c: remove C99 comments
arm: scoop.c: remove C99 comments
Fix typo configue => configure in comments
Fix typo: configuation => configuration
Fix typo interrest[ing|ed] => interest[ing|ed]
Fix various typos of valid in comments
...

Fix up trivial conflicts in:
drivers/char/ipmi/ipmi_si_intf.c
drivers/usb/gadget/rndis.c
net/irda/irnet/irnet_ppp.c
092e0e7e520a1fca03e13c9f2d157432a8657ff2 22-Oct-2010 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl

* 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
vfs: make no_llseek the default
vfs: don't use BKL in default_llseek
llseek: automatically add .llseek fop
libfs: use generic_file_llseek for simple_attr
mac80211: disallow seeks in minstrel debug code
lirc: make chardev nonseekable
viotape: use noop_llseek
raw: use explicit llseek file operations
ibmasmfs: use generic_file_llseek
spufs: use llseek in all file operations
arm/omap: use generic_file_llseek in iommu_debug
lkdtm: use generic_file_llseek in debugfs
net/wireless: use generic_file_llseek in debugfs
drm: use noop_llseek
6038f373a3dc1f1c26496e60b6c40b164716f07e 15-Aug-2010 Arnd Bergmann <arnd@arndb.de> llseek: automatically add .llseek fop

All file_operations should get a .llseek operation so we can make
nonseekable_open the default for future file operations without a
.llseek pointer.

The three cases that we can automatically detect are no_llseek, seq_lseek
and default_llseek. For cases where we can we can automatically prove that
the file offset is always ignored, we use noop_llseek, which maintains
the current behavior of not returning an error from a seek.

New drivers should normally not use noop_llseek but instead use no_llseek
and call nonseekable_open at open time. Existing drivers can be converted
to do the same when the maintainer knows for certain that no user code
relies on calling seek on the device file.

The generated code is often incorrectly indented and right now contains
comments that clarify for each added line why a specific variant was
chosen. In the version that gets submitted upstream, the comments will
be gone and I will manually fix the indentation, because there does not
seem to be a way to do that using coccinelle.

Some amount of new code is currently sitting in linux-next that should get
the same modifications, which I will do at the end of the merge window.

Many thanks to Julia Lawall for helping me learn to write a semantic
patch that does all this.

===== begin semantic patch =====
// This adds an llseek= method to all file operations,
// as a preparation for making no_llseek the default.
//
// The rules are
// - use no_llseek explicitly if we do nonseekable_open
// - use seq_lseek for sequential files
// - use default_llseek if we know we access f_pos
// - use noop_llseek if we know we don't access f_pos,
// but we still want to allow users to call lseek
//
@ open1 exists @
identifier nested_open;
@@
nested_open(...)
{
<+...
nonseekable_open(...)
...+>
}

@ open exists@
identifier open_f;
identifier i, f;
identifier open1.nested_open;
@@
int open_f(struct inode *i, struct file *f)
{
<+...
(
nonseekable_open(...)
|
nested_open(...)
)
...+>
}

@ read disable optional_qualifier exists @
identifier read_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
expression E;
identifier func;
@@
ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
{
<+...
(
*off = E
|
*off += E
|
func(..., off, ...)
|
E = *off
)
...+>
}

@ read_no_fpos disable optional_qualifier exists @
identifier read_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
@@
ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
{
... when != off
}

@ write @
identifier write_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
expression E;
identifier func;
@@
ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
{
<+...
(
*off = E
|
*off += E
|
func(..., off, ...)
|
E = *off
)
...+>
}

@ write_no_fpos @
identifier write_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
@@
ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
{
... when != off
}

@ fops0 @
identifier fops;
@@
struct file_operations fops = {
...
};

@ has_llseek depends on fops0 @
identifier fops0.fops;
identifier llseek_f;
@@
struct file_operations fops = {
...
.llseek = llseek_f,
...
};

@ has_read depends on fops0 @
identifier fops0.fops;
identifier read_f;
@@
struct file_operations fops = {
...
.read = read_f,
...
};

@ has_write depends on fops0 @
identifier fops0.fops;
identifier write_f;
@@
struct file_operations fops = {
...
.write = write_f,
...
};

@ has_open depends on fops0 @
identifier fops0.fops;
identifier open_f;
@@
struct file_operations fops = {
...
.open = open_f,
...
};

// use no_llseek if we call nonseekable_open
////////////////////////////////////////////
@ nonseekable1 depends on !has_llseek && has_open @
identifier fops0.fops;
identifier nso ~= "nonseekable_open";
@@
struct file_operations fops = {
... .open = nso, ...
+.llseek = no_llseek, /* nonseekable */
};

@ nonseekable2 depends on !has_llseek @
identifier fops0.fops;
identifier open.open_f;
@@
struct file_operations fops = {
... .open = open_f, ...
+.llseek = no_llseek, /* open uses nonseekable */
};

// use seq_lseek for sequential files
/////////////////////////////////////
@ seq depends on !has_llseek @
identifier fops0.fops;
identifier sr ~= "seq_read";
@@
struct file_operations fops = {
... .read = sr, ...
+.llseek = seq_lseek, /* we have seq_read */
};

// use default_llseek if there is a readdir
///////////////////////////////////////////
@ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier readdir_e;
@@
// any other fop is used that changes pos
struct file_operations fops = {
... .readdir = readdir_e, ...
+.llseek = default_llseek, /* readdir is present */
};

// use default_llseek if at least one of read/write touches f_pos
/////////////////////////////////////////////////////////////////
@ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read.read_f;
@@
// read fops use offset
struct file_operations fops = {
... .read = read_f, ...
+.llseek = default_llseek, /* read accesses f_pos */
};

@ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier write.write_f;
@@
// write fops use offset
struct file_operations fops = {
... .write = write_f, ...
+ .llseek = default_llseek, /* write accesses f_pos */
};

// Use noop_llseek if neither read nor write accesses f_pos
///////////////////////////////////////////////////////////

@ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read_no_fpos.read_f;
identifier write_no_fpos.write_f;
@@
// write fops use offset
struct file_operations fops = {
...
.write = write_f,
.read = read_f,
...
+.llseek = noop_llseek, /* read and write both use no f_pos */
};

@ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier write_no_fpos.write_f;
@@
struct file_operations fops = {
... .write = write_f, ...
+.llseek = noop_llseek, /* write uses no f_pos */
};

@ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read_no_fpos.read_f;
@@
struct file_operations fops = {
... .read = read_f, ...
+.llseek = noop_llseek, /* read uses no f_pos */
};

@ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
@@
struct file_operations fops = {
...
+.llseek = noop_llseek, /* no read or write fn */
};
===== End semantic patch =====

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Julia Lawall <julia@diku.dk>
Cc: Christoph Hellwig <hch@infradead.org>
/drivers/scsi/aacraid/linit.c
35df83970ecdc2cffb141503cf721a740d0f0ec5 05-Sep-2010 Joe Perches <joe@perches.com> drivers/scsi: Remove unnecessary casts of private_data

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
/drivers/scsi/aacraid/linit.c
c45d15d24eb2b49bf734e1e5e7e103befb76b19b 02-Jun-2010 Arnd Bergmann <arnd@arndb.de> scsi: autoconvert trivial BKL users to private mutex

All these files use the big kernel lock in a trivial
way to serialize their private file operations,
typically resulting from an earlier semi-automatic
pushdown from VFS.

None of these drivers appears to want to lock against
other code, and they all use the BKL as the top-level
lock in their file operations, meaning that there
is no lock-order inversion problem.

Consequently, we can remove the BKL completely,
replacing it with a per-file mutex in every case.
Using a scripted approach means we can avoid
typos.

file=$1
name=$2
if grep -q lock_kernel ${file} ; then
if grep -q 'include.*linux.mutex.h' ${file} ; then
sed -i '/include.*<linux\/smp_lock.h>/d' ${file}
else
sed -i 's/include.*<linux\/smp_lock.h>.*$/include <linux\/mutex.h>/g' ${file}
fi
sed -i ${file} \
-e "/^#include.*linux.mutex.h/,$ {
1,/^\(static\|int\|long\)/ {
/^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex);

} }" \
-e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \
-e '/[ ]*cycle_kernel_lock();/d'
else
sed -i -e '/include.*\<smp_lock.h\>/d' ${file} \
-e '/cycle_kernel_lock()/d'
fi

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: linux-scsi@vger.kernel.org
Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>
/drivers/scsi/aacraid/linit.c
0dcae66fd9cb47f4db64aba20a59d26e09e78fe4 01-Jul-2009 Rolf Eike Beer <eike-kernel@sf-tec.de> [SCSI] aacraid: Do not set DMA mask to 32 bit first if adapter only supports 31

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Acked-by: Achim Leubner <Achim_Leubner@pmc-sierra.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/aacraid/linit.c
f4927c45beda9a70e5c3bda0bd9f12b4f713c00b 27-Apr-2010 Arnd Bergmann <arnd@arndb.de> scsi: Push down BKL into ioctl functions

Push down the bkl into ioctl functions on the scsi layer.

[jkacur: Forward declaration missing ';'.
Conflicting declaraction in megaraid.h changed
Fixed missing inodes declarations]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
/drivers/scsi/aacraid/linit.c
e881a172dac4d9ea3b2a1540041d872963c269bd 16-Oct-2009 Mike Christie <michaelc@cs.wisc.edu> [SCSI] modify change_queue_depth to take in reason why it is being called

This patch modifies scsi_host_template->change_queue_depth so that
it takes an argument indicating why it is being called. This will be
used so that if a LLD needs to do some extra processing when
handling queue fulls or later ramp ups, it can do so.

This is a simple port of the drivers setting a change_queue_depth
callback. In the patch I just have these LLDs adjust the queue depth
if the user was requesting it.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>

[Vasu.Dev: v2
Also converted pmcraid_change_queue_depth and then verified
all modules compile using "make allmodconfig" for any new build
warnings on X86_64.

Updated original description after combing two original
patches from Mike to make this patch git bisectable.]
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
[jejb: fixed up 53c700]
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/aacraid/linit.c
929a22a558429bd22001d6b41cf31c233c68a5e2 07-Apr-2009 Yang Hongyang <yanghy@cn.fujitsu.com> dma-mapping: replace all DMA_31BIT_MASK macro with DMA_BIT_MASK(31)

Replace all DMA_31BIT_MASK macro with DMA_BIT_MASK(31)

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>
/drivers/scsi/aacraid/linit.c
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>
/drivers/scsi/aacraid/linit.c
d8e965076514dcb16410c0d18c6c8de4dcba19fc 01-Apr-2009 Leubner, Achim <Achim_Leubner@adaptec.com> [SCSI] aacraid driver update

changes:

- set aac_cache=2 as default value to avoid performance problem
(Novell bugzilla #469922)

- Dell/PERC controller boot problem fixed (RedHat bugzilla #457552)

- WWN flag added to fix SLES10 SP1/SP2 drive detection problems

- 64-bit support changes

- DECLARE_PCI_DEVICE_TABLE macro added

- controller type changes

Signed-off-by: Achim Leubner <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
fa195afe4ad3f6d85a9b7cc236ae85c05ca8db03 27-Oct-2008 Alan Cox <alan@lxorguk.ukuu.org.uk> [SCSI] Clean up my email address and use a single standard address for everything

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
b21227c5fcadab206e2a2373e5b288a351919abb 17-Sep-2008 Hillier, Gernot <gernot.hillier@siemens.com> [SCSI] aacraid: disable Dell Percraid quirk on Adaptec 2200S and 2120S

A lot of 64bit machines with Adaptec 2200S and 2120S controllers don't
recognize SCSI disks any more with the patch

commit 94cf6ba11b068b8a8f68a1e88bffb6827e92124b
Author: Salyzyn, Mark <mark_salyzyn@adaptec.com>
Date: Thu Dec 13 16:14:18 2007 -0800

[SCSI] aacraid: fix driver failure with Dell PowerEdge Expandable RAID Controller 3/Di

but fail with tons of "aac_srb: aac_fib_send failed with status: 8195"
instead. This patch disables the quirk introduced in the change cited
above for those two controllers again.

[thenzl: added 2120S Controller]
Signed-off-by: Gernot Hillier <gernot.hillier@siemens.com>
Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Acked-by: Matt Domsch <Matt_Domsch@dell.com>
Cc: AACRAID list <aacraid@adaptec.com>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
8fbd64e2eeb81d4b94be935a15d6d4829ec62aa2 30-Nov-2008 James Bottomley <James.Bottomley@HansenPartnership.com> [SCSI] aacraid: switch to block timeout

aacraid updates the timeout in its slave configure routine if it is too
small. This now needs to update the request queue timeout in block.

Cc: AACRAID list <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
89a93f2f4834f8c126e8d9dd6b368d0b9e21ec3d 16-Jul-2008 Linus Torvalds <torvalds@linux-foundation.org> Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (102 commits)
[SCSI] scsi_dh: fix kconfig related build errors
[SCSI] sym53c8xx: Fix bogus sym_que_entry re-implementation of container_of
[SCSI] scsi_cmnd.h: remove double inclusion of linux/blkdev.h
[SCSI] make struct scsi_{host,target}_type static
[SCSI] fix locking in host use of blk_plug_device()
[SCSI] zfcp: Cleanup external header file
[SCSI] zfcp: Cleanup code in zfcp_erp.c
[SCSI] zfcp: zfcp_fsf cleanup.
[SCSI] zfcp: consolidate sysfs things into one file.
[SCSI] zfcp: Cleanup of code in zfcp_aux.c
[SCSI] zfcp: Cleanup of code in zfcp_scsi.c
[SCSI] zfcp: Move status accessors from zfcp to SCSI include file.
[SCSI] zfcp: Small QDIO cleanups
[SCSI] zfcp: Adapter reopen for large number of unsolicited status
[SCSI] zfcp: Fix error checking for ELS ADISC requests
[SCSI] zfcp: wait until adapter is finished with ERP during auto-port
[SCSI] ibmvfc: IBM Power Virtual Fibre Channel Adapter Client Driver
[SCSI] sg: Add target reset support
[SCSI] lib: Add support for the T10 (SCSI) Data Integrity Field CRC
[SCSI] sd: Move scsi_disk() accessor function to sd.h
...
d4514d1bed1c7157bcff4c81307a9e0374df257a 16-May-2008 Jonathan Corbet <corbet@lwn.net> aacraid: cdev lock_kernel() pushdown

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
/drivers/scsi/aacraid/linit.c
13a17fdeedbb156463a9a007378366ec0a0c30ef 08-May-2008 Harvey Harrison <harvey.harrison@gmail.com> [SCSI] aacraid: linit.c make aac_show_serial_number static

drivers/scsi/aacraid/linit.c:865:9: warning: symbol 'aac_show_serial_number' was not declared. Should it be static?

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Mark Salyzyn <Mark_Salyzyn@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
655d722cf7812078306f975a3afe88b96a1306b8 30-Apr-2008 Mark Salyzyn <Mark_Salyzyn@adaptec.com> [SCSI] aacraid: Add Power Management support

For firmware that supports the feature(s), add the ability to start or
stop an array using the associated SCSI commands, to automatically
manage the spin-up of an array on new I/O reporting back the
appropriate check conditions and actions in cooperation with the
normal timeout mechanisms and enable the blackout period management in
the Firmware associated with the background spin-down of the arrays
when the Firmware times out and deems the arrays as idle.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
a4576b5da671563187ac388e36e1d077bd20e43a 30-Apr-2008 Mark Salyzyn <Mark_Salyzyn@adaptec.com> [SCSI] aacraid: Fix jbod operations scan issues

As JBOD devices (really just Simple Single Drive Volumes exported to
the SCSI channel) are managed, they fail to update correctly when the
driver triggers a SCSI scan. In addition, the ability to change
multiple arrays or JBODs at the same time was resulting in dropped
scans, set up a mechanism to issue a list of single target scans on a
single configuration change notification from the Firmware.

Performed some additional sundry cosmetic code style cleanups.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
e80ab411e589e00550e2e6e5a6a02d59cc730357 22-Apr-2008 Linus Torvalds <torvalds@linux-foundation.org> Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6: (36 commits)
SCSI: convert struct class_device to struct device
DRM: remove unused dev_class
IB: rename "dev" to "srp_dev" in srp_host structure
IB: convert struct class_device to struct device
memstick: convert struct class_device to struct device
driver core: replace remaining __FUNCTION__ occurrences
sysfs: refill attribute buffer when reading from offset 0
PM: Remove destroy_suspended_device()
Firmware: add iSCSI iBFT Support
PM: Remove legacy PM (fix)
Kobject: Replace list_for_each() with list_for_each_entry().
SYSFS: Explicitly include required header file slab.h.
Driver core: make device_is_registered() work for class devices
PM: Convert wakeup flag accessors to inline functions
PM: Make wakeup flags available whenever CONFIG_PM is set
PM: Fix misuse of wakeup flag accessors in serial core
Driver core: Call device_pm_add() after bus_add_device() in device_add()
PM: Handle device registrations during suspend/resume
block: send disk "change" event for rescan_partitions()
sysdev: detect multiple driver registrations
...

Fixed trivial conflict in include/linux/memory.h due to semaphore header
file change (made irrelevant by the change to mutex).
ee959b00c335d7780136c5abda37809191fe52c3 22-Feb-2008 Tony Jones <tonyj@suse.de> SCSI: convert struct class_device to struct device

It's big, but there doesn't seem to be a way to split it up smaller...

Signed-off-by: Tony Jones <tonyj@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/scsi/aacraid/linit.c
d3135846f6c1858dbad6ccb780a42e6c98953e6d 19-Apr-2008 Matthew Wilcox <matthew@wil.cx> drivers: Remove unnecessary inclusions of asm/semaphore.h

None of these files use any of the functionality promised by
asm/semaphore.h. It's possible that they rely on it dragging in some
unrelated header file, but I can't build all these files, so we'll have
fix any build failures as they come up.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
/drivers/scsi/aacraid/linit.c
95f6fb578970c9dbfcaa436ff98d2f3c6bdea953 08-Feb-2008 Salyzyn, Mark <Mark_Salyzyn@adaptec.com> [SCSI] aacraid: informational sysfs value corrections

Some sysfs problems reported. The serial number on late model
controllers was truncated. Non-DASD devices (tapes and CDROMs) were
showing up as JBOD in the level report on the physical channel.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
2f7ecc55b37ef9f0208360e64d8b9d2313df8ce6 08-Feb-2008 Salyzyn, Mark <Mark_Salyzyn@adaptec.com> [SCSI] aacraid: ignore adapter reset check polarity

The Adapter's Ignore Reset flag and insmod parameter boolean polarity
is incorrect in the driver.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
8ef2224707996aede1808f40116cd467b7c8d549 08-Feb-2008 Salyzyn, Mark <Mark_Salyzyn@adaptec.com> [SCSI] aacraid: add optional MSI support

Added support for MSI utilizing the aacraid.msi=1 parameter. This
patch adds some localized or like-minded janitor fixes. Since the
default is disabled, there is no impact on the code paths unless the
customer wishes to experiment with the MSI performance.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
62e9f5c4671a3026639b01ec84a3063f03bead4c 06-Feb-2008 Salyzyn, Mark <Mark_Salyzyn@adaptec.com> [SCSI] aacraid: pci_set_dma_max_seg_size opened up for late model controllers

This patch ensures that the modern adapters get a maximum sg segment
size on par with the maximum transfer size. Added some localized
janitor fixes to the discussion patch I used with Fujita.

FUJITA Tomonori [mailto:fujita.tomonori@lab.ntt.co.jp] sez:
> I think that setting the proper maximum segment size for the late
> model cards (as you did above) makes sense.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
0c95fdc59640824d7e0b017be295fb912ceef4ab 05-Feb-2008 FUJITA Tomonori <tomof@acm.org> iommu sg merging: aacraid: use pci_set_dma_max_seg_size

This sets the segment size limit properly via pci_set_dma_max_seg_size
and remove blk_queue_max_segment_size because scsi-ml calls it.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Acked-by: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/scsi/aacraid/linit.c
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>
/drivers/scsi/aacraid/linit.c
cb1042f285c2168bd8cf10aca0e24802e682252b 17-Jan-2008 Salyzyn, Mark <Mark_Salyzyn@adaptec.com> [SCSI] aacraid: add Voodoo Lite class of cards.

The cards being added are supported in a limited sense already through
family matching, but we needed to add some functionality to the driver
to expose selectively the physical drives. These Physical drives are
specifically marked to not be part of any array and thus are declared
JBODs (Just a Bunch Of Drives) for generic SCSI access.

We report that this is the second patch in a set of two, but merely
depends on the stand-alone functionality of the first patch which adds
in that case the ability to report a driver feature flag via sysfs. We
leverage that functionality by reporting that this driver now supports
this new JBOD feature for the controller so that the array management
applications may react accordingly and guide the user as they manage
the controller.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
2ca39c48ea0d2fd265479d0b62f2ac8878900360 17-Jan-2008 Salyzyn, Mark <Mark_Salyzyn@adaptec.com> [SCSI] aacraid: add new driver features flags

Feature enhancement, adding a 'flags' entry that will reside in the
host controller's tree, with a newline separated list of arbitrary
ascii named features that indicate whether the combination of driver
and controller has support for said feature. Breaking from the
one-line output typical of sysfs entries, newline was added to tailor
for grep, or simple gets line by line string match within an
application. I added one for a compiler time check for existence of
debug print output, one for an optional manifest defined enhanced
status reporting in the logs, and one for runtime reporting whether
the controller and driver supports arrays larger than 2TB. Adaptec's
storage management software uses the last flag to determine whether to
make available the creation of arrays larger than 2TB, otherwise a
warning is posted.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
8ce3eca4dc8161e030a055bde94cde28476e0894 16-Jan-2008 Salyzyn, Mark <Mark_Salyzyn@adaptec.com> [SCSI] aacraid: remove pigs in space

I was amazed at how much embedded space was present in the aacraid
driver source files. Just selected five files from the set to clean up
for now and the attached patch swelled to 73K in size!

- Removed trailing space or tabs
- Removed spaces embedded within tabs
- Replaced leading 8 spaces with tabs
- Removed spaces before )
- Removed ClusterCommand as it was unused (noticed it as one triggered by above)
- Replaced scsi_status comparison with 0x02, to compare against SAM_STATUS_CHECK_CONDITION.
- Replaced a long series of spaces with tabs
- Replaced some simple if...defined() with ifdef/ifndef

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
d496f94d22d1491ffb25f4000e85f7a4ecf7f2c4 08-Nov-2007 Alan Cox <alan@lxorguk.ukuu.org.uk> [SCSI] aacraid: fix security weakness

Actually there are several but one is trivially fixed

1. FSACTL_GET_NEXT_ADAPTER_FIB ioctl does not lock dev->fib_list
but needs to
2. Ditto for FSACTL_CLOSE_GET_ADAPTER_FIB
3. It is possible to construct an attack via the SRB ioctls where
the user obtains assorted elevated privileges. Various approaches are
possible, the trivial ones being things like writing to the raw media
via scsi commands and the swap image of other executing programs with
higher privileges.

So the ioctls should be CAP_SYS_RAWIO - at least all the FIB manipulating
ones. This is a bandaid fix for #3 but probably the ioctls should grow
their own capable checks. The other two bugs need someone competent in that
driver to fix them.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
b18268fc631034882f5f3dd93daa248a3bfdd085 08-Jan-2008 Salyzyn, Mark <Mark_Salyzyn@adaptec.com> [SCSI] aacraid: improve queue balancing

The adapter queue is divided up equally to all the arrays to prevent
command starvation to any individual array. On the other hand,
physical targets are only granted a queue depth of one each. The code
prior to this patch used to deal with the incremental discovery of
targets, but the driver knows how many arrays are present prior to the
scan so this knowledge is used to generate a better estimate for the
queue depth.

Remove the capability of 'physical=0' from preventing access to the
class of adapters that have the RAID/SCSI mode of operation since none
of the physicals on the SCSI channel are candidates ever for an array.

As always, the user can override this default queue depth policy by
making the appropriate adjustments utilizing sysfs.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
b6ef70f33ca2a3084b4fea12414550724a9114dc 08-Jan-2008 Salyzyn, Mark <Mark_Salyzyn@adaptec.com> [SCSI] aacraid: OS panic after Adapter panic (hardening).

In experiments in the lab we managed to trigger an Adapter firmware
panic (BlinkLED) coincidentally while several pass-through ioctl
command from the management software were outstanding on a bug only
present on a class of RAID Adapters that require a hardware reset
rather than a commanded reset. The net result was an attempt to time
out the management software command as if it came from the SCSI layer
resulting in an OS panic.

Adapters that use commanded reset, management commands are returned
failed by the Adapter correctly. The adapter firmware panic that
resulted in this condition was also resolved, and there were no
adapters in the field with this specific firmware bug so we do not
expect any field reports. This is a rare or unlikely corner condition,
and no reports have ever been forwarded from the field.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
a3940da5e6fe8b833eecdbca3fac9456b4204d6e 08-Jan-2008 Salyzyn, Mark <Mark_Salyzyn@adaptec.com> [SCSI] aacraid: fix big endian issues

Big endian systems issues discovered in the aacraid driver. Somewhat
reverses a patch from November 7th of last year that removed swap
operations because they formerly were being assigned to an u8 array
when they should have been assigned to an le32 array.

This patch is largely inert for any little endian processor
architecture. It resolves a bug in delivering the BlinkLED AIF event
to registered applications when the adapter or associated hardware was
reset due to ill health. A rare corner case occurrence, also largely
unnoticed by any as it was a new (untested!) feature.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
17eaaceef52b1ce5ca061d49a1ff9ae56ccce1e1 08-Jan-2008 Salyzyn, Mark <Mark_Salyzyn@adaptec.com> [SCSI] aacraid: add sysfs report of RAID level

Report the RAID level string for the SCSI device representing the
array. Report is in /sys/class/scsi_device/#:#:#:#/device/level.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
94cf6ba11b068b8a8f68a1e88bffb6827e92124b 14-Dec-2007 Salyzyn, Mark <mark_salyzyn@adaptec.com> [SCSI] aacraid: fix driver failure with Dell PowerEdge Expandable RAID Controller 3/Di

As reported in http://bugzilla.kernel.org/show_bug.cgi?id=3D9133 it was
discovered that the PERC line of controllers lacked a key 64 bit
ScatterGather capable SCSI pass-through function. The adapters are still
capable of 64 bit ScatterGather I/O commands, but these two can not be
mixed. This problem was exacerbated by the introduction of the SCSI
Generic access to the DASD physical devices.

The fix for users before this patch is applied is aacraid.dacmode=3D0 on
the kernel command line to disable 64 bit I/O.

The enclosed patch introduces a new adapter quirk and tries to limp
along by enabling pass-through in situations where memory is 32 bit
addressable on 64 bit machines, or disable the pass-through functions
altogether. I expect that the check for 32 bit addressable memory to be
controversial in that it can be incorrect in non-Dell non-Intel systems
that PERC would never be installed under, the alternative is to disable
pass-through in all cases which could be reported as another regression.

Pass-through is used for SCSI Generic access to the physical devices, or
for the management applications to properly function.

In systems where this patch has disabled pass-through because it is
unsupportable in combination with I/O performance, the user can choose
to enable pass-through by turning off dacmode (aacraid.dacmode=3D0) or
limiting the discovered kernel memory (mem=3D4G) with an associated loss
in runtime performance. If we chose instead to turn off 64 bit dacmode
for the adapters with this quirk, then this would be reported as another
regression.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
f3307f7276067e2f8f29a20e3ebe52887e8f9f00 08-Nov-2007 Christoph Hellwig <hch@infradead.org> [SCSI] aacraid: don't assign cpu_to_le32(int) to u8

On Wed, Nov 07, 2007 at 01:51:44PM -0500, Salyzyn, Mark wrote:
> Christoph Hellwig [mailto:hch@infradead.org] sez:
> > Did anyone run the driver through sparse to see if we have
> > more issues like this?
>
> There are some warnings from sparse, none like this one. I will deal
> with the warnings ...

Actually there are a lot of endianess warnings, fortunately most of them
harmless. The patch below fixes all of them up (including the ones in
the patch I replied to), except for aac_init_adapter which is really odd
and I don't know what to do.

[jejb fixed up rejections and checkpatch issues]

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Mark Salyzyn <mark_salyzyn@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
f858317d894a22eb2c26edcd26c7060fc4f40a15 30-Oct-2007 Salyzyn, Mark <mark_salyzyn@adaptec.com> [SCSI] aacraid: forced reset override

Some of our vendors have requested that our adapters ignore the hardware
reset attempts during recovery and have enforced this with changes in
Adapter Firmware. Some of our customers have requested the option to be
able to reset the adapter under adverse adapter failure, we even had a
few defects reported here considering it a regression that the Adapter
could not be reset. This patch addresses this dichotomy. The user can
force the adapter to be reset if it supports the IOP_RESET_ALWAYS
command, in cases where the adapter has been programmed to ignore the
reset, by setting the aacraid.check_reset parameter to a value of -1.

The driver will not reset an Adapter that does not support the reset
command(s).

This patch also fixes and cleans up some of the logic associated with
resetting the adapter.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James <James.Bottomley@HansenPartnership.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
5f78e89b5f7041895c4820be5c000792243b634f 08-Nov-2007 Alan Cox <alan@lxorguk.ukuu.org.uk> [SCSI] aacraid: fix security weakness

Actually there are several but one is trivially fixed

1. FSACTL_GET_NEXT_ADAPTER_FIB ioctl does not lock dev->fib_list
but needs to
2. Ditto for FSACTL_CLOSE_GET_ADAPTER_FIB
3. It is possible to construct an attack via the SRB ioctls where
the user obtains assorted elevated privileges. Various approaches are
possible, the trivial ones being things like writing to the raw media
via scsi commands and the swap image of other executing programs with
higher privileges.

So the ioctls should be CAP_SYS_RAWIO - at least all the FIB manipulating
ones. This is a bandaid fix for #3 but probably the ioctls should grow
their own capable checks. The other two bugs need someone competent in that
driver to fix them.

Signed-off-by: Alan Cox <alan@redhat.com>
Acked-by: Mark Salyzyn <mark_salyzyn@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
e85fbc595aa527e0b3c9a738c4dc1d7717afb30c 31-Oct-2007 Salyzyn, Mark <mark_salyzyn@adaptec.com> [SCSI] aacraid: fix potential panic in thread stop

Got a panic in the threading code on an older kernel when the Adapter
failed to load properly and driver shut down apparently before any
threading had started, can not dupe. Expect that this may be relevant in
the latest kernel, but not sure. This patch does no harm, and should
alleviate the possibility of this panic.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/aacraid/linit.c
9cb83c7529d929c00f37d821daed1942a1b20602 16-Oct-2007 FUJITA Tomonori <tomof@acm.org> [SCSI] add use_sg_chaining option to scsi_host_template

This option is true if a low-level driver can support sg
chaining. This will be removed eventually when all the drivers are
converted to support sg chaining. q->max_phys_segments is set to
SCSI_MAX_SG_SEGMENTS if false.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/drivers/scsi/aacraid/linit.c
2b053729a84b6aac197df51b8729bc9fec743bff 02-Aug-2007 Salyzyn, Mark <mark_salyzyn@adaptec.com> [SCSI] aacraid: prevent panic on adapter resource failure

If the driver fails to allocate the contiguous (DMAable) memory for
system reasons, we fail to load the instance, but then we try to free
the <nul> allocation in the cleanup code and we get a panic in
pci_free_consistent(). This is reported against an older kernel, hope
this is relevant for latest/greatest.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
c835e3727b87115f98c612a5ecb8882826d2537e 26-Jul-2007 Salyzyn, Mark <mark_salyzyn@adaptec.com> [SCSI] aacraid: draw line in sand, sundry cleanup and version update

Minor unimportant cuttings from the floor bundled in with a version
stamp update. Only controversial change is the dropping of Alan Cox
copyright on the nark.c module since that file has no code written by
him in it.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
bbf17d6483a7feb4c1eeef9fd553976d4f394e4c 23-Jul-2007 Salyzyn, Mark <mark_salyzyn@adaptec.com> [SCSI] aacraid: sysfs adapter reset/status format change.

We need to newline terminate responses from nodes within the sysfs tree,
the Adapter status value reported by the reset adapter node is adjusted.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
60395bb60e0b5e4e0808ac8eb07a92f6c9cdea1f 23-Jul-2007 Alan Cox <alan@lxorguk.ukuu.org.uk> [SCSI] aacraid: Fix security hole

On the SCSI layer ioctl path there is no implicit permissions check for
ioctls (and indeed other drivers implement unprivileged ioctls). aacraid
however allows all sorts of very admin only things to be done so should
check.

Signed-off-by: Alan Cox <alan@redhat.com>
Acked-by: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
bc06cffdec85d487c77109dffcd2f285bdc502d3 16-Jul-2007 Linus Torvalds <torvalds@woody.linux-foundation.org> Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (166 commits)
[SCSI] ibmvscsi: convert to use the data buffer accessors
[SCSI] dc395x: convert to use the data buffer accessors
[SCSI] ncr53c8xx: convert to use the data buffer accessors
[SCSI] sym53c8xx: convert to use the data buffer accessors
[SCSI] ppa: coding police and printk levels
[SCSI] aic7xxx_old: remove redundant GFP_ATOMIC from kmalloc
[SCSI] i2o: remove redundant GFP_ATOMIC from kmalloc from device.c
[SCSI] remove the dead CYBERSTORMIII_SCSI option
[SCSI] don't build scsi_dma_{map,unmap} for !HAS_DMA
[SCSI] Clean up scsi_add_lun a bit
[SCSI] 53c700: Remove printk, which triggers because of low scsi clock on SNI RMs
[SCSI] sni_53c710: Cleanup
[SCSI] qla4xxx: Fix underrun/overrun conditions
[SCSI] megaraid_mbox: use mutex instead of semaphore
[SCSI] aacraid: add 51245, 51645 and 52245 adapters to documentation.
[SCSI] qla2xxx: update version to 8.02.00-k1.
[SCSI] qla2xxx: add support for NPIV
[SCSI] stex: use resid for xfer len information
[SCSI] Add Brownie 1200U3P to blacklist
[SCSI] scsi.c: convert to use the data buffer accessors
...
24f02e1d819ad91de46ad3a636cd3f2bf11c720f 19-Jun-2007 Salyzyn, Mark <mark_salyzyn@adaptec.com> [SCSI] aacraid: add support for long serial number information

Support displaying long serial number information. Reuse sysfs handler
internally as helper.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
b27e66df78a9d8d43c05a6a5777ef45f2e238951 19-Jun-2007 Salyzyn, Mark <mark_salyzyn@adaptec.com> [SCSI] aacraid: correct PERC2/QC and family match quirk list

The Dell PERC2/QC erroneously was listed as having the 31 bit limit
quirk on the interface allocations, removing the reference to repair
this oversight. Also, the 2 quad pci address (family) match catch-all
also retained the 31 bit limit and the 34 SG limit quirks in a paranoid
move. Now, many years later, we find that none of the Adapters that did
trigger with the family match had such quirks; these quirks are all
limited to the 4 quad pci address matches to select legacy adapters
already populated.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
29c976844d0bef07d97babc8db60fa6c46788133 12-Jun-2007 Salyzyn, Mark <mark_salyzyn@adaptec.com> [SCSI] aacraid: add user initiated reset

Add the ability for an application to issue a hardware reset to the
adapter via sysfs. Typical uses include restarting the adapter after it
has been flashed. Bumped revision number for the driver and added a
feature to periodically check the adapter's health (check_interval),
update the adapter's concept of time (update_interval) and block
checking/resetting of the adapter (check_reset).

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
94774a3a8e01989960aaadaea6deff51a4e7deed 30-May-2007 Salyzyn, Mark <mark_salyzyn@adaptec.com> [SCSI] aacraid: fix shutdown handler to also disable interrupts.

Moves quiesce, thread and interrupt shutdown into aacraid drivers'
.shutdown handler. This fix to the aac_shutdown handler will remove the
superfluous reset of the adapter during a (clean) kexec.

This fix may mitigate the active investigation 'kexec and aacraid
broken' but it is unlikely to affect the root cause (issue likely
present in both kexec and kdump). This patch reduces the chance the
problem will occur with a kexec. The fix for root cause is currently
expected to be the minimum value check to the aacraid.startup_timeout
driver variable after an adapter reset within aacraid_commit_reset.patch
submitted on 05/22/2007 and awaiting testing by Yinghai to confirm.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
5c9cfeddbb49954b459fda91bf5479f5a0a4e409 30-May-2007 Salyzyn, Mark <mark_salyzyn@adaptec.com> [SCSI] aacraid: Changeable queue depth

Inspired by Brian King's patch to the ibmvscsi driver. Adds support for
a changeable queue depth to the aacraid driver.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
9d399cc7feac3faf66768566e04e16c750aad25f 18-May-2007 Salyzyn, Mark <mark_salyzyn@adaptec.com> [SCSI] aacraid: add support for FUA

Back in the beginning of last year we disabled mode page 8 and mode page
3f requests through device quirk bits instead of enhancing the driver to
respond to these mode pages because there was no apparent added value.

The Firmware that supports the new communication commands supports the
ability to force a write around of the adapter cache on a command by
command basis. In the attached patch we enable mode page 8 and 3f and
spoof the results as needed in order to *convince* the layers above to
submit writes with the FUA (Force Unit Attention) bit set if the file
system or application requires it, if the Firmware supports the write
through, or instead to submit a SYNCHRONIZE_CACHE if the Firmware does
not. The added value here is for file systems that benefit from this
functionality and for clustering or redundancy scenarios.

Caveats: By convince, we are responding with a minimal short 3 byte
content mode page 8, with only the data the SCSI layer needs and that we
can fill confidently. Applications that require the customarily larger
mode page 8 results may be confused by this(?). The FUA, or the
SYNCHRONIZE_CACHE only affect the cache on the controller. Our firmware
by default ensure that the underlying physical drives of the array have
their cache turned off so normally this is not a problem.

This attached patch is against current scsi-misc-2.6 and was unit tested
on RHEL5. Since this is a feature enhancement, it should not be
considered for any current stabilization efforts.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
9695a25dbff788f26225966c43425e8bae7f06e8 27-Mar-2007 Adrian Bunk <bunk@stusta.de> [SCSI] aacraid: cleanups

- proper prototypes for global code in aacraid.h
- aac_rx_start_adapter() can now become static

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
802ae2f05b646c1e5f9e33cfe4c80cfa1452a0e3 21-Mar-2007 Salyzyn, Mark <mark_salyzyn@adaptec.com> [SCSI] aacraid: cleanup and version stamp driver

There is some residual cleanup of the last series of patches and the
need to bump the revision number to draw the line in the sand.

The cmd->SCp.phase is set in the aac_valid_context routine, then set
again to the same value following it's return. The cmd->scsi_done is set
twice in the aac_queuecommand routine. Free up the scsidev FILO in
aac_probe_container as it is not needed further down the function in any
case. Improve the efficiency of the abort handler kernel print
parameters. Bump revision number of driver to approximate the equivalent
in the Adaptec supplied version.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
03d4433721880bf1972c924b168e4e1dd3c59d53 15-Mar-2007 Mark Haverkamp <markh@linux-foundation.org> [SCSI] aacraid: Improved error handling

Received from Mark Salyzyn,

This set of fixes improve error handling stability of the driver. A popular
manifestation of the problems is an NULL pointer reference in the interrupt
handler when referencing portions of the scsi command context, or in the
scsi_done handling when an offlined device is referenced.

The aacraid driver currently does not get notification of orphaned command
completions due to devices going offline. The driver also fails to handle the
commands that are finished by the error handler, and thus can complete again
later at the hands of the adapter causing situations of completion of an
invalid scsi command context. Test Unit Ready calls abort assuming that the
abort was successful, but are not, and thus when the interrupt from the adapter
occurs, they reference invalid command contexts. We add in a TIMED_OUT flag to
inform the aacraid FIB context that the interrupt service should merely release
the driver resources and not complete the command up. We take advantage of this
with the abort handler as well for select abortable commands. And we detect and
react if a command that can not be aborted is currently still outstanding to
the controller when reissued by the retry mechanism.

Signed-off-by: Mark Haverkamp <markh@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
00977a59b951207d38380c75f03a36829950265c 12-Feb-2007 Arjan van de Ven <arjan@linux.intel.com> [PATCH] mark struct file_operations const 6

Many struct file_operations in the kernel can be "const". Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data. In addition it'll catch accidental writes at compile time to
these shared resources.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/scsi/aacraid/linit.c
30716e07ef511ec7525c07eb1e8060ba8943c2a2 31-Jan-2007 James Bottomley <jejb@mulgrave.il.steeleye.com> Merge branch 'linus'
e37ee4bec6c6d6d67aebafeecbbb32aa33d502bc 26-Jan-2007 Mark Haverkamp <markh@linux-foundation.org> [SCSI] aacraid: expanded expose physical device code (new)

Received from Mark Salyzyn,

Take the expose_physicals flag and allow the user to select default (physicals
available via /dev/sg), exposed (physicals available via /dev/sd for
experimental reasons) and hidden (physicals blocked from all access). This
expands the functionality of the previous expose_physicals insmod parameter
which was added to support some experimental configurations.

Signed-off-by Mark Haverkamp <markh@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
239eab19559b3d74a029dff3f0c792bc0770a062 24-Jan-2007 Mark Haverkamp <markh@linux-foundation.org> [SCSI] aacraid: Begin adding support for new adapter type

Received from Mark Salyzyn,

Add in the NEMER/ARK physical register mapping, represented in up and coming
products currently under test at Adaptec.

Signed-off-by Mark Haverkamp <markh@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
8e9d58e723e29e8b04c09bd9badd81c1d8232f5f 18-Dec-2006 Salyzyn, Mark <mark_salyzyn@adaptec.com> [SCSI] aacraid: Product List Update

Update drivers/scsi/aacraid/linit.c and Documentation/scsi/aacraid.txt
file with the current list of
adapters supported by the aacraid driver. Deprecated a few adapters that
never shipped, corrected a
few and added new adapters that matched the family code support. No
functional changes to the driver.
No side effects.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
76a7f8fdc0c2381ae1ba55ef71837712223ecb3c 19-Sep-2006 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: merge rx and rkt code

Received from Mark Salyzyn:

The only real difference between the rkt and rx platform modules is the
offset of the message registers. This patch recognizes this similarity
and simplifies the driver to reduce it's code footprint and to improve
maintainability by reducing the code duplication.

Visibly, the 'rkt.c' portion of this patch looks more complicated than
it really is. View it as retaining the rkt-only specifics of the
interface.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
653ba58d55feb708c6f97e6f3e84901b3a03c9c0 19-Sep-2006 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: expose physical devices

Received from Mark Salyzyn:

I am placing this functionality into an insmod parameter. Normally the physical
components are exported to sg, and are blocked from showing up in sd.

Note that the pass-through I/O path via the driver through the Firmware to the
physical disks is not an optimized path, the card is designed for Hardware
RAID, elevator sorting and caching. This should not be used as a means for
utilizing the aacraid based controllers as a generic scsi/SATA/SAS controller,
performance should suck by a few percentage points, any RAID meta-data on the
drives will confuse the controller about who owns the drives and there is a
high risk of destroying content in both directions. Unreliable and for
experimentation or strange controlled circumstances only.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
8c867b257d159ca04602d7087fa29f846785f9ea 03-Aug-2006 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: Reset adapter in recovery timeout

Received from Mark Salyzyn

If the adapter is in blinkled (Firmware Assert) when error recovery
timeout actions have been triggered, perform an adapter warm reset and
restart the initialization.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
90ee346651524eb275405d410f5d3bb6765a2d93 03-Aug-2006 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: Check for unlikely errors

Received from Mark Salyzyn

The enclosed patch cleans up some code fragments, adds some paranoia
(unproven causes of potential driver failures).

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
75c3628db75c573870379094a5f90f690ee99b76 08-Jun-2006 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: Update supported product information

Received From Mark Salyzyn

Some of the cards product names changed.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
821499a8241019be5591fad5ab925759fbcd9f32 12-Jun-2006 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: Fix return code interpretation

Received from Mark Salyzyn

clear_user return is 0 for success, the code fragment is written to
assume that it is the count of the number of bytes zero'd.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
edb527ce35b0c86e72ed518af255f02e1cecb3b7 10-May-2006 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: remove unneeded locking

Received From Mark Salyzyn

Since new commands to the card are quiesced, respect the changes in
the SCSI error path which dropped locking around the hba reset handler
and similarly drop the lock requirement in the driver's path.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
9a72f976d29091e4f4dfa08ed404ef84a56b0d47 27-Mar-2006 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: Driver version update

Received from Mark Salyzyn

Fix module param
Update driver version.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
3d2f98a66571d1aa8d66aab1a97bad6ffff61b24 27-Mar-2006 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: Fix parenthesis placement error

Received from Mark Salyzyn

On 64 bit machines, when a 32 bit application tries to acquire the AIF,
they will always get and EFAULT error response from the driver.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
d1ad94ad773c34a5a3491f9dcc0a97e264f971f6 27-Mar-2006 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: Show max channel and max id is sysfs

Received from Mark Salyzyn

Add max_channel and max_id sysfs parameters.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
1241f3593a8857fab4259b6aa9d17f26e7de3a86 27-Mar-2006 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: General driver cleanup

Received from Mark Salyzyn

Remove superfluous code, optimize code, harden code, cast code, correct
some text, use msleep instead of schedule_timeout_interruptible. No
bugs.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
53926274f24e5c852dbe8f89dea16b7822549472 27-Mar-2006 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: Fix extra unregister_chrdev

Received from Mark Salyzyn

If there are no aacraid controllers, we do not create the raid
controller chrdev, thus when the driver is unloaded it performs a
superfluous deregistration.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
95433badf0ff8dbc2caf14bc69c984841539715f 27-Mar-2006 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: Fix error in max_channel field

Received from Mark Salyzyn

The max_channel field is set one too large.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
e61b17fd3ae270c0ca83d12c8276b73e50466db9 27-Mar-2006 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: Error path cleanup

Received from Mark Salyzyn

Some of the error return paths during initialization resulted in a zero
report to caller

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
77d644d4d70c9ad5df51792575f43a950525c9aa 27-Mar-2006 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: Track command ownership in driver

Received from Mark Salyzyn

The loss of the ownership flags, despite their flaws, in the scsi
command were sorely missed and are reinstated more accurately in the
aacraid driver to track commands and permit us to properly handle error
recovery actions.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
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>
/drivers/scsi/aacraid/linit.c
fe27381d16c6683c55e618360d0d11bd43647e43 14-Feb-2006 Christoph Hellwig <hch@lst.de> [SCSI] aacraid: use kthread_ API

Use the kthread_ API instead of opencoding lots of hairy code for kernel
thread creation and teardown.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Salyzyn, Mark <mark_salyzyn@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
bb08f92ebd75704e07d69bb9d8ee234d1a500b98 01-Feb-2006 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: use no_uld_attach flag

Received From Mark Salyzyn.

In order to support user tools accessing the array components (SMART,
Mode Page information, Cache page adjustments, WWN determination,
Firmware updates etc), we take advantage of the no_uld_attach flag and
deprecate the code that filters Inquiries to block the requests to array
components. The quirk prevents the sd layer from attaching to the
components.

We also took the opportunity to balance the queue depths based on the
total adapter queue depth to the array devices to reduce the chances of
starvation.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
bfb35aa85057da4336af56a7f26e08031f4e3468 01-Feb-2006 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: Update global function names

Received from Mark Salyzyn,

Reduce the possibility of namespace collision. Prefix with aac_.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
d8a571135aad527e5984c8094b7977c6914f2550 01-Feb-2006 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: reduce device probe warnings

Received from Mark Salyzyn.

This patch sets up some device quirks surrounding arrays to inform the
scsi layer that various mode pages are not supported. This reduces the
severity of the complaints that show up in the logs as the array devices
are enumerated.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
db39363c029cd9e74661ef059a17785d1c62a851 11-Jan-2006 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: 17 element sg performance update

Received From Mark Salyzyn.

The Jaguar and Corsair class of adapters (2410, 2810, 2610, 21610, CERC)
perform better (about 10% better read performance, write performance
neutral) with current Firmware if the OS limits the number of scatter
gather elements to 17 per request.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
7686f132653fa3d52d45c3f021215f714094f1ca 11-Jan-2006 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: better sysfs adapter information

Received from Mark Salyzyn.

Provide more accurate adapter information.

Allows the Adapter Firmware to override the Adapter product
information.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
7ff92053ddff48d9d7908a353bd85f893944463e 10-Jan-2006 Christoph Hellwig <hch@lst.de> [PATCH] don't include ioctl32.h in drivers

These days ioctl32.h is only used for communication of fs/compat.c and
fs/compat_ioctl.c and doesn't contain anything of interest to drivers.

Remove inclusion in various drivers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/scsi/aacraid/linit.c
8bdf810f89c3e686ba18a11e2852f32014f1506a 30-Nov-2005 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: Check scsi_bios_ptabe return code

Received from Mark Salyzyn.

scsi_bios_ptable return value is not being checked in aac_biosparm.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
8e0c5ebde82b08f6d996e11983890fc4cc085fab 24-Oct-2005 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: Newer adapter communication iterface support

Received from Mark Salyzyn.

This patch adds the 'new comm' interface, which modern AAC based
adapters that are less than a year old support in the name of much
improved performance. These modern adapters support both the legacy and
the 'new comm' interfaces.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
38a9a621aba953ddb8051547e98c10ec3c741312 28-Oct-2005 James Bottomley <jejb@mulgrave.(none)> Merge HEAD from ../scsi-misc-2.6-old
71e0f32fbc7841d9c34949655039dcf4635540f0 28-Oct-2005 James Bottomley <jejb@mulgrave.(none)> [SCSI] aacraid: Use DMA mask defines

From: Mark Haverkamp <markh@osdl.org>
Received from Mark Salyzyn.

This patch changes the driver over to utilizing the DMA_64BIT_MASK and
DMA_32BIT_MASK manifests.

Applies to the scsi-rc-fixes-2.6 git tree.

Signed-off-by: Mark Haverkamp <markh@osdl.org>

Rejects fixed up and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
0e7734d3ca24302a513e69dd24a560c34047c038 15-Oct-2005 Mark Haverkamp <markh@osdl.org> [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>
/drivers/scsi/aacraid/linit.c
08efb7b6116927c8b6e0af5064448e3aa13300e6 20-Sep-2005 Mark Haverkamp <markh@osdl.org> [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>
/drivers/scsi/aacraid/linit.c
7a8cf29d69e077dfe90e327859201fd9b75a47ce 22-Sep-2005 Mark Haverkamp <markh@osdl.org> [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>
/drivers/scsi/aacraid/linit.c
7a93aef7fbac6f4db40b6fec5c0c6b654ae7a93c 28-Aug-2005 James Bottomley <jejb@titanic.(none)> Merge HEAD from ../scsi-misc-2.6-tmp
8e87c2f118d40d2dc2f5d0140818e8cd023b13e1 08-Aug-2005 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: adapter support update

Received from Mark Salyzyn

This patch adds the product ID for the ICP9067MA adapter.

The entries for the ICP9085LI, ICP5085BR, IBM8k & ASR4810SAS were
incorrect and would not initialize the adapters correctly.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
bd1aac809ddbcf7772cfd809d8cfb29c729c6cf9 04-Aug-2005 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: driver shutdown method

Add in pci shutdown method so that the adapter shuts down correctly and
flushes its cache. Shutdown should also disable the adapter's interrupt
when shutdown (in particularly if the driver is rmmod'd) to prevent
spurious hardware activities.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
c7f476023f57145357df32346b7de9202ce47d5f 04-Aug-2005 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: driver version update

Received from Mark Salyzyn from Adaptec.

Fixes a bug in check_revision. It should return the driver version not
the firmware version.
Update driver version number.
Update driver version string.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
43f2f3d343f9d00a94a9242547a59d9dfb2338c4 02-Aug-2005 Mark Haverkamp <markh@osdl.org> [PATCH] aacraid: Fix for controller load based timeouts

Martin Drab found that he could get aacraid timeouts with high load on his
controller / disk drive combinations. After some experimentation Mark
Salyzyn has come up with a patch to reduce the default max_sectors to
something that will keep the controller from being overloaded and will
eliminate the timeout issues.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Acked-by: Mark Salyzyn <mark_salyzyn@adaptec.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/scsi/aacraid/linit.c
849717383abc795b8f5efe7b9e0792b2e1f8916a 20-Jun-2005 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: New products patch

This patch add the following products to the driver:
IBM ServeRAID 8i
ICP 9014R0
ICP 9024R0
ICP 9047MA
ICP 9087MA
ICP 9085LI
ICP 5085AU

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
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>
/drivers/scsi/aacraid/linit.c
3471c288036bf0835a82d0b1bbce2002f6e68390 28-May-2005 Jeff Garzik <jgarzik@pobox.com> [SCSI] Remove no-op implementations of SCSI EH hooks

Drivers need not implement a hook that returns FAILED, and does nothing
else, since the SCSI midlayer code will do that for us.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
0bb14afe10dddbc05c3244bd224b6858de0ee319 01-Jun-2005 Mark Haverkamp <markh@osdl.org> [SCSI] 2.6 aacraid: updated sysfs files

This patch adds some files into the /sys/class/scsi_host/hostN
directories for aacraid adapters:

model
vendor
hba_kernel_version
hba_monitor_version
hba_bios_version
serial_number

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
7c00ffa314bf0fb0e23858bbebad33b48b6abbb9 17-May-2005 Mark Haverkamp <markh@osdl.org> [SCSI] 2.6 aacraid: Variable FIB size (updated patch)

New code from the Adaptec driver. Performance enhancement for newer
adapters. I hope that this isn't too big for a single patch. I believe
that other than the few small cleanups mentioned, that the changes are
all related.

- Added Variable FIB size negotiation for new adapters.
- Added support to maximize scatter gather tables and thus permit
requests larger than 64KB/each.
- Limit Scatter Gather to 34 elements for ROMB platforms.
- aac_printf is only enabled with AAC_QUIRK_34SG
- Large FIB ioctl support
- some minor cleanup

Passes sparse check.
I have tested it on x86 and ppc64 machines.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
ad34ea2cc3845ef4dcd7d12fb0fa8484734bd672 20-May-2005 James Bottomley <jejb@titanic.(none)> merge by hand - fix up rejections in Documentation/DocBook/Makefile
56b5871223f66d4a34e6e1069f241077e9f0a154 27-Apr-2005 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: remove sparse warnings

This patch addresses the sparse -Wbitwise warnings that Christoph wanted
me to eliminate. This mostly consisted of making data structure
elements of hardware associated structures the __le* equivalent.
Although there were a couple places where there was mixing of cpu and le
variable math. These changes have been tested on both an x86 and ppc
machine running bonnie++. The usage of the LE32_ALL_ONES macro has been
eliminated.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
4833869e6e6c2315e301c256e393dfb949c10076 26-Apr-2005 Adrian Bunk <bunk@stusta.de> [SCSI] drivers/scsi/aacraid/: make some functions static

This patch makes some needlessly global functions static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
036d618434516103adb4d36db28a57968d2f2e7b 27-Apr-2005 Mark Haverkamp <markh@osdl.org> [SCSI] aacraid: Fix adapter open error

This fixes an error on the device open code that allows a non-existent
device to be opened causing later panic problems.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/aacraid/linit.c
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!
/drivers/scsi/aacraid/linit.c