GitHub/moto-9609/android_kernel_motorola_exynos9610.git
13 years ago[SCSI] scsi_debug: add consecutive medium errors
Douglas Gilbert [Fri, 11 Mar 2011 15:43:35 +0000 (10:43 -0500)]
[SCSI] scsi_debug: add consecutive medium errors

A useful test case for error recovery is multiple,
consecutive medium errors. When scsi_debug is started
with "opts=2" a MEDIUM ERROR is generated when block
0x1234 (4660) is read. The patch extends that to
10 consecutive blocks from 0x1234 (i.e. blocks 4660 to
4669 inclusive).

[0:0:0:0]  disk  ATA    INTEL SSD  2CV1 /dev/sda /dev/sg0 80.0GB
[10:0:0:0] disk  Linux  scsi_debug 0004 /dev/sdb /dev/sg1 1.09TB

Output file not specified so no copy, just reading input
 >> unrecovered read error at blk=4660, substitute zeros
...
 >> unrecovered read error at blk=4669, substitute zeros
4670+10 records in
0+0 records out
10 unrecovered read errors
lowest unrecovered read lba=4660, highest unrecovered lba=4669
time to read data: 0.047943 secs at 49.87 MB/sec

BTW Change /dev/sg1 (bsg device works just as well) to
/dev/sdb to see why, with faulty media, you do not want
to use the block layer interface. Reason: time block
layer takes to do useless retries and collateral damage
to data in its 4 KB blocks (O_DIRECT mitigates the
latter).

ChangeLog:
    - extend opts=2 medium error generation at block
      0x1234 to 10 consecutive blocks (i.e. blocks
      0x1234 to 0x123d).

Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libsas: fix ata list corruption issue
James Bottomley [Thu, 10 Mar 2011 23:13:18 +0000 (17:13 -0600)]
[SCSI] libsas: fix ata list corruption issue

I think this stems from a misunderstanding of how the ata error handler
works.  ata_scsi_cmd_error_handler() gets called with a passed in list
of commands to handle.  However, that list may still not be empty when
it exits.  The command ata_scsi_port_error_handler() must be called
(which takes no list) before the list will be completely emptied.  This
bites the sas error handler because the two are called from different
functions and the original list has gone out of scope before
ata_scsi_port_error_handler() is called. leading to some commands
dangling on bare stack, which is a potential memory corruption issue.
Fix this by manually deleting all outstanding commands from the on-stack
list before it goes out of scope.

Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] hpsa: export resettable host attribute
Stephen M. Cameron [Wed, 9 Mar 2011 23:00:06 +0000 (17:00 -0600)]
[SCSI] hpsa: export resettable host attribute

This attribute, requested by Redhat, allows kexec-tools to know
whether the controller can honor the reset_devices kernel parameter
and actually reset the controller.  For kdump to work properly it
is necessary that the reset_devices parameter be honored.  This
attribute enables kexec-tools to warn the user if they attempt to
designate a non-resettable controller as the dump device.

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: move device attributes to avoid forward declarations
Stephen M. Cameron [Wed, 9 Mar 2011 23:00:01 +0000 (17:00 -0600)]
[SCSI] hpsa: move device attributes to avoid forward declarations

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] scsi_debug: Logical Block Provisioning (SBC3r26)
Martin K. Petersen [Tue, 8 Mar 2011 07:08:11 +0000 (02:08 -0500)]
[SCSI] scsi_debug: Logical Block Provisioning (SBC3r26)

Update scsi_debug to support the Logical Block Provisioning commands and
bits as defined in SBC3r26. The old tp* parameters have been
transitioned to the new lbp* scheme found in the draft standard.

The old tpu option to enable UNMAP is now called lbpu. tpws to signal
support for WRITE SAME(16) with the UNMAP bit set is now lbpws. Support
for WRITE SAME(10) with the UNMAP bit set is also available using the
lpuws10 parameter.

Limiting the maximum number of blocks per WRITE SAME command has been
implemented and is available via the write_same_length module parameter.

As part of the renaming process the parameter lists have been sorted
alphabetically (request from Doug).

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] sd: Logical Block Provisioning update
Martin K. Petersen [Tue, 8 Mar 2011 07:07:15 +0000 (02:07 -0500)]
[SCSI] sd: Logical Block Provisioning update

SBC3r26 contains many changes to the Logical Block Provisioning
interfaces (formerly known as Thin Provisioning ditto). This patch
implements support for both the old and new schemes using the same
heuristic as before (whether the LBP VPD page is present).

The new code also allows the provisioning mode (i.e. choice of command)
to be overridden on a per-device basis via sysfs. Two additional modes
are supported in this version:

 - WRITE SAME(10) with the UNMAP bit set

 - WRITE SAME(10) without the UNMAP bit set. This allows us to support
   devices that predate the TP/LBP enhancements in SBC3 and which work
   by way zero-detection

Switching between modes has been consolidated in a helper function that
also updates the block layer topology according to the limitations of
the chosen command.

I experimented with trying WRITE SAME(16) if UNMAP fails, WRITE SAME(10)
if WRITE SAME(16) fails, etc. but found several devices that got
cranky. So for now we'll disable discard if one of the commands
fail. The user still has the option of selecting a different mode in
sysfs.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] Include protection operation in SCSI command trace
Martin K. Petersen [Tue, 8 Mar 2011 07:03:59 +0000 (02:03 -0500)]
[SCSI] Include protection operation in SCSI command trace

When debugging DIF/DIX it is very helpful to be able to see which DIX
operation is associated with the scsi_cmnd. Include the protection op in
the SCSI command trace.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] hpsa: fix incorrect PCI IDs and add two new ones (2nd try)
scameron@beardog.cce.hp.com [Mon, 7 Mar 2011 16:44:16 +0000 (10:44 -0600)]
[SCSI] hpsa: fix incorrect PCI IDs and add two new ones (2nd try)

My first attempt was botched, got the wrong PCI Device ID
(used PCI_DEVICE_ID_HP_CISSE, should have been PCI_DEVICE_ID_HP_CISSF)

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] target: Fix volume size misreporting for volumes > 2TB
Nicholas Bellinger [Wed, 2 Mar 2011 23:52:51 +0000 (15:52 -0800)]
[SCSI] target: Fix volume size misreporting for volumes > 2TB

the target infrastructure fails to send the correct conventional size
to READ_CAPACITY that force a retry with READ_CAPACITY_16, which reads
the capacity for devices > 2TB.  Fix by adding the correct return to
trigger RC(16).

Reported-by: Ben Jarvis <bjarvismn@gmail.com>
Signed-off-by: Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] bnx2fc: Broadcom FCoE offload driver
Bhanu Gollapudi [Fri, 4 Feb 2011 20:10:34 +0000 (12:10 -0800)]
[SCSI] bnx2fc: Broadcom FCoE offload driver

This driver is for Broadcom Netxtreme II 57712 chip. The following
patch contains the driver sources for bnx2fc driver.  libfc/libfcoe
changes to enable bnx2fc have already gone through the fcoe
tree. bnx2fc is a SCSI low level driver that interfaces with SCSI
midlayer, libfc, libfcoe, cnic modules.  bnx2fc driver uses services
of libfc for slow path operations such as FIP and fabric
discovery. The fast path IO perations are performed after offloading
the session information to the underlying FCoE firmware.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] fcoe: fix broken fcoe interface reset
Vasu Dev [Fri, 25 Feb 2011 23:03:28 +0000 (15:03 -0800)]
[SCSI] fcoe: fix broken fcoe interface reset

Reset using "fcoeadm -r" also needs to restart FIP before
doing libfc lport reset, this is needed for new switch firmware
requiring FIP solicitation before doing FLOGI again during reset.
So this patch does this by doing fcoe_ctlr_link_down and then
fcoe_ctlr_link_up to reset the interface.

The fcoe_ctlr_link_down call path also does lport reset
and then fcoe_ctlr_link_up re-starts the fabric login after
doing FIP solicitation first to get reset feature working
again.

Signed-off-by: Vasu Dev <vasu.dev@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] fcoe: precedence bug in fcoe_filter_frames()
Dan Carpenter [Fri, 25 Feb 2011 23:03:23 +0000 (15:03 -0800)]
[SCSI] fcoe: precedence bug in fcoe_filter_frames()

Negate has higher precedence than bitwise AND.  FCPHF_CRC_UNCHECKED is
0x1 so the original code is equivalent to: if (!fr_flags(fp)) { ...

Signed-off-by: Dan Carpenter <error27@gmail.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: Remove stale fcoe-netdev entries
Bhanu Prakash Gollapudi [Fri, 25 Feb 2011 23:03:17 +0000 (15:03 -0800)]
[SCSI] libfcoe: Remove stale fcoe-netdev entries

When L2 driver is unloaded, libfcoe_destroy tries to access the fcoe
transport structure matching the netdev. However, since the netdev is
unregistered by that time, it fails to do so. Hence the stale mappings
exists in the fcoe-netdev list. Handle NETDEV_UREGISTER device
notification mechanism to remove the stale fcoe-netdev mapping.

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 FCOE_MTU definition from fcoe.h to libfcoe.h
Bhanu Prakash Gollapudi [Fri, 25 Feb 2011 23:03:12 +0000 (15:03 -0800)]
[SCSI] libfcoe: Move FCOE_MTU definition from fcoe.h to libfcoe.h

both fcoe and bnx2fc drivers can access the common definition of
FCOE_MTU.

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: introduce __fc_fill_fc_hdr that accepts fc_hdr as an argument
Bhanu Prakash Gollapudi [Fri, 25 Feb 2011 23:03:07 +0000 (15:03 -0800)]
[SCSI] libfc: introduce __fc_fill_fc_hdr that accepts fc_hdr as an argument

fc_fill_fc_hdr() expects fc_frame as an argument. Introduce __fc_fill_fc_hdr to
accept fc_frame_header as an argument.

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, libfc: initialize EM anchors list and then update npiv EMs
Vasu Dev [Fri, 25 Feb 2011 23:03:01 +0000 (15:03 -0800)]
[SCSI] fcoe, libfc: initialize EM anchors list and then update npiv EMs

EM anchors list initialization for only master port was not enough to
keep npiv working as described here:-
https://lists.open-fcoe.org/pipermail/devel/2011-January/011063.html

So this patch moves fc_exch_mgr_list_clone to update npiv ports
EMs once EM anchors list initialized.

Also some cleanup, no need to set lport = NULL as that always
get initialized later.

Signed-off-by: Vasu Dev <vasu.dev@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] Revert "[SCSI] libfc: fix exchange being deleted when the abort itself is...
Parikh, Neerav [Fri, 25 Feb 2011 23:02:56 +0000 (15:02 -0800)]
[SCSI] Revert "[SCSI] libfc: fix exchange being deleted when the abort itself is timed out"

When abort for an exchange timed out it didn't release the reference to
the exchange resulting in a memory leak.

After discussion with the author of the patch (CC) that introduced this
bug it was suggested to revert that patch.

This reverts commit ea3e2e72eeb3e8a9440a5da965914f9b12088626.

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] 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>