Andrew Vasquez [Wed, 22 Dec 2010 00:00:24 +0000 (16:00 -0800)]
[SCSI] qla2xxx: Display mailbox register 4 during 8012 AEN for ISP82XX parts.
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>
Andrew Vasquez [Wed, 22 Dec 2010 00:00:23 +0000 (16:00 -0800)]
[SCSI] qla2xxx: Don't perform a BIG_HAMMER if Get-ID (0x20) mailbox command fails on CNAs.
The semantics we employ now in the driver, performing a
BIG_HAMMER in the event of Get-ID (0x20) mailbox command
failing, should only be done for FC. On FC configurations, it
makes sense since advertising is only really performed once,
so a BIG_HAMMER to reinitiate the process is needed to
restart. Under FCoE, this is not needed, as there's a
continous stream of advertisements/ACks at the protocol layer
to initiate a relogin/reinitialization process.
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>
Joe Carnuccio [Wed, 22 Dec 2010 00:00:22 +0000 (16:00 -0800)]
[SCSI] qla2xxx: Remove redundant module parameter permission bits
For driver module parameters that have permission bits set to
(S_IRUGO|S_IRUSR), remove the second term since it is already
included in the first term.
S_IRUGO comes defined as (S_IRUSR|S_IRGRP|S_IROTH).
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Andrew Vasquez [Wed, 22 Dec 2010 00:00:21 +0000 (16:00 -0800)]
[SCSI] qla2xxx: Add sysfs node for displaying board temperature.
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>
Giridhar Malavali [Wed, 22 Dec 2010 00:00:20 +0000 (16:00 -0800)]
[SCSI] qla2xxx: Code cleanup to remove unwanted comments and code.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Madhuranath Iyengar [Wed, 22 Dec 2010 00:00:19 +0000 (16:00 -0800)]
[SCSI] qla2xxx: Fix for memory wedge on fw halt for ISP82XX
Signed-off-by: Swapnil Nagle <swapnil.nagle@qlogic.com>
Signed-off-by: Karen Higgins <karen.higgins@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Madhuranath Iyengar [Wed, 22 Dec 2010 00:00:18 +0000 (16:00 -0800)]
[SCSI] qla2xxx: Update FCP priority information to firmware before sending IOs
The FCP priority info was not being updated properly in certain situations.
Here are the changes that needs to be done to take care of this issue:
1. No need to check fcport->state for FCS_UNCONFIGURED in
qla24xx_update_fcport_fcp_prio(), since an invalid loop id check is
already performed which is sufficient.
2. Add the missing qla24xx_update_fcport_fcp_prio() function call
within qla2x00_update_fcport() function, so that the priority info
is updated on every port addition or change.
3. Perform proper adapter types checking.
4. Other changes, associated with DEBUG/printk's and parameter passing.
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
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>
Joe Carnuccio [Wed, 22 Dec 2010 00:00:17 +0000 (16:00 -0800)]
[SCSI] qla2xxx: Fixed zero test on new_config in qla2x00_process_loopback().
Fixed the incorrect zero test on array new_config[].
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Andrew Vasquez [Wed, 22 Dec 2010 00:00:16 +0000 (16:00 -0800)]
[SCSI] qla2xxx: Populate FCP_PRIO location for no *FLT* case
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>
Dan Carpenter [Wed, 22 Dec 2010 00:00:15 +0000 (16:00 -0800)]
[SCSI] qla2xxx: list cursors are not null
This is just a cleanup.
The unneeded NULL check annoys static checkers because we already
derefenced it and the we check it and then (if it's not the _safe()
version) we dereference it again without checking. And the static
checker is all, "Wah? Is it null or not?"
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Saurav Kashyap [Wed, 22 Dec 2010 00:00:14 +0000 (16:00 -0800)]
[SCSI] qla2xxx: Added support for quiescence mode for ISP82xx.
Support is added for quiescence mode. This feature is for P3P
adapters. Any of the functions can put the firmware into quiescence
state. All the others have to ack that request. During quiescence mode
current commands are processed and all the new incoming I/Os are
blocked. Loop resync is performed after firmware comes out of
quiescence state.
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>
adam radford [Wed, 15 Dec 2010 03:11:56 +0000 (19:11 -0800)]
[SCSI] megaraid_sas: Documentation update
The following patch updates the
Documentation/scsi/ChangeLog.megaraid_sas file.
Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
adam radford [Tue, 21 Dec 2010 21:34:31 +0000 (13:34 -0800)]
[SCSI] megaraid_sas: Add 9565/9285 specific code
This patch adds MegaRAID 9265/9285 (Device id 0x5b) specific code
Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
adam radford [Tue, 21 Dec 2010 18:23:23 +0000 (10:23 -0800)]
[SCSI] megaraid_sas: Add struct megasas_instance_template changes
The following patch adds struct megasas_instance_template changes to
the megaraid_sas driver, and changes all code to use the new instance
entries:
irqreturn_t (*service_isr )(int irq, void *devp);
void (*tasklet)(unsigned long);
u32 (*init_adapter)(struct megasas_instance *);
u32 (*build_and_issue_cmd) (struct megasas_instance *, struct scsi_cmnd *);
void (*issue_dcmd) (struct megasas_instance *instance,
struct megasas_cmd *cmd);
Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
adam radford [Wed, 15 Dec 2010 02:56:07 +0000 (18:56 -0800)]
[SCSI] megaraid_sas: Use lowest memory bar for SR-IOV VF support
The following patch modifies the megaraid_sas driver to select the
lowest memory bar available so the driver will work in SR-IOV VF
environments where the memory bar mapping changes.
Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
adam radford [Tue, 21 Dec 2010 18:17:40 +0000 (10:17 -0800)]
[SCSI] megaraid_sas: Add MSI-X support and msix_disable module parameter
This patch adds MSI-X support and 'msix_disable' module parameter to
the megaraid_sas driver.
Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
FUJITA Tomonori [Mon, 20 Dec 2010 16:44:45 +0000 (18:44 +0200)]
[SCSI] st: Increase success probability in driver buffer allocation
Modify allocation to try the minimum possible page order allowed by the HBA
scatter/gather segment limit in allocation of the driver's internal
buffer. This increases the probability of successful allocation. The
allocation may still fail if this minimum order is > 0.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi>
Reported-by: Lukas Kolbe <lkolbe@techfak.uni-bielefeld.de>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Kai Makisara [Mon, 20 Dec 2010 16:43:39 +0000 (18:43 +0200)]
[SCSI] st: Store page order before driver buffer allocation
The order of the pages allocated for the driver buffer must be stored before
allocation because it is used in freeing already allocated pages if
allocation fails.
Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi>
Reported-by: Lukas Kolbe <lkolbe@techfak.uni-bielefeld.de>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Douglas Gilbert [Sat, 18 Dec 2010 00:16:06 +0000 (19:16 -0500)]
[SCSI] scsi_debug: set resid to indicate no data-in when medium error
set resid to the requested data-in length when a MEDIUM ERROR is
simulated. This implies no valid data is returned in the data-in
buffer
Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
James Bottomley [Fri, 17 Dec 2010 20:36:34 +0000 (15:36 -0500)]
[SCSI] fix medium error problems with some arrays which can cause data corruption
Our current handling of medium error assumes that data is returned up
to the bad sector. This assumption holds good for all disk devices,
all DIF arrays and most ordinary arrays. However, an LSI array engine
was recently discovered which reports a medium error without returning
any data. This means that when we report good data up to the medium
error, we've reported junk originally in the buffer as good. Worse,
if the read consists of requested data plus a readahead, and the error
occurs in readahead, we'll just strip off the readahead and report
junk up to userspace as good data with no error.
The fix for this is to have the error position computation take into
account the amount of data returned by the driver using the scsi
residual data. Unfortunately, not every driver fills in this data,
but for those who don't, it's set to zero, which means we'll think a
full set of data was transferred and the behaviour will be identical
to the prior behaviour of the code (believe the buffer up to the error
sector). All modern drivers seem to set the residual, so that should
fix up the LSI failure/corruption case.
Reported-by: Douglas Gilbert <dgilbert@interlog.com>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Nicholas Bellinger [Fri, 17 Dec 2010 21:11:16 +0000 (13:11 -0800)]
[SCSI] Add missing SPC-4 CDB and MAINTENANCE_[IN,OUT] service action definitions
This patch adds a handful of missing CDBs defs that are used by TCM
persistent reservation logic in the SPC-4 defined CDB exclusion table for
registrations and reservations.
This includes a number of missing MI_* and MO_* prefixed service actions defs
for MAINTENANCE_IN and MAINTENANCE_OUT that are mentioned wrt to persistent
registration and reservation status for the SCSI Initiator Port.
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
adam radford [Wed, 15 Dec 2010 02:51:48 +0000 (18:51 -0800)]
[SCSI] megaraid_sas: Update GPL headers.
This patch updates the GPL headers in megaraid_sas_base.c and megaraid_sas.h.
Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
adam radford [Wed, 15 Dec 2010 03:17:17 +0000 (19:17 -0800)]
[SCSI] megaraid_sas: Rename megaraid_sas.c to megaraid_sas_base.c
This patch renames megaraid_sas.c to megaraid_sas_base.c to facilitate
other files in the compile.
Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Hillf Danton [Thu, 16 Dec 2010 20:26:37 +0000 (14:26 -0600)]
[SCSI] fix the return value of scsi_target_queue_read()
It seems that zero should be returned if scsi_target_is_busy(starget) is
true, no matter if sdev is on the starved list.
Signed-off-by: Hillf Danton <dhillf@gmail.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Menny Hamburger [Thu, 16 Dec 2010 19:57:07 +0000 (14:57 -0500)]
[SCSI] scsi_dh: propagate SCSI device deletion
Currently, when scsi_dh_activate() returns with an error
(e.g. SCSI_DH_NOSYS) the activate_complete callback is not called and
the error is not propagated to DM mpath.
When a SCSI device attached to a device handler is deleted, userland
processes currently performing I/O on the device will have their I/O
hang forever.
- Set SCSI_DH_NOSYS error when the handler is in the process of being
deleted (e.g. the SCSI device is in a SDEV_CANCEL or SDEV_DEL state).
- Set SCSI_DH_DEV_OFFLINED error when device is in SDEV_OFFLINE state.
- Call the activate_complete callback function directly from
scsi_dh_activate if an error has been set (when either the scsi_dh
internal data has already been deleted or is in the process of being
deleted).
The patch was tested in an iSCSI environment, RDAC H/W handler and
multipath. In the following reproduction process, dd will I/O hang
forever and the only way to release it will be to reboot the machine:
1) Perform I/O on a multipath device:
dd if=/dev/dm-0 of=/dev/zero bs=8k count=1000000 &
2) Delete all slave SCSI devices contained in the mpath device:
I) In an iSCSI environment, the easiest way to do this is by
stopping iSCSI:
/etc/init.d/iscsi stop
II) Another way to delete the devices is by applying the following
bash scriptlet:
dm_devs=$(ls /sys/block/ | grep dm- | xargs)
for dm_dev in $dm_devs; do
devices=$(ls /sys/block/$dm_dev/slaves)
for device in $devices; do
echo 1 > /sys/block/$device/device/delete
done
done
NOTE: when DM mpath's fail_path uses blk_abort_queue this scsi_dh change
isn't strictly required. However, DM mpath's call to blk_abort_queue
will soon be reverted because it has proven to be unsafe due to a race
(between blk_abort_queue and scsi_request_fn) that can lead to list
corruption. Therefore we cannot rely on blk_abort_queue via fail_path,
but even if we could this scsi_dh change is still preferrable.
Signed-off-by: Menny Hamburger <Menny_Hamburger@Dell.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Reviewed-by: Babu Moger <babu.moger@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Stephen M. Cameron [Thu, 16 Dec 2010 19:01:03 +0000 (13:01 -0600)]
[SCSI] hpsa: do not consider RAID level to be part of device identity
Otherwise, after doing a RAID level migration, the disk will be
disruptively removed and re-added as a different disk on rescan.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Stephen M. Cameron [Thu, 16 Dec 2010 19:00:58 +0000 (13:00 -0600)]
[SCSI] hpsa: do not consider firmware revision when looking for device changes.
The firmware may have been updated, in which case, it's the same device,
and in that case, we do not want to remove and add the device, we want to
let it continue as is.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
James Smart [Wed, 15 Dec 2010 22:58:20 +0000 (17:58 -0500)]
[SCSI] lpfc 8.3.20: Update lpfc driver version to 8.3.20
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>
James Smart [Wed, 15 Dec 2010 22:58:10 +0000 (17:58 -0500)]
[SCSI] lpfc 8.3.20: Updates to FC discovery commands
Updated commands used for ELS to utilize VPI
Allocate RPI at node creation time and pass in ELS commnads.
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>
James Smart [Wed, 15 Dec 2010 22:57:46 +0000 (17:57 -0500)]
[SCSI] lpfc 8.3.20: Implement new SLI4 init procedures based on if_type
Implement new SLI4 init procedures based on if_type:
- Add structure changes for new SLIPORT registers and BAR changes.
- Update register names to be consistent with inteface spec terms.
- Added union to encapsulate Hardward error registers.
- Rework lpfc_sli4_post_status_check() around SLI-4's SLI_INTF type
- Removed the lpfc_sli4_fw_cfg_check routine
- Segmented driver logic to include evaluation of the if_type to
engage different behaviors.
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>
James Smart [Wed, 15 Dec 2010 22:57:33 +0000 (17:57 -0500)]
[SCSI] lpfc 8.3.20: Implement the FC and SLI async event handlers
Implement the FC and SLI async event handlers:
- Updated MQ_CREATE_EXT mailbox structure to include fc and SLI async events.
- Added the SLI trailer code.
- Split physical field into type and number to reflect latest SLI spec.
- Changed lpfc_acqe_fcoe to lpfc_acqe_fip to reflect latest Spec changes.
- Added lpfc_acqe_fc_la structure for FC link attention async events.
- Added lpfc_acqe_sli structure for sli async events.
- Added lpfc_sli4_async_fc_evt routine to handle fc la async events.
- Added lpfc_sli4_async_sli routine to handle sli async events.
- Moved LPFC_TRAILER_CODE_FC to be handled by its own handler function.
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>
James Smart [Wed, 15 Dec 2010 22:57:20 +0000 (17:57 -0500)]
[SCSI] lpfc 8.3.20: Critical fixes
- Use for iocbq->context1 to hold the ndlp pointer.
- Set ndlp in all iocbs generated from ioctl functions.
- Turn parity and serr bits back on after performing sli4 board reset.
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>
Krishna Gudipati [Tue, 14 Dec 2010 00:23:51 +0000 (16:23 -0800)]
[SCSI] bfa: Update the driver version to 2.3.2.3
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Krishna Gudipati [Tue, 14 Dec 2010 00:23:27 +0000 (16:23 -0800)]
[SCSI] bfa: io tag handling and minor bug fix.
Fix iotag handling:
1) Update and check io tag for retry case.
2) Clearing upper 3 bits in io tag when an IO completes.
The 3 upper bits in io tags are used for counting FCP exchange retry.
Un-cleared bits will cause firmware to access invalid memory when the
same io tag is used for an IO to a target that doesn't support FCP
exchange retry.
3) Only check the effective bits when validating an iotag.
Other minor fixes:
1) Added trace to get FC header type with assert of unhandled packet received.
Ignore the type FC_TYPE_FC_FSS (FC_XS).
2) Fixed the adapter info display check - to check for fcmode flag even.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Krishna Gudipati [Tue, 14 Dec 2010 00:17:42 +0000 (16:17 -0800)]
[SCSI] bfa: direct attach mode fix.
- Direct attach is not working due to the check of PID in fcxp_send request.
- Added logic to set the lps->lp_pid with the PID assigned for n2n mode.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Krishna Gudipati [Tue, 14 Dec 2010 00:17:11 +0000 (16:17 -0800)]
[SCSI] bfa: IOC auto recovery fix.
- Made IOC auto_recovery synchronized and not timer based.
- Only one PCI function will attempt to recover and reinitialize
the ASIC on a failure, after all the active PCI fns
acknowledge the IOC failure.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Krishna Gudipati [Tue, 14 Dec 2010 00:16:50 +0000 (16:16 -0800)]
[SCSI] bfa: Store port configuration in flash for persistency.
When the bfa driver is loaded a flogi is sent without the knowledge of
trunking configuration. This normal flogi causes the switch ports
which had trunking enabled to go to persistent offline. Solution is
to store the port configuration (which has trunking info) in the flash
for persistency. The firmware will read this configuration when the
very first fcport enable is received.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Krishna Gudipati [Tue, 14 Dec 2010 00:16:09 +0000 (16:16 -0800)]
[SCSI] bfa: IOC fwtrace save logic & state machine fixes.
- Move fw trace save logic to bfa_ioc_sm_fail_entry(),
so that fw trace is saved irrespective of the cause of the failure.
- Make bfa_ioc_sm_fail() a failure parking state.
- Rename bfa_ioc_sm_initfail() to a more appropriate bfa_ioc_sm_fail_retry()
as it is no longer a parking state.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Maggie Zhang [Fri, 10 Dec 2010 03:13:20 +0000 (19:13 -0800)]
[SCSI] bfa: remove unused functions and misc cleanups
Remove unused functions and fix checkpatch errors. Misc cleanups in
comment and formatting.
Signed-off-by: Maggie Zhang <xmzhang@brocade.com>
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Maggie Zhang [Fri, 10 Dec 2010 03:12:32 +0000 (19:12 -0800)]
[SCSI] bfa: remove all OS wrappers
Remove OS wrapper functions/macros, and as a result remove bfa_os_inc.h.
Signed-off-by: Maggie Zhang <xmzhang@brocade.com>
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Maggie Zhang [Fri, 10 Dec 2010 03:11:39 +0000 (19:11 -0800)]
[SCSI] bfa: remove all SCSI IO callbacks
Remove SCSI IO callbacks, and as a result remove bfa_cb_ioim.h.
Signed-off-by: Maggie Zhang <xmzhang@brocade.com>
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Maggie Zhang [Fri, 10 Dec 2010 03:10:27 +0000 (19:10 -0800)]
[SCSI] bfa: scatter gather processing change
Modified scatter gather processing to use the kernel provided
scsi_for_each_sg() macro.
1) Instead of allocating and setting up sgpg in bfa_ioim_sge_setup(),
we only do allocation. As a result, we remove
bfa_ioim_sgpg_setup() and rename bfa_ioim_sge_setup() to
bfa_ioim_sgpg_alloc().
2) bfa_ioim_send_ioreq() call scsi_for_each_sg() to handle both inline
and sgpg setup.
Signed-off-by: Maggie Zhang <xmzhang@brocade.com>
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Maggie Zhang [Fri, 10 Dec 2010 03:09:26 +0000 (19:09 -0800)]
[SCSI] bfa: remove a file with small size
Removed bfa_drv.c, merged it to bfa_core.c and modified Makefile.
Signed-off-by: Maggie Zhang <xmzhang@brocade.com>
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Maggie Zhang [Fri, 10 Dec 2010 03:08:43 +0000 (19:08 -0800)]
[SCSI] bfa: clean up one line functions
Cleaned up one line functions.
Signed-off-by: Maggie Zhang <xmzhang@brocade.com>
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Maggie Zhang [Fri, 10 Dec 2010 03:07:46 +0000 (19:07 -0800)]
[SCSI] bfa: remove unused and empty functions
Removed unused and empty functions.
Signed-off-by: Maggie Zhang <xmzhang@brocade.com>
Signed-off-by: Jing Huang <xmzhang@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Robert Jennings [Thu, 9 Dec 2010 20:03:59 +0000 (14:03 -0600)]
[SCSI] ibmvfc: Improve ibmvfc_async_desc memory layout
By changing field ordering we can avoid a couple of memory holes in
the tables that use the ibmvfc_async_desc structure.
Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Stephen Hemminger [Thu, 9 Dec 2010 17:37:56 +0000 (09:37 -0800)]
[SCSI] iscsi: add module alias
Since iscsi transport can be built as a module and uses netlink socket
to communicate. The module should have an alias to autoload when socket
of NETLINK_ISCSI type is requested.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Christof Schmitt [Wed, 8 Dec 2010 16:30:46 +0000 (17:30 +0100)]
[SCSI] zfcp: Add allow_lun_scan module parameter
The zfcpdump tool requires a method to attach exactly one LUN. The
easiest way to achieve this is to add a new zfcp module parameter.
When allow_lun_scan is set to "false", zfcp only accepts LUNs that
have been configured through the unit_add sysfs interface.
Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Christof Schmitt [Thu, 2 Dec 2010 14:16:18 +0000 (15:16 +0100)]
[SCSI] zfcp: Add __init declaration to zfcp_cache_hw_align
The function zfcp_cache_hw_align is only called from zfcp_module_init,
so it should be declared with __init as well.
Reviewed-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Christof Schmitt [Thu, 2 Dec 2010 14:16:17 +0000 (15:16 +0100)]
[SCSI] zfcp: Move qdio setup from erp to zfcp_qdio.c
Initialization of the qdio waitqueue should happen when the qdio data
is initialized and the QDIOUP flag should be handled in the qdio code
as well. Adjust the code accordingly and remove the superfluos
function zfcp_erp_adapter_strategy_open_qdio.
Reviewed-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Swen Schillig [Thu, 2 Dec 2010 14:16:16 +0000 (15:16 +0100)]
[SCSI] zfcp: Redesign of the debug tracing final cleanup.
This patch is the final cleanup of the redesign from the zfcp tracing.
Structures and elements which were used by multiple areas of the
former debug tracing are now changed to the new scheme.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Swen Schillig [Thu, 2 Dec 2010 14:16:15 +0000 (15:16 +0100)]
[SCSI] zfcp: Redesign of the debug tracing for SCSI records.
This patch is the continuation to redesign the zfcp tracing to a more
straight-forward and easy to extend scheme.
This patch deals with all trace records of the zfcp SCSI area.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Swen Schillig [Thu, 2 Dec 2010 14:16:14 +0000 (15:16 +0100)]
[SCSI] zfcp: Redesign of the debug tracing for HBA records.
This patch is the continuation to redesign the zfcp tracing to a more
straight-forward and easy to extend scheme.
This patch deals with all trace records of the zfcp HBA area.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Swen Schillig [Thu, 2 Dec 2010 14:16:13 +0000 (15:16 +0100)]
[SCSI] zfcp: Redesign of the debug tracing for SAN records.
This patch is the continuation to redesign the zfcp tracing to a more
straight-forward and easy to extend scheme.
This patch deals with all trace records of the zfcp SAN area.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Swen Schillig [Thu, 2 Dec 2010 14:16:12 +0000 (15:16 +0100)]
[SCSI] zfcp: Redesign of the debug tracing for recovery actions.
The tracing environment of the zfcp LLD has become very bulky and hard
to maintain. Small changes involve a large modification process which
is error-prone and not effective. This patch is the first of a set to
redesign the zfcp tracing to a more straight-forward and easy to
extend scheme. It removes all interpretation and visualization parts
and focuses on bare logging of the information.
This patch deals with all trace records of the zfcp error recovery.
Signed-off-by: Swen schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Vikas Chaudhary [Fri, 3 Dec 2010 06:13:00 +0000 (22:13 -0800)]
[SCSI] qla4xxx: Update driver version to 5.02.00-k5
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Vikas Chaudhary [Fri, 3 Dec 2010 06:12:51 +0000 (22:12 -0800)]
[SCSI] qla4xxx: Updated the Copyright header
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Vikas Chaudhary [Fri, 3 Dec 2010 06:12:47 +0000 (22:12 -0800)]
[SCSI] qla4xxx: do not reset hba if ql4xdontresethba is set
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Lalit Chandivade [Fri, 3 Dec 2010 06:12:45 +0000 (22:12 -0800)]
[SCSI] qla4xxx: do not check for fw hung if reset retry is in progress
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Prasanna Mumbai [Fri, 3 Dec 2010 06:12:43 +0000 (22:12 -0800)]
[SCSI] qla4xxx: cache new IP address acquired via DHCP
Prior to firmware state change from ACQUIRING to READY, an
0x8029 AEN is received. Added code to check previous state
being ACQUIRING in order to update the ip address in the driver.
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Prasanna Mumbai <prasanna.mumbai@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Lalit Chandivade [Fri, 3 Dec 2010 06:12:40 +0000 (22:12 -0800)]
[SCSI] qla4xxx: Fail initialization if qla4_8xxx_pci_mem_write_2M fails
Since if fw load is failing, running on incomplete fw load would
be fatal.
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Lalit Chandivade [Fri, 3 Dec 2010 06:12:36 +0000 (22:12 -0800)]
[SCSI] qla4xxx: put device in FAILED state for 82XX initialization failure
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Lalit Chandivade [Fri, 3 Dec 2010 06:12:27 +0000 (22:12 -0800)]
[SCSI] qla4xxx: do not process interrupt unconditionally
in mailbox command do not process interrupt unconditionally,
process interrupt only in polling mode
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Karen Higgins [Fri, 3 Dec 2010 06:12:22 +0000 (22:12 -0800)]
[SCSI] qla4xxx: use correct fw_ddb_index in abort task
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Karen Higgins <karen.higgins@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Swapnil Nagle [Fri, 3 Dec 2010 06:12:15 +0000 (22:12 -0800)]
[SCSI] qla4xxx: memory wedge with peg_halt test in loop
Signed-off-by: Swapnil Nagle <swapnil.nagle@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Shyam Sundar [Fri, 3 Dec 2010 06:12:08 +0000 (22:12 -0800)]
[SCSI] qla4xxx: initialize MSI in correct way
IRQF_SHARED flag should not be set when calling request_irq for MSI since
this interrupt mechanism cannot be shared like standard INTx
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Shyam Sundar <shyam.sundar@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Vikas Chaudhary [Fri, 3 Dec 2010 06:12:03 +0000 (22:12 -0800)]
[SCSI] qla4xxx: Drop use of IRQF_DISABLE
IRQF_DISABLE flag is deprecated and this flag is a NOOP in kernel.
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Joe Eykholt [Wed, 1 Dec 2010 00:20:18 +0000 (16:20 -0800)]
[SCSI] libfc: fix statistics for FCP input/output megabytes
The statistics for InputMegabytes and OutputMegabytes are
misnamed. They're accumulating bytes, not megabytes.
The statistic returned via /sys must be in megabytes, however,
which is what the HBA-API wants. The FCP code needs to accumulate
it in bytes and then divide by 1,000,000 (not 2^20) before it
presented via sysfs.
This affects fcoe.ko only, not fnic. The fnic driver
correctly by accumulating bytes and then converts to megabytes.
I checked that libhbalinux is using the /sys file directly without
conversion.
BTW, qla2xxx does divide by 2^20, which I'm not fixing here.
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>
Joe Eykholt [Wed, 1 Dec 2010 00:20:12 +0000 (16:20 -0800)]
[SCSI] libfcoe: change fip_select to return new FCF
Neaten several calls to fip_select() by having it return the
pointer to the new FCF.
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>
Joe Eykholt [Wed, 1 Dec 2010 00:20:07 +0000 (16:20 -0800)]
[SCSI] libfcoe: reorder FCF list to put latest advertiser first
When there are several FCFs to choose from, the one most likely
to accept a FLOGI on certian switches is the one that last
answered a multicast solicit.
So, when receiving an advertisement, move the FCF to the front
of the list so that it gets chosen first among those with the
same priority.
Without this, more FLOGIs need to be sent in a test with
multiple FCFs and a switch in NPV mode, but it still
eventually finds one that accepts the FLOGI.
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>
Joe Eykholt [Wed, 1 Dec 2010 00:20:02 +0000 (16:20 -0800)]
[SCSI] libfcoe: add debug message for FCF destination MAC
When multiple FCFs to the same fabric exist, the debug messages
all look alike. Change the message to include the MAC address.
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>
Joe Eykholt [Wed, 1 Dec 2010 00:19:56 +0000 (16:19 -0800)]
[SCSI] libfcoe: retry rejected FLOGI to another FCF if possible
Switches using multiple-FCFs may reject FLOGI in order to
balance the load between multiple FCFs. Even though the FCF
was available, it may have more load at the point we actually
send the FLOGI.
If the FLOGI fails, select a different FCF
if possible, among those with the same priority. If no other
FCF is available, just deliver the reject to libfc for retry.
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>
Joe Eykholt [Wed, 1 Dec 2010 00:19:51 +0000 (16:19 -0800)]
[SCSI] libfcoe: fix checking of conflicting fabrics in fcoe_ctlr_select()
The check for conflicting fabrics in fcoe_ctlr_select()
ignores any FCFs that aren't usable. This is a minor
problem now but becomes more pronounced after later patches.
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>
Joe Eykholt [Wed, 1 Dec 2010 00:19:46 +0000 (16:19 -0800)]
[SCSI] libfcoe: move some timer code to make it reusable.
Move some of the code in fcoe_ctlr_timer_work() to
fcoe_ctlr_select() so that it can be shared
with another function in a forthcoming patch.
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>
Joe Eykholt [Wed, 1 Dec 2010 00:19:40 +0000 (16:19 -0800)]
[SCSI] libfcoe: update FIP FCF announcements
Move the announcement code to a separate function for reuse in
a forthcoming patch.
For messages regarding FCF timeout and selection, use the
previously-announced FCF MAC address (dest_addr) in the fcoe_ctlr struct.
Only print (announce) the FCF if it is new. Print MAC for
timed-out or deselected FCFs.
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>
Yi Zou [Wed, 1 Dec 2010 00:19:35 +0000 (16:19 -0800)]
[SCSI] libfc: fix fc_tm_done not freeing the allocated fsp pkt
Frame should be freed in fc_tm_done, this is an updated patch on the one
initially submitted by Hillf Danton.
Signed-off-by: Hillf Danton <dhillf@gmail.com>
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>
Yi Zou [Wed, 1 Dec 2010 00:19:30 +0000 (16:19 -0800)]
[SCSI] libfc: the timeout for the REC itself is 2 * R_A_TOV_els
The timeout for the exchange carrying REC itself is 2 * R_A_TOV_els.
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>
Yi Zou [Wed, 1 Dec 2010 00:19:25 +0000 (16:19 -0800)]
[SCSI] libfc: fix exchange being deleted when the abort itself is timed out
Should not continue when the abort itself is being timeout since in that case
the exchange will be deleted and relesased. We still want to call the
associated response handler to let the layer, e.g., fcp, know the exchange
itself is being timed out.
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>
Yi Zou [Wed, 1 Dec 2010 00:19:20 +0000 (16:19 -0800)]
[SCSI] libfc: do not fc_io_compl on fsp w/o any scsi_cmnd associated
Do not call fc_io_compl() on fsp w/o any scsi_cmnd, e.g., lun reset is built
inside fc_fcp, not from a scsi command from queuecommnd from scsi-ml, so in
in case target is buggy that is invalid flags in the FCP_RSP, as we have seen
in some SAN Blaze target where all bits in flags are 0, we do not want to call
io_compl on this fsp.
[ Comment block added by Robert Love ]
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>
Yi Zou [Wed, 1 Dec 2010 00:19:15 +0000 (16:19 -0800)]
[SCSI] libfc: add print of exchange id for debugging fc_fcp
This is very helpful to match up the corresponding exchange to the actual I/O
described by the fsp, particularly when you do a side-by-side comparison of
the syslog with your trace.
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>
Joe Perches [Wed, 1 Dec 2010 00:19:09 +0000 (16:19 -0800)]
[SCSI] drivers/scsi/fcoe: Update WARN uses
Add missing newlines.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Hillf Danton [Wed, 1 Dec 2010 00:19:04 +0000 (16:19 -0800)]
[SCSI] libfc: fix memory leakage in remote port
There seems rdata should get put before return.
Signed-off-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Hillf Danton [Wed, 1 Dec 2010 00:18:59 +0000 (16:18 -0800)]
[SCSI] libfc: fix memory leakage in local port
There seems info should get freed when error encountered.
Signed-off-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Hillf Danton [Wed, 1 Dec 2010 00:18:54 +0000 (16:18 -0800)]
[SCSI] libfc: fix memory leakage in local port
There seems info should get freed when error encountered.
Signed-off-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
john fastabend [Wed, 1 Dec 2010 00:18:49 +0000 (16:18 -0800)]
[SCSI] libfc: remove tgt_flags from fc_fcp_pkt struct
We can easily remove the tgt_flags from fc_fcp_pkt struct
and use rpriv->tgt_flags directly where needed.
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
john fastabend [Wed, 1 Dec 2010 00:18:44 +0000 (16:18 -0800)]
[SCSI] libfc: use rport timeout values for fcp recovery
Use the rport value for rec_tov for timeout values when
sending fcp commands. Currently, defaults are being used
which may or may not match the advertised values.
The default may cause i/o to timeout on networks that
set this value larger then the default value. To make
the timeout more configurable in the non-REC mode we
remove the FC_SCSI_ER_TIMEOUT completely allowing the
scsi-ml to do the timeout. This removes an unneeded
timer and allows the i/o timeout to be configured
using the scsi-ml knobs.
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
john fastabend [Wed, 1 Dec 2010 00:18:39 +0000 (16:18 -0800)]
[SCSI] libfc: incorrect scsi host byte codes returned to scsi-ml
The fcp packet recovery handler fc_fcp_recover() is called
when errors occurr in a fcp session. Currently it is
generically setting the status code to FC_CMD_RECOVERY for
all error types. This results in DID_BUS_BUSY errors
being returned to the scsi-ml.
DID_BUS_BUSY errors indicate "BUS stayed busy through time
out period" according to scsi.h. Many of the error reported
by fc_rcp_recovery() are pkt errors. Here we update
fc_fcp_recovery to use better host byte codes.
With certain FAST FAIL flags set DID_BUS_BUSY and DID_ERROR
will have different behaviors this was causing dm multipath
to fail quickly in some cases where a retry would be a
better action.
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Hillf Danton [Wed, 1 Dec 2010 00:18:33 +0000 (16:18 -0800)]
[SCSI] libfc: fix stats computation in fc_queuecommand()
There seems accumulation needed.
Signed-off-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Hillf Danton [Wed, 1 Dec 2010 00:18:28 +0000 (16:18 -0800)]
[SCSI] libfc: fix mem leak in fc_seq_assign()
There is a typo cleaned, which triggers memory leakage.
Signed-off-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Robert Love [Wed, 1 Dec 2010 00:18:23 +0000 (16:18 -0800)]
[SCSI] libfc: Fix incorrect locking and unlocking in FCP
The error handler grabs the si->scsi_queue_lock, but
in the case where the fsp pointer is NULL it releases
the scsi_host lock. This can lead to a variety of
system hangs depending on which is used first- the
scsi_host lock or the scsi_queue_lock.
This patch simply unlocks the correct lock when fcp
is NULL.
Signed-off-by: Robert Love <robert.w.love@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Hillf Danton [Wed, 1 Dec 2010 00:18:17 +0000 (16:18 -0800)]
[SCSI] libfc: tune fc_exch_em_alloc() to be O(2)
For allocating new exch from pool, scanning for free slot in exch
array fluctuates when exch pool is close to exhaustion.
The fluctuation is smoothed, and the scan looks to be O(2).
Signed-off-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Hillf Danton [Wed, 1 Dec 2010 00:18:12 +0000 (16:18 -0800)]
[SCSI] libfc: fix mem leak in fc_exch_recv_seq_resp()
There seems that ep should get released, or it will no longer get freed.
Signed-off-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Yi Zou [Wed, 1 Dec 2010 00:18:07 +0000 (16:18 -0800)]
[SCSI] libfc: fix NULL pointer dereference bug in fc_fcp_pkt_release
This happens when then tearing down the fcoe interface with active I/O.
The back trace shows
dead000000200200 in RAX, i.e., LIST_POISON2, indicating
that the fsp is already being dequeued, which is probably why no complaining
was seen in fc_fcp_destroy() about outstanding fsp not freed, since we dequeue
it in the end of fc_io_compl() before releasing it. The bug is due to the
fact that we have already destroyed lport's scsi_pkt_pool while on-going i/o
is still accessing it through fc_fcp_pkt_release(), like this trace or the
similar code path from scsi-ml to fc_eh_abort, etc. This is fixed by moving
the fc_fcp_destroy() after lport is detached from scsi-ml since fc_fcp_destroy
is supposed to called only once where no lport lock is taken, otherwise the
fc_fcp_pkt_release() would have to grab the lport lock.
BUG: unable to handle kernel NULL pointer dereference at (null)
.......
RIP: 0010:[<
0000000000000000>]
[<(null)>] (null)
RSP: 0018:
ffff8803270f7b88 EFLAGS:
00010282
RAX:
dead000000200200 RBX:
ffff880197d2fbc0 RCX:
0000000000005908
RDX:
ffff880195ea6d08 RSI:
0000000000000282 RDI:
ffff880180f4fec0
RBP:
ffff8803270f7bc0 R08:
ffff880197d2fbe0 R09:
0000000000000000
R10:
ffff88032867f090 R11:
0000000000000000 R12:
ffff880195ea6d08
R13:
0000000000000282 R14:
ffff880180f4fec0 R15:
0000000000000000
FS:
0000000000000000(0000) GS:
ffff8801b5820000(0000) knlGS:
0000000000000000
CS: 0010 DS: 0018 ES: 0018 CR0:
000000008005003b
CR2:
0000000000000000 CR3:
00000001a6eae000 CR4:
00000000000006e0
DR0:
0000000000000000 DR1:
0000000000000000 DR2:
0000000000000000
DR3:
0000000000000000 DR6:
00000000ffff0ff0 DR7:
0000000000000400
Process fc_rport_eq (pid: 5278, threadinfo
ffff8803270f6000, task
ffff880326254ab0)
Stack:
ffffffffa02c39ca ffff8803270f7ba0 ffff88019331cbc0 ffff880197d2fbc0
0000000000000000 ffff8801a8c895e0 ffff8801a8c895e0 ffff8803270f7c10
ffffffffa02c4962 ffff8803270f7be0 ffffffff814c94ab ffff8803270f7c10
Call Trace:
[<
ffffffffa02c39ca>] ? fc_io_compl+0x10a/0x530 [libfc]
[<
ffffffffa02c4962>] fc_fcp_complete_locked+0x72/0x150 [libfc]
[<
ffffffff814c94ab>] ? _spin_unlock_bh+0x1b/0x20
[<
ffffffffa02b98ff>] ? fc_exch_done+0x3f/0x60 [libfc]
[<
ffffffffa02c4a8f>] fc_fcp_retry_cmd+0x4f/0x60 [libfc]
[<
ffffffffa02c6150>] fc_fcp_recv+0x9b0/0xc30 [libfc]
[<
ffffffff8106ba7a>] ? _call_console_drivers+0x4a/0x80
[<
ffffffff8107d5ec>] ? lock_timer_base+0x3c/0x70
[<
ffffffff8107e06b>] ? try_to_del_timer_sync+0x7b/0xe0
[<
ffffffffa02b9dcf>] fc_exch_mgr_reset+0x1df/0x250 [libfc]
[<
ffffffffa02c57a0>] ? fc_fcp_recv+0x0/0xc30 [libfc]
[<
ffffffffa02c1042>] fc_rport_work+0xf2/0x4e0 [libfc]
[<
ffffffff8109203e>] ? prepare_to_wait+0x4e/0x80
[<
ffffffffa02c0f50>] ? fc_rport_work+0x0/0x4e0 [libfc]
[<
ffffffff8108c6c0>] worker_thread+0x170/0x2a0
[<
ffffffff81091d50>] ? autoremove_wake_function+0x0/0x40
[<
ffffffff8108c550>] ? worker_thread+0x0/0x2a0
[<
ffffffff810919e6>] kthread+0x96/0xa0
[<
ffffffff810141ca>] child_rip+0xa/0x20
[<
ffffffff81091950>] ? kthread+0x0/0xa0
[<
ffffffff810141c0>] ? child_rip+0x0/0x20
Code:
Bad RIP value.
RIP
[<(null)>] (null)
RSP <
ffff8803270f7b88>
CR2:
0000000000000000
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>
Hillf Danton [Wed, 1 Dec 2010 00:18:01 +0000 (16:18 -0800)]
[SCSI] libfc: remove define of fc_seq_exch in fc_exch.c
The define for fc_seq_exch is unnecessary, since it also appears in scsi/libfc.h
Signed-off-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Maggie [Tue, 30 Nov 2010 02:26:32 +0000 (18:26 -0800)]
[SCSI] bfa: fix endianess sparse check warnings
First round of fix for the endianess check warnings from make C=2 CF="-D__CHECK_ENDIAN__".
Signed-off-by: Maggie <xmzhang@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Maggie [Tue, 30 Nov 2010 02:21:32 +0000 (18:21 -0800)]
[SCSI] bfa: fix regular sparse check warnings.
Fix all sparse check warnings from make C=2.
Signed-off-by: Maggie <xmzhang@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Eddie Wai [Tue, 23 Nov 2010 23:29:32 +0000 (15:29 -0800)]
[SCSI] bnx2i: Updated version to 2.6.2.2
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Eddie Wai [Tue, 23 Nov 2010 23:29:31 +0000 (15:29 -0800)]
[SCSI] bnx2i: Updated copyright and maintainer info
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Eddie Wai [Tue, 23 Nov 2010 23:29:30 +0000 (15:29 -0800)]
[SCSI] bnx2i: Cleaned up various error conditions in ep_connect/disconnect
Various error conditions inside ep_connect and ep_disconnect were
either not being handled or not being handled correctly. This patch
fixes all those issues.
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Acked-by: Anil Veerabhadrappa <anilgv@broadcom.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Eddie Wai [Tue, 23 Nov 2010 23:29:29 +0000 (15:29 -0800)]
[SCSI] bnx2i: Added return code check for chip kwqe submission request
Added the handling for cases when a chip request is made to the
CNIC module but the hardware is not ready to accept. This would
lead to many unnecessary wait timeouts.
This code adds check in the connect establishment and destruction
path.
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>