]> pilppa.com Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
16 years ago[SCSI] sym53c8xx: Fix bogus sym_que_entry re-implementation of container_of
Benjamin Herrenschmidt [Mon, 7 Jul 2008 00:50:25 +0000 (10:50 +1000)]
[SCSI] sym53c8xx: Fix bogus sym_que_entry re-implementation of container_of

The sym53c8xx driver, for some reason, seems to mostly re-implement
linux/list.h with added bogosity. The main one is it's implementation
of sym_que_entry which spits warnings with recent gcc's on some
64 bits architectures.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_cmnd.h: remove double inclusion of linux/blkdev.h
Alexander Beregalov [Sun, 6 Jul 2008 13:01:34 +0000 (17:01 +0400)]
[SCSI] scsi_cmnd.h: remove double inclusion of linux/blkdev.h

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] make struct scsi_{host,target}_type static
Adrian Bunk [Fri, 4 Jul 2008 06:47:33 +0000 (23:47 -0700)]
[SCSI] make struct scsi_{host,target}_type static

Make the needlessly global struct scsi_{host,target}_type static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] fix locking in host use of blk_plug_device()
James Bottomley [Thu, 3 Jul 2008 16:31:55 +0000 (11:31 -0500)]
[SCSI] fix locking in host use of blk_plug_device()

scsi_lib.c:scsi_host_queue_ready() plugs the device with incorrect
locking.  It should actually have the queue lock held, but it's
holding the host lock.  Fix this by eliminating the call.  The host
ready has no need to plug the queue because if it returns 0 in
scsi_request_function control transfers to not_ready which acquires
the queue lock and plugs the device if its at zero depth.

Reported-by: Elias Oltmanns <eo@nebensachen.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Cleanup external header file
Christof Schmitt [Wed, 2 Jul 2008 08:56:41 +0000 (10:56 +0200)]
[SCSI] zfcp: Cleanup external header file

Sort the extern definitions by file.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Cleanup code in zfcp_erp.c
Christof Schmitt [Wed, 2 Jul 2008 08:56:40 +0000 (10:56 +0200)]
[SCSI] zfcp: Cleanup code in zfcp_erp.c

Cleanup the code in zfcp_erp.c, move erp internal definititions to
this file and move FSF timeout handling to the FSF layer.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: zfcp_fsf cleanup.
Swen Schillig [Wed, 2 Jul 2008 08:56:39 +0000 (10:56 +0200)]
[SCSI] zfcp: zfcp_fsf cleanup.

Code cleanup for the zfcp_fsf.c file.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: consolidate sysfs things into one file.
Swen Schillig [Wed, 2 Jul 2008 08:56:38 +0000 (10:56 +0200)]
[SCSI] zfcp: consolidate sysfs things into one file.

zfcp was using three files to deal with sysfs representation
for adapters, ports and units. The consolidation into one file
prevents code-duplication and eases maintainability.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Cleanup of code in zfcp_aux.c
Swen Schillig [Wed, 2 Jul 2008 08:56:37 +0000 (10:56 +0200)]
[SCSI] zfcp: Cleanup of code in zfcp_aux.c

Overall cleanup of zfcp_aux.c to simplify code and follow kernel
coding style.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Cleanup of code in zfcp_scsi.c
Martin Petermann [Wed, 2 Jul 2008 08:56:36 +0000 (10:56 +0200)]
[SCSI] zfcp: Cleanup of code in zfcp_scsi.c

Cleanup code in zfcp_scsi.c, fix coding style issues and simplify the
code.

Signed-off-by: Martin Petermann <martin@linux.vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Move status accessors from zfcp to SCSI include file.
Martin Petermann [Wed, 2 Jul 2008 08:56:35 +0000 (10:56 +0200)]
[SCSI] zfcp: Move status accessors from zfcp to SCSI include file.

Move the accessor functions for the scsi_cmnd status from zfcp to the
SCSI include file. Change the interface to the functions to pass the
scsi_cmnd pointer instead of the status pointer.

Signed-off-by: Martin Petermann <martin@linux.vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Small QDIO cleanups
Christof Schmitt [Wed, 2 Jul 2008 08:56:34 +0000 (10:56 +0200)]
[SCSI] zfcp: Small QDIO cleanups

QBUFF_PER_PAGE is only used inside the qdio module, so move it to
zfcp_qdio.c

zfcp_qdio_zero_sbals is now only used in the qdio module, so make it
static.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Adapter reopen for large number of unsolicited status
Swen Schillig [Wed, 2 Jul 2008 08:56:33 +0000 (10:56 +0200)]
[SCSI] zfcp: Adapter reopen for large number of unsolicited status

When zfcp receives 16 unsolicited status messages, this could trigger
an adapter reopen. In this case, first try to send a new status read,
and only if this fails, go through the recovery.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Fix error checking for ELS ADISC requests
Christof Schmitt [Wed, 2 Jul 2008 08:56:32 +0000 (10:56 +0200)]
[SCSI] zfcp: Fix error checking for ELS ADISC requests

Correctly check the status for ELS ADISC requests. 0 means success.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: wait until adapter is finished with ERP during auto-port
Swen Schillig [Wed, 2 Jul 2008 08:56:31 +0000 (10:56 +0200)]
[SCSI] zfcp: wait until adapter is finished with ERP during auto-port

In some situations the auto port attachment task is started
before the ERP is finished. To prevent this unwanted situation
we wait until the adapter is up and running before we start our work.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] ibmvfc: IBM Power Virtual Fibre Channel Adapter Client Driver
Brian King [Tue, 1 Jul 2008 18:14:30 +0000 (13:14 -0500)]
[SCSI] ibmvfc: IBM Power Virtual Fibre Channel Adapter Client Driver

This patch adds a new device driver to support the Virtual Fibre Channel
interface on IBM Power based servers. The Virtual I/O Server on IBM Power
servers utilizes N-Port ID Virtualization to export a Virtual Fibre Channel
adapter to the client. This driver is the client device driver.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] sg: Add target reset support
Brian King [Tue, 1 Jul 2008 18:03:19 +0000 (13:03 -0500)]
[SCSI] sg: Add target reset support

Adds support for target reset to SG_SCSI_RESET.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] lib: Add support for the T10 (SCSI) Data Integrity Field CRC
Martin K. Petersen [Wed, 25 Jun 2008 15:22:42 +0000 (11:22 -0400)]
[SCSI] lib: Add support for the T10 (SCSI) Data Integrity Field CRC

The SCSI Block Protocol uses this 16-bit CRC to verify the integrity
of each data sector.  crc_t10dif() is used by sd_dif.c when performing
I/O to or from disks formatted with protection information.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] sd: Move scsi_disk() accessor function to sd.h
Martin K. Petersen [Wed, 25 Jun 2008 15:22:41 +0000 (11:22 -0400)]
[SCSI] sd: Move scsi_disk() accessor function to sd.h

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] sd: Move sd.h header file
Martin K. Petersen [Tue, 17 Jun 2008 16:47:32 +0000 (12:47 -0400)]
[SCSI] sd: Move sd.h header file

Christoph objected to having sd.h in include/scsi since it is internal
to the sd driver.  Move it to drivers/scsi/sd.h.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] esp: correct module name in Kconfig help for SCSI_SUNESP
Frans Pop [Fri, 20 Jun 2008 03:20:12 +0000 (20:20 -0700)]
[SCSI] esp: correct module name in Kconfig help for SCSI_SUNESP

The module name was changed from esp to sun_esp some time ago.
Also correct the list of chips supported by the driver.

Signed-off-by: Frans Pop <elendil@planet.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] esp: Correct chip ID probing sequence.
David S. Miller [Mon, 1 Oct 2007 00:10:42 +0000 (17:10 -0700)]
[SCSI] esp: Correct chip ID probing sequence.

The features enable bit has to be set in the config2 register
before we can be absolutely sure we will probe a correct
part unique ID and family code from the transfer-count-high
register.

Also, reload the CFACT, STP, SOFF, and TIMEO near the end of
esp_reset_esp().

From a patch by Maciej W. Rozycki.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_debug: add support for rotation speed
Matthew Wilcox [Thu, 19 Jun 2008 16:02:58 +0000 (10:02 -0600)]
[SCSI] scsi_debug: add support for rotation speed

Add support for VPD page b1 to scsi_debug

SCSI VPD page b1 reports the nominal rotation speed of the device.
Since scsi_debug is ram-based, claim to be a non-rotating medium.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iscsi class: fix endpoint leak
Mike Christie [Mon, 16 Jun 2008 15:11:35 +0000 (10:11 -0500)]
[SCSI] iscsi class: fix endpoint leak

class_find_device gets a ref to the device so we must release it.
The class will serialize access to the ep so we do not have to worry
about a remove racing with the callers access, so we can simplify the
use and drop the ref right away.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iscsi class: update version number
Mike Christie [Mon, 16 Jun 2008 15:11:34 +0000 (10:11 -0500)]
[SCSI] iscsi class: update version number

Update iscsi class version number.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] libiscsi, iscsi_tcp, ib_iser: fix setting of can_queue with old tools.
Mike Christie [Mon, 16 Jun 2008 15:11:33 +0000 (10:11 -0500)]
[SCSI] libiscsi, iscsi_tcp, ib_iser: fix setting of can_queue with old tools.

This patch fixes two bugs that are related.

1. Old tools did not set can_queue/cmds_max. This patch modifies
libiscsi so that when we add the host we catch this and set it
to the default.

2. iscsi_tcp thought that the scsi command that was passed to
the eh functions needed a iscsi_cmd_task allocated for it. It
only needed a mgmt task, and now it does not matter since it
all comes from the same pool and libiscsi handles this for the
drivers. ib_iser had copied iscsi_tcp's code and set can_queue
to its max - 1 to handle this. So this patch removes the max -1,
and just sets it to the max.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iscsi class: fix refcount leak
Mike Christie [Mon, 16 Jun 2008 15:11:32 +0000 (10:11 -0500)]
[SCSI] iscsi class: fix refcount leak

Must do a module_out if the endpoint lookup fails.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] lpfc 8.2.7 : Update version to 8.2.7
James Smart [Sun, 15 Jun 2008 02:53:02 +0000 (22:53 -0400)]
[SCSI] lpfc 8.2.7 : Update version to 8.2.7

Update lpfc driver version to 8.2.7

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] lpfc 8.2.7 : Miscellaneous Fixes
James Smart [Sun, 15 Jun 2008 02:52:59 +0000 (22:52 -0400)]
[SCSI] lpfc 8.2.7 : Miscellaneous Fixes

Miscellaneous Fixes:
- Fix bug in mbox sysfs interface that locked in EAGAIN if discovery stalled.
- Fix missing error message when npiv and loop are true when link up occurs.
- Fix panic in lpfc_scsi_cmd_iocb_cmpl: scsi_buf was NULL, but created
  race conditions with other code paths.
- Fix error in sysfs mailbox structure that didn't rezero on next use.
- Add missing mempool_free() to attachment failure path
- Fix missing put of ndlp structure during driver unload.
- Fix applications unable to send mailbox commands during discovery.
- Remove unused argument (type) from function lpfc_post_buffer() API
- Fix vport name is not shown after hbacmd vportcreate.
- Remove repeated code statements.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] lpfc 8.2.7 : Rework the worker thread
James Smart [Sun, 15 Jun 2008 02:52:53 +0000 (22:52 -0400)]
[SCSI] lpfc 8.2.7 : Rework the worker thread

Rework of the worker thread to make it more efficient.
Make a finer-grain notfication of pending work so less time is
spent checking conditions. Also made other general cleanups.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] lpfc 8.2.7 : Discovery Fixes
James Smart [Sun, 15 Jun 2008 02:52:47 +0000 (22:52 -0400)]
[SCSI] lpfc 8.2.7 : Discovery Fixes

- Fix ADISC timeout on initiators causing devloss timeout on targets
- Correct FAN processing : port state vs unreg rpi's wasn't consistent
- Correct mismatches between ASICs and PLOGI that would skip PLOGI

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] lpfc 8.2.7 : Change device reset behavior
James Smart [Sun, 15 Jun 2008 02:52:38 +0000 (22:52 -0400)]
[SCSI] lpfc 8.2.7 : Change device reset behavior

Prior handler was only waiting for I/O on one lun to finish before
returning completion. Now, wait for all LUNs on the target.
Also performed some rudimentary cleanup while in this code.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Remove sysfs attribute port_add
Martin Peschke [Tue, 10 Jun 2008 16:21:01 +0000 (18:21 +0200)]
[SCSI] zfcp: Remove sysfs attribute port_add

With the automatic scanning of remote ports in place, there is no need
to add remote ports manually. So, remove the port_add attribute.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Automatically attach remote ports
Swen Schillig [Tue, 10 Jun 2008 16:21:00 +0000 (18:21 +0200)]
[SCSI] zfcp: Automatically attach remote ports

Automatically attach the remote ports in zfcp when the adapter is set
online. This is done by querying all available ports from the FC
namesever. The scan for remote ports is also triggered by RSCNs and
can be triggered manually with the sysfs attribute 'port_rescan'.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Add port_state attribute to sysfs
Sven Schuetz [Tue, 10 Jun 2008 16:20:59 +0000 (18:20 +0200)]
[SCSI] zfcp: Add port_state attribute to sysfs

The sysfs attribute /sys/class/fc_host/hostX/port_state was not set by
zfcp so far.

Now, the appropriate members of the fc_function_template struct are
set during its initialziation. The first is a boolean to show the port
state. The second is a function pointer to the function
zfcp_get_host_port_state, which reads the port state from our adapter
status bits and calls fc_host_port_state with the approriate port
state afterwards.

Signed-off-by: Sven Schuetz <sven@linux.vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Message cleanup
Christof Schmitt [Tue, 10 Jun 2008 16:20:58 +0000 (18:20 +0200)]
[SCSI] zfcp: Message cleanup

Cleanup the messages used in the zfcp driver: Remove unnecessary debug
and trace message and convert the remaining messages to standard
kernel macros. Remove the zfcp message macros and while updating the
whole flie also update the copyright headers.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Cleanup qdio code
Swen Schillig [Tue, 10 Jun 2008 16:20:57 +0000 (18:20 +0200)]
[SCSI] zfcp: Cleanup qdio code

Cleanup the interface code from zfcp to qdio. Also move code that
belongs to the qdio interface from the erp to the qdio file.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Cleanup code in zfcp_ccw
Christof Schmitt [Tue, 10 Jun 2008 16:20:56 +0000 (18:20 +0200)]
[SCSI] zfcp: Cleanup code in zfcp_ccw

Overall cleanup in file zfcp_ccw.c. Fix coding style issues, remove
useless macros and messages and convert remaining messages to standard
macros.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Move CFDC code to new file.
Christof Schmitt [Tue, 10 Jun 2008 16:20:55 +0000 (18:20 +0200)]
[SCSI] zfcp: Move CFDC code to new file.

zfcp implements a device file to allow Linux guests changing the
Access Control Tables stored in the adapter. The code for the device
file has nothing to do with the other parts of the driver, so move it
to a new file and cleanup the code while doing so.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Move FC code to new file
Christof Schmitt [Tue, 10 Jun 2008 16:20:54 +0000 (18:20 +0200)]
[SCSI] zfcp: Move FC code to new file

Move all Fibre Channel related code to new file and cleanup the code
while doing so.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] Rename scsi_bidi_sdb_cache
Martin K. Petersen [Fri, 6 Jun 2008 03:30:03 +0000 (23:30 -0400)]
[SCSI] Rename scsi_bidi_sdb_cache

The data integrity changes need to dynamically allocate
scsi_data_buffers too.  Rename scsi_bidi_sdb_cache for clarity.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] aacraid: prevent copy_from_user() BUG!
Mark Salyzyn [Wed, 28 May 2008 19:32:55 +0000 (15:32 -0400)]
[SCSI] aacraid: prevent copy_from_user() BUG!

Seen:

kernel BUG at arch/i386/lib/usercopy.c:872

under a 2.6.18-8.el5 kernel. Traced it to a garbage-in/garbage-out
ioctl condition in the aacraid driver.

Adaptec's special ioctl scb passthrough needs to check the validity of
the individual scatter gather count fields to the maximum the adapter
supports. Doing so will have the side effect of preventing
copy_from_user() from bugging out while populating the dma buffers.
This is a hardening effort, issue was triggered by an errant version
of the management tools and thus the BUG should not be seen in the
field.

[jejb: fixed up compile failure]
Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_debug: Runtime-configurable sector size
Martin K. Petersen [Thu, 5 Jun 2008 04:12:59 +0000 (00:12 -0400)]
[SCSI] scsi_debug: Runtime-configurable sector size

Make scsi_debug sector size configurable at load time instead of being
a #define.  Handy for testing 4KB sectors.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] bsg: fix bsg_mutex hang with device removal
FUJITA Tomonori [Wed, 28 May 2008 22:56:55 +0000 (07:56 +0900)]
[SCSI] bsg: fix bsg_mutex hang with device removal

We don't need to hold bsg_mutex during bsg_complete_all_commands(). It
leads to a problem that we block bsg_unregister_queue during
bsg_complete_all_commands (untill all the outstanding commands
complete).

Thanks to Pete Wyckoff for finding the bug and testing the patch.

The detailed bug report is:

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

Tested-by: Pete Wyckoff <pw@osc.edu>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iscsi_tcp: Enable any size command
Boaz Harrosh [Mon, 26 May 2008 08:31:19 +0000 (11:31 +0300)]
[SCSI] iscsi_tcp: Enable any size command

Let through upto the largest command of 260 defined by the scsi standard.
iscsi core supports this already. Now that the scsi-ml supports it we can
start using large commands.

[jejb:rejections fixed up]
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Acked-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi: use get_unaligned_* helpers
Harvey Harrison [Wed, 21 May 2008 20:54:20 +0000 (15:54 -0500)]
[SCSI] scsi: use get_unaligned_* helpers

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] Replace __FUNCTION__ with __func__ in iscsi_tcp.
Harvey Harrison [Wed, 21 May 2008 20:54:19 +0000 (15:54 -0500)]
[SCSI] Replace __FUNCTION__ with __func__ in iscsi_tcp.

__FUNCTION__ is gcc-specific, use __func__

(Update diff by Mike Christie)

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] libiscsi, iser, tcp: remove recv_lock
Mike Christie [Wed, 21 May 2008 20:54:18 +0000 (15:54 -0500)]
[SCSI] libiscsi, iser, tcp: remove recv_lock

The recv lock was defined so the iscsi layer could block
the recv path from processing IO during recovery. It
turns out iser just set a lock to that pointer which was pointless.

We now disconnect the transport connection before doing recovery
so we do not need the recv lock. For iscsi_tcp we still stop
the recv path incase older tools are being used.

This patch also has iscsi_itt_to_ctask user grab the session lock
and has the caller access the task with the lock or get a ref
to it in case the target is broken and sends a tmf success response
then sends data or a response for the command that was supposed to
be affected bty the tmf.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] libiscsi: fix cmds_max setting
Mike Christie [Wed, 21 May 2008 20:54:17 +0000 (15:54 -0500)]
[SCSI] libiscsi: fix cmds_max setting

Drivers expect that the cmds_max value they pass to the iscsi layer
is the max scsi commands  + mgmt tasks. This patch implements that
and fixes some checks for nr cmd limits.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iscsi class: Add session initiatorname and ifacename sysfs attrs.
Mike Christie [Wed, 21 May 2008 20:54:16 +0000 (15:54 -0500)]
[SCSI] iscsi class: Add session initiatorname and ifacename sysfs attrs.

This adds two new attrs used for creating initiator ports and
binding sessions to hardware.

The session level initiatorname:

Since bnx2i does a scsi_host per host device, we need to add the
iface initiator port settings on the session, so we can create
multiple initiator ports (each with different inames) per device/scsi_host.

The current iname reflects that qla4xxx can have one iname per hba, and we are
allocating a host per session for software. The iname on the host will
remain so we can export and set the hba level qla4xxx setting.

The ifacename attr:

To bind a session to a some peice of hardware in userspace we maintain
some mappings, but during boot or iscsid restart (iscsid contains the user
space part of the driver) we need to be able to figure out which of those
host mappings abstractions maps to certain sessions. This patch adds
a ifacename attr, which userspace can set to id the host side of the
endpoint across pivot_roots and iscsid restarts.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iscsi_tcp: hook iscsi_tcp into iscsi_endpoint code
Mike Christie [Wed, 21 May 2008 20:54:15 +0000 (15:54 -0500)]
[SCSI] iscsi_tcp: hook iscsi_tcp into iscsi_endpoint code

iscsi_tcp creates its ep in userspace using sockets because
it is virtual, so we just check if we are sent a ep and fail
if we are.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iser: Modify iser to take a iscsi_endpoint struct in ep callouts and session...
Mike Christie [Wed, 21 May 2008 20:54:14 +0000 (15:54 -0500)]
[SCSI] iser: Modify iser to take a iscsi_endpoint struct in ep callouts and session setup

This hooks iser into the iscsi endpoint code. Previously it handled the
lookup and allocation. This has been made generic so bnx2i and iser can
share it. It also allows us to pass iser the leading conn's ep, so we
know the ib_deivce being used and can set it as the scsi_host's parent.
And that allows scsi-ml to set the dma_mask based on those values.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iscsi class: add endpoint class
Mike Christie [Wed, 21 May 2008 20:54:13 +0000 (15:54 -0500)]
[SCSI] iscsi class: add endpoint class

Add sysfs representation for the endpoint, so userspace can match the
host and session to the endpoint. This will allow us to set the host's
parent correctly at host creation time.

The next patches will convert tcp and iser, and fix iser's dma_mask
bug.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iscsi class: user device_for_each_child instead of duplicating session list
Mike Christie [Wed, 21 May 2008 20:54:12 +0000 (15:54 -0500)]
[SCSI] iscsi class: user device_for_each_child instead of duplicating session list

Currently we duplicate the list of sessions, because we were using the
test for if a session was on the host list to indicate if the session
was bound or unbound. We can instead use the target_id and fix up
the class so that drivers like bnx2i do not have to manage the target id
space.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iser: handle iscsi_cmd_task rename
Mike Christie [Wed, 21 May 2008 20:54:11 +0000 (15:54 -0500)]
[SCSI] iser: handle iscsi_cmd_task rename

This handles the iscsi_cmd_task rename and renames
the iser cmd task to iser task.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iscsi_tcp: handle iscsi_cmd_task rename
Mike Christie [Wed, 21 May 2008 20:54:10 +0000 (15:54 -0500)]
[SCSI] iscsi_tcp: handle iscsi_cmd_task rename

This converts iscsi_tcp to use the iscsi_task name.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] libiscsi: rename iscsi_cmd_task to iscsi_task
Mike Christie [Wed, 21 May 2008 20:54:09 +0000 (15:54 -0500)]
[SCSI] libiscsi: rename iscsi_cmd_task to iscsi_task

This is the second part of the iscsi task merging, and
all it does it rename iscsi_cmd_task to iscsi_task and
mtask/ctask to just task.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iser: convert ib_iser to support merged tasks
Mike Christie [Wed, 21 May 2008 20:54:08 +0000 (15:54 -0500)]
[SCSI] iser: convert ib_iser to support merged tasks

Convert ib_iser to support merged tasks.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iscsi_tcp: convert iscsi_tcp to support merged tasks
Mike Christie [Wed, 21 May 2008 20:54:07 +0000 (15:54 -0500)]
[SCSI] iscsi_tcp: convert iscsi_tcp to support merged tasks

Convert iscsi_tcp to support merged tasks.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] libiscsi: merge iscsi_mgmt_task and iscsi_cmd_task
Mike Christie [Wed, 21 May 2008 20:54:06 +0000 (15:54 -0500)]
[SCSI] libiscsi: merge iscsi_mgmt_task and iscsi_cmd_task

There is no need to have the mgmt and cmd tasks separate
structs. It used to save a lot of memory when we overprealocated
memory for tasks, but the next patches will set up the
driver so in the future they can use a mempool or some other
common scsi command allocator and common tagging.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] libiscsi: modify libiscsi so it supports offloaded data paths
Mike Christie [Wed, 21 May 2008 20:54:05 +0000 (15:54 -0500)]
[SCSI] libiscsi: modify libiscsi so it supports offloaded data paths

This patch modifies libiscsi, so drivers like bnx2i and iser can execute
a command from queuecommand/send_pdu instead of having to be queued to
be run in a workq.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] libiscsi, iscsi_tcp, iser: add session cmds array accessor
Mike Christie [Wed, 21 May 2008 20:54:04 +0000 (15:54 -0500)]
[SCSI] libiscsi, iscsi_tcp, iser: add session cmds array accessor

Currently to get a ctask from the session cmd array, you have to
know to use the itt modifier. To make this easier on LLDs and
so in the future we can easilly kill the session array and use
the host shared map instead, this patch adds a nice wrapper
to strip the itt into a session->cmds index and return a ctask.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iser: fix handling of scsi cmnds during recovery.
Mike Christie [Wed, 21 May 2008 20:54:03 +0000 (15:54 -0500)]
[SCSI] iser: fix handling of scsi cmnds during recovery.

After the stop_conn callback has returned the LLD should not
touch the scsi cmds. iscsi_tcp and libiscsi use the
conn->recv_lock and suspend_rx field to halt recv path
processing, but iser does not have any protection.

This patch modifies iser so that userspace can just
call the ep_disconnect callback, which will halt
all recv IO, before calling the stop_conn callback so
we do not have to worry about the conn->recv_lock and
suspend rx field. iser just needs to stop the send side
from accessing the ib conn.

Fixup to handle when the ep poll fails and ep disconnect
is called from Erez.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iscsi: modify iscsi printk so it can take driver data pointers
Mike Christie [Wed, 21 May 2008 20:54:02 +0000 (15:54 -0500)]
[SCSI] iscsi: modify iscsi printk so it can take driver data pointers

Some drivers want to be able to just pass in the driver data pointers
to the iscsi objects. To enable this we need the iscsi printk macro
to cast the object.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iscsi: remove session/conn_data_size from iscsi_transport
Mike Christie [Wed, 21 May 2008 20:54:01 +0000 (15:54 -0500)]
[SCSI] iscsi: remove session/conn_data_size from iscsi_transport

This removes the session and conn data_size fields from the iscsi_transport.
Just pass in the value like with host allocation. This patch also makes
it so the LLD iscsi_conn data is allocated with the iscsi_cls_conn.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iscsi: add iscsi host helpers
Mike Christie [Wed, 21 May 2008 20:54:00 +0000 (15:54 -0500)]
[SCSI] iscsi: add iscsi host helpers

This finishes the host/session unbinding, by adding some helpers
to add and remove hosts and the session they manage.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iscsi: remove session and host binding in libiscsi
Mike Christie [Wed, 21 May 2008 20:53:59 +0000 (15:53 -0500)]
[SCSI] iscsi: remove session and host binding in libiscsi

bnx2i allocates a host per netdevice but will use libiscsi,
so this unbinds the session from the host in that code.

This will also be useful for the iser parent device dma settings
fixes.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iscsi class: rename iscsi_host to iscsi_cls_host
Mike Christie [Wed, 21 May 2008 20:53:58 +0000 (15:53 -0500)]
[SCSI] iscsi class: rename iscsi_host to iscsi_cls_host

This renames the iscsi_host to iscsi_cls_host to match the other
structs, because libiscsi wants to use the iscsi_host name in
the future.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iscsi class, iscsi drivers: remove unused iscsi_transport attrs
Mike Christie [Wed, 21 May 2008 20:53:57 +0000 (15:53 -0500)]
[SCSI] iscsi class, iscsi drivers: remove unused iscsi_transport attrs

max_cmd_len and max_conn are not really used. max_cmd_len is
always 16 and can be set by the LLD. max_conn is always one
since we do not support MCS.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] iscsi class, iscsi_tcp/iser: add host arg to session creation
Mike Christie [Wed, 21 May 2008 20:53:56 +0000 (15:53 -0500)]
[SCSI] iscsi class, iscsi_tcp/iser: add host arg to session creation

iscsi offload (bnx2i and qla4xx) allocate a scsi host per hba,
so the session creation path needs a shost/host_no argument.
Software iscsi/iser will follow the same behabior as before
where it allcoates a host per session, but in the future iser
will probably look more like bnx2i where the host's parent is
the hardware (rnic for iser and for bnx2i it is the nic), because
it does not use a socket layer like how iscsi_tcp does.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] mpt fusion : Adding FAULT Reset polling work
Prakash, Sathya [Tue, 20 May 2008 19:32:18 +0000 (01:02 +0530)]
[SCSI] mpt fusion : Adding FAULT Reset polling work

When the firmware is in Fault state it will be identifed only when the next time
the driver access the IOC state.
This patch includes a polling function in the driver which will be executed in
regular interval to check the status of the firmware and if it is in Fault
state, then the firmware will be reset by the driver.

Signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] mpt fusion : Setting intial period to 0xFF instead of 0xA
Prakash, Sathya [Tue, 20 May 2008 19:31:11 +0000 (01:01 +0530)]
[SCSI] mpt fusion : Setting intial period to 0xFF instead of 0xA

The initial period is set to 0xFF

Signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] mpt fusion : Updated copyright statment with 2008 included
Prakash, Sathya [Tue, 20 May 2008 19:26:41 +0000 (00:56 +0530)]
[SCSI] mpt fusion : Updated copyright statment with 2008 included

Updating copyright statement to include the year 2008

Signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] mpt fusion: Driver version upgrade to 3.04.07
Prakash, Sathya [Tue, 20 May 2008 19:25:33 +0000 (00:55 +0530)]
[SCSI] mpt fusion: Driver version upgrade to 3.04.07

Updating driver version to 3.04.07 from 3.04.06

Signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Fix sparse warning by providing new entry in dbf
Christof Schmitt [Mon, 19 May 2008 10:17:47 +0000 (12:17 +0200)]
[SCSI] zfcp: Fix sparse warning by providing new entry in dbf

drivers/s390/scsi/zfcp_dbf.c:692:2: warning: context imbalance in
'zfcp_rec_dbf_event_thread' - different lock contexts for basic block

Replace the parameter indicating if the lock is held with a new entry
function that only acquires the lock. This makes the lock handling
more visible and removes the sparse warning.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: remove some __attribute__ ((packed))
Martin Peschke [Mon, 19 May 2008 10:17:46 +0000 (12:17 +0200)]
[SCSI] zfcp: remove some __attribute__ ((packed))

There is no need to pack data structures which describe the
contents of records in the new recovery trace.

lcrash currently depends on the binary format for the other traces,
removing the packed attribute from all traces would break trace
debugging with lcrash.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Refine trace levels of some recovery related events.
Martin Peschke [Mon, 19 May 2008 10:17:45 +0000 (12:17 +0200)]
[SCSI] zfcp: Refine trace levels of some recovery related events.

This change better spreads trace levels of recovery related events.
There was an overlap of traces for some recovery triggers and the
processing of recovery actions.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Add information about interrupt to trace.
Martin Peschke [Mon, 19 May 2008 10:17:44 +0000 (12:17 +0200)]
[SCSI] zfcp: Add information about interrupt to trace.

Store the index of the buffer in the inbound queue used to report
request completion in trace record for request coompletion.
This piece of information allows to better compare qdio and zfcp traces.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Rename sbal_curr to sbal_last.
Martin Peschke [Mon, 19 May 2008 10:17:43 +0000 (12:17 +0200)]
[SCSI] zfcp: Rename sbal_curr to sbal_last.

sbal_last is more appropriate, because it matches sbal_first.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Rename sbal_last.
Martin Peschke [Mon, 19 May 2008 10:17:42 +0000 (12:17 +0200)]
[SCSI] zfcp: Rename sbal_last.

sbal_last is confusing, as it is not the last one actually used,
but just a limit. sbal_limit is a better name.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Remove field sbal_last from trace record.
Martin Peschke [Mon, 19 May 2008 10:17:41 +0000 (12:17 +0200)]
[SCSI] zfcp: Remove field sbal_last from trace record.

This field is not needed, because it designates an index with a fix offset
from sbal_first. It's name is confusing anyway.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Remove some sparse warnings
Christof Schmitt [Mon, 19 May 2008 10:17:40 +0000 (12:17 +0200)]
[SCSI] zfcp: Remove some sparse warnings

Remove some sparse warnings by telling sparse that zfcp_req_create
acquires the lock for the request queue.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Fix fsf_status_read return code handling
Heiko Carstens [Mon, 19 May 2008 10:17:39 +0000 (12:17 +0200)]
[SCSI] zfcp: Fix fsf_status_read return code handling

If allocation of a status buffer failed the function incorrectly
returned 0 instead of -ENOMEM.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Fix mempool pointer for GID_PN request allocation
Christof Schmitt [Mon, 19 May 2008 10:17:38 +0000 (12:17 +0200)]
[SCSI] zfcp: Fix mempool pointer for GID_PN request allocation

When allocating memory for GID_PN nameserver requests, the allocation
function stores the pointer to the mempool, but then overwrites the
pointer via memset. Later, the wrong function to free the memory will
be called, since this is based on the stored pointer.

Fix this by first initializing the struct and then storing the pointer.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: receiving an unsolicted status can lead to I/O stall
Swen Schillig [Mon, 19 May 2008 10:17:37 +0000 (12:17 +0200)]
[SCSI] zfcp: receiving an unsolicted status can lead to I/O stall

Processing of an unsolicted status request can lead to a locking race
of the request_queue's queue_lock during the recreation of the
used up status read request while still in interrupt context
of the response handler.

Detaching the 'refill' of the long running status read requests from
the handler to a scheduled work is solving this issue.

In addition, each refill-run is trying to re-establish the full amount
of status read requests, which might have failed in earlier runs.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] mpt fusion: make struct mpt_proc_root_dir static
Adrian Bunk [Mon, 21 Apr 2008 21:31:51 +0000 (00:31 +0300)]
[SCSI] mpt fusion: make struct mpt_proc_root_dir static

This patch makes the needlessly global struct mpt_proc_root_dir static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: "Prakash, Sathya" <Sathya.Prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] make use of the residue value
James Bottomley [Sun, 9 Mar 2008 00:24:17 +0000 (18:24 -0600)]
[SCSI] make use of the residue value

USB sometimes doesn't return an error but instead returns a residue
value indicating part (or all) of the command wasn't completed.  So if
the driver _done() error processing indicates the command was fully
processed, subtract off the residue so that this USB error gets
propagated.

Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] SCSI: remove dev->power.power_state from mesh driver
Alan Stern [Fri, 7 Mar 2008 16:20:25 +0000 (11:20 -0500)]
[SCSI] SCSI: remove dev->power.power_state from mesh driver

power.power_state is scheduled for removal.  This patch (as1055)
removes all uses of that field from the SCSI mesh driver.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Paul Mackerras <paulus@au.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] aacraid: linit.c make aac_show_serial_number static
Harvey Harrison [Thu, 8 May 2008 19:08:53 +0000 (12:08 -0700)]
[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>
16 years ago[SCSI] aacraid: Add Power Management cards to documentation
Mark Salyzyn [Wed, 7 May 2008 19:24:23 +0000 (15:24 -0400)]
[SCSI] aacraid: Add Power Management cards to documentation

Update the documented list of products supported by the aacraid driver.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: sysfs attributes for fabric and channel latencies
Christof Schmitt [Tue, 6 May 2008 09:00:06 +0000 (11:00 +0200)]
[SCSI] zfcp: sysfs attributes for fabric and channel latencies

The latency information is provided on a SCSI device level (LUN)
which can be found at the following location

 /sys/class/scsi_device/<H:C:T:L>/device/cmd_latency
 /sys/class/scsi_device/<H:C:T:L>/device/read_latency
 /sys/class/scsi_device/<H:C:T:L>/device/write_latency

Each sysfs attribute provides the available data: min, max and sum for
fabric and channel latency and the number of requests processed.

An overrun of the variables is neither detected nor treated.  The file
has to be read twice to make a meaningful statement, because only the
differences of the values between the two reads can be used.  A reset
of the values can be achieved by writing to the attribute.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Track fabric and channel latencies provided by FCP adapter
Christof Schmitt [Tue, 6 May 2008 09:00:05 +0000 (11:00 +0200)]
[SCSI] zfcp: Track fabric and channel latencies provided by FCP adapter

Add the infrastructure to retrieve the fabric and channel latencies
from FSF commands for each SCSI command that has been processed. For
each unit, the sum, min, max and number of requests is tracked.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_dh: Remove hardware handler infrastructure from dm
Chandra Seetharaman [Thu, 1 May 2008 21:50:40 +0000 (14:50 -0700)]
[SCSI] scsi_dh: Remove hardware handler infrastructure from dm

This patch just removes infrastructure that provided support for hardware
handlers in the dm layer as it is not needed anymore.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Acked-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_dh: Remove hardware handlers from dm
Chandra Seetharaman [Thu, 1 May 2008 21:50:34 +0000 (14:50 -0700)]
[SCSI] scsi_dh: Remove hardware handlers from dm

This patch removes the 3 hardware handlers that currently exist
under dm as the functionality is moved to SCSI layer in the earlier
patches.

[jejb: removed more makefile hunks and rejection fixes]
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Acked-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_dh: Remove dm_pg_init_complete
Chandra Seetharaman [Thu, 1 May 2008 21:50:28 +0000 (14:50 -0700)]
[SCSI] scsi_dh: Remove dm_pg_init_complete

This patch just removes the dm layer's path initialization completion
routine.  This is separated from the other patch(scsi_dh: Use SCSI
device handler in dm-multipath) Just to make that patch more readable.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Acked-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_dh: Add a single threaded workqueue for initializing paths
Chandra Seetharaman [Thu, 1 May 2008 21:50:22 +0000 (14:50 -0700)]
[SCSI] scsi_dh: Add a single threaded workqueue for initializing paths

Before this patch set (SCSI hardware handlers), initialization of a
path was done asynchronously. Doing that requires a workqueue in each
device/hardware handler module and leads to unneccessary complication
in the device handler code, making it difficult to read the code and
follow the state diagram.

Moving that workqueue to this level makes the device handler code simpler.
Hence, the workqueue is moved to dm level.

A new workqueue is added instead of adding it to the existing workqueue
(kmpathd) for the following reasons:
1. Device activation has to happen faster, stacking them along
   with the other workqueue might lead to unnecessary delay
   in the activation of the path.
2. The effect could be felt the other way too. i.e the current
   events that are handled by the existing workqueue might get
   a delayed response.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Acked-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_dh: Use SCSI device handler in dm-multipath
Chandra Seetharaman [Thu, 1 May 2008 21:50:11 +0000 (14:50 -0700)]
[SCSI] scsi_dh: Use SCSI device handler in dm-multipath

This patch converts dm-mpath to use scsi device handlers instead of
dm's hardware handlers.

This patch does not add any new functionality. Old behaviors remain and
userspace tools work as is except that arguments supplied with hardware
handler are ignored.

One behavioral exception is: Activation of a path is synchronous in this
patch, opposed to the older behavior of being asynchronous (changed in
patch 07: scsi_dh: Add a single threaded workqueue for initializing a path)

Note: There is no need to get a reference for the device handler module
(as it was done in the dm hardware handler case) here as the reference
is held when the device was first found. Instead we check and make sure
that support for the specified device is present at table load time.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_dh: add EMC Clariion device handler
Chandra Seetharaman [Thu, 1 May 2008 21:50:04 +0000 (14:50 -0700)]
[SCSI] scsi_dh: add EMC Clariion device handler

This adds support for EMC Clariions. This patch has the features that
currently exists in mainline and advanced features from Ed's patches.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_dh: add hp sw device handler
Mike Christie [Thu, 1 May 2008 21:49:59 +0000 (14:49 -0700)]
[SCSI] scsi_dh: add hp sw device handler

This patch provides the device handler to support the older hp boxes
which cannot be upgraded.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_dh: add lsi rdac device handler
Chandra Seetharaman [Thu, 1 May 2008 21:49:52 +0000 (14:49 -0700)]
[SCSI] scsi_dh: add lsi rdac device handler

This patch provides the device handler to support the LSI RDAC SCSI
based storage devices.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>