firefly-linux-kernel-4.4.55.git
11 years ago[SCSI] qla4xxx: Update function name from 8xxx to 82xx
Vikas Chaudhary [Wed, 22 Aug 2012 11:54:59 +0000 (07:54 -0400)]
[SCSI] qla4xxx: Update function name from 8xxx to 82xx

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] scsi_debug: Add "removable" parameter
Martin Pitt [Thu, 6 Sep 2012 10:04:33 +0000 (12:04 +0200)]
[SCSI] scsi_debug: Add "removable" parameter

Add "removable" module parameter to set the "removable" attribute of any
subsequently created debug block device. It is a writable driver option, so
that you can switch between removable and "fixed" media block devices in
between the add_host calls.

This is useful for being able to test the different behaviour/required
privileges in e. g. the udisks test suite.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Update driver version to 5.02.00-k20
Vikas Chaudhary [Wed, 22 Aug 2012 11:45:27 +0000 (07:45 -0400)]
[SCSI] qla4xxx: Update driver version to 5.02.00-k20

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Wait for cmd to complete before chip reset for ISP40XX
Vikas Chaudhary [Wed, 22 Aug 2012 11:45:26 +0000 (07:45 -0400)]
[SCSI] qla4xxx: Wait for cmd to complete before chip reset for ISP40XX

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Clear interrupt while unloading driver.
Vikas Chaudhary [Wed, 22 Aug 2012 11:45:25 +0000 (07:45 -0400)]
[SCSI] qla4xxx: Clear interrupt while unloading driver.

while processing the stop firmware mailbox command on driver unload,
a interrupt is processed which causes kernel panic as the response
queue is not valid.

Fix is to clear the interrupt in free_adapter call just after
disabling the interrupts.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Fix lockdep warning in qla4xxx_post_work()
Vikas Chaudhary [Wed, 22 Aug 2012 11:45:24 +0000 (07:45 -0400)]
[SCSI] qla4xxx: Fix lockdep warning in qla4xxx_post_work()

Fix following lockdep warning:-

 INFO: trying to register non-static key.
 the code is fine but needs lockdep annotation.
 turning off the locking correctness validator.
 Pid: 298, comm: modprobe Not tainted 3.6.0-rc1+ #13
 Call Trace:
 [<c049f5c6>] register_lock_class+0x186/0x360
 [<c06e2e39>] ? __dev_printk+0x139/0x280
 [<c04a288a>] __lock_acquire+0x6a/0x450
 [<c04a2cf4>] lock_acquire+0x84/0xf0
 [<f98bb0d0>] ? qla4xxx_post_work+0x20/0x60 [qla4xxx]
 [<c089a05b>] _raw_spin_lock_irqsave+0x4b/0x60
 [<f98bb0d0>] ? qla4xxx_post_work+0x20/0x60 [qla4xxx]
 [<f98bb0d0>] qla4xxx_post_work+0x20/0x60 [qla4xxx]
 [<f98bb1c9>] qla4xxx_post_aen_work+0x49/0x60 [qla4xxx]
 [<f98c6cf2>] qla4xxx_isr_decode_mailbox+0x3f2/0x780 [qla4xxx]
 [<f98c8493>] qla4_83xx_interrupt_service_routine+0x33/0x50 [qla4xxx]
 [<f98d0e49>] qla4_83xx_process_mbox_intr+0x29/0x40 [qla4xxx]
 [<f98c2031>] qla4xxx_mailbox_command+0x361/0x5d0 [qla4xxx]
 [<c08983c8>] ? mutex_unlock+0x8/0x10
 [<f98c3e86>] qla4xxx_get_ifcb+0x66/0xb0 [qla4xxx]
 [<f98c3ef7>] qla4xxx_update_local_ifcb+0x27/0x100 [qla4xxx]
 [<f98c56af>] qla4xxx_initialize_fw_cb+0x2ff/0x3b0 [qla4xxx]
 [<c04150d0>] ? dma_generic_free_coherent+0x30/0x30
 [<f98c0f70>] qla4xxx_init_firmware+0x40/0xf0 [qla4xxx]
 [<f98c10b6>] qla4xxx_initialize_adapter+0x96/0x120 [qla4xxx]
 [<f98d35cd>] qla4xxx_probe_adapter+0x378/0x855 [qla4xxx]
 [<c04a1a04>] ? trace_hardirqs_on_caller+0xf4/0x180
 [<c04a1a9b>] ? trace_hardirqs_on+0xb/0x10
 [<c06ef403>] ? pm_runtime_enable+0x43/0x70
 [<c062f042>] local_pci_probe+0x42/0xb0
 [<c06300c0>] pci_device_probe+0x60/0x80
 [<c06e6bb6>] really_probe+0x56/0x2e0
 [<c089a5f2>] ? _raw_spin_unlock_irq+0x22/0x30
 [<c06f0b02>] ? pm_runtime_barrier+0x52/0xb0
 [<c06e6e77>] driver_probe_device+0x37/0x90
 [<c0898281>] ? mutex_lock_nested+0x31/0x40
 [<c06e6f51>] __driver_attach+0x81/0x90
 [<c06e51e8>] bus_for_each_dev+0x48/0x70
 [<c06e68e9>] driver_attach+0x19/0x20
 [<c06e6ed0>] ? driver_probe_device+0x90/0x90
 [<c06e637f>] bus_add_driver+0x18f/0x280
 [<c062ff40>] ? pci_dev_put+0x20/0x20
 [<c062ff40>] ? pci_dev_put+0x20/0x20
 [<c06e7435>] driver_register+0x65/0x120
 [<c061a3a2>] ? __raw_spin_lock_init+0x32/0x60
 [<c06302f4>] __pci_register_driver+0x54/0xc0
 [<f98e809e>] qla4xxx_module_init+0x9e/0xcd [qla4xxx]
 [<c040302f>] do_one_initcall+0x2f/0x170
 [<f98e8000>] ? 0xf98e7fff
 [<c04ae025>] sys_init_module+0x75/0x1c0
 [<c04a1a04>] ? trace_hardirqs_on_caller+0xf4/0x180
 [<c0609514>] ? trace_hardirqs_on_thunk+0xc/0x10
 [<c08a141f>] sysenter_do_call+0x12/0x38

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] isci: Fix interrupt coalescing assumption of active TCs
Dave Jiang [Wed, 5 Sep 2012 23:35:44 +0000 (16:35 -0700)]
[SCSI] isci: Fix interrupt coalescing assumption of active TCs

We always assign a dummy task context to a port in order to address a
silicon issue. We have 4 ports per controller. So when idle, there are always
exactly 4 TCs "active". The adaptive interrupt coalescing code uses number of
active TCs to figure out the coalescing values. However, we never hit "0" TCs
because of the 4 dummy TCs. Putting in fix so that we calculate this correctly.

Reported-by: Dan Melnic <dan@seamicro.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] isci: Allow SSP tasks into the task management path.
Jeff Skirvin [Thu, 6 Sep 2012 04:36:47 +0000 (21:36 -0700)]
[SCSI] isci: Allow SSP tasks into the task management path.

This commit fixes a driver bug for SSP tasks that require task management
in the target after they complete in the SCU hardware.  The problem was
manifested in the function "isci_task_abort_task", which tests
to see if the sas_task.lldd_task is non-NULL before allowing task
management; this bug would always NULL lldd_task in the SCU I/O completion
path even if target management was required, which would prevent
task / target manangement from happening.

Note that in the case of SATA/STP targets, error recovery is provided by
the libata error handler which is why SATA/STP device recovery worked
correctly even though SSP handling did not.

Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] fc-transport: Remove unnecessary include
Robert Love [Wed, 5 Sep 2012 20:50:07 +0000 (13:50 -0700)]
[SCSI] fc-transport: Remove unnecessary include

This header file is included in user space applications
that are doing "FC Passthrough." This include causes
them to also include scsi/scsi.h. Since this header
file doesn't actually need scsi/scsi.h, remove the
include line.

This patch was tested with 'make allyesconfig'.

Signed-off-by: Robert Love <robert.w.love@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] scsi_dh_rdac : minor return fix for rdac
Moger, Babu [Tue, 4 Sep 2012 17:13:18 +0000 (17:13 +0000)]
[SCSI] scsi_dh_rdac : minor return fix for rdac

Signed-off-by: Babu Moger <babu.moger@netapp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] scsi_dh_rdac : Consolidate rdac strings together
Moger, Babu [Tue, 4 Sep 2012 17:05:15 +0000 (17:05 +0000)]
[SCSI] scsi_dh_rdac : Consolidate rdac strings together

This patch consolidates the strings together. Purpose is to remove minor product strings extensions.
That way the future products with similar strings should not require change  here.

Signed-off-by: Babu Moger <babu.moger@netapp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] scsi_dh_rdac: Add a new netapp vendor/product string
Moger, Babu [Tue, 4 Sep 2012 17:04:33 +0000 (17:04 +0000)]
[SCSI] scsi_dh_rdac: Add a new netapp vendor/product string

This patch adds a new vendor/product strings for netapp E series  product.
Also consolidated the strings together with similar names.

Signed-off-by: Babu Moger <babu.moger@netapp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] zfcp: only access zfcp_scsi_dev for valid scsi_device
Martin Peschke [Tue, 4 Sep 2012 13:23:36 +0000 (15:23 +0200)]
[SCSI] zfcp: only access zfcp_scsi_dev for valid scsi_device

__scsi_remove_device (e.g. due to dev_loss_tmo) calls
zfcp_scsi_slave_destroy which in turn sends a close LUN FSF request to
the adapter. After 30 seconds without response,
zfcp_erp_timeout_handler kicks the ERP thread failing the close LUN
ERP action. zfcp_erp_wait in zfcp_erp_lun_shutdown_wait and thus
zfcp_scsi_slave_destroy returns and then scsi_device is no longer
valid. Sometime later the response to the close LUN FSF request may
finally come in. However, commit
b62a8d9b45b971a67a0f8413338c230e3117dff5
"[SCSI] zfcp: Use SCSI device data zfcp_scsi_dev instead of zfcp_unit"
introduced a number of attempts to unconditionally access struct
zfcp_scsi_dev through struct scsi_device causing a use-after-free.
This leads to an Oops due to kernel page fault in one of:
zfcp_fsf_abort_fcp_command_handler, zfcp_fsf_open_lun_handler,
zfcp_fsf_close_lun_handler, zfcp_fsf_req_trace,
zfcp_fsf_fcp_handler_common.
Move dereferencing of zfcp private data zfcp_scsi_dev allocated in
scsi_device via scsi_transport_reserve_device after the check for
potentially aborted FSF request and thus no longer valid scsi_device.
Only then assign sdev_to_zfcp(sdev) to the local auto variable struct
zfcp_scsi_dev *zfcp_sdev.

Signed-off-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Cc: <stable@vger.kernel.org> #2.6.37+
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] zfcp: No automatic port_rescan on events
Steffen Maier [Tue, 4 Sep 2012 13:23:35 +0000 (15:23 +0200)]
[SCSI] zfcp: No automatic port_rescan on events

In FC fabrics with large zones, the automatic port_rescan on incoming ELS
and any adapter recovery can cause quite some traffic at the very same
time, especially if lots of Linux images share an HBA, which is common on
s390. This can cause trouble and failures. Fix this by making such port
rescans dependent on a user configurable module parameter.

The following unconditional automatic port rescans remain as is:
On setting an adapter online and
on manual user-triggered writes to the sysfs attribute port_rescan.

Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] zfcp: restore refcount check on port_remove
Steffen Maier [Tue, 4 Sep 2012 13:23:34 +0000 (15:23 +0200)]
[SCSI] zfcp: restore refcount check on port_remove

Upstream commit f3450c7b917201bb49d67032e9f60d5125675d6a
"[SCSI] zfcp: Replace local reference counting with common kref"
accidentally dropped a reference count check before tearing down
zfcp_ports that are potentially in use by zfcp_units.
Even remote ports in use can be removed causing
unreachable garbage objects zfcp_ports with zfcp_units.
Thus units won't come back even after a manual port_rescan.
The kref of zfcp_port->dev.kobj is already used by the driver core.
We cannot re-use it to track the number of zfcp_units.
Re-introduce our own counter for units per port
and check on port_remove.

Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: <stable@vger.kernel.org> #2.6.33+
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] zfcp: remove invalid reference to list iterator variable
Julia Lawall [Tue, 4 Sep 2012 13:23:33 +0000 (15:23 +0200)]
[SCSI] zfcp: remove invalid reference to list iterator variable

If list_for_each_entry, etc complete a traversal of the list, the iterator
variable ends up pointing to an address at an offset from the list head,
and not a meaningful structure.  Thus this value should not be used after
the end of the iterator.  Replace port->adapter->scsi_host by
adapter->scsi_host.

This problem was found using Coccinelle (http://coccinelle.lip6.fr/).

Oversight in upsteam commit of v2.6.37
a1ca48319a9aa1c5b57ce142f538e76050bb8972
"[SCSI] zfcp: Move ACL/CFDC code to zfcp_cfdc.c"
which merged the content of zfcp_erp_port_access_changed().

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Reviewed-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Cc: <stable@vger.kernel.org> #2.6.37+
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] zfcp: Do not wakeup while suspended
Steffen Maier [Tue, 4 Sep 2012 13:23:32 +0000 (15:23 +0200)]
[SCSI] zfcp: Do not wakeup while suspended

If the mapping of FCP device bus ID and corresponding subchannel
is modified while the Linux image is suspended, the resume of FCP
devices can fail. During resume, zfcp gets callbacks from cio regarding
the modified subchannels but they can be arbitrarily mixed with the
restore/resume callback. Since the cio callbacks would trigger
adapter recovery, zfcp could wakeup before the resume callback.
Therefore, ignore the cio callbacks regarding subchannels while
being suspended. We can safely do so, since zfcp does not deal itself
with subchannels. For problem determination purposes, we still trace the
ignored callback events.

The following kernel messages could be seen on resume:

kernel: <WWPN>: parent <FCP device bus ID> should not be sleeping

As part of adapter reopen recovery, zfcp performs auto port scanning
which can erroneously try to register new remote ports with
scsi_transport_fc and the device core code complains about the parent
(adapter) still sleeping.

kernel: zfcp.3dff9c: <FCP device bus ID>:\
 Setting up the QDIO connection to the FCP adapter failed
<last kernel message repeated 3 more times>
kernel: zfcp.574d43: <FCP device bus ID>:\
 ERP cannot recover an error on the FCP device

In such cases, the adapter gave up recovery and remained blocked along
with its child objects: remote ports and LUNs/scsi devices. Even the
adapter shutdown as part of giving up recovery failed because the ccw
device state remained disconnected. Later, the corresponding remote
ports ran into dev_loss_tmo. As a result, the LUNs were erroneously
not available again after resume.

Even a manually triggered adapter recovery (e.g. sysfs attribute
failed, or device offline/online via sysfs) could not recover the
adapter due to the remaining disconnected state of the corresponding
ccw device.

Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Cc: <stable@vger.kernel.org> #2.6.32+
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] zfcp: Bounds checking for deferred error trace
Steffen Maier [Tue, 4 Sep 2012 13:23:31 +0000 (15:23 +0200)]
[SCSI] zfcp: Bounds checking for deferred error trace

The pl vector has scount elements, i.e. pl[scount-1] is the last valid
element. For maximum sized requests, payload->counter == scount after
the last loop iteration. Therefore, do bounds checking first (with
boolean shortcut) to not access the invalid element pl[scount].

Do not trust the maximum sbale->scount value from the HBA
but ensure we won't access the pl vector out of our allocated bounds.
While at it, clean up scoping and prevent unnecessary memset.

Minor fix for 86a9668a8d29ea711613e1cb37efa68e7c4db564
"[SCSI] zfcp: support for hardware data router"

Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Reviewed-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Cc: <stable@vger.kernel.org> #3.2+
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] zfcp: Make trace record tags unique
Steffen Maier [Tue, 4 Sep 2012 13:23:30 +0000 (15:23 +0200)]
[SCSI] zfcp: Make trace record tags unique

Duplicate fssrh_2 from a54ca0f62f953898b05549391ac2a8a4dad6482b
"[SCSI] zfcp: Redesign of the debug tracing for HBA records."
complicates distinction of generic status read response from
local link up.
Duplicate fsscth1 from 2c55b750a884b86dea8b4cc5f15e1484cc47a25c
"[SCSI] zfcp: Redesign of the debug tracing for SAN records."
complicates distinction of good common transport response from
invalid port handle.

Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Reviewed-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Cc: <stable@vger.kernel.org> #2.6.38+
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] zfcp: Adapt to new FC_PORTSPEED semantics
Steffen Maier [Tue, 4 Sep 2012 13:23:29 +0000 (15:23 +0200)]
[SCSI] zfcp: Adapt to new FC_PORTSPEED semantics

Commit a9277e7783651d4e0a849f7988340b1c1cf748a4
"[SCSI] scsi_transport_fc: Getting FC Port Speed in sync with FC-GS"
changed the semantics of FC_PORTSPEED defines to
FDMI port attributes of FC-HBA/SM-HBA
which is different from the previous bit reversed
Report Port Speed Capabilities (RPSC) ELS of FC-GS/FC-LS.

Zfcp showed "10 Gbit" instead of "4 Gbit" for supported_speeds.
It now uses explicit bit conversion as the other LLDs already
do, in order to be independent of the kernel bit semantics.
See also http://marc.info/?l=linux-scsi&m=134452926830730&w=2

Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Reviewed-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Cc: <stable@vger.kernel.org> #3.4+
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] Fix incorrect memset in bnx2fc_parse_fcp_rsp
Andi Kleen [Mon, 3 Sep 2012 18:50:30 +0000 (20:50 +0200)]
[SCSI] Fix incorrect memset in bnx2fc_parse_fcp_rsp

gcc 4.8 warns because the memset only clears sizeof(char *) bytes, not
the whole buffer. Use the correct buffer size and clear the whole sense
buffer.

/backup/lsrc/git/linux-lto-2.6/drivers/scsi/bnx2fc/bnx2fc_io.c: In
function 'bnx2fc_parse_fcp_rsp':
/backup/lsrc/git/linux-lto-2.6/drivers/scsi/bnx2fc/bnx2fc_io.c:1810:41:
warning: argument to 'sizeof' in 'memset' call is the same expression as
the destination; did you mean to provide an explicit length?
[-Wsizeof-pointer-memaccess]
   memset(sc_cmd->sense_buffer, 0, sizeof(sc_cmd->sense_buffer));
                                         ^

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mpt2sas: Add a module parameter that permits overriding protection capabilities
Martin K. Petersen [Tue, 28 Aug 2012 18:29:37 +0000 (14:29 -0400)]
[SCSI] mpt2sas: Add a module parameter that permits overriding protection capabilities

Add a parameter that allows the host protection capabilities mask to be
provided at module load time.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: "Sreekanth Reddy" <Sreekanth.reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mpt2sas: Return the correct sense key for DIF errors
Martin K. Petersen [Tue, 28 Aug 2012 18:29:36 +0000 (14:29 -0400)]
[SCSI] mpt2sas: Return the correct sense key for DIF errors

Only a target device should return ABORTED COMMAND when a PI error is
discovered. The HBA should always set the sense key to ILLEGAL REQUEST.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: "Sreekanth Reddy" <Sreekanth.reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] Disable DIF on Hitachi Ultrastar 15K300
Martin K. Petersen [Tue, 28 Aug 2012 18:29:35 +0000 (14:29 -0400)]
[SCSI] Disable DIF on Hitachi Ultrastar 15K300

Hitachi Ultrastar 15K300 is quirky. Disable T10 PI (DIF).

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] sd: Allow protection_type to be overridden
Martin K. Petersen [Tue, 28 Aug 2012 18:29:34 +0000 (14:29 -0400)]
[SCSI] sd: Allow protection_type to be overridden

We have encountered a few devices that misbehaved when operating in T10
PI mode. Allow T10 PI protection type to be overridden from userland.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] sd: Avoid remapping bad reference tags
Martin K. Petersen [Tue, 28 Aug 2012 18:29:33 +0000 (14:29 -0400)]
[SCSI] sd: Avoid remapping bad reference tags

It does not make sense to translate ref tags with unexpected values.
Instead we simply ignore them and let the upper layers catch the
problem. Ref tags that contain the expected value are still remapped.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mpt2sas: fix double mutex lock in NON_BLOCKING state
Alexey Khoroshilov [Tue, 28 Aug 2012 14:38:02 +0000 (18:38 +0400)]
[SCSI] mpt2sas: fix double mutex lock in NON_BLOCKING state

If state is NON_BLOCKING and mutex_trylock is succeed,
the control flow goes to mutex_lock_interruptible() that is a deadlock.

[jejb: fixed coding style problems]
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: "Sreekanth Reddy" <sreekanth.reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] ibmvfc: Driver version 1.0.10
Brian King [Fri, 24 Aug 2012 21:51:03 +0000 (16:51 -0500)]
[SCSI] ibmvfc: Driver version 1.0.10

Bump driver version.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] ibmvfc: Ignore fabric RSCNs when link is dead
Brian King [Fri, 24 Aug 2012 21:51:01 +0000 (16:51 -0500)]
[SCSI] ibmvfc: Ignore fabric RSCNs when link is dead

This fixes an issues seen where a Fabric RSCN event was received
while the link was down, which resulted in repeated attempts to log back
into the fabric, which then failed, resulting in the ibmvfc driver
taking the host offline. Fix this by delaying taking any action
regarding the fabric RSCN until the link comes back up.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] ibmvfc: Fix double completion on abort timeout
Brian King [Fri, 24 Aug 2012 21:50:59 +0000 (16:50 -0500)]
[SCSI] ibmvfc: Fix double completion on abort timeout

If an abort request times out to the virtual fibre channel adapter,
the ibmvfc driver will kick off a reset of the adapter. This
patch ensures we wait for the both the abort request and the
request being aborted to be completed prior to exiting the
eh_abort handler. This fixes a bug where the ibmvfc driver
was erroneously returning success to the eh_abort handler
then later sending back a response to the same command.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] megaraid_sas: combine kmalloc+memset into kzalloc
Fengguang Wu [Fri, 24 Aug 2012 15:27:35 +0000 (23:27 +0800)]
[SCSI] megaraid_sas: combine kmalloc+memset into kzalloc

Use kzalloc rather than kmalloc followed by memset with 0.

Generated by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] ipr: trivial: fix small coding style issues
Kleber Sacilotto de Souza [Wed, 22 Aug 2012 21:14:14 +0000 (18:14 -0300)]
[SCSI] ipr: trivial: fix small coding style issues

Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bfa: Update the driver version to v3.1.2.0.
Krishna Gudipati [Thu, 23 Aug 2012 02:53:45 +0000 (19:53 -0700)]
[SCSI] bfa: Update the driver version to v3.1.2.0.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bfa: Update MAINTAINERS file for BFA driver.
Krishna Gudipati [Thu, 23 Aug 2012 02:53:28 +0000 (19:53 -0700)]
[SCSI] bfa: Update MAINTAINERS file for BFA driver.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bfa: Add support for max target ports discovery
Krishna Gudipati [Thu, 23 Aug 2012 02:52:58 +0000 (19:52 -0700)]
[SCSI] bfa: Add support for max target ports discovery

- Changes to avoid discovering NPIV port as remote port by the other
  NPIV ports created on same physical port when all the NPIV ports are
  part of the same zone in a fabric.
- Provided mechanism to support maximum number of target ports for a
  given initiator port (physical port + NPIV ports) irrespective of the
  way in which the initiator and target ports are zoned in the fabric.
- Introduced module_parameter max_rport_logins to restrict number of
  remote ports discovery which includes target and initiator remote ports.

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bfa: Add support to register node symbolic name with name server
Krishna Gudipati [Thu, 23 Aug 2012 02:52:43 +0000 (19:52 -0700)]
[SCSI] bfa: Add support to register node symbolic name with name server

- Changes to register node symbolic name with name server on the fabric
  by sending CT commands RNN_ID and RSNN_NN.

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bfa: Fix to process mbox interrupts only if interrupts are enabled in INTx...
Krishna Gudipati [Thu, 23 Aug 2012 02:52:18 +0000 (19:52 -0700)]
[SCSI] bfa: Fix to process mbox interrupts only if interrupts are enabled in INTx mode.

- Made changes to process mbox and error interrupts only if interrupts are
  enabled, when running in INTx mode.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bfa: Add PowerPC support and enable PCIE AER handling.
Krishna Gudipati [Thu, 23 Aug 2012 02:52:02 +0000 (19:52 -0700)]
[SCSI] bfa: Add PowerPC support and enable PCIE AER handling.

- Added few missing endian swap changes to support BFA on PowerPC.
- Added PCIE AER support to BFA:
  a) Implemented the PCI error handler entry points.
  b) Made changes to FCS state machine to handle STOP event from the
 PCI error detected entry point.
  c) Made changes to the IO Controller state machine to handle SUSPEND
     event from the PCI error detected entry point.
  d) Made changes to restart the BFA operations on a slot_reset completion.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bfa: Add new hardware model info to sysfs model description routine.
Krishna Gudipati [Thu, 23 Aug 2012 02:51:35 +0000 (19:51 -0700)]
[SCSI] bfa: Add new hardware model info to sysfs model description routine.

- Added new hardware model Brocade-1867 information to
  sysfs model description routine.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bfa: Make changes to FCXP resource management.
Krishna Gudipati [Thu, 23 Aug 2012 02:51:08 +0000 (19:51 -0700)]
[SCSI] bfa: Make changes to FCXP resource management.

- Made changes to split FCXP resources as request and response resources.
- The split will reduce the contention for FCXP resources in an open zone
  config.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bfa: FCS remote port enhancements.
Krishna Gudipati [Thu, 23 Aug 2012 02:50:43 +0000 (19:50 -0700)]
[SCSI] bfa: FCS remote port enhancements.

- Introduced rport qualifier structure and modified design to
  export remote ports with valid pid or valid pwwn to the user space.
- Introduced old_pid field in the rport structure and made changes to
  prevent re-creating a new remote port for an already existing rport
  that is transitioning to a delete state. (Happens if we receive a RSCN
  on the existing remote port that is getting deleted).

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bfa: Support vport symbolic name change from sysfs.
Krishna Gudipati [Thu, 23 Aug 2012 02:50:20 +0000 (19:50 -0700)]
[SCSI] bfa: Support vport symbolic name change from sysfs.

- Implemented the FC function template set_vport_symbolic_name entry
  point to modify the vport symbolic name from sysfs.
- Implemented support to send RSPN_ID to switch to register the
  modified vport symbolic name.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] iscsi_tcp: increase max_lun to ~0, don't care
Rob Evers [Wed, 15 Aug 2012 22:39:34 +0000 (18:39 -0400)]
[SCSI] iscsi_tcp: increase max_lun to ~0, don't care

Signed-off-by: Rob Evers <revers@redhat.com>
Acked-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Update version number to 8.04.00.07-k.
Chad Dupuis [Wed, 22 Aug 2012 18:21:36 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Update version number to 8.04.00.07-k.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Use the right field for container_of.
Arun Easi [Wed, 22 Aug 2012 18:21:35 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Use the right field for container_of.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Allow MSI interrupt registration for ISP82xx.
Giridhar Malavali [Wed, 22 Aug 2012 18:21:34 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Allow MSI interrupt registration for ISP82xx.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Don't toggle RISC interrupt bits after IRQ lines are attached.
Giridhar Malavali [Wed, 22 Aug 2012 18:21:33 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Don't toggle RISC interrupt bits after IRQ lines are attached.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Fix incorrect status reporting on DIF errors.
Arun Easi [Wed, 22 Aug 2012 18:21:32 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Fix incorrect status reporting on DIF errors.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: T10 DIF - ISP83xx changes.
Arun Easi [Wed, 22 Aug 2012 18:21:31 +0000 (14:21 -0400)]
[SCSI] qla2xxx: T10 DIF - ISP83xx changes.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Fix for legacy interrupts for ISP83xx.
Giridhar Malavali [Wed, 22 Aug 2012 18:21:30 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Fix for legacy interrupts for ISP83xx.

Signed-off-by: Giridhar Malaval <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Restrict nic core reset to one function for mctp.
Saurav Kashyap [Wed, 22 Aug 2012 18:21:29 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Restrict nic core reset to one function for mctp.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Enable fw attributes for ISP24xx and above.
Saurav Kashyap [Wed, 22 Aug 2012 18:21:28 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Enable fw attributes for ISP24xx and above.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Get fcal position map should not be called for p2p topology.
Saurav Kashyap [Wed, 22 Aug 2012 18:21:27 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Get fcal position map should not be called for p2p topology.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Set Maximum Read Request Size to 4K.
Chad Dupuis [Wed, 22 Aug 2012 18:21:26 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Set Maximum Read Request Size to 4K.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Enclose adapter related calls in adapter check in failed state handler.
Saurav Kashyap [Wed, 22 Aug 2012 18:21:25 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Enclose adapter related calls in adapter check in failed state handler.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Fix for handling some error conditions in loopback.
Chad Dupuis [Wed, 22 Aug 2012 18:21:24 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Fix for handling some error conditions in loopback.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Fix description of qla2xmaxqdepth parameter.
Chad Dupuis [Wed, 22 Aug 2012 18:21:23 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Fix description of qla2xmaxqdepth parameter.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: set idc version if function is first one to come.
Saurav Kashyap [Wed, 22 Aug 2012 18:21:22 +0000 (14:21 -0400)]
[SCSI] qla2xxx: set idc version if function is first one to come.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Do not restrict the number of NPIV ports for ISP83xx.
Saurav Kashyap [Wed, 22 Aug 2012 18:21:21 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Do not restrict the number of NPIV ports for ISP83xx.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Do PCI fundamental reset for ISP83xx
Joe Carnuccio [Wed, 22 Aug 2012 18:21:20 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Do PCI fundamental reset for ISP83xx

On ISP83xx cards perform a fundamental reset instead of hot reset.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Fail initialization if unable to load RISC code.
Andrew Vasquez [Wed, 22 Aug 2012 18:21:19 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Fail initialization if unable to load RISC code.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Ensure PLOGI is sent to Fabric Management-Server upon request.
Andrew Vasquez [Wed, 22 Aug 2012 18:21:18 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Ensure PLOGI is sent to Fabric Management-Server upon request.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Remove setting Scsi_host->this_id during adapter probe.
Chad Dupuis [Wed, 22 Aug 2012 18:21:17 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Remove setting Scsi_host->this_id during adapter probe.

Setting this to 255 will cause any target with id 255 to not show up so leave
it at the default in our host template.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Use #defines instead of hardcoded values for intr status.
Arun Easi [Wed, 22 Aug 2012 18:21:16 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Use #defines instead of hardcoded values for intr status.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Dont call nic restart firmware if it is already active and running.
Saurav Kashyap [Wed, 22 Aug 2012 18:21:15 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Dont call nic restart firmware if it is already active and running.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Wrong PCIe(2.5Gb/s x8) speed in the kerenel message for ISP82xx.
Atul Deshmukh [Wed, 22 Aug 2012 18:21:14 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Wrong PCIe(2.5Gb/s x8) speed in the kerenel message for ISP82xx.

qla2xxx show wrong PCIe(2.5Gb/s x8) speed in the kerenel message. It should be
5.0Gb/s.

Signed-off-by: Atul Deshmukh <atul.deshmukh@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Perform ROM mbx cmd access only after ISP soft-reset during f/w recovery.
Santosh Vernekar [Wed, 22 Aug 2012 18:21:13 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Perform ROM mbx cmd access only after ISP soft-reset during f/w recovery.

Signed-off-by: Santosh Vernekar <santosh.vernekar@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Implement beacon support for ISP83xx.
Chad Dupuis [Wed, 22 Aug 2012 18:21:11 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Implement beacon support for ISP83xx.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Fix for continuous rescan attempts in arbitrated loop topology.
Arun Easi [Wed, 22 Aug 2012 18:21:10 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Fix for continuous rescan attempts in arbitrated loop topology.

Stale information in the temporary fcport created in
qla2x00_configure_local_loop() causes qla2x00_get_port_database() call
to fail. This reschedules scan, which gets stuck continuously in the
rescheduling-of-scan loop due to the failure.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Only enable link up on the correct interrupt event.
Chad Dupuis [Wed, 22 Aug 2012 18:21:09 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Only enable link up on the correct interrupt event.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Update the driver copyright.
Chad Dupuis [Wed, 22 Aug 2012 18:21:08 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Update the driver copyright.

Update the driver copyright from 2003-2011 to 2003-2012.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Don't register to legacy interrupt for ISP82xx.
Giridhar Malavali [Wed, 22 Aug 2012 18:21:07 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Don't register to legacy interrupt for ISP82xx.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Changes for ISP83xx loopback support.
Chad Dupuis [Wed, 22 Aug 2012 18:21:06 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Changes for ISP83xx loopback support.

Minor changes to support loopback functionality with ISP83xx CNAs.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Add bit to identify adapters for thermal temp.
Joe Carnuccio [Wed, 22 Aug 2012 18:21:05 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Add bit to identify adapters for thermal temp.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Implemetation of mctp.
Saurav Kashyap [Wed, 22 Aug 2012 18:21:04 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Implemetation of mctp.

[jejb: fix up checkpatch errors]
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: IDC implementation for ISP83xx.
Santosh Vernekar [Wed, 22 Aug 2012 18:21:03 +0000 (14:21 -0400)]
[SCSI] qla2xxx: IDC implementation for ISP83xx.

Signed-off-by: Santosh Vernekar <santosh.vernekar@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Add FW DUMP SIZE sysfs attribute.
Harish Zunjarrao [Wed, 22 Aug 2012 18:21:02 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Add FW DUMP SIZE sysfs attribute.

Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Implementation of bidirectional.
Saurav Kashyap [Wed, 22 Aug 2012 18:21:01 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Implementation of bidirectional.

[jejb: merge fix for introduced warning]
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Use bitmap to store loop_id's for fcports.
Chad Dupuis [Wed, 22 Aug 2012 18:21:00 +0000 (14:21 -0400)]
[SCSI] qla2xxx: Use bitmap to store loop_id's for fcports.

Store used fcport loop_id's in a bitmap so that as opposed to looping through
all fcports to find the next free loop_id, new loop_id lookup can be just be
done via bitops.

[jejb: plus fix for incorrect LOOPID_MAP_SIZE from Andrew Vasquez]
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Display mailbox failure by default.
Saurav Kashyap [Wed, 22 Aug 2012 18:20:59 +0000 (14:20 -0400)]
[SCSI] qla2xxx: Display mailbox failure by default.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Fix typo in qla2xxx files
Masanari Iida [Wed, 22 Aug 2012 18:20:58 +0000 (14:20 -0400)]
[SCSI] qla2xxx: Fix typo in qla2xxx files

Correct spelling typo within qla2xxx files.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Add check in qla82xx_watchdog for failed hardware state.
Chad Dupuis [Wed, 22 Aug 2012 18:20:57 +0000 (14:20 -0400)]
[SCSI] qla2xxx: Add check in qla82xx_watchdog for failed hardware state.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Add I2C BSG interface.
Joe Carnuccio [Wed, 22 Aug 2012 18:20:56 +0000 (14:20 -0400)]
[SCSI] qla2xxx: Add I2C BSG interface.

Add BSG interface to generically access I2C attached devices.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Bind to ISP8031 devices.
Chad Dupuis [Wed, 22 Aug 2012 18:20:55 +0000 (14:20 -0400)]
[SCSI] qla2xxx: Bind to ISP8031 devices.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] Fusion MPT: disable pci device when mpt map resoures failed
Hanjun Guo [Sat, 11 Aug 2012 02:58:36 +0000 (10:58 +0800)]
[SCSI] Fusion MPT: disable pci device when mpt map resoures failed

when probe a pci device, first we enable it, and disable it when
some error happened in the following process, because the power
state of the device is set to D0, and if MSI is disabled,
we will allocate irq and register gsi for this device in the enable process.

In function mpt_mapresources(MPT_ADAPTER *ioc), it forgot disable the
pci device when error happened, the irq and gsi will never be released.
this patch will fix it.

Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Acked-by: "Nandigama, Nagalakshmi" <Nagalakshmi.Nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] st: raise device limit
Jeff Mahoney [Sat, 18 Aug 2012 19:20:41 +0000 (15:20 -0400)]
[SCSI] st: raise device limit

The device limit of 128 tape drives was established in 2003 as a
significant increase from the 8 tape drives allowed previously.

We're seeing customer sites that between a large number of drives
and multipath are discovering more than 128 devices and running
into problems.

Now that we're not stuck having to store a pointer in array
and aren't limited by kmalloc failing on higher order allocs we can
lift the limit to fill the entire minor range based on the number
of modes.

Based on the current code, that's 2^17 devices.

Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-by: Kai Mäkisara <kai.makisara@kolumbus.fi>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] st: clean up device file creation and removal
Jeff Mahoney [Sat, 18 Aug 2012 19:20:40 +0000 (15:20 -0400)]
[SCSI] st: clean up device file creation and removal

This patch cleans up the st device file creation and removal.

Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-by: Kai Mäkisara <kai.makisara@kolumbus.fi>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] st: get rid of scsi_tapes array
Jeff Mahoney [Sat, 18 Aug 2012 19:20:39 +0000 (15:20 -0400)]
[SCSI] st: get rid of scsi_tapes array

st currently allocates an array to store pointers to all of the
scsi_tape objects. It's used to discover available indexes to use as the
base for the minor number selection and later to look up scsi_tape
devices for character devices.

We switch to using an IDR for minor selection and a pointer from
st_modedef back to scsi_tape for the lookups.

Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-by: Kai Mäkisara <kai.makisara@kolumbus.fi>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] st: clean up dev cleanup in st_probe
Jeff Mahoney [Sat, 18 Aug 2012 19:20:38 +0000 (15:20 -0400)]
[SCSI] st: clean up dev cleanup in st_probe

st_probe leaves a cdev pointer hanging around that is compared
during the error path and freed later. There's no need for the pointer
to hang around at all. So we free it immediately and simplify the error
handling.

Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-by: Kai Mäkisara <kai.makisara@kolumbus.fi>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] st: Use static class attributes
Jeff Mahoney [Sat, 18 Aug 2012 19:20:37 +0000 (15:20 -0400)]
[SCSI] st: Use static class attributes

st currently sets up and tears down class attributes manually for
every tape drive in the system. This patch uses a statically defined
class with class attributes to let the device core do it for us.

Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-by: Kai Mäkisara <kai.makisara@kolumbus.fi>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] be2iscsi: Bump the driver version.
John Soni Jose [Mon, 20 Aug 2012 17:31:06 +0000 (23:01 +0530)]
[SCSI] be2iscsi: Bump the driver version.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] be2iscsi: Fix a kernel panic because of TCP RST/FIN received.
John Soni Jose [Mon, 20 Aug 2012 17:30:55 +0000 (23:00 +0530)]
[SCSI] be2iscsi: Fix a kernel panic because of TCP RST/FIN received.

A TCP RST/FIN can be received even before the connection specific
structures are initialized.This fix checks for the conn structure
is intialized or not  when RST/FIN is received.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] be2iscsi: Add support for configuring the VLAN on the adapter.
John Soni Jose [Mon, 20 Aug 2012 17:30:43 +0000 (23:00 +0530)]
[SCSI] be2iscsi: Add support for configuring the VLAN on the adapter.

Add support for configuring the VLAN parameters on the adapter
using the iscsiadm interface.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] be2iscsi: Format the MAC_ADDR with sysfs_format_mac.
John Soni Jose [Mon, 20 Aug 2012 17:30:31 +0000 (23:00 +0530)]
[SCSI] be2iscsi: Format the MAC_ADDR with sysfs_format_mac.

The MAC_ADDR stored in driver private structure is of
unsigned char data type but strlcpy parameters is of
signed char data type. This conversion of data types
lead to change in the value.This changed value is passed
to the upper layer and junk characters were displayed
when "iscsiadm -m iface" command was run.

In case of iSCSI boot, since the the MAC_ADDR was coming
junk the boot was also not working

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] be2iscsi: Added Logging mechanism for the driver.
John Soni Jose [Mon, 20 Aug 2012 17:30:18 +0000 (23:00 +0530)]
[SCSI] be2iscsi: Added Logging mechanism for the driver.

Added new log level mechanism for different events. These
log levels can be set at driver load time/run time. The
log level is set for each Scsi_host.

Fixed few multi-line print warning to get over the new checkpatch.pl
warnings on multi-line strings.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] be2iscsi: Issue MBX Cmd for login to boot target in crashdump mode
John Soni Jose [Mon, 20 Aug 2012 17:30:08 +0000 (23:00 +0530)]
[SCSI] be2iscsi: Issue MBX Cmd for login to boot target in crashdump mode

When the driver comes up in crashdump mode, it has to explicitly
issue command to FW for logging to the boot target. This fix issues
MBX Cmd to login to boot target in crashdump mode.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] be2iscsi: Removing the iscsi_data_pdu setting.
John Soni Jose [Mon, 20 Aug 2012 17:29:58 +0000 (22:59 +0530)]
[SCSI] be2iscsi: Removing the iscsi_data_pdu setting.

The setting of iscsi_data_pdu is not required anymore,
as this was required for BE1 adapters only. The BE1 adapter
were not supported in any previous versions of the kernel.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.34: Update lpfc version for 8.3.34 driver release
James Smart [Tue, 14 Aug 2012 18:26:42 +0000 (14:26 -0400)]
[SCSI] lpfc 8.3.34: Update lpfc version for 8.3.34 driver release

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.34: Fixed leaking memory from pci dma pool
James Smart [Tue, 14 Aug 2012 18:26:35 +0000 (14:26 -0400)]
[SCSI] lpfc 8.3.34: Fixed leaking memory from pci dma pool

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.34: Correct lock handling to eliminate reset escalation on I/O abort
James Smart [Tue, 14 Aug 2012 18:26:28 +0000 (14:26 -0400)]
[SCSI] lpfc 8.3.34: Correct lock handling to eliminate reset escalation on I/O abort

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>