]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
13 years ago[SCSI] arcmsr: fix write to device check
roel kluin [Sat, 1 Jan 2011 18:40:23 +0000 (19:40 +0100)]
[SCSI] arcmsr: fix write to device check

Use command->sc_data_direction instead of trying (incorrectly) to
figure it out from the command itself

[jejb: fix up compile failure]
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: NickCheng <nick.cheng@areca.com.tw>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] lpfc: lower stack use in lpfc_fc_frame_check
Tomas Henzl [Wed, 22 Dec 2010 15:52:40 +0000 (16:52 +0100)]
[SCSI] lpfc: lower stack use in lpfc_fc_frame_check

according to checkstack the lpfc_fc_frame_check occupies the first
place in stack usage:

make checkstack
objdump -d vmlinux $(find . -name '*.ko') | \
perl /root/rpmbuild/BUILD/kernel-2.6.32/linux-2.6.32.x86_64/scripts/checkstack.pl x86_64
0x000013f4 lpfc_fc_frame_check [lpfc]: 1936
...
This change makes the rctl_names static, thus not on stack.

Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Acked-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] eliminate an unnecessary local variable from scsi_remove_target()
Alan Stern [Mon, 15 Nov 2010 21:04:56 +0000 (16:04 -0500)]
[SCSI] eliminate an unnecessary local variable from scsi_remove_target()

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libiscsi: use bh locking instead of irq with session lock
Mike Christie [Fri, 31 Dec 2010 08:22:22 +0000 (02:22 -0600)]
[SCSI] libiscsi: use bh locking instead of irq with session lock

The session lock is taken in threads, timers, and bottom halves
like softirqs and tasklets. All the code but
iscsi_conn/session_failure take the session lock with the spin_lock_bh
call. This was done because I thought some offload drivers
would be calling these functions from a irq. They never did,
so this patch has iscsi_conn/session_failure use the bh
locking.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libiscsi: do not take host lock in queuecommand
Mike Christie [Fri, 31 Dec 2010 08:22:21 +0000 (02:22 -0600)]
[SCSI] libiscsi: do not take host lock in queuecommand

iscsi_tcp, ib_iser, cxgb*, be2iscsi and bnx2i do not use
the host lock and do not take the session lock against
a irq, so this patch drops the DEF_SCSI_QCMD use. Instead
we just take the session lock and disable bhs.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] be2iscsi: fix null ptr when accessing task hdr
Mike Christie [Fri, 31 Dec 2010 08:22:20 +0000 (02:22 -0600)]
[SCSI] be2iscsi: fix null ptr when accessing task hdr

If alloc_pdu fails then the task->hdr pointer may not be
set. This adds a check for this case in the cleanup callback.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] be2iscsi: fix gfp use in alloc_pdu
Mike Christie [Fri, 31 Dec 2010 08:22:19 +0000 (02:22 -0600)]
[SCSI] be2iscsi: fix gfp use in alloc_pdu

The pdu allication callout is called from a spin lock
and in the IO path so we cannot use GFP_KERNEL. This
has the driver use GFP_ATOMIC.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] libiscsi: add more informative failure message during iscsi scsi eh
Mike Christie [Fri, 31 Dec 2010 08:22:18 +0000 (02:22 -0600)]
[SCSI] libiscsi: add more informative failure message during iscsi scsi eh

This adds a more informative error code and message
for the iscsi scsi eh session drop paths. This allows
you to distinguish if the session was dropped due to
a connection failure vs the iscsi layer dropping
the session due to scsi eh failure processing.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] gdth: Add missing call to gdth_ioctl_free
Julia Lawall [Wed, 29 Dec 2010 14:57:54 +0000 (15:57 +0100)]
[SCSI] gdth: Add missing call to gdth_ioctl_free

Add missing call to gdth_ioctl_free before aborting.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression buf,ha,len,addr,E;
@@

buf = gdth_ioctl_alloc(ha, len, FALSE, &addr)
... when != false buf != NULL
    when != true buf == NULL
    when != \(E = buf\|buf = E\)
    when != gdth_ioctl_free(ha, len, buf, addr)
*return ...;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] bfa: remove unused defintions and misc cleanups
Jing Huang [Mon, 27 Dec 2010 05:50:10 +0000 (21:50 -0800)]
[SCSI] bfa: remove unused defintions and misc cleanups

This patch removes unused functions, data strucutres, and definitions.  It
also includes misc comment and formatting cleanups.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] bfa: remove inactive functions
Jing Huang [Mon, 27 Dec 2010 05:48:53 +0000 (21:48 -0800)]
[SCSI] bfa: remove inactive functions

This patch removes some inactive functions and macros.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] bfa: replace bfa_assert with WARN_ON
Jing Huang [Mon, 27 Dec 2010 05:46:35 +0000 (21:46 -0800)]
[SCSI] bfa: replace bfa_assert with WARN_ON

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] qla2xxx: Use sg_next to fetch next sg element while walking sg list.
Giridhar Malavali [Wed, 22 Dec 2010 00:00:27 +0000 (16:00 -0800)]
[SCSI] qla2xxx: Use sg_next to fetch next sg element while walking sg list.

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 to avoid recursive lock failure during BSG timeout.
Giridhar Malavali [Wed, 22 Dec 2010 00:00:26 +0000 (16:00 -0800)]
[SCSI] qla2xxx: Fix to avoid recursive lock failure during BSG timeout.

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: Remove code to not reset ISP82xx on failure.
Giridhar Malavali [Wed, 22 Dec 2010 00:00:25 +0000 (16:00 -0800)]
[SCSI] qla2xxx: Remove code to not reset ISP82xx on failure.

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 mailbox register 4 during 8012 AEN for ISP82XX parts.
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>
13 years ago[SCSI] qla2xxx: Don't perform a BIG_HAMMER if Get-ID (0x20) mailbox command fails...
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>
13 years ago[SCSI] qla2xxx: Remove redundant module parameter permission bits
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>
13 years ago[SCSI] qla2xxx: Add sysfs node for displaying board temperature.
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>
13 years ago[SCSI] qla2xxx: Code cleanup to remove unwanted comments and code.
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>
13 years ago[SCSI] qla2xxx: Fix for memory wedge on fw halt for ISP82XX
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>
13 years ago[SCSI] qla2xxx: Update FCP priority information to firmware before sending IOs
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>
13 years ago[SCSI] qla2xxx: Fixed zero test on new_config in qla2x00_process_loopback().
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>
13 years ago[SCSI] qla2xxx: Populate FCP_PRIO location for no *FLT* case
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>
13 years ago[SCSI] qla2xxx: list cursors are not null
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>
13 years ago[SCSI] qla2xxx: Added support for quiescence mode for ISP82xx.
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>
13 years ago[SCSI] megaraid_sas: Documentation update
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>
13 years ago[SCSI] megaraid_sas: Add 9565/9285 specific code
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>
13 years ago[SCSI] megaraid_sas: Add struct megasas_instance_template changes
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>
13 years ago[SCSI] megaraid_sas: Use lowest memory bar for SR-IOV VF support
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>
13 years ago[SCSI] megaraid_sas: Add MSI-X support and msix_disable module parameter
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>
13 years ago[SCSI] st: Increase success probability in driver buffer allocation
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>
13 years ago[SCSI] st: Store page order before driver buffer allocation
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>
13 years ago[SCSI] scsi_debug: set resid to indicate no data-in when medium error
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>
13 years ago[SCSI] fix medium error problems with some arrays which can cause data corruption
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>
13 years ago[SCSI] Add missing SPC-4 CDB and MAINTENANCE_[IN,OUT] service action definitions
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>
13 years ago[SCSI] megaraid_sas: Update GPL headers.
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>
13 years ago[SCSI] megaraid_sas: Rename megaraid_sas.c to megaraid_sas_base.c
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>
13 years ago[SCSI] fix the return value of scsi_target_queue_read()
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>
13 years ago[SCSI] scsi_dh: propagate SCSI device deletion
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>
13 years ago[SCSI] hpsa: do not consider RAID level to be part of device identity
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>
13 years ago[SCSI] hpsa: do not consider firmware revision when looking for device changes.
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>
13 years ago[SCSI] lpfc 8.3.20: Update lpfc driver version to 8.3.20
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>
13 years ago[SCSI] lpfc 8.3.20: Updates to FC discovery commands
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>
13 years ago[SCSI] lpfc 8.3.20: Implement new SLI4 init procedures based on if_type
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>
13 years ago[SCSI] lpfc 8.3.20: Implement the FC and SLI async event handlers
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>
13 years ago[SCSI] lpfc 8.3.20: Critical fixes
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>
13 years ago[SCSI] bfa: Update the driver version to 2.3.2.3
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>
13 years ago[SCSI] bfa: io tag handling and minor bug fix.
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>
13 years ago[SCSI] bfa: direct attach mode fix.
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>
13 years ago[SCSI] bfa: IOC auto recovery fix.
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>
13 years ago[SCSI] bfa: Store port configuration in flash for persistency.
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>
13 years ago[SCSI] bfa: IOC fwtrace save logic & state machine fixes.
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>
13 years ago[SCSI] bfa: remove unused functions and misc cleanups
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>
13 years ago[SCSI] bfa: remove all OS wrappers
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>
13 years ago[SCSI] bfa: remove all SCSI IO callbacks
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>
13 years ago[SCSI] bfa: scatter gather processing change
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>
13 years ago[SCSI] bfa: remove a file with small size
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>
13 years ago[SCSI] bfa: clean up one line functions
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>
13 years ago[SCSI] bfa: remove unused and empty functions
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>
13 years ago[SCSI] ibmvfc: Improve ibmvfc_async_desc memory layout
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>
13 years ago[SCSI] iscsi: add module alias
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>
13 years ago[SCSI] zfcp: Add allow_lun_scan module parameter
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>
13 years ago[SCSI] zfcp: Add __init declaration to zfcp_cache_hw_align
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>
13 years ago[SCSI] zfcp: Move qdio setup from erp to zfcp_qdio.c
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>
13 years ago[SCSI] zfcp: Redesign of the debug tracing final cleanup.
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>
13 years ago[SCSI] zfcp: Redesign of the debug tracing for SCSI records.
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>
13 years ago[SCSI] zfcp: Redesign of the debug tracing for HBA records.
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>
13 years ago[SCSI] zfcp: Redesign of the debug tracing for SAN records.
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>
13 years ago[SCSI] zfcp: Redesign of the debug tracing for recovery actions.
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>
13 years ago[SCSI] qla4xxx: Update driver version to 5.02.00-k5
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>
13 years ago[SCSI] qla4xxx: Updated the Copyright header
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>
13 years ago[SCSI] qla4xxx: do not reset hba if ql4xdontresethba is set
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>
13 years ago[SCSI] qla4xxx: do not check for fw hung if reset retry is in progress
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>
13 years ago[SCSI] qla4xxx: cache new IP address acquired via DHCP
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>
13 years ago[SCSI] qla4xxx: Fail initialization if qla4_8xxx_pci_mem_write_2M fails
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>
13 years ago[SCSI] qla4xxx: put device in FAILED state for 82XX initialization failure
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>
13 years ago[SCSI] qla4xxx: do not process interrupt unconditionally
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>
13 years ago[SCSI] qla4xxx: use correct fw_ddb_index in abort task
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>
13 years ago[SCSI] qla4xxx: memory wedge with peg_halt test in loop
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>
13 years ago[SCSI] qla4xxx: initialize MSI in correct way
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>
13 years ago[SCSI] qla4xxx: Drop use of IRQF_DISABLE
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>
13 years ago[SCSI] libfc: fix statistics for FCP input/output megabytes
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>
13 years ago[SCSI] libfcoe: change fip_select to return new FCF
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>
13 years ago[SCSI] libfcoe: reorder FCF list to put latest advertiser first
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>
13 years ago[SCSI] libfcoe: add debug message for FCF destination MAC
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>
13 years ago[SCSI] libfcoe: retry rejected FLOGI to another FCF if possible
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>
13 years ago[SCSI] libfcoe: fix checking of conflicting fabrics in fcoe_ctlr_select()
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>
13 years ago[SCSI] libfcoe: move some timer code to make it reusable.
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>
13 years ago[SCSI] libfcoe: update FIP FCF announcements
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>
13 years ago[SCSI] libfc: fix fc_tm_done not freeing the allocated fsp pkt
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>
13 years ago[SCSI] libfc: the timeout for the REC itself is 2 * R_A_TOV_els
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>
13 years ago[SCSI] libfc: fix exchange being deleted when the abort itself is timed out
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>
13 years ago[SCSI] libfc: do not fc_io_compl on fsp w/o any scsi_cmnd associated
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>
13 years ago[SCSI] libfc: add print of exchange id for debugging fc_fcp
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>
13 years ago[SCSI] drivers/scsi/fcoe: Update WARN uses
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>
13 years ago[SCSI] libfc: fix memory leakage in remote port
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>
13 years ago[SCSI] libfc: fix memory leakage in local port
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>
13 years ago[SCSI] libfc: fix memory leakage in local port
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>
13 years ago[SCSI] libfc: remove tgt_flags from fc_fcp_pkt struct
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>