]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
13 years ago[SCSI] libfc: Fixing a memory leak when destroying an interface
Parikh, Neerav [Fri, 25 Feb 2011 23:02:51 +0000 (15:02 -0800)]
[SCSI] libfc: Fixing a memory leak when destroying an interface

When an fcoe interface is being destroyed; in the process the
fcoe driver will try to release all the resources it had allocated
for that interface including rports. But, it seems that it does not
release the reference held for the name server rport in that process
resulting into a memory leak. This patch fixes that memory leak.

Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] megaraid_sas: Version and Changelog update
adam radford [Fri, 25 Feb 2011 04:57:21 +0000 (20:57 -0800)]
[SCSI] megaraid_sas: Version and Changelog update

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] megaraid_sas: Fix iMR OCR support to work correctly
adam radford [Fri, 25 Feb 2011 04:57:15 +0000 (20:57 -0800)]
[SCSI] megaraid_sas: Fix iMR OCR support to work correctly

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] megaraid_sas: Fix max_sectors for IEEE SGL
adam radford [Fri, 25 Feb 2011 04:57:09 +0000 (20:57 -0800)]
[SCSI] megaraid_sas: Fix max_sectors for IEEE SGL

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] megaraid_sas: Fix fault state handling
adam radford [Fri, 25 Feb 2011 04:57:04 +0000 (20:57 -0800)]
[SCSI] megaraid_sas: Fix fault state handling

The following patch for megaraid_sas fixes fault state handling in
megasas_transition_to_ready().

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] megaraid_sas: Fix tasklet_init call
adam radford [Fri, 25 Feb 2011 04:57:00 +0000 (20:57 -0800)]
[SCSI] megaraid_sas: Fix tasklet_init call

The following patch fixes an incorrect tasklet_init() call in
megasas_init_fw() to use instancet->tasklet.

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] megaraid_sas: Add CFG_CLEARED AEN
adam radford [Fri, 25 Feb 2011 04:56:53 +0000 (20:56 -0800)]
[SCSI] megaraid_sas: Add CFG_CLEARED AEN

The following patch for megaraid_sas adds a missing check for
MR_EVT_CFG_CLEARED in megasas_aen_polling().

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] megaraid_sas: Fix megasas_build_dcdb_fusion to use correct LUN field
adam radford [Fri, 25 Feb 2011 04:56:49 +0000 (20:56 -0800)]
[SCSI] megaraid_sas: Fix megasas_build_dcdb_fusion to use correct LUN field

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] megaraid_sas: Fix megasas_build_dcdb_fusion to not filter by TYPE_DISK
adam radford [Fri, 25 Feb 2011 04:56:43 +0000 (20:56 -0800)]
[SCSI] megaraid_sas: Fix megasas_build_dcdb_fusion to not filter by TYPE_DISK

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] megaraid_sas: Fix probe_one to clear MSI-X flags in kdump
adam radford [Fri, 25 Feb 2011 04:56:28 +0000 (20:56 -0800)]
[SCSI] megaraid_sas: Fix probe_one to clear MSI-X flags in kdump

The following patch for megaraid_sas fixes megasas_probe_one() to
clear MSI-X flags in kdump when the 'reset_devices' kernel parameter
is passed in.

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] megaraid_sas: Call tasklet_schedule for MSI-X
adam radford [Fri, 25 Feb 2011 04:56:21 +0000 (20:56 -0800)]
[SCSI] megaraid_sas: Call tasklet_schedule for MSI-X

The following patch for megaraid_sas calls tasklet_schedule() even if
outbound_intr_status == 0 for MFI based boards in MSI-X mode.

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] megaraid_sas: Enable MSI-X before calling megasas_init_fw
adam radford [Fri, 25 Feb 2011 04:56:12 +0000 (20:56 -0800)]
[SCSI] megaraid_sas: Enable MSI-X before calling megasas_init_fw

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] megaraid_sas: Add missing check_and_restore_queue_depth call
adam radford [Fri, 25 Feb 2011 04:56:05 +0000 (20:56 -0800)]
[SCSI] megaraid_sas: Add missing check_and_restore_queue_depth call

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] megaraid_sas: Fix failure gotos
adam radford [Fri, 25 Feb 2011 04:55:56 +0000 (20:55 -0800)]
[SCSI] megaraid_sas: Fix failure gotos

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libsas: fix loopback topology bug during discovery
jack_wang [Sat, 19 Feb 2011 10:20:53 +0000 (18:20 +0800)]
[SCSI] libsas: fix loopback topology bug during discovery

In some test envirenment, there is loopback topology test. We should
handle this during discovery.

Signed-off-by: Jack Wang <jack_wang@usish.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] lpfc: block target when port queueing limit is hit
Mike Christie [Fri, 25 Feb 2011 20:04:28 +0000 (14:04 -0600)]
[SCSI] lpfc: block target when port queueing limit is hit

Instead of blocking the entire host when the port's
queueing limit is hit, we should only block the port's
target. This will allow IO to other ports to execute.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] lpfc: force retry in queuecommand when port is transitioning
Mike Christie [Fri, 25 Feb 2011 20:04:27 +0000 (14:04 -0600)]
[SCSI] lpfc: force retry in queuecommand when port is transitioning

If the port takes a while to transition we could exhaust
the retries when using DID_TRANSPORT_DISRUPTED. For this
case we do not want to use any of the cmd's
retries, because if the command was running then when
it got failed the retry counter was already incremented.
And if this is the first time we are seeing the command,
(it got queued because it slipped through during the race)
then it should not have its retries incremented. The
fc class will decide the correct handling later.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] qla2xxx: Update version number to 8.03.07.00
Madhuranath Iyengar [Wed, 23 Feb 2011 23:27:18 +0000 (15:27 -0800)]
[SCSI] qla2xxx: Update version number to 8.03.07.00

We'll be using the new version number scheme from now on.
The 'k' in the version in the past will be removed.

The format will be: <major>.<minor>.<sub_minor>.<iter>
A scsi-misc submission increments <sub_minor> and resets <iter>.
An scsi-rc-fixes submission, increments <iter>.

Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] qla2xxx: Check return value of fc_block_scsi_eh()
Andrew Vasquez [Wed, 23 Feb 2011 23:27:17 +0000 (15:27 -0800)]
[SCSI] qla2xxx: Check return value of fc_block_scsi_eh()

The fc_block_scsi_eh() might return with status FAST_IO_FAIL
indicating I/O has been terminated due to fast_io_fail timeout.
In this case the rport is still blocked, so any error recovery
will be failing on this port. Hence we need to check if the
return value from fc_block_scsi_eh() is something other than 0,
in which case it should just return with that status.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] qla2xxx: The ISP82XX should be online while waiting for commands completion.
Saurav Kashyap [Wed, 23 Feb 2011 23:27:16 +0000 (15:27 -0800)]
[SCSI] qla2xxx: The ISP82XX should be online while waiting for commands completion.

If adapter is not online, the driver will not process the response queue, even
on getting an interrupt.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] qla2xxx: Propagate block-layer tags on submitted I/Os.
Andrew Vasquez [Wed, 23 Feb 2011 23:27:15 +0000 (15:27 -0800)]
[SCSI] qla2xxx: Propagate block-layer tags on submitted I/Os.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] qla2xxx: Adjust FCP_RSP response-info field check after TMF completion.
Andrew Vasquez [Wed, 23 Feb 2011 23:27:14 +0000 (15:27 -0800)]
[SCSI] qla2xxx: Adjust FCP_RSP response-info field check after TMF completion.

Based on reading of the FCP2/4 specification, the driver cannot
expect the storage device to send FCP_RSP information. Instead,
the driver should interpret the data which is present in the frame
to base decisions on the success or failure of the system.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] qla2xxx: Clear any stale login-states during an adapter reset.
Andrew Vasquez [Wed, 23 Feb 2011 23:27:13 +0000 (15:27 -0800)]
[SCSI] qla2xxx: Clear any stale login-states during an adapter reset.

By not clearing the 'login needed' nor 'login outstanding' states
for an fcport after a big-hammer (adapter reset), the driver may
not properly perform a PLOGI/PRLI sequence (and lose visibility
to the rport) during a follow-on SNS scan.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] qla2xxx: Pass right CT command string for CT status processing.
Andrew Vasquez [Wed, 23 Feb 2011 23:27:12 +0000 (15:27 -0800)]
[SCSI] qla2xxx: Pass right CT command string for CT status processing.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] qla2xxx: Don't wait for active mailbox command completion when firmware is...
Giridhar Malavali [Wed, 23 Feb 2011 23:27:11 +0000 (15:27 -0800)]
[SCSI] qla2xxx: Don't wait for active mailbox command completion when firmware is hung.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] qla2xxx: Abort pending commands for faster recovery during ISP reset.
Giridhar Malavali [Wed, 23 Feb 2011 23:27:10 +0000 (15:27 -0800)]
[SCSI] qla2xxx: Abort pending commands for faster recovery during ISP reset.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] qla2xxx: Display nport_id when any SNS command fails.
Giridhar Malavali [Wed, 23 Feb 2011 23:27:09 +0000 (15:27 -0800)]
[SCSI] qla2xxx: Display nport_id when any SNS command fails.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] qla2xxx: Reinitialize the device initialize timeout value after reset on ISP82xx.
Giridhar Malavali [Wed, 23 Feb 2011 23:27:08 +0000 (15:27 -0800)]
[SCSI] qla2xxx: Reinitialize the device initialize timeout value after reset on ISP82xx.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] qla2xxx: Fix array subscript is above array bounds in qla2xx_build_scsi_type_6...
Chad Dupuis [Wed, 23 Feb 2011 23:27:07 +0000 (15:27 -0800)]
[SCSI] qla2xxx: Fix array subscript is above array bounds in qla2xx_build_scsi_type_6_iocbs().

The additional increment of dsd_seg was causing the compiler to throw an array
out of bounds warning. This patch moves to a direct assignment of
cmd_pkt->fcp_data_dseg_len so that the compiler doesn't generate an array out
bounds warning.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] qla2xxx: Remove host_lock in queuecommand function
Madhuranath Iyengar [Wed, 23 Feb 2011 23:27:06 +0000 (15:27 -0800)]
[SCSI] qla2xxx: Remove host_lock in queuecommand function

Also in qla_os.c, rename the function, remove DEF_SCSI_QCMD, etc.

Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] zfcp: Add information to symbolic port name when running in NPIV mode
Christof Schmitt [Tue, 22 Feb 2011 18:54:48 +0000 (19:54 +0100)]
[SCSI] zfcp: Add information to symbolic port name when running in NPIV mode

Query the FC symbolic port name for reporting in the fc_host sysfs and
enable the symbolic_name attribute in the fc_host sysfs. When running
in NPIV mode, extend the symbolic port name with the devno and the
hostname. This allows better identification of Linux systems for SAN
and storage administrators.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] fc: Add GSPN_ID request to header file
Christof Schmitt [Tue, 22 Feb 2011 18:54:47 +0000 (19:54 +0100)]
[SCSI] fc: Add GSPN_ID request to header file

Add request code and corresponding structs for "Get Symbolic Port
Name" (GSPN_ID) request.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] zfcp: Move SCSI host and transport templates out of struct zfcp_data
Christof Schmitt [Tue, 22 Feb 2011 18:54:46 +0000 (19:54 +0100)]
[SCSI] zfcp: Move SCSI host and transport templates out of struct zfcp_data

The SCSI host and transport templates are the only members left in the
global zfcp_data struct. Move them out of zfcp_data  and remove the
now unused zfcp_data struct. Also update the names of the register and
unregister functions to use the zfcp_scsi prefix.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] zfcp: Merge FCP task management setup with regular FCP command setup
Christof Schmitt [Tue, 22 Feb 2011 18:54:45 +0000 (19:54 +0100)]
[SCSI] zfcp: Merge FCP task management setup with regular FCP command setup

For task management commands, only LUN and flags are required. The
regular FCP setup already sets the LUN in the fcp_cmnd. All is
required for merging the function is setting up the TM flags.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] zfcp: Move qtcb kmem_cache to zfcp_fsf.c
Christof Schmitt [Tue, 22 Feb 2011 18:54:44 +0000 (19:54 +0100)]
[SCSI] zfcp: Move qtcb kmem_cache to zfcp_fsf.c

Move the kmem_cache for allocating the qtcb to zfcp_fsf.c and rename
it accordingly.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] zfcp: Use common FC kmem_cache for GPN_FT request
Christof Schmitt [Tue, 22 Feb 2011 18:54:43 +0000 (19:54 +0100)]
[SCSI] zfcp: Use common FC kmem_cache for GPN_FT request

Switch the allocation of the GPN_FT request data to the FC kmem_cache
and remove the zfcp_gpn kmem_cache.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] zfcp: Allocate GID_PN data through new FC kmem_cache
Christof Schmitt [Tue, 22 Feb 2011 18:54:42 +0000 (19:54 +0100)]
[SCSI] zfcp: Allocate GID_PN data through new FC kmem_cache

Allocate the data for the GID_PN request through the new FC
kmem_cache. While updating the GID_PN code, also introduce a helper
function for initializing the CT header for FC nameserver requests.
Remove the "paranoia" check as well, the GID_PN request data does not
suddenly change.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] zfcp: Introduce new kmem_cache for FC request and response data
Christof Schmitt [Tue, 22 Feb 2011 18:54:41 +0000 (19:54 +0100)]
[SCSI] zfcp: Introduce new kmem_cache for FC request and response data

A data buffer that is passed to the hardware must not cross a page
boundary. zfcp uses a series of kmem_caches to align the data to not
cross a page boundary. Introduce a new kmem_cache for the FC requests
sent from the zfcp driver and use it for the ELS ADISC data.  The goal
is to migrate to the FC kmem_cache in later patches and remove the
request specific kmem_caches.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] zfcp: Replace kmem_cache for "status read" data
Christof Schmitt [Tue, 22 Feb 2011 18:54:40 +0000 (19:54 +0100)]
[SCSI] zfcp: Replace kmem_cache for "status read" data

zfcp requires a mempool for the status read data blocks to resubmit
the "status read" requests at any time. Each status read data block
has the size of a page (4096 bytes) and needs to be placed in one
page.

Instead of having a kmem_cache for allocating page sized chunks, use
mempool_create_page_pool to create a mempool returning pages and
remove the zfcp kmem_cache.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] zfcp: Remove unused flag ZFCP_STATUS_FSFREQ_TASK_MANAGEMENT
Christof Schmitt [Tue, 22 Feb 2011 18:54:39 +0000 (19:54 +0100)]
[SCSI] zfcp: Remove unused flag ZFCP_STATUS_FSFREQ_TASK_MANAGEMENT

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] zfcp: Remove redundant unlikely()
Tobias Klauser [Tue, 22 Feb 2011 18:54:38 +0000 (19:54 +0100)]
[SCSI] zfcp: Remove redundant unlikely()

IS_ERR() already implies unlikely(), so it can be omitted here.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] be2iscsi: fix null ptr ref in conn get param
Mike Christie [Wed, 16 Feb 2011 21:04:41 +0000 (15:04 -0600)]
[SCSI] be2iscsi: fix null ptr ref in conn get param

The ep_disconnect function could be freeing the ep
while beiscsi_conn_get_param is running. This has
the driver use the get ep param callback instead
of the get conn param to fix this.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] iser: export addr and port
Mike Christie [Wed, 16 Feb 2011 21:04:40 +0000 (15:04 -0600)]
[SCSI] iser: export addr and port

This pactch has iser export the address and port
of the endpoint.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] bnx2i: fix null ptr ref in conn get param
Mike Christie [Wed, 16 Feb 2011 21:04:39 +0000 (15:04 -0600)]
[SCSI] bnx2i: fix null ptr ref in conn get param

bnx2i has some checks to try and make sure the ep
is not destroyed while the addr/port is getting
read. However, if after this check:

if (!(bnx2i_conn && bnx2i_conn->ep && bnx2i_conn->ep->hba))
goto out;

bnx2i_conn->ep is cleared by ep_disconnect then we will
oops.

This patches fixes the problem by having the driver
use the get_ep_param callback instead of get_conn_param.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] cxgbi: convert to use iscsi_conn_get_addr_param
Mike Christie [Wed, 16 Feb 2011 21:04:38 +0000 (15:04 -0600)]
[SCSI] cxgbi: convert to use iscsi_conn_get_addr_param

This has cxgbi use the iscsi_conn_get_addr_param helper
and the get ep callback.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] iscsi class: add callout to get iscsi_endpoint values
Mike Christie [Wed, 16 Feb 2011 21:04:37 +0000 (15:04 -0600)]
[SCSI] iscsi class: add callout to get iscsi_endpoint values

For drivers using the ep callbacks the addr and port
are attached to the endpoint instead of the conn.
This adds a callout to the iscsi_transport to get
ep values. It also adds locking around the get
param call to make sure that ep_disconnect does
not free the LLD's ep interconnect structs from
under us (the ep has a refcount so it will not
go away but the LLD may have structs from other
subsystems that are not allocated in the ep so
we need to protect them from getting freed).

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] iscsi_tcp: use iscsi_conn_get_addr_param libiscsi function
Mike Christie [Wed, 16 Feb 2011 21:04:36 +0000 (15:04 -0600)]
[SCSI] iscsi_tcp: use iscsi_conn_get_addr_param libiscsi function

This has iscsi_tcp use the iscsi_conn_get_addr_param
libiscsi function. It also drops the use of the libiscsi
session portal buffers, so they can be removed in
the next patches. Instead of copying the values
at bind time we get them during get() time. If we are
not connected userspace will now get -ENOTCONN,
so it knows that connection is disconnected instead
of a possible stale value.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libiscsi: add helper to convert addr to string
Mike Christie [Wed, 16 Feb 2011 21:04:35 +0000 (15:04 -0600)]
[SCSI] libiscsi: add helper to convert addr to string

This adds a helper to convert a addr struct to
a string. This will be used by the drivers in
the next patches.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] iscsi class: remove unused active variable
Mike Christie [Wed, 16 Feb 2011 21:04:34 +0000 (15:04 -0600)]
[SCSI] iscsi class: remove unused active variable

The active variable on the iscsi_cls_conn is not used
so this patch removes it.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] iscsi: fix iscsi_endpoint leak
Mike Christie [Wed, 16 Feb 2011 21:04:33 +0000 (15:04 -0600)]
[SCSI] iscsi: fix iscsi_endpoint leak

When iscsid restarts it does not know the connection's
endpoint, so it is getting leaked. This fixes the problem
by having the iscsi class force a disconnect before a
new connection is bound.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] cxgbi: enable TEXT PDU support
Mike Christie [Wed, 16 Feb 2011 21:04:32 +0000 (15:04 -0600)]
[SCSI] cxgbi: enable TEXT PDU support

cxgb3i and cxgb4i support TEXT PDU offloading, so set
the bits to enable it.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] bnx2i: Updated to version 2.6.2.3
Eddie Wai [Wed, 16 Feb 2011 21:04:31 +0000 (15:04 -0600)]
[SCSI] bnx2i: Updated to version 2.6.2.3

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] bnx2i: Added iSCSI text pdu support for iSCSI offload
Eddie Wai [Wed, 16 Feb 2011 21:04:30 +0000 (15:04 -0600)]
[SCSI] bnx2i: Added iSCSI text pdu support for iSCSI offload

This is part of an effort to support send target discovery via
the iSCSI offload path.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] bnx2i: Added jumbo MTU support for the no shost case
Eddie Wai [Wed, 16 Feb 2011 21:04:29 +0000 (15:04 -0600)]
[SCSI] bnx2i: Added jumbo MTU support for the no shost case

For scenarios where the shost is not being passed to bnx2i for the
iSCSI offload connection request, the code would consult the routing
table to select the CNIC device.
This code path will erroneously error out if the corresponding L2
interface's MTU has been setup to > 1500.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] bnx2i: Added support for the 57712(E) devices
Eddie Wai [Wed, 16 Feb 2011 21:04:28 +0000 (15:04 -0600)]
[SCSI] bnx2i: Added support for the 57712(E) devices

Moved all PCI_DEVICE_ID_NX2_57712(E) definitions to pci_ids.h

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] bnx2i: Added handling for unsupported iSCSI offload hba
Eddie Wai [Wed, 16 Feb 2011 21:04:27 +0000 (15:04 -0600)]
[SCSI] bnx2i: Added handling for unsupported iSCSI offload hba

The hba will now be unregistered and freed when iSCSI offload
is not supported by the NIC.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] bnx2i: Fixed the 32-bit swapping of the LUN field for nopouts for 5771X
Eddie Wai [Wed, 16 Feb 2011 21:04:26 +0000 (15:04 -0600)]
[SCSI] bnx2i: Fixed the 32-bit swapping of the LUN field for nopouts for 5771X

Fixed a bug where the 64-bit LUN field for nopouts were 32-bit swapped.
This only pertains to 5771X devices.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] bnx2i: Allow ep CONNECT_FAILED condition to go through proper cleanup
Eddie Wai [Wed, 16 Feb 2011 21:04:25 +0000 (15:04 -0600)]
[SCSI] bnx2i: Allow ep CONNECT_FAILED condition to go through proper cleanup

Allow CNIC to go through the proper cleanup procedure for an endpoint
which failed to connect.  Proper cleanup is necessary for the chip
to reset back to the initial state for the offloaded endpoint.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] lpfc 8.3.21: Change lpfc driver version to 8.3.21
James Smart [Wed, 16 Feb 2011 17:40:15 +0000 (12:40 -0500)]
[SCSI] lpfc 8.3.21: Change lpfc driver version to 8.3.21

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] lpfc 8.3.21: Debugfs additions
James Smart [Wed, 16 Feb 2011 17:40:06 +0000 (12:40 -0500)]
[SCSI] lpfc 8.3.21: Debugfs additions

- Add the driver debugfs framework for supporting debugfs read and write
  operations, and iDiag command structure.
- Add read and write to SLI4 device PCI config space registers.
- Add the driver support of debugfs PCI config space register bits set/clear
  methods to the provided bitmask.
- Add iDiag driver support for SLI4 device queue diagnostic.

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] lpfc 8.3.21: Initialization and user interface changes
James Smart [Wed, 16 Feb 2011 17:39:57 +0000 (12:39 -0500)]
[SCSI] lpfc 8.3.21: Initialization and user interface changes

- Make link speed not supported by port message an error message.
- Add support for new SLI failure codes add sysfs parameter to reflect the
  security setting and current state.
- Add all lpfc module parameters to the /sys/modules/lpfc/parameters directory.

[jejb: fix up compile failure]
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] lpfc 8.3.21: FC Discovery changes
James Smart [Wed, 16 Feb 2011 17:39:44 +0000 (12:39 -0500)]
[SCSI] lpfc 8.3.21: FC Discovery changes

FC Discovery changes

- Treat received PLOGI while logged in as a relogin (unregister and reregister).
- Added a timer to delay Nport discovery when clean bit is cleared and Fabric
  portname/nodename/FCID is changed.
- Invalidate Port's DID when receiving PLOGI from p2p port with CONFIG_PORT
  mailbox command.

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] lpfc 8.3.21: RRQ Implementation fixes
James Smart [Wed, 16 Feb 2011 17:39:35 +0000 (12:39 -0500)]
[SCSI] lpfc 8.3.21: RRQ Implementation fixes

RRQ Implementation fixes

- Added checks to prevent a call to findnode_did in clr_active_rrq
- Added the del_sync_timer call for the rrq_tmr to the stop_hba_timers routine.
- Added a check in __lpfc_set_active_rrq for the driver unloading to prevent
  adding an rrq when the driver is being removed.
- Add code to scsi_iocb_cmpl to check for the remote stop and add the rrq.
- Added the same check to els retry.
- Added code to compare the source did in the els rrq to the vports did and
  chose the right exchange ID.
- Initialize the start_cmd pointer to indicate when we have looped through
  all of the scsi buffers.
- Remove the need for the lock around the clearing of the active bit in the
  rrq.
- Added code to clean the els and fcp xri aborted list and remove the all of
  the RRQs for a deleted vport.

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] lpfc 8.3.21: Critical Errors and Bug Fixes
James Smart [Wed, 16 Feb 2011 17:39:24 +0000 (12:39 -0500)]
[SCSI] lpfc 8.3.21: Critical Errors and Bug Fixes

Critical Errors:
- Correctly handle non-zero return lpfc_workq_post_event and return ENOMEM
- Save the irq level when locking the host_lock in lpfc_findnode_did

Bug Fixes:
- Adjust payload_length and request_length for sli4_config mailbox commands.
- Add the freed sgl/XRI to the tail of the list rather than to the head.
- Set the FC_VPORT_NEEDS_INIT_VPI on vport deletes and check it before
  issuing a fdisc on an els retry.
- Only call lpfc_hba_init_link() if phba->cfg_suppress_link_up
  is LPFC_INITIALIZE_LINK.
- Add support for SLI-4 Performance Hints

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] hpsa: fix bad comparison
Dan Carpenter [Tue, 15 Feb 2011 21:33:13 +0000 (15:33 -0600)]
[SCSI] hpsa: fix bad comparison

'!' has higher precedence than '&'.  CFGTBL_ChangeReq is 0x1 so the
original code is equivelent to if (!doorbell_value) {...

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] hpsa: Do not attempt kdump if we detect resetting controller failed.
Stephen M. Cameron [Tue, 15 Feb 2011 21:33:08 +0000 (15:33 -0600)]
[SCSI] hpsa: Do not attempt kdump if we detect resetting controller failed.

We can get completions left over from before the attempted reset which
will interfere with the kdump.  Better to just not make the attempt in
that case.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] hpsa: Inform controller we are using 32-bit tags.
Stephen M. Cameron [Tue, 15 Feb 2011 21:33:03 +0000 (15:33 -0600)]
[SCSI] hpsa: Inform controller we are using 32-bit tags.

Controller will transfer only 32-bits on completion if it
knows we are only using 32-bit tags.  Also, some newer controllers
apparently (and erroneously) require that we only use 32-bit tags,
and that we inform the controller of this.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] hpsa: Add transport_mode host attribute in /sys
Stephen M. Cameron [Tue, 15 Feb 2011 21:32:58 +0000 (15:32 -0600)]
[SCSI] hpsa: Add transport_mode host attribute in /sys

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] hpsa: make hpsa.hpsa_simple_mode=1 module parameter actually work
Stephen M. Cameron [Tue, 15 Feb 2011 21:32:53 +0000 (15:32 -0600)]
[SCSI] hpsa: make hpsa.hpsa_simple_mode=1 module parameter actually work

It's not enough to simple avoid putting the board into performant
mode, as we have to set up the interrupts differently, etc.  When
I originally tested this module parameter, I tested it incorrectly
without realizing it, and the driver was running in performant mode
the whole time unbeknownst to me.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] hpsa: do not re-order commands in internal queues
Stephen M. Cameron [Tue, 15 Feb 2011 21:32:48 +0000 (15:32 -0600)]
[SCSI] hpsa: do not re-order commands in internal queues

Driver's internal queues should be FIFO, not LIFO.
This is a port of an almost identical patch from cciss by Jens Axboe.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] ipr: Fix a race on multiple configuration changes
Kleber Sacilotto de Souza [Mon, 14 Feb 2011 22:19:31 +0000 (20:19 -0200)]
[SCSI] ipr: Fix a race on multiple configuration changes

In a multiple configuration change scenario a remove notification can be
followed by an immediate add notification for the same device, which
will cause the device to be removed but never added back. This patch
fixes the problem by ensuring that in such situations the device will be
added back.

Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libsas: convert to libata new error handler
James Bottomley [Sun, 23 Jan 2011 15:44:12 +0000 (09:44 -0600)]
[SCSI] libsas: convert to libata new error handler

The conversion is quite complex given that the libata new error
handler has to be hooked into the current libsas timeout and error
handling.  The way this is done is to process all the failed commands
via libsas first, but if they have no underlying sas task (and they're
on a sata device) assume they are destined for the libata error
handler and send them accordingly.

Finally, activate the port recovery of the libata error handler for
each port known to the host.  This is somewhat suboptimal, since that
port may not need recovering, but given the current architecture of
the libata error handler, it's the only way; and the spurious
activation is harmless.

Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libata: separate error handler into usable components
James Bottomley [Sun, 23 Jan 2011 15:42:50 +0000 (09:42 -0600)]
[SCSI] libata: separate error handler into usable components

Right at the moment, the libata error handler is incredibly
monolithic.  This makes it impossible to use from composite drivers
like libsas and ipr which have to handle error themselves in the first
instance.

The essence of the change is to split the monolithic error handler
into two components: one which handles a queue of ata commands for
processing and the other which handles the back end of readying a
port.  This allows the upper error handler fine grained control in
calling libsas functions (and making sure they only get called for ATA
commands whose lower errors have been fixed up).

Cc: Tejun Heo <tj@kernel.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libata: fix eh locking
James Bottomley [Sun, 23 Jan 2011 14:31:14 +0000 (08:31 -0600)]
[SCSI] libata: fix eh locking

The SCSI host eh_cmd_q should be protected by the host lock (not the
port lock).  This probably doesn't matter that much at the moment,
since we try to serialise the add and eh pieces, but it might matter
in future for more convenient error handling.  Plus this switches
libata to the standard eh pattern where you lock, remove from the cmd
queue to a local list and unlock and then operate on the local list.

Cc: Tejun Heo <tj@kernel.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libata: fix locking for sas paths
James Bottomley [Sun, 23 Jan 2011 14:30:00 +0000 (08:30 -0600)]
[SCSI] libata: fix locking for sas paths

For historical reasons, libsas uses the scsi host lock as the ata port
lock, and libata always uses the ata host.  For the old eh, this was
largely irrelevant since the two locks were never mixed inside the
code.  However, the new eh has a case where it nests acquisition of
the host lock inside the port lock (this does look rather deadlock
prone).  Obviously this would be an instant deadlock if the port lock
were the host lock, so switch the libsas paths to use the ata host
lock as well.

Cc: Tejun Heo <tj@kernel.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libata: plumb sas port scan into standard libata paths
James Bottomley [Sun, 23 Jan 2011 14:28:33 +0000 (08:28 -0600)]
[SCSI] libata: plumb sas port scan into standard libata paths

The function ata_sas_port_init() has always really done its own thing.
However, as a precursor to moving to the libata new eh, it has to be
properly using the standard libata scan paths.  This means separating
the current libata scan paths into pieces which can be shared with
libsas and pieces which cant (really just the async call and the host
scan).

Cc: Tejun Heo <tj@kernel.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] scsi_dh_rdac : Adding MODULE VERSION for rdac device handler
Moger, Babu [Fri, 11 Feb 2011 23:12:44 +0000 (16:12 -0700)]
[SCSI] scsi_dh_rdac : Adding MODULE VERSION for rdac device handler

Adding MODULE_VERSION for scsi_dh_rdac. This will be helpful sometimes
to get the code level without looking at the code.

Signed-off-by: Babu Moger <babu.moger@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] scsi_dh: cosmetic change to sizeof()
Hillf Danton [Fri, 11 Feb 2011 22:17:33 +0000 (15:17 -0700)]
[SCSI] scsi_dh: cosmetic change to sizeof()

instead of doing sizeof(struct X) it's better to do sizeof(*v) where v
is the variable pointing to struct X.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Babu Moger <babu.moger@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] scsi_dh_rdac: fix for lun_table update for rdac device handler
Moger, Babu [Fri, 11 Feb 2011 22:14:08 +0000 (15:14 -0700)]
[SCSI] scsi_dh_rdac: fix for lun_table update for rdac device handler

During one of our testing, we noticed that mode select command sent
from the host did not have the lun_table updated.

Problem is root caused to the way lun table is updated. Lun table
update was done after the call to blk_rq_map_kern is made. This was
causing problem because kernel uses bounce buffer(bio_copy_kern) if
the address is not aligned.  The command buffer updated after the
call(blk_rq_map_kern) was not going on the wire. Moved the code to
update the lun_table before the call to fix the problem.

Signed-off-by: Babu Moger <babu.moger@lsi.com>
Signed-off-by: Somasundaram Krishnasamy <Somasundaram.Krishnasamy@lsi.com>
Signed-off-by: Yanling Qi <Yanling.Qi@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] mptfusion: Remove bus reset for mptsas module
Kashyap, Desai [Thu, 10 Feb 2011 06:21:24 +0000 (11:51 +0530)]
[SCSI] mptfusion: Remove bus reset for mptsas module

Bus reset is not required for SAS Controller. It is valid for mptspi
and mptfc, but for mptsas it is not required. It is an extra work for
Error handling escallation for mptsas.  Removing bus reset from error
handling will eventually speedup Error handling for SAS controller.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] mptfusion: Support SAS2.0 Devices with SAS1.0 Controllers
Kashyap, Desai [Thu, 10 Feb 2011 06:20:39 +0000 (11:50 +0530)]
[SCSI] mptfusion: Support SAS2.0 Devices with SAS1.0 Controllers

SAS1.0 Controller was not able to detect SAS2.0 Expanders due to Link
RATE detection was limited to 1.5 Gbps and 3.0 Gbps for SAS1
controllers. Added detection for 6.0 Gbps link.  Now, user can mix-up
6.0 Gpbs links with SAS1.0 controller.

e.g SAS1.0 HBA <----> SAS2.0 Expander <------> SAS2.0 Expander <--------> SAS1.0 Drive.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libfcoe: Move common code from fcoe to libfcoe module
Bhanu Prakash Gollapudi [Sat, 29 Jan 2011 00:05:37 +0000 (16:05 -0800)]
[SCSI] libfcoe: Move common code from fcoe to libfcoe module

To facilitate LLDDs to reuse the code, skb queue related functions are moved to
libfcoe, so that both fcoe and bnx2fc drivers can use them. The common structures
fcoe_port, fcoe_percpu_s are moved to libfcoe. fcoe_port will now have an
opaque pointer that points to corresponding driver's interface structure.
Also, fcoe_start_io and fcoe_fc_crc are moved to libfcoe.

As part of this change, fixed fcoe_start_io to return ENOMEM if
skb_clone fails.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] fcoe: use dedicated workqueue instead of system_wq
Tejun Heo [Sat, 29 Jan 2011 00:05:32 +0000 (16:05 -0800)]
[SCSI] fcoe: use dedicated workqueue instead of system_wq

fcoe uses the system_wq to destroy ports and the work items need to be
flushed before the driver is unloaded.  As the work items free the
containing data structure, they can't be flushed directly.  The
workqueue should be flushed instead.

Also, the destruction works can be chained - ie. destruction of a port
may lead to destruction of another port where the work item for the
former queues the work for the latter.  Currently, the depth of chain
can be at most two and fcoe_exit() makes sure everything is complete
by calling flush_scheduled_work() twice.

With commit c8efcc25 (workqueue: allow chained queueing during
destruction), destroy_workqueue() can take care of chained works on
workqueue destruction.  Add and use fcoe_wq instead.  Simply
destroying fcoe_wq on driver unload takes care of flushing.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libfc: introduce LLD event callback
Bhanu Prakash Gollapudi [Sat, 29 Jan 2011 00:05:27 +0000 (16:05 -0800)]
[SCSI] libfc: introduce LLD event callback

This patch enables LLD to listen to rport events and perform LLD
specific operations based on the rport event. This patch also stores
sp_features and spp_type in rdata for further reference by LLD.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libfc: Extending lport's roles for target if there is a registered target.
Kiran Patil [Sat, 29 Jan 2011 00:05:22 +0000 (16:05 -0800)]
[SCSI] libfc: Extending lport's roles for target if there is a registered target.

Problem:

From initaitor machine, when queried role of target (other end of connection),
it is "initiator", hence SCSI-ml doesn't send any LUN Inquiry commands.

Fix:

If there is a registered target for FC_TYPE_FCP, extend lport's params
(capability) to be target as well, By default lport params are
INITIATOR only. Having this fix, caused initiator to send SCSI LUN
inquiry command to target.

Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] fcoe: convert fcoe.ko to become an fcoe transport provider driver
Yi Zou [Sat, 29 Jan 2011 00:05:16 +0000 (16:05 -0800)]
[SCSI] fcoe: convert fcoe.ko to become an fcoe transport provider driver

Remove the existing sysfs entry points of the fcoe.ko module parameters that
are used to create/destroy/enable/disable an FCoE instance, rather, use the
newly added fcoe transport code to attach itself as an FCoE transport provider
when fcoe.ko gets loaded. There is no functionality change on the logic of
fcoe interacts with upper libfc and lower netdev. The fcoe transport only acts
as thin layer to provide a unified interface for all fcoe transport providers
so all FCoE instances on any network interfaces from all vendors can be
managed through the same Open-FCoE.org's user space tool package, which also
has full DCB support.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] fcoe: prepare fcoe for using fcoe transport
Yi Zou [Sat, 29 Jan 2011 00:05:11 +0000 (16:05 -0800)]
[SCSI] fcoe: prepare fcoe for using fcoe transport

Prepare the fcoe to convert it to use the newly added fcoe transport, making
it as the default fcoe transport provider for libfcoe. This patch is to rename
some of the variables to avoid any confusing names later as now there are
several transports in the same file.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libfcoe: include fcoe_transport.c into kernel libfcoe module
Yi Zou [Sat, 29 Jan 2011 00:05:06 +0000 (16:05 -0800)]
[SCSI] libfcoe: include fcoe_transport.c into kernel libfcoe module

Now we can include the fcoe_transport.c to the build of the kernel libfcoe
module. Move the module information to fcoe_transport, and it will have
all the module parameters later for the create/destroy/enable/disable of an
FCoE instance.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libfcoe: rename libfcoe.c to fcoe_cltr.c for the coming fcoe_transport.c
Yi Zou [Sat, 29 Jan 2011 00:05:00 +0000 (16:05 -0800)]
[SCSI] libfcoe: rename libfcoe.c to fcoe_cltr.c for the coming fcoe_transport.c

The existing libfcoe.c is mostly for FIP support, rename it to reflect that
fact and so we can add fcoe_transport.c to the make file to include both
into the libfcoe kernel module.

[ Minor modifications by Robert Love converting a few
  "__attribute__((packed))" modifiers to "__packed" to remove new
  checkpatch.pl WARNINGS ]

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libfcoe: add implementation to support fcoe transport
Yi Zou [Sat, 29 Jan 2011 00:04:55 +0000 (16:04 -0800)]
[SCSI] libfcoe: add implementation to support fcoe transport

Add the new fcoe_transport.c file that implements basic fcoe transport
interface. Eventually, the sysfs entries to create/destroy/enable/disable
an FCoE instance will be coming to the fcoe transport layer, who does a
look-up to find the corresponding transport provide and pass the corresponding
action over to the identified provider.

The fcoe.ko will become the default fcoe transport provider that can support
FCoE on any given netdev interfaces, as the Open-FCoE.org's default software
FCoE HBA solution. Any vendor specific FCoE HBA driver that is built on top
of Open-FCoE's kernel stack of libfc & libfcoe as well as the user land tool
of fcoe-utils can easily plug-in and start running FCoE on their network
interfaces. The fcoe.ko will be converted to act as the default provider if
no vendor specific transport provider is found, as it is always added to the
very end of the list of attached transports.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libfcoe: add fcoe_transport structure defines to include/scsi/libfcoe.h
Yi Zou [Sat, 29 Jan 2011 00:04:50 +0000 (16:04 -0800)]
[SCSI] libfcoe: add fcoe_transport structure defines to include/scsi/libfcoe.h

add the fcoe_transport struct to the common libfcoe.h header so all fcoe
transport provides can use it to attach itself as an fcoe transport. This
is the header part, and the next patch will be the transport code itself.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libfcoe: move logging macros into the local libfcoe.h header file
Yi Zou [Sat, 29 Jan 2011 00:04:45 +0000 (16:04 -0800)]
[SCSI] libfcoe: move logging macros into the local libfcoe.h header file

libfcoe kernel module debug macros will used by the fcoe transport code
as well when later it gets added.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libfc: Enhanced exchange ID selection mechanism and fix related EMA selection...
Kiran Patil [Sat, 29 Jan 2011 00:04:39 +0000 (16:04 -0800)]
[SCSI] libfc: Enhanced exchange ID selection mechanism and fix related EMA selection logic.

Problem:

In case of exchange responder case, EMA selection was defaulted to the
last EMA from EMA list (lport.ema_list).  If exchange ID is selected
from offload pool and not setup DDP, resulting into incorrect
selection of EMA, and eventually dropping the packet because unable to
find exchange.

Fix:

Enhanced the exchange ID selection (depending upon request type and
exchange responder) Made necessary enhancement in EMA selection
algorithm.

Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libfc: export seq_release() for users of seq_assign()
Joe Eykholt [Sat, 29 Jan 2011 00:04:34 +0000 (16:04 -0800)]
[SCSI] libfc: export seq_release() for users of seq_assign()

Target modules using lport->tt.seq_assign() get a hold on the
exchange but have no way of releasing it.  Add that.

Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libfc: Remove usage of the Scsi_Host's host_lock
Robert Love [Sat, 29 Jan 2011 00:04:29 +0000 (16:04 -0800)]
[SCSI] libfc: Remove usage of the Scsi_Host's host_lock

This patch removes the use of the Scsi_Host's host_lock
within fc_queuecommand. It also removes the DEF_SCSI_QCMD
usage so that libfc has fully moved on to the new
queuecommand interface.

Signed-off-by: Robert Love <robert.w.love@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Reviewed-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libfc: use PRLI hook to get parameters when sending outgoing PRLI
Joe Eykholt [Sat, 29 Jan 2011 00:04:23 +0000 (16:04 -0800)]
[SCSI] libfc: use PRLI hook to get parameters when sending outgoing PRLI

When sending an outgoing PRLI as an initiator, get the parameters
from registered providers so that they all get a chance to decide
on roles.

The passive provider is called last, and could override the
initiator role.

Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libfc: add hook to notify providers of local port changes
Joe Eykholt [Sat, 29 Jan 2011 00:04:18 +0000 (16:04 -0800)]
[SCSI] libfc: add hook to notify providers of local port changes

When an SCST provider is registered, it needs to know what
local ports are available for configuration as targets.

Add a notifier chain that is invoked when any local port
that is added or deleted.

Maintain a global list of local ports and add an
interator function that calls a given function for
every existing local port.  This is used when first
loading a provider.

Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libfc: add local port hook for provider session lookup
Joe Eykholt [Sat, 29 Jan 2011 00:04:13 +0000 (16:04 -0800)]
[SCSI] libfc: add local port hook for provider session lookup

The target provider needs a per-instance lookup table
or other way to lookup sessions quickly without going through
a linear list or serializing too much.

Add a simple void * array indexed by FC-4 type to the fc_lport.

Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Committed-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libfc: add method for setting handler for incoming exchange
Joe Eykholt [Sat, 29 Jan 2011 00:04:08 +0000 (16:04 -0800)]
[SCSI] libfc: add method for setting handler for incoming exchange

Add a method for setting handler for incoming exchange.
For multi-sequence exchanges, this allows the target driver
to add a response handler for handling subsequent sequences,
and exchange manager resets.

The new function is called fc_seq_set_resp().

Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libfc: add hook for FC-4 provider registration
Joe Eykholt [Sat, 29 Jan 2011 00:04:02 +0000 (16:04 -0800)]
[SCSI] libfc: add hook for FC-4 provider registration

Allow FC-4 provider modules to hook into libfc, mostly for targets.
This should allow any FC-4 module to handle PRLI requests and maintain
process-association states.

Each provider registers its ops with libfc and then will be called for
any incoming PRLI for that FC-4 type on any instance.   The provider
can decide whether to handle that particular instance using any method
it likes, such as ACLs or other configuration information.

A count is kept of the number of successful PRLIs from the remote port.
Providers are called back with an implicit PRLO when the remote port
is about to be deleted or has been reset.

fc_lport_recv_req() now sends incoming FC-4 requests to FC-4 providers,
and there is a built-in provider always registered for handling
incoming ELS requests.

The call to provider recv() routines uses rcu_read_lock()
so that providers aren't removed during the call.  That lock is very
cheap and shouldn't affect any performance on ELS requests.
Providers can rely on the RCU lock to protect a session lookup as well.

Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>