History log of /drivers/scsi/ibmvscsi/ibmvscsi.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cb52d8970eee65bf2c47d9a91bd4f58b17f595f4 26-Mar-2012 Benjamin Herrenschmidt <benh@kernel.crashing.org> powerpc+sparc/vio: Modernize driver registration

This makes vio_register_driver() get the module owner & name at compile
time like PCI drivers do, and adds a name pointer directly in struct
vio_driver to avoid having to explicitly initialize the embedded
struct device.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: David S. Miller <davem@davemloft.net>
/drivers/scsi/ibmvscsi/ibmvscsi.c
7834799a6c8fed36d06d6b78bfd17831ecfa93c4 07-Mar-2012 Stephen Rothwell <sfr@canb.auug.org.au> powerpc: remove the legacy iSeries part of ibmvscsi

The PowerPC legacy iSeries platform is being removed and this code is
no longer selectable. There is more clean up that can be done, but this
just gets the old code out of the way.

Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Cc: Brian King <brking@linux.vnet.ibm.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
/drivers/scsi/ibmvscsi/ibmvscsi.c
201aed678482f247aa96bd8fcd9e960fefd82d59 27-Apr-2011 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Improve CRQ reset reliability

This patch fixes an issue seen where an event occurs
which causes the ibmvscsi driver to reset its CRQ. Upon
re-registering its CRQ, it receives H_CLOSED, indicating
the Virtual I/O Server is not yet ready to receive commands.
This resulted in the ibmvscsi driver essentially offlining
the adapter and not recovering. The fix is to re-enable
our interrupt so that when the Virtual I/O server is ready
and sends a CRQ init, we will be able to receive it and
resume initialization of the VSCSI adapter.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/ibmvscsi/ibmvscsi.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/ibmvscsi/ibmvscsi.c
aac3118d33e275a7b1134cb19227c982f4d43877 17-Jun-2010 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Driver version 1.5.9

Bump driver version

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/ibmvscsi/ibmvscsi.c
f3a9c4d76a955e331e88992cd3b1e1498c231d52 17-Jun-2010 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Fix possible request_limit issue

If we encounter an error when sending a management datagram (i.e. non
SCSI command, such as virtual adapter initialization command), we
end up incrementing the request_limit, even though we don't decrement
it for these commands. Fix this up by doing this increment in
the error path for SRP commands only.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/ibmvscsi/ibmvscsi.c
1117ef8aed95521f46dae3052c7120baae48c2bb 17-Jun-2010 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Fix error path deadlock

Fixes a deadlock that can occur if we hit a command timeout
during the virtual adapter initialization. The event done
functions are written with the assumption that no locks are held,
however, when purging requests this is not true. Fix up the
purge function to drop the lock so that the done function
is not called with the lock held, which can cause a deadlock.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/ibmvscsi/ibmvscsi.c
0f33ece5bc3d5a9567b65cfbc736e8f206ecfc7b 17-Jun-2010 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Fix softlockup on resume

This fixes a softlockup seen on resume. During resume, the CRQ
must be reenabled. However, the H_ENABLE_CRQ hcall used to do
this may return H_BUSY or H_LONG_BUSY. When this happens, the
caller is expected to retry later. This patch changes a simple
loop, which was causing the softlockup, to a loop at task level
which sleeps between retries rather than simply spinning.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/ibmvscsi/ibmvscsi.c
cf9b59e9d3e008591d1f54830f570982bb307a0d 22-May-2010 Grant Likely <grant.likely@secretlab.ca> Merge remote branch 'origin' into secretlab/next-devicetree

Merging in current state of Linus' tree to deal with merge conflicts and
build failures in vio.c after merge.

Conflicts:
drivers/i2c/busses/i2c-cpm.c
drivers/i2c/busses/i2c-mpc.c
drivers/net/gianfar.c

Also fixed up one line in arch/powerpc/kernel/vio.c to use the
correct node pointer.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
61c7a080a5a061c976988fd4b844dfb468dda255 14-Apr-2010 Grant Likely <grant.likely@secretlab.ca> of: Always use 'struct device.of_node' to get device node pointer.

The following structure elements duplicate the information in
'struct device.of_node' and so are being eliminated. This patch
makes all readers of these elements use device.of_node instead.

(struct of_device *)->node
(struct dev_archdata *)->prom_node (sparc)
(struct dev_archdata *)->of_node (powerpc & microblaze)

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
/drivers/scsi/ibmvscsi/ibmvscsi.c
a71fa1fc43a29133f13ae6ada1a389ca298c0934 02-Apr-2010 FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> [SCSI] ibmvscsi: fix DMA API misuse

ibmvscsi uses dma_unmap_single() for buffers mapped via
dma_map_sg(). It works however it's the API violation. The DMA debug
facility complains about it:

http://marc.info/?l=linux-scsi&m=127018555013151&w=2

Reported-by: Sachin Sant <sachinp@in.ibm.com>
Tested-by: Sachin Sant <sachinp@in.ibm.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/ibmvscsi/ibmvscsi.c
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>
/drivers/scsi/ibmvscsi/ibmvscsi.c
64355b929dec0cb6271e4ac7834c9cf262961e40 21-Feb-2010 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Add suspend/resume support

Adds support for resuming from suspend for IBM VSCSI devices. We may have
lost an interrupt over the suspend, so we just kick the interrupt handler
to process anything that is outstanding. We expect to find a transport event
indicating we need to reestablish our CRQ.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/ibmvscsi/ibmvscsi.c
9b7dac086bec7c71722d6e79464609e17f0996e7 04-Dec-2009 Bart Van Assche <bart.vanassche@gmail.com> [SCSI] ibmvscsi: fix a typo in a source code comment

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/ibmvscsi/ibmvscsi.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/ibmvscsi/ibmvscsi.c
98840f2ce5339d46e1830b0455360ad03a840d9d 20-Sep-2009 Jaswinder Singh Rajput <jaswinderrajput@gmail.com> includecheck fix: drivers/scsi, ibmvscsi.c

fix the following 'make includecheck' warning:

drivers/scsi/ibmvscsi/ibmvscsi.c: asm/firmware.h is included more than once.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
LKML-Reference: <1247067016.4382.78.camel@ht.satnam>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
e08afeb7e69f45e4ab9fbb8530fe433484b96606 24-Jun-2009 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Fix module load hang

Fixes a regression seen in the ibmvscsi driver when using the VSCSI
server in SLES 9 and SLES 10. The VSCSI server in these releases
has a bug in it in which it does not send responses to unknown MADs.
Check the OS Type field in the adapter info response and do not send
these unsupported commands when talking to an older server.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
559fde706873256903155b3a62b05d0f52d62ab9 04-May-2009 Greg Kroah-Hartman <gregkh@suse.de> ibmvscsi: gadget: at91_udc: remove driver_data direct access of struct device

In the near future, the driver core is going to not allow direct access
to the driver_data pointer in struct device. Instead, the functions
dev_get_drvdata() and dev_set_drvdata() should be used. These functions
have been around since the beginning, so are backwards compatible with
all older kernel versions.

Cc: linux-scsi@vger.kernel.org
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Brian King <brking@linux.vnet.ibm.com>
Cc: Robert Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/scsi/ibmvscsi/ibmvscsi.c
126c5cc37e682e7c5ae96754994b1cb50c2d0cb5 08-Jun-2009 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Add support for capabilities MAD

Add support to ibmvscsi for the capabilities MAD. This command gets sent
to the Virtual I/O server prior to login in order to communicate client
capabilities. Additionally it returns information regarding capabilities
that the server supports. The two main capabilities communicated in this
MAD are related to partition migration and client reserve. Client reserve
allows for SCSI-2 reservations to be sent to virtual disks which are backed
by physical LUNs and will result in the reservation being sent to the
physical LUN.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
c1988e3123751fd425fbae99d5c1776608e965a9 08-Jun-2009 Robert Jennings <rcj@linux.vnet.ibm.com> [SCSI] ibmvscsi: Enable fast fail feature

A new mode of error reporting, fast fail, has been added to the VIOS
which allows failover to happen more quickly.

If this new fast fail mode is enabled on the VIOS and the vSCSI client
supports the mode, the VIOS will not return MEDIUM error on path failures,
but rather return VIOSRP_ADAPTER_FAIL in the crq response, which
ibmvscsi will translate to DID_ERROR.

This new mode can be enabled for single path configurations as well,
so it is the new default error reporting mode. A module parameter is
provided to disable this new behavior on the off chance it causes a
problem on some old VIOS version.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
3507e13fcba6b97501891a410ec8ef9f1f188620 08-Jun-2009 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Send adapter info before login

The ibmvscsi driver currently sends the SRP Login before sending the Adapter
Info MAD, which can result in commands getting sent to the virtual adapter
before we are ready for them. This results in a slight window where the target
devices may not behave as expected. Change the order and close the window.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
e1a5ce5b88d06344caec0c71b4ee33e7296358dd 08-Jun-2009 Robert Jennings <rcj@linux.vnet.ibm.com> [SCSI] ibmvscsi: Add specific timeouts for operations

Previously we had one timeout that was used for all types of operations.
This adds specific timeout values for different operations (init, login,
adapter info MAD, abort task, and LUN reset).

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
fbc56f0801f58041a4372a030933bac076b46aad 08-Jun-2009 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Add 16 byte CDB support

Adds support for 16 byte CDBs to the ibmvscsi driver.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
16b3858ec967f4d9817f6958cc7a0bf1222355f3 02-May-2009 Roel Kluin <roel.kluin@gmail.com> [SCSI] ibmvscsi: Remove redundant test on unsigned.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
e637d553199e264327714da437e6c808f2f4b096 22-Jan-2009 Robert Jennings <rcj@linux.vnet.ibm.com> [SCSI] ibmvscsi: Correct DMA mapping leak

The ibmvscsi client driver is not unmapping the SCSI command after
encountering a DMA mapping error while trying to map an indirect
scattergather list for the event pool. This leads to a leak of DMA
entitlement that could result in the device failing future DMA operations
in a CMO environment.

Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
fe333321e2a71f706b794d55b6a3dcb5ab240f65 06-Jan-2009 Ingo Molnar <mingo@elte.hu> powerpc: Change u64/s64 to a long long integer type

Convert arch/powerpc/ over to long long based u64:

-#ifdef __powerpc64__
-# include <asm-generic/int-l64.h>
-#else
-# include <asm-generic/int-ll64.h>
-#endif
+#include <asm-generic/int-ll64.h>

This will avoid reoccuring spurious warnings in core kernel code that
comes when people test on their own hardware. (i.e. x86 in ~98% of the
cases) This is what x86 uses and it generally helps keep 64-bit code
32-bit clean too.

[Adjusted to not impact user mode (from paulus) - sfr]

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
/drivers/scsi/ibmvscsi/ibmvscsi.c
4f10aae0d1a285df6b16bf6ca5abd366140fd371 18-Dec-2008 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Make max_requests module parameter more accurate

In a previous patch to fix an issue with error recovery,
the behavior of the max_requests module paramater was also
changed. If, for some reason, max_requests is set to one by
the user, we will end up with a negative number for can_queue.
Fix this by making max_requests not include the two event structs
needed to do error recovery.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
21465eda9eafa275ed11c27779d90aa95559b6f6 09-Dec-2008 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Don't fail EH due to insufficient resources

The ibmvscsi driver currently has a bug in it which can result
in it using up all its event structs for commands. If something
results in all those commands timing out, we won't have any resources
left to send aborts or resets. This results in escalating to a host reset
in order to recover, which is a bit heavy handed. This fixes it
by reducing can_queue by two in order to have resources to do EH.
It also changes the max_requests module parameter so that it is not
writable at runtime, since the code really does not handle it changing
at runtime.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
97b5648a8bc2aef980645ee39d31bba0933a6112 30-Nov-2008 James Bottomley <James.Bottomley@HansenPartnership.com> [SCSI] ibmvscsi: switch to block timeout

ibmvscsi sets the timeout in its slave configure routine for disk
devices. This now needs to update the request queue timeout in block.

Cc: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
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>
/drivers/scsi/ibmvscsi/ibmvscsi.c
004dd5e88673516a408f0e8e43edbe6a4424be2f 15-Aug-2008 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Fixup desired DMA value for shared memory partitions

When running ibmvscsi in a shared memory partition, it must provide
a default value for the amount of DMA resources it will need in order to
perform reasonably well. This was being calculated in sectors rather than
bytes, as it should. This patch fixes this.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
8d8bb39b9eba32dd70e87fd5ad5c5dd4ba118e06 26-Jul-2008 FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> dma-mapping: add the device argument to dma_mapping_error()

Add per-device dma_mapping_ops support for CONFIG_X86_64 as POWER
architecture does:

This enables us to cleanly fix the Calgary IOMMU issue that some devices
are not behind the IOMMU (http://lkml.org/lkml/2008/5/8/423).

I think that per-device dma_mapping_ops support would be also helpful for
KVM people to support PCI passthrough but Andi thinks that this makes it
difficult to support the PCI passthrough (see the above thread). So I
CC'ed this to KVM camp. Comments are appreciated.

A pointer to dma_mapping_ops to struct dev_archdata is added. If the
pointer is non NULL, DMA operations in asm/dma-mapping.h use it. If it's
NULL, the system-wide dma_ops pointer is used as before.

If it's useful for KVM people, I plan to implement a mechanism to register
a hook called when a new pci (or dma capable) device is created (it works
with hot plugging). It enables IOMMUs to set up an appropriate
dma_mapping_ops per device.

The major obstacle is that dma_mapping_error doesn't take a pointer to the
device unlike other DMA operations. So x86 can't have dma_mapping_ops per
device. Note all the POWER IOMMUs use the same dma_mapping_error function
so this is not a problem for POWER but x86 IOMMUs use different
dma_mapping_error functions.

The first patch adds the device argument to dma_mapping_error. The patch
is trivial but large since it touches lots of drivers and dma-mapping.h in
all the architecture.

This patch:

dma_mapping_error() doesn't take a pointer to the device unlike other DMA
operations. So we can't have dma_mapping_ops per device.

Note that POWER already has dma_mapping_ops per device but all the POWER
IOMMUs use the same dma_mapping_error function. x86 IOMMUs use device
argument.

[akpm@linux-foundation.org: fix sge]
[akpm@linux-foundation.org: fix svc_rdma]
[akpm@linux-foundation.org: build fix]
[akpm@linux-foundation.org: fix bnx2x]
[akpm@linux-foundation.org: fix s2io]
[akpm@linux-foundation.org: fix pasemi_mac]
[akpm@linux-foundation.org: fix sdhci]
[akpm@linux-foundation.org: build fix]
[akpm@linux-foundation.org: fix sparc]
[akpm@linux-foundation.org: fix ibmvscsi]
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Muli Ben-Yehuda <muli@il.ibm.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/scsi/ibmvscsi/ibmvscsi.c
7912a0ac5907df1f8b214b3ca15ccf96129daae0 23-Jul-2008 Robert Jennings <rcj@linux.vnet.ibm.com> ibmvscsi: driver enablement for CMO

Enable the driver to function in a Cooperative Memory Overcommitment (CMO)
environment.

The following changes are made to enable the driver for CMO:
* DMA mapping errors will not result in error messages if entitlement has
been exceeded and resources were not available.
* The driver has a get_desired_dma function defined to function
in a CMO environment. It will indicate how much IO memory it would like
to function.

Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Acked by: Brian King <brking@linux.vnet.ibm.com>
Acked-by: Paul Mackerras <paulus@samba.org>
Acked-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
/drivers/scsi/ibmvscsi/ibmvscsi.c
ca61668b82a902143997794aae3f681a602e6ebc 19-May-2008 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Non SCSI error status fixup

Some versions of the Virtual I/O Server on Power
return 0x99 in the non-SCSI error status field as success,
rather than 0. This fixes the ibmvscsi driver to treat this
response as success.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
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>
/drivers/scsi/ibmvscsi/ibmvscsi.c
c3a3b55ae80a0d595445064159c69f8e80911e85 25-Apr-2008 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Handle non SCSI error status

Adds support to the ibmvscsi driver to handle non SCSI error
status. This is needed to support some new VIOS enhancements.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Santiago Leon <santil@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
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/ibmvscsi/ibmvscsi.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/ibmvscsi/ibmvscsi.c
860784c8a2b077157b6a51fb8749524d0363cc49 12-Nov-2007 Robert Jennings <rcj@linux.vnet.ibm.com> [SCSI] ibmvscsi: requeue while CRQ closed

CRQ send errors that return with H_CLOSED should return with
SCSI_MLQUEUE_HOST_BUSY until firmware alerts the client of a CRQ
transport event. The transport event will either reinitialize and
requeue the requests or fail and return IO with DID_ERROR.

To avoid failing the eh_* functions while re-attaching to the server
adapter this will retry for a period of time while ibmvscsi_send_srp_event
returns SCSI_MLQUEUE_HOST_BUSY.

In ibmvscsi_eh_abort_handler() the loop includes the search of the
event list. The lock on the hostdata is dropped while waiting to try
again after failing ibmvscsi_send_srp_event. The event could have been
purged if a login was in progress when the function was called.

In ibmvscsi_eh_device_reset_handler() the loop includes the call to
get_event_struct() because a failing call to ibmvscsi_send_srp_event()
will have freed the event struct.

Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
d1a357fcc8348d325d151f6fe0ea54e317652457 25-Oct-2007 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Set default command timeout

Set the default command timeout for ibmvscsi disks to 60 seconds
to ensure we don't prematurely timeout commands. This fixes a problem
seen where the default 30 seconds was not long enough due to
congestion on the server.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
3c887e8a1a4553ae6263fc9490e33de213e3746f 30-Oct-2007 Robert Jennings <rcj@linux.vnet.ibm.com> [SCSI] ibmvscsi: Prevent IO during partner login

By setting the request_limit in send_srp_login to 1 we allowed login
requests to be sent to the server adapter. If this was not an initial
login, but was a login after a disconnect with the server, other I/O
requests could attempt to be processed before the login occured. These
I/O requests would fail, sometimes resulting in filesystems getting
marked read-only.

To address this we can set the request_limit to 0 while doing the login
and add an exception where login requests, along with task management
events, are always passed to the server.

There is a case where the request_limit had already reached 0 would result
in all events being sent rather than returning SCSI_MLQUEUE_HOST_BUSY; this
has also been fixed by this patch.

Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/ibmvscsi/ibmvscsi.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/ibmvscsi/ibmvscsi.c
d3849d512fb0ca1e369e3efcaec910a949f55f62 22-Sep-2007 David Woodhouse <dwmw2@infradead.org> [SCSI] Fix ibmvscsi client for multiplatform iSeries+pSeries kernel

If you build a multiplatform kernel for iSeries and pSeries, with
ibmvscsic support, the resulting client doesn't work on iSeries.

This fixes that, using the appropriate low-level operations
for the machine detected at runtime.

[jejb: fixed up rejections around the srp transport patch]

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
aebd5e476ecc8ceb53577b20f2a352ff4ceffd8d 11-Jul-2007 FUJITA Tomonori <tomof@acm.org> [SCSI] transport_srp: add rport roles attribute

This adds a 'roles' attribute to rport like transport_fc. The role can
be initiator or target. That is, the initiator driver creates target
remote ports and the target driver creates initiator remote ports.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
4d68041907b150b07640b607c6c626391cf3fe8b 27-Jun-2007 FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> [SCSI] ibmvscsi: convert to use the srp transport class

This converts ibmvscsi to use the srp transport class.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
7603e02eac309626c0153ebddf277253ea7fe0e0 23-Jul-2007 FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> [SCSI] ibmvscsi: use shost_priv

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
ed3a3633b798a15281f9c9a89a7e74d4bdd02ebe 23-Jul-2007 FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> [SCSI] ibmvscsi: remove unnecessary map_sg check

No need to check use_sg since sg_tablesize is set appropriately in the
scsi host template.

Brian King's patch (2a7309372fe56ae46c499b772d811ad31c501dd9) did this
cleanup but the data buffer accessors patch (written before the patch
and merged after it) restored the check.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
9413d7b8aa777dd1fc7db9563ce5e80d769fe7b5 25-May-2007 FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> [SCSI] ibmvscsi: 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.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Santiago Leon <santil@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
33874a002d4fdd34e35e8265f9b2e0582385f744 22-May-2007 FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> [SCSI] ibmvscsi: fix timeout bugs

The viosrp_crq timeout field is in seconds.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Santiago Leon <santil@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
35f51eee99efe88866476300ccb7f206e88f3394 14-Jun-2007 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Abort path fix

Since it is completely possible for scsi core to call
a LLDD's eh_abort function after the command has completed,
fix ibmvscsi to return SUCCESS if this is the case.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
06f923cbf080e22d1ffccbf3fd2cbab0176f6025 14-Jun-2007 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Misc. locking fixes

Fix a couple locking bugs discovered during code inspection.
ibmvscsi_send_srp_event needs to be called with the host lock
held. This patch fixes a couple paths in the code where this
wasn't true.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
3d0e91f7ace12499c4b00088e9a6b1361e1bb0ca 14-Jun-2007 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Add eh_host_reset_handler

Adds an eh_host_reset_handler to ibmvscsi which resets the connection
to the vscsi server. This patch also adds a timer to internally
issues commands to prevent client hangs in the case of a misbehaving
server. Tested by modifying the VIOS such that it would occasionally
drop one or more request in sequence.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
6c0a60ec52042ece8bf4904c91ac497188e8d70b 14-Jun-2007 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Enhanced error logging

Converts ibmvscsi to use dev_printk and friends to simplify
debugging. ibmvscsi adapter initialization now looks like this:

ibmvscsi 30000005: SRP_VERSION: 16.a
ibmvscsi 30000005: partner initialization complete
ibmvscsi 30000005: sent SRP login
ibmvscsi 30000005: SRP_LOGIN succeeded

Additionally, this patch adds the logging of a couple return codes in
a couple logs.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
2a7309372fe56ae46c499b772d811ad31c501dd9 14-Jun-2007 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Remove unnecessary map_sg check

Since sg_tablesize is set appropriately in the scsi host template,
remove the unnecessary check to make sure it is not exceeded
following the dma_map_sg call.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
742d25b819f11dce91b89e6c9ac17402a119f20a 29-May-2007 Brian King <brking@linux.vnet.ibm.com> [SCSI] ibmvscsi: Changeable queue depth

Adds support for a changeable queue depth to ibmvscsi.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
0979c84b4affaf924a894380dd0069638b64de03 29-Mar-2007 Robert Jennings <rcj@linux.vnet.ibm.com> [SCSI] ibmvscsi: add slave_configure to allow device restart

Fixed the kernel-doc comment for ibmvscsi_slave_configure. Thanks to
Randy Dunlap for pointing this out.

Adding a slave_configure function for the driver. Now the disks can be
restarted by the scsi mid-layer when the are disconnected and reconnected.

Signed-off-by: "Robert Jennings" <rcj@linux.vnet.ibm.com>
Signed-off-by: "Santiago Leon" <santil@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
a897ff2a6386ac4368ba41db18b626afd903f9d8 28-Mar-2007 Robert Jennings <rcjenn@us.ibm.com> [SCSI] ibmvscsi: allow for dynamic adjustment of server request_limit

The request limit calculations used previously on the client failed to
mirror the state of the server. Additionally, when a value < 3 was provided
there could be problems setting can_queue and handling abort and reset
commands.

Signed-off-by: "Robert Jennings" <rcj@linux.vnet.ibm.com>
Signed-off-by: Santiago Leon <santil@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
9c3121feef7e1fba86f74b2677e6f54e7153d149 13-Oct-2006 Santiago Leon <santil@us.ibm.com> [SCSI] ibmvscsi: correctly reenable CRQ

The "ibmvscsi: treat busy and error conditions separately" patch
submitted by Dave Boutcher back in June incorrectly reenables the CRQ.
The broken logic causes the adapter to get disabled if the CRQ
connection happens to close temporarily. This patch "fixes that
obviously wrong logic check" (Dave's words).

Signed-off-by: Santiago Leon <santil@us.ibm.com>
Signed-off-by: David Boutcher <sleddog@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
cefbda2d6cd9bf78a93768130729a6d142588d67 13-Jun-2006 Dave C Boutcher <boutcher@cs.umn.edu> [SCSI] ibmvscsi: treat busy and error conditions separately

This patch fixes a condition where ibmvscsi treats a transport error as a
"busy" condition, so no errors were returned to the scsi mid-layer.
In a RAID environment this means that I/O hung rather than failing
over.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
f0cd91a68acdc9b49d7f6738b514a426da627649 10-Jun-2006 James Bottomley <jejb@mulgrave.il.steeleye.com> Merge ../linux-2.6
e5dbfa6621732a110514fb10f9a43f0e8f4befd4 14-Apr-2006 FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> [SCSI] ibmvscsi: fix leak when failing to send srp event

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
4c021dd136c0ad524e6d117296beafad2bf570c0 07-Apr-2006 FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> [SCSI] ibmvscsi: convert kmalloc + memset to kcalloc

Convert kmalloc + memset to kcalloc in ibmvscsi

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Dave Boutcher <sleddog@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
ef265673434680f2307ceafae4a2badc657e94cc 25-Mar-2006 FUJITA Tomonori <tomof@acm.org> [SCSI] ibmvscsi: convert the ibmvscsi driver to use include/scsi/srp.h

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
9b833e428ad24dc7cec2c0c7e6898caa91449c95 23-Mar-2006 Dave C Boutcher <boutcher@cs.umn.edu> [SCSI] ibmvscsi: prevent scsi commands being sent in invalid state

There is a window where we can be re-enabling an adapter, but
still allow SCSI commands to be sent to the target. This fix
sets our window (request_limit) to -1 as soon as we know the
adapter is being reenabled, and closes a very teeny tiny
window where we could set the window back to 1 before we
grab a lock.

Signed-off-by: Dave Boutcher <sleddog@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
2b541f8f77fd339e4c5c5cbe8549b52445012704 19-Jan-2006 Dave C Boutcher <sleddog@us.ibm.com> [SCSI] ibmvscsi: handle re-enable firmware message

New versions of the Power5 firmware can send a "re-enable" message to
the virtual scsi adapter. This fix makes us handle the message
correctly. Without it, the driver goes catatonic and the system crashes
unpleasantly.

Signed-off-by: Dave Boutcher <sleddog@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
915124d8114ec8c3825b10a39151bf9e851593bb 24-Oct-2005 Stephen Rothwell <sfr@canb.auug.org.au> powerpc: set the driver.owner field for all vio drivers

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
/drivers/scsi/ibmvscsi/ibmvscsi.c
6fdf5392caa4c3cba65add0a4beec9f5eb96b723 24-Oct-2005 Stephen Rothwell <sfr@canb.auug.org.au> powerpc: don't duplicate name between vio_driver and device_driver

Just set the name field directly in the device_driver structure
contained in the vio_driver struct.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
/drivers/scsi/ibmvscsi/ibmvscsi.c
154fb614df83086ceb18a2c19908154e78d4dc98 13-Sep-2005 Dave C Boutcher <sleddog@us.ibm.com> [SCSI] ibmvscsi compatibility fix

Linda Xie ever so gently pointed out that she had a patch
to preserve compatibility with older SLES targets, and I told
her we didn't need to push it to mainline.

This patch explicitly checks the version of the IBMVSCSI target
and ensures that large scatterlists are not sent to older
targets.

Signed-off-by: Linda Xie <lxie@us.ibm.com>
Signed-off-by: Dave Boutcher <boutcher@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
0481990b758628e12f4b0a9e15094e70cefc7cd1 08-Sep-2005 Linus Torvalds <torvalds@g5.osdl.org> Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6
4dddbc26c3895ecdab1f4b16435685b47f96f599 07-Sep-2005 James Bottomley <jejb@mulgrave.(none)> [SCSI] ibmvscsi: handle large scatter/gather lists

The maximum size of a scatter-gather list that the current IBM VSCSI
Client can handle is 10. This patch adds large scatter-gather support
to the client so that it is capable of handling up to SG_ALL(255)
number of requests in the scatter-gather list.

Signed-off-by: Linda Xie <lxie@us.ibm.com>
Acked by: Dave C Boutcher <sleddog@us.ibm.com>

Rejections fixed up and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
fb120da678c517f72d4b39932062c2191827b331 17-Aug-2005 Stephen Rothwell <sfr@canb.auug.org.au> [PATCH] Make MODULE_DEVICE_TABLE work for vio devices

Make MODULE_DEVICE_TABLE work for vio devices.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
/drivers/scsi/ibmvscsi/ibmvscsi.c
8224bfa84d510630b40ea460b2bb380c91acb8ae 22-Aug-2005 Dave C Boutcher <sleddog@us.ibm.com> [SCSI] ibmvscsi timeout fix

This patch fixes a long term borkenness in
ibmvscsi where we were using the wrong timeout
field from the scsi command (and using the
wrong units.) Now broken by the fact that the
scsi_cmnd timeout field is gone entirely.
This only worked before because all the SCSI
targets assumed that 0 was default.

Signed-off-by: Dave Boutcher <boutcher@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
be042f240a8528b8f6b741a484cdbbf515698388 15-Aug-2005 Dave C Boutcher <sleddog@us.ibm.com> [SCSI] ibmvscsi eh locking

With the removal of the spinlocking around eh calls, we need to add a
little more locking back in, otherwise we do some naked list
manipulation.

Signed-off-by: Dave Boutcher <boutcher@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
b4687ca42cb82a7821f682dde0310b16ce284770 28-Jun-2005 Linda Xie <lxiep@us.ibm.com> [SCSI] IBM VSCSI Client: sending client info to server

Fix the problem in IBM VSCSI Client where the client doesn't send the
information which is expected by the server.

Signed-off-by: Linda Xie <lxie@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/ibmvscsi/ibmvscsi.c
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>
/drivers/scsi/ibmvscsi/ibmvscsi.c
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>
/drivers/scsi/ibmvscsi/ibmvscsi.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/ibmvscsi/ibmvscsi.c