Boaz Harrosh [Sun, 24 May 2009 17:05:43 +0000 (20:05 +0300)]
[SCSI] libosd: Use REQ_QUIET requests.
libosd has it's own sense decoding and printout. Don't
let scsi_lib duplicate that printout. (Which is done wrong
in regard to osd commands)
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Boaz Harrosh [Sun, 24 May 2009 17:05:05 +0000 (20:05 +0300)]
[SCSI] osduld: use filp_open() when looking up an osd-device
This patch was inspired by Al Viro, for simplifying and fixing the
retrieval of osd-devices by in-kernel users, eg: file systems.
In-Kernel users, now, go through the same path user-mode does by
opening a file on the osd char-device and though holding a reference
to both the device and the Module.
A file pointer was added to the osd_dev structure which is now
allocated for each user. The internal osd_dev is no longer exposed
outside of the uld. I wanted to do that for a long time so each
libosd user can have his own defaults on the device.
The API is left the same, so user code need not change.
It is no longer needed to open/close a file handle on the osd
char-device from user-mode, before mounting an exofs on it.
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
CC: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Boaz Harrosh [Sun, 24 May 2009 17:04:43 +0000 (20:04 +0300)]
[SCSI] libosd: Define an osd_dev wrapper to retrieve the request_queue
libosd users that need to work with bios, must sometime use
the request_queue associated with the osd_dev. Make a wrapper for
that, and convert all in-tree users.
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Boaz Harrosh [Sun, 24 May 2009 17:04:26 +0000 (20:04 +0300)]
[SCSI] libosd: osd_req_{read,write} takes a length parameter
For supporting of chained-bios we can not inspect the first
bio only, as before. Caller shall pass the total length of the
request, ie. sum_bytes(bio-chain).
Also since the bio might be a chain we don't set it's direction
on behalf of it's callers. The bio direction should be properly
set prior to this call. So fix a couple of write users that now
need to set the bio direction properly
[In this patch I change both library code and user sites at
exofs, to make it easy on integration. It should be submitted
via James's scsi-misc tree.]
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
CC: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Boaz Harrosh [Sun, 24 May 2009 17:04:00 +0000 (20:04 +0300)]
[SCSI] libosd: Let _osd_req_finalize_data_integrity receive number of out_bytes
_osd_req_finalize_data_integrity was trying to deduce the number of
out_bytes from passed osd_request->out.bio. This is wrong when
the bio is chained. The caller of _osd_req_finalize_data_integrity
has more ready available information and should just pass it.
Also in the light of future support for CDB-continuation segment this is
a better solution.
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Boaz Harrosh [Sun, 24 May 2009 17:02:22 +0000 (20:02 +0300)]
[SCSI] libosd: osd_req_{read,write}_kern new API
By popular demand, define usefull wrappers for osd_req_read/write
that recieve kernel pointers. All users had their own.
Also remove these from exofs
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Boaz Harrosh [Sun, 24 May 2009 17:01:26 +0000 (20:01 +0300)]
[SCSI] libosd: Better printout of OSD target system information
Shorten out the Attributes names.
Align all results on column 24.
Print system ID in a new line.
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Boaz Harrosh [Sun, 24 May 2009 17:01:03 +0000 (20:01 +0300)]
[SCSI] libosd: OSD2r05: Attribute definitions
Some New revision 5 Attribute definitions.
Some missing definitions of Attributes and pages
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Boaz Harrosh [Sun, 24 May 2009 17:00:39 +0000 (20:00 +0300)]
[SCSI] libosd: OSD2r05: Additional command enums
Add all constant definitions of new OSD commands added in
revision 4 & 5. Mainly for creating snapshots and clones.
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Bottomley [Tue, 9 Jun 2009 23:01:01 +0000 (23:01 +0000)]
[SCSI] mpt fusion: fix up doc book comments
Several of the doc book in the previous patches had incorrect multi-line short
function descriptors. Fixed it all to be the correct single line descriptor.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Kashyap, Desai [Fri, 29 May 2009 11:26:59 +0000 (16:56 +0530)]
[SCSI] mpt fusion: Added support for Broadcast primitives Event handling
Firmware is able to handle Broadcast primitives, but upstream driver does not
have support for broadcast primitive handling. Now this patch is mainly to
support broadcast primitives.
Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Kashyap, Desai [Fri, 29 May 2009 11:25:09 +0000 (16:55 +0530)]
[SCSI] mpt fusion: Queue full event handling
FW will report Queue full event to Driver and driver will handle this queue
full event to SCSI Mid layer.
Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Kashyap, Desai [Fri, 29 May 2009 11:23:56 +0000 (16:53 +0530)]
[SCSI] mpt fusion: RAID device handling and Dual port Raid support is added
1. Handle integrated Raid device(Add/Delete) and error condition and check
related to Raid device. is_logical_volume will represent logical volume
device.
2. Raid device dual port support is added. Main functions to support this
feature are mpt_raid_phys_disk_get_num_paths and mpt_raid_phys_disk_pg1.
Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Kashyap, Desai [Fri, 29 May 2009 11:23:14 +0000 (16:53 +0530)]
[SCSI] mpt fusion: Put IOC into ready state if it not already in ready state
Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Kashyap, Desai [Fri, 29 May 2009 11:22:37 +0000 (16:52 +0530)]
[SCSI] mpt fusion: Code Cleanup patch
Resending patch considering Grants G's code review.
Main goal to submit this patch is code cleaup.
1. Better driver debug prints and code indentation.
2. fault_reset_work_lock is not used anywhere. driver is using taskmgmt_lock
instead of fault_reset_work_lock.
3. setting pci_set_drvdata properly.
4. Ingore config request when IOC is in reset state.( ioc_reset_in_progress
is set).
5. Init/clear managment frame proprely.(INITIALIZE_MGMT_STATUS and
CLEAR_MGMT_STATUS)
Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Kashyap, Desai [Fri, 29 May 2009 11:21:32 +0000 (16:51 +0530)]
[SCSI] mpt fusion: Rescan SAS topology added
1.) SAS topology Rescan is added. If Firmware is doing Reset and we get
Device add interrupt from Firmware, we will not receive it as part of Reset
is going ON. After Reset we will do special Rescan of SAS topology.
2.) Driver version changed from 3.04.08 to 3.04.09.
Added proper lock/unlock in mptsas_not_responding_devices() as per James'
comment.
Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Kashyap, Desai [Fri, 29 May 2009 11:19:36 +0000 (16:49 +0530)]
[SCSI] mpt fusion: SAS topology scan changes, expander events
SAS topology scan is restructured. HBA firmware is generating more
events. Expander Events are added, Link status events are also added with
respect to SAS topology scan optimization.
Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Kashyap, Desai [Fri, 29 May 2009 11:17:26 +0000 (16:47 +0530)]
[SCSI] mpt fusion: Firmware event implementation using seperate WorkQueue
Now Firmware events are handled by firmware event queue.
Previously it was handled in interrupt context/WorkQueue of Linux.
Firmware Event handling is restructured and optimized.
Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Kashyap, Desai [Fri, 29 May 2009 11:16:50 +0000 (16:46 +0530)]
[SCSI] mpt fusion: rewrite of ioctl_cmds internal generated function
1) rewrite of ioctl_cmds internal generated function that issue commands to
firmware, porting them to be single threaded using the generic MPT_MGMT
struct. All wait Queues are replace by completion Queue.
2) added seperate callback handler for ioctl task managment
(mptctl_taskmgmt_reply), to handle command that timeout
3) rewrite mptctl_bus_reset
Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Kashyap, Desai [Fri, 29 May 2009 11:16:07 +0000 (16:46 +0530)]
[SCSI] mpt fusion: Adding DeviceResetCtx for internal Device reset frame
1.) Added taskmgmt_quiesce_io flag in IOC and removed resetPending from
_MPT_SCSI_HOST struct.
2.) Reset from Scsi mid layer and internal Reset are seperate context.
Adding DeviceResetCtx for internal Device reset frame.
mptsas_taskmgmt_complete is optimized as part of implementation.
Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Kashyap, Desai [Fri, 29 May 2009 11:14:48 +0000 (16:44 +0530)]
[SCSI] mpt fusion: rewrite taskmgmt request and completion routines
1.) rewrite taskmanagement request and completion routines, making them
single threaded and using the generic MPT_MGMT struct, deleting
mptscsih_TMHandler, replacing with single request TM handler
mptscsih_IssueTaskMgmt, and killing the watchdog timer functions.
2.) cleanup ioc_reset callback handlers, introducing wrappers for
synchronizing error recovery (mpt_set_taskmgmt_in_progress_flag,
mpt_clear_taskmgmt_in_progress_flag), as the fusion firmware only handles
one task management request at a time
Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Kashyap, Desai [Fri, 29 May 2009 11:14:06 +0000 (16:44 +0530)]
[SCSI] mpt fusion: rewrite of all internal generated functions
Rewrite of all internal generated functions that issue commands to firmware,
porting them to be single threaded using the generic MPT_MGMT
struct. Implemented using completion Queue.
Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Kashyap, Desai [Fri, 29 May 2009 11:10:57 +0000 (16:40 +0530)]
[SCSI] mpt fusion: config path optimized, completion queue is used
1) Previously we had mutliple #defines to use same values.
Now those #defines are optimized.
MPT_IOCTL_STATUS_* is removed and MPT_MGMT_STATUS_* are new
#defines.
2.) config path is optimized.
Instead of wait Queue and timer, using completion Q.
3.) mpt_timer_expired is not used.
[jejb: elide patch to eliminate mpt_timer_expired]
Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Kashyap, Desai [Fri, 29 May 2009 11:09:06 +0000 (16:39 +0530)]
[SCSI] mpt fusion: Optimized SendEvent notification Using Doorbell instead FIFO
SendEventNotification was handled through FIFO, now it is using doorbell to
communicate with hardware. Added Sleep Flag as an extra argument to support
Can-Sleep feature. Resending patch including compilation error fix reviewed
by Grant Grundler.
Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Kashyap, Desai [Fri, 29 May 2009 11:08:14 +0000 (16:38 +0530)]
[SCSI] mpt fusion: Added support for MPT discovery completion check
sas_discovery_quiesce_io flag is used to control IO start/resume functionality.
IO will be stoped while doing discovery of topology. Once discovery is completed
It will resume IO. Resending patch including James review.
Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Kashyap, Desai [Fri, 29 May 2009 11:07:04 +0000 (16:37 +0530)]
[SCSI] mpt fusion: Fixing 1078 data corruption issue for 36GB memory region
The reason for this change is there is a data corruption when four different
physical memory regions in the 36GB to 37GB region are
accessed. This is only affecting 1078.
The solution is we need to use different addressing when filling in
the scatter gather table for the effected memory regions. So instead
of snooping on all four different memory holes, we treat any physical
addresses in the 36GB address with the same algorithm.
The fix is explained below
1) Ensure that the message frames are NOT located in the trouble
region. There is no remapping available for message frames, they must
be allocated outside the problem region.
2) Ensure that Sense buffers are NOT in the trouble region. There is
no remapping available.
3) Walk through the SGE entries and if any are inside the trouble region
then they need to be remapped as discussed below.
1) Set the Local Address bit in the SGE Flags field.
MPI_SGE_FLAGS_LOCAL_ADDRESS
2) Ensure we are using 64-bit SGEs
3) Set MSb (Bit 63) of the 64-bit address, this will indicate buffer
location is Host Memory.
Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Alan Cox [Tue, 9 Jun 2009 12:44:02 +0000 (13:44 +0100)]
[SCSI] gdth: fix overlapping snprintf users
Closes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=13438
Closes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=13437
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Michael Chan [Tue, 9 Jun 2009 01:14:44 +0000 (18:14 -0700)]
[SCSI] bnx2i: Add bnx2i iSCSI driver.
New iSCSI driver for Broadcom BNX2 devices. The driver interfaces with
the CNIC driver to access the hardware.
Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Michael Chan [Tue, 9 Jun 2009 01:14:43 +0000 (18:14 -0700)]
[SCSI] cnic: Add new Broadcom CNIC driver.
The CNIC driver controls BNX2 hardware rings and resources used by
iSCSI. Most hardware resources for iSCSI are separate from those
used for ethernet networking.
iSCSI uses a separate MAC address and IP address. The CNIC driver
creates a UIO interface to handle the non-offloaded packets such as
ARP, etc in userspace.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Michael Chan [Tue, 9 Jun 2009 01:14:42 +0000 (18:14 -0700)]
[SCSI] bnx2: Add support for CNIC driver.
Add interface and functions to support a new CNIC driver to drive
the Broadcom bnx2 hardware for iSCSI offload.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Michael Chan [Tue, 9 Jun 2009 01:14:41 +0000 (18:14 -0700)]
[SCSI] iscsi class: Add new NETLINK_ISCSI messages for cnic/bnx2i driver.
Add ISCSI_NETLINK messages for iSCSI NICs to get information such as
path from userspace. Original iscsid messages are now always sent as
multicast to group 1. The new messages are sent to group 2.
The multicast changes were made by Mike Christie.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Brian King [Mon, 8 Jun 2009 21:19:08 +0000 (16:19 -0500)]
[SCSI] ibmvscsi: Add support for capabilities MAD
Add support to ibmvscsi for the capabilities MAD. This command gets sent
to the Virtual I/O server prior to login in order to communicate client
capabilities. Additionally it returns information regarding capabilities
that the server supports. The two main capabilities communicated in this
MAD are related to partition migration and client reserve. Client reserve
allows for SCSI-2 reservations to be sent to virtual disks which are backed
by physical LUNs and will result in the reservation being sent to the
physical LUN.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Robert Jennings [Mon, 8 Jun 2009 21:19:07 +0000 (16:19 -0500)]
[SCSI] ibmvscsi: Enable fast fail feature
A new mode of error reporting, fast fail, has been added to the VIOS
which allows failover to happen more quickly.
If this new fast fail mode is enabled on the VIOS and the vSCSI client
supports the mode, the VIOS will not return MEDIUM error on path failures,
but rather return VIOSRP_ADAPTER_FAIL in the crq response, which
ibmvscsi will translate to DID_ERROR.
This new mode can be enabled for single path configurations as well,
so it is the new default error reporting mode. A module parameter is
provided to disable this new behavior on the off chance it causes a
problem on some old VIOS version.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Brian King [Mon, 8 Jun 2009 21:19:04 +0000 (16:19 -0500)]
[SCSI] ibmvscsi: Send adapter info before login
The ibmvscsi driver currently sends the SRP Login before sending the Adapter
Info MAD, which can result in commands getting sent to the virtual adapter
before we are ready for them. This results in a slight window where the target
devices may not behave as expected. Change the order and close the window.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Robert Jennings [Mon, 8 Jun 2009 21:19:03 +0000 (16:19 -0500)]
[SCSI] ibmvscsi: Add specific timeouts for operations
Previously we had one timeout that was used for all types of operations.
This adds specific timeout values for different operations (init, login,
adapter info MAD, abort task, and LUN reset).
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Brian King [Mon, 8 Jun 2009 21:19:01 +0000 (16:19 -0500)]
[SCSI] ibmvscsi: Add 16 byte CDB support
Adds support for 16 byte CDBs to the ibmvscsi driver.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Wed, 3 Jun 2009 16:55:31 +0000 (09:55 -0700)]
[SCSI] qla2xxx: Update version number to 8.03.01-k3.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Wed, 3 Jun 2009 16:55:30 +0000 (09:55 -0700)]
[SCSI] qla2xxx: Synchronize MPI settings after a PE Reset.
Ensure MPS remains in synchronization across all NIC/FCoE
functions after a reset.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Wed, 3 Jun 2009 16:55:29 +0000 (09:55 -0700)]
[SCSI] qla2xxx: Export additional firmware-states for application support.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Wed, 3 Jun 2009 16:55:28 +0000 (09:55 -0700)]
[SCSI] qla2xxx: Reduce lock-contention during do-work processing.
Queued work processing will now be serialized with its own
lower-priority spinlock. This also simplifies the work-queue
interface for future work-queue consumers.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Wed, 3 Jun 2009 16:55:27 +0000 (09:55 -0700)]
[SCSI] qla2xxx: Avoid explicit LOGO during driver host tear-down.
As firmware will ultimately terminate (stop) and port
states-cleared.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Wed, 3 Jun 2009 16:55:26 +0000 (09:55 -0700)]
[SCSI] qla2xxx: Query supported RISC registers bits in determining a paused-state.
ISP24xx and above must query the host-status register, not HCCR.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Wed, 3 Jun 2009 16:55:25 +0000 (09:55 -0700)]
[SCSI] qla2xxx: Avoid redundant RISC reset during (re)-initialization.
ISP24xx and above ISPs perform a RISC reset in
qla24xx_reset_chip(), which is called prior to
qla24xx_chip_diag().
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Wed, 3 Jun 2009 16:55:24 +0000 (09:55 -0700)]
[SCSI] qla2xxx: Fallback enode-mac should not be a multicast address.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Wed, 3 Jun 2009 16:55:23 +0000 (09:55 -0700)]
[SCSI] qla2xxx: Add notification message when an NPIV fails to acquire a port-id.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Wed, 3 Jun 2009 16:55:22 +0000 (09:55 -0700)]
[SCSI] qla2xxx: Add 10Gb iiDMA support.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Wed, 3 Jun 2009 16:55:21 +0000 (09:55 -0700)]
[SCSI] qla2xxx: Mark a port's state as needing-rediscovery during link disruptions.
With RSCN states not being kept across qla2x00_configure_loop()
invocations, loop-resync distruptions during fabric-discovery may
cause ports to remain in a lost state. Force state
renegotiation during a follow-on configure-loop iteration.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Wed, 3 Jun 2009 16:55:20 +0000 (09:55 -0700)]
[SCSI] qla2xxx: Check status of qla2x00_get_fw_version() call.
Unlike earlier ISPs, recent ISPs (ISP81xx) can in fact fail this
mailbox command.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Anirban Chakraborty [Wed, 3 Jun 2009 16:55:19 +0000 (09:55 -0700)]
[SCSI] qla2xxx: Correct NULL pointer bug in cpu affinity mode.
This patch fixes a NULL pointer bug that occurs when IO is being
carried out on a vport for which the cpu affinity mode is turned on.
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Wed, 3 Jun 2009 16:55:18 +0000 (09:55 -0700)]
[SCSI] qla2xxx: Use 'proper' DID_* status code for dropped-frame scenarios.
The SCSI-midlayer's fast-fail codes consider an DID_ERROR status
as a driver-error and the failed I/O would then be retried in the
midlayer without being fast-failed to dm-multipath. DID_BUS_BUSY
status returns would induce unneeded path-failures events being
propagated to the DM/MD.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Wed, 3 Jun 2009 16:55:17 +0000 (09:55 -0700)]
[SCSI] qla2xxx: Fallback to 'golden-firmware' operation on supported ISPs.
In case the onboard firmware is unable to be read or loaded for
operation, attempt to fallback to a limited-operational firmware
image stored in a different flash region. This will allow a user
to reflash and correct a board with proper operational firmware.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Anirban Chakraborty [Wed, 3 Jun 2009 16:55:16 +0000 (09:55 -0700)]
[SCSI] qla2xxx: Correct queue-creation bug when driver loaded in QoS mode.
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Wed, 3 Jun 2009 16:55:15 +0000 (09:55 -0700)]
[SCSI] qla2xxx: Correct logic-bug in set-model-info().
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Wed, 3 Jun 2009 16:55:14 +0000 (09:55 -0700)]
[SCSI] qla2xxx: Export TLV data on supported ISPs.
Firmware currently provides PB and PGF TLVs.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Wed, 3 Jun 2009 16:55:13 +0000 (09:55 -0700)]
[SCSI] qla2xxx: Export XGMAC statistics on supported ISPs.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Wed, 3 Jun 2009 16:55:12 +0000 (09:55 -0700)]
[SCSI] qla2xxx: Export negotiated fabric-parameters for application support.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Joe Eykholt [Wed, 6 May 2009 17:52:51 +0000 (10:52 -0700)]
[SCSI] net, libfcoe: Add the FCoE Initialization Protocol ethertype
FIP is the FCoE Initialization Protocol and this patch
adds the protocol ethertype to the kernel's list of
ethertypes.
Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Vasu Dev [Wed, 6 May 2009 17:52:46 +0000 (10:52 -0700)]
[SCSI] fcoe: removes reserving memory for vlan_ethdr on tx path
This is not required as VLAN header is added by device
interface driver, this was causing bad FC_CRC in FCoE pkts when
using VLAN interface.
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Vasu Dev [Wed, 6 May 2009 17:52:40 +0000 (10:52 -0700)]
[SCSI] fcoe: removes fcoe_watchdog
Removes periodic fcoe_watchdog timer used across all fcoe interface
maintained in fcoe_hostlist instead added new fcoe_queue_timer
per fcoe interface.
Added timer is armed only when some pending skb need to be flushed
as oppose to periodic 1 second fcoe_watchdog, since now
fcoe_queue_timer is used on demand thus set this to 2 jiffies.
Now fcoe_queue_timer is much simple than fcoe_watchdog using lock to
process all fcoe interface from fcoe_hostlist.
I noticed +ve performance result with using 2 jiffies timer as
this helps flushing fcoe_pending_queue quickly.
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Vasu Dev [Wed, 6 May 2009 17:52:34 +0000 (10:52 -0700)]
[SCSI] fcoe: reduces lock cost when adding a new skb to fcoe_pending_queue
Currently fcoe_pending_queue.lock held twice for every new skb
adding to this queue when already least one pkt is pending in this
queue and that is not uncommon once skb pkts starts getting queued
here upon fcoe_start_io => dev_queue_xmit failure.
This patch moves most fcoe_pending_queue logic to fcoe_check_wait_queue
function, this new logic grabs fcoe_pending_queue.lock only once to
add a new skb instead twice as used to be.
I think after this patch call flow around fcoe_check_wait_queue
calling in fcoe_xmit is bit simplified with modified
fcoe_check_wait_queue function taking care of adding and
removing pending skb in one function.
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Steve Ma [Wed, 6 May 2009 17:52:29 +0000 (10:52 -0700)]
[SCSI] libfc: Check if exchange is completed when receiving a sequence
When a sequence is received in response to an exchange we issued previously,
we should check to see if the exchange has completed. If yes, the sequence
should be discarded. Since the exchange might be still in the completion
process, it should be untouched.
Signed-off-by: Steve Ma <steve.ma@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Mike Christie [Wed, 6 May 2009 17:52:23 +0000 (10:52 -0700)]
[SCSI] libfc: use DID_ERROR when we have internall aborted command
If we aborted a command, because it timed out we should not use
DID_ABORT. It will fail the command right away back to the upper
layer. We want to use something that indicated that the problem
did not complete normally, but it was not a fatal problem.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Chris Leech [Wed, 6 May 2009 17:52:18 +0000 (10:52 -0700)]
[SCSI] fcoe: use ETH_P_FIP for skb->protocol of FIP frames
FIP frames should leave the fcoe layer with skb->protocol set to
ETH_P_FIP, not ETH_P_802_3.
Signed-off-by: Chris Leech <christopher.leech@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Joe Eykholt [Wed, 6 May 2009 17:52:12 +0000 (10:52 -0700)]
[SCSI] libfcoe: fip: fix non-FIP-mode FLOGI state after reset.
When a reset is sent using fcoeadm on a non-FIP mode NIC,
there's no link flap, so the fcoe_ctlr stays in non-FIP mode.
In that case, FIP wasn't setting the flogi_oxid or map_dest flag,
causing the FLOGI to be sent with the both wrong source MAC and
the wrong destination MAC address, causing it to fail.
This leads to a non-functioning HBA until a link flap or
instance delete/create.
Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Herbert Xu [Sat, 30 May 2009 03:40:04 +0000 (13:40 +1000)]
[SCSI] cxgb3i: Include net/dst.h for struct dst_cache
This driver needs dst_cache->dev so it should include net/dst.h
to ensure that it builds. While net/tcp.h probably includes it
already, we shouldn't rely on that since there is no guarantee
that this won't change in future.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Brian King [Thu, 28 May 2009 21:17:34 +0000 (16:17 -0500)]
[SCSI] ibmvfc: Driver version 1.0.6
Bump driver version
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Brian King [Thu, 28 May 2009 21:17:33 +0000 (16:17 -0500)]
[SCSI] ibmvfc: Improve LOGO/PRLO ELS handling
There are several scenarios where the ibmvfc driver needs to
try to log back into a target on the fabric. Today when these events
occur, we simply go through re-discovery for all attached targets,
assuming that either the query of the name server or an ADISC will
indicate we might need to log back into the target, which doesn't
work for all scenarios. Fix this by taking note of the affected target(s)
in these conditions and ensuring we try to PLOGI back into the target.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Brian King [Thu, 28 May 2009 21:17:32 +0000 (16:17 -0500)]
[SCSI] ibmvfc: Improve device rediscovery
For certain scenarios during device rediscovery, we detect we need
to log back into a target. Currently we do just that - PLOGI/PRLI
back into the target. Change the code to delete and add the target
from the FC transport layer as well, to ensure we handle any cases
where the target may have changed.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Brian King [Thu, 28 May 2009 21:17:30 +0000 (16:17 -0500)]
[SCSI] ibmvfc: Add flush on halt support
The virtual I/O server controlling the NPIV adapter associated with
a virtual fibre channel adapter can send a HALT event to the client.
When this occurs, the client can no longer send commands until a RESUME
is received. By adding support for flush on halt, we will get all of
our outstanding commands flushed back before the Virtual I/O server
enters the halt state, eliminating potential command timeouts for
outstanding commands which might occur if we did not support this feature.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Brian King [Thu, 28 May 2009 21:17:29 +0000 (16:17 -0500)]
[SCSI] ibmvfc: Add support for NPIV Logout
This patch adds support for a new command supported by the Virtual I/O
Server, NPIV Logout. The command will abort all outstanding commands
and log out of the fabric. Currently, the only way to do this is
by breaking the CRQ, which can take a fairly long time when lots of
commands are outstanding. The NPIV Logout commands provides a mechanism
to accomplish virtually the same function, but is much faster.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Brian King [Thu, 28 May 2009 21:17:28 +0000 (16:17 -0500)]
[SCSI] ibmvfc: Fix deadlock in EH
Fixes the following deadlock scenario shown below. We currently allow
queuecommand to send commands when the ibmvfc workqueue is scanning for
new rports, so we should also allow EH to function at this time as well.
scsi_eh_3 D
0000000000000000 12304 1279 2
Call Trace:
[
c0000002f7257730] [
c0000002f72577e0] 0xc0000002f72577e0 (unreliable)
[
c0000002f7257900] [
c0000000000118f4] .__switch_to+0x158/0x1a0
[
c0000002f72579a0] [
c0000000004f8b40] .schedule+0x8d4/0x9dc
[
c0000002f7257b60] [
c0000000004f8f08] .schedule_timeout+0xa8/0xe8
[
c0000002f7257c50] [
d0000000001d23e0] .ibmvfc_wait_while_resetting+0xe4/0x140 [ibmvfc]
[
c0000002f7257d20] [
d0000000001d3984] .ibmvfc_eh_abort_handler+0x60/0xe4 [ibmvfc]
[
c0000002f7257dc0] [
d000000000366714] .scsi_error_handler+0x38c/0x674 [scsi_mod]
[
c0000002f7257f00] [
c0000000000a7470] .kthread+0x78/0xc4
[
c0000002f7257f90] [
c000000000029b8c] .kernel_thread+0x4c/0x68
ibmvfc_3 D
0000000000000000 12432 1280 2
Call Trace:
[
c0000002f7253540] [
c0000002f72535f0] 0xc0000002f72535f0 (unreliable)
[
c0000002f7253710] [
c0000000000118f4] .__switch_to+0x158/0x1a0
[
c0000002f72537b0] [
c0000000004f8b40] .schedule+0x8d4/0x9dc
[
c0000002f7253970] [
c0000000004f8e98] .schedule_timeout+0x38/0xe8
[
c0000002f7253a60] [
c0000000004f80cc] .wait_for_common+0x138/0x220
[
c0000002f7253b40] [
c0000000000a2784] .flush_cpu_workqueue+0xac/0xcc
[
c0000002f7253c10] [
c0000000000a2960] .flush_workqueue+0x58/0xa0
[
c0000002f7253ca0] [
d0000000000827fc] .fc_flush_work+0x4c/0x64 [scsi_transport_fc]
[
c0000002f7253d20] [
d000000000082db4] .fc_remote_port_add+0x48/0x6c4 [scsi_transport_fc]
[
c0000002f7253dd0] [
d0000000001d7d04] .ibmvfc_work+0x820/0xa7c [ibmvfc]
[
c0000002f7253f00] [
c0000000000a7470] .kthread+0x78/0xc4
[
c0000002f7253f90] [
c000000000029b8c] .kernel_thread+0x4c/0x68
fc_wq_3 D
0000000000000000 10720 1283 2
Call Trace:
[
c0000002f559ac30] [
c0000002f559ace0] 0xc0000002f559ace0 (unreliable)
[
c0000002f559ae00] [
c0000000000118f4] .__switch_to+0x158/0x1a0
[
c0000002f559aea0] [
c0000000004f8b40] .schedule+0x8d4/0x9dc
[
c0000002f559b060] [
c0000000004f8e98] .schedule_timeout+0x38/0xe8
[
c0000002f559b150] [
c0000000004f80cc] .wait_for_common+0x138/0x220
[
c0000002f559b230] [
c0000000002721c4] .blk_execute_rq+0xb4/0x100
[
c0000002f559b360] [
d00000000036a1f8] .scsi_execute+0x118/0x194 [scsi_mod]
[
c0000002f559b420] [
d00000000036a32c] .scsi_execute_req+0xb8/0x124 [scsi_mod]
[
c0000002f559b500] [
d0000000000c1330] .sd_sync_cache+0x8c/0x108 [sd_mod]
[
c0000002f559b5e0] [
d0000000000c15b4] .sd_shutdown+0x9c/0x158 [sd_mod]
[
c0000002f559b660] [
d0000000000c16d0] .sd_remove+0x60/0xb4 [sd_mod]
[
c0000002f559b700] [
c000000000392ecc] .__device_release_driver+0xd0/0x118
[
c0000002f559b7a0] [
c000000000393080] .device_release_driver+0x30/0x54
[
c0000002f559b830] [
c000000000392108] .bus_remove_device+0x128/0x16c
[
c0000002f559b8d0] [
c00000000038f94c] .device_del+0x158/0x234
[
c0000002f559b960] [
d00000000036f078] .__scsi_remove_device+0x5c/0xd4 [scsi_mod]
[
c0000002f559b9f0] [
d00000000036f124] .scsi_remove_device+0x34/0x58 [scsi_mod]
[
c0000002f559ba80] [
d00000000036f204] .__scsi_remove_target+0xb4/0x120 [scsi_mod]
[
c0000002f559bb10] [
d00000000036f338] .__remove_child+0x2c/0x44 [scsi_mod]
[
c0000002f559bb90] [
c00000000038f11c] .device_for_each_child+0x54/0xb4
[
c0000002f559bc50] [
d00000000036f2e0] .scsi_remove_target+0x70/0x9c [scsi_mod]
[
c0000002f559bce0] [
d000000000083454] .fc_starget_delete+0x24/0x3c [scsi_transport_fc]
[
c0000002f559bd70] [
c0000000000a2368] .run_workqueue+0x118/0x208
[
c0000002f559be30] [
c0000000000a2580] .worker_thread+0x128/0x154
[
c0000002f559bf00] [
c0000000000a7470] .kthread+0x78/0xc4
[
c0000002f559bf90] [
c000000000029b8c] .kernel_thread+0x4c/0x68
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Brian King [Thu, 28 May 2009 21:17:26 +0000 (16:17 -0500)]
[SCSI] ibmvfc: Reduce error logging noise
The ibmvfc driver currently logs errors during discovery for several
transient fabric errors, which generally get retried. If retries
do not work, we see multiple errors in the log. If retries do work,
we see errors in the log which may be confusing since the retry worked.
This patch enhances the discovery time error logging to only log errors
for command failures during discovery if all allowed retries have been
used up. The existing behavior of logging all failures can be restored
by setting the hosts log_level to a value of 3 or greater.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Brian King [Thu, 28 May 2009 21:17:25 +0000 (16:17 -0500)]
[SCSI] ibmvfc: Use DEVICE_ATTR macro
Use DEVICE_ATTR macro for defining device sysfs attributes.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Brian King [Thu, 28 May 2009 21:17:24 +0000 (16:17 -0500)]
[SCSI] ibmvfc: Fixup GFP flags for target allocations
Since target allocations can occur while resetting the virtual adapter,
we shouldn't be using GFP_KERNEL for them as it could hang. Switch to
use GFP_NOIO.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Brian King [Thu, 28 May 2009 21:17:22 +0000 (16:17 -0500)]
[SCSI] ibmvfc: Fix invalid error response handling
Fix an obvious bug in processing error responses for SCSI commands
which can result in successful responses being incorrectly returned
with DID_ERROR.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Bottomley [Tue, 26 May 2009 20:35:48 +0000 (20:35 +0000)]
[SCSI] sd: fix bug in SCSI async probing
The async split up of probing in sd.c created a potential failure case where
something goes wrong with device_add(), but which we don't recover properly.
Since, in general, asynchronous error handling is hard, move the device_add()
into the asynchronous path (it should be fast) and make sure all the deferred
processing cannot fail.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Bottomley [Sun, 17 May 2009 14:30:48 +0000 (09:30 -0500)]
[SCSI] fix up scsi_eh_lock_door()
The Documentation is incorrect (we removed some functions referred to), and
none of the bug warnings now apply. Additionally remove the spurious check on
the return from blk_get_request() which can't fail if __GFP_WAIT is passed in.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Bartlomiej Zolnierkiewicz [Mon, 27 Apr 2009 18:54:22 +0000 (20:54 +0200)]
[SCSI] fix documentation for two functions
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Smart [Fri, 22 May 2009 18:53:27 +0000 (14:53 -0400)]
[SCSI] lpfc 8.3.2 : Update the lpfc driver version to 8.3.2
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Smart [Fri, 22 May 2009 18:53:21 +0000 (14:53 -0400)]
[SCSI] lpfc 8.3.2 : Persistent Vport Support
Add support for persistent vport definitions at creation at boot time
Also includes a few misc fixes for:
- conversion to vpi name from vport slang name
- couple of small mailbox references
- some additional discovery mods
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Smart [Fri, 22 May 2009 18:53:12 +0000 (14:53 -0400)]
[SCSI] lpfc 8.3.2 : Miscellaneous Changes
Miscellaneous Changes:
- Convert from SLI2_ACTIVE flag to more correct SLI_ACTIVE (generic) flag
- Reposition log verbose messaging definitions
- Update naming for vpi object name from vport slang name
- Handle deferred error attention condition
- Add 10G link support
- Small bug fixup
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Smart [Fri, 22 May 2009 18:53:05 +0000 (14:53 -0400)]
[SCSI] lpfc 8.3.2 : Update of copyrights
Update of copyrights on modified files
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Smart [Fri, 22 May 2009 18:52:59 +0000 (14:52 -0400)]
[SCSI] lpfc 8.3.2 : Addition of SLI4 Interface - FCOE Discovery support
SLI4 supports both FC and FCOE, with some extended topology objects.
This patch adss support for the objects, and updates the disovery
engines for their use.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Smart [Fri, 22 May 2009 18:52:52 +0000 (14:52 -0400)]
[SCSI] lpfc 8.3.2 : Addition of SLI4 Interface - Mailbox handling
The mailbox commands themselves are the same, or very similar to
their SLI3 counterparts. This patch genericizes mailbox command
handling and adds support for the new SLI4 mailbox queue.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Smart [Fri, 22 May 2009 18:52:35 +0000 (14:52 -0400)]
[SCSI] lpfc 8.3.2 : Addition of SLI4 Interface - Queues
Adds support for the new queues in the SLI-4 interface. There are :
- Work Queues - host-to-adapter for fast-path traffic
- Mailbox Queues - host-to-adapter for control (slow-path)
- Buffer Queues - host-to-adapter for posting buffers for async receive
- Completion Queues - adapter-to-host for posting async events,
completions for fast or slow patch work, receipt of async
receive traffic
- Event Queues - tied to MSI-X vectors, binds completion queues with
interrupts
These patches add the all the support code to tie into command submission
and response paths, updates the interrupt handling, etc.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Smart [Fri, 22 May 2009 18:51:39 +0000 (14:51 -0400)]
[SCSI] lpfc 8.3.2 : Addition of SLI4 Interface - Base Support
Adds new hardware and interface definitions.
Adds new interface routines - utilizing the reorganized layout of the
driver. Adds SLI-4 specific functions for attachment, initialization,
teardown, etc.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Smart [Fri, 22 May 2009 18:50:54 +0000 (14:50 -0400)]
[SCSI] lpfc 8.3.2 : Reorganization for SLI4
Preps the organization of the driver so that the bottom half, which
interacts with the hardware, can share common code sequences for
attachment, detachment, initialization, teardown, etc with new hardware.
For very common code sections, which become specific to the interface
type, the driver uses an indirect function call. The function is set at
initialization. For less common sections, such as initialization, the
driver looks at the interface type and calls the routines relative to
the interface.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Abhijeet Joglekar [Fri, 1 May 2009 17:01:26 +0000 (10:01 -0700)]
[SCSI] libfc,fcoe,fnic: Separate rport and lport max retry counts
This allows fnic to configure number of retries for lport and rport
separately.
Signed-off-by: Abhijeet Joglekar <abjoglek@cisco.com>
Acked-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Eric Moore [Mon, 18 May 2009 19:02:49 +0000 (13:02 -0600)]
[SCSI] mpt2sas: bump driver version to 01.100.03.00
Bump driver version.
Signed-off-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Eric Moore [Mon, 18 May 2009 19:02:08 +0000 (13:02 -0600)]
[SCSI] mpt2sas: using the same naming convention for all static function
This fix's is for all local function so their name has the "_" preceeding
the module name, then function name. Most the code is already is using this
naming convention.
Signed-off-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Eric Moore [Mon, 18 May 2009 19:01:29 +0000 (13:01 -0600)]
[SCSI] mpt2sas: add query task support for MPT2COMMAND ioctl
This patch will find an active mid for a query_task request via the ioctl path.
This code is already there for task_abort, so this patch combining code using
the same fuction _ctl_set_task_mid(), previously _ctl_do_task_abort().
Signed-off-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Eric Moore [Mon, 18 May 2009 19:00:45 +0000 (13:00 -0600)]
[SCSI] mpt2sas: LUN Reset Support
Adding new eh_target_reset_handler for target reset. Change the
eh_device_reset_handler so its sending
MPI2_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET, instead of
MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET. Add new function
_scsih_scsi_lookup_find_by_lun as a sanity check to insure I_T_L commands are
completed upon completing lun reset.
Signed-off-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Eric Moore [Mon, 18 May 2009 18:59:41 +0000 (12:59 -0600)]
[SCSI] mpt2sas: T10 DIF Support
This add support for type 1 and 3 DIF support per the Oracle API.
Signed-off-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Christof Schmitt [Fri, 15 May 2009 11:18:21 +0000 (13:18 +0200)]
[SCSI] zfcp: Keep ccw device and model id in zfcp_ccw.c
Keep the information about the device and model id in zfcp_ccw. This
requires an additional helper function to check for the privileged
cfdc subchannel, but it allows the removal of the redundant defines
from the zfcp_def header file.
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@HansenPartnership.com>
Swen Schillig [Fri, 15 May 2009 11:18:20 +0000 (13:18 +0200)]
[SCSI] zfcp: Changed D_ID left port disabled
If the destination ID (D_ID) of a remote storage port changed, e.g.
re-plugged cable on the switch in a different switch port, the port
was never (re-)attached within Linux. This patch fixes the broken
mapping between the WWPN and the D_ID.
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@HansenPartnership.com>
Martin Petermann [Fri, 15 May 2009 11:18:19 +0000 (13:18 +0200)]
[SCSI] zfcp: Increase ref counter for port open requests
In rare cases, open port request might timeout, erp calls
zfcp_port_put, port gets dequeued. Now, the late returning (or
dismissed) fsf-port-open calls the fsf_port_open_handler that tries to
reference the port data structure leading to a kernel oops.
Signed-off-by: Martin Petermann <martin.petermann@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Christof Schmitt [Fri, 15 May 2009 11:18:18 +0000 (13:18 +0200)]
[SCSI] zfcp: Add comments to switch/case fallthroughs
Add comments where there is a deliberate fall through in switch/case
statements. This makes some code checkers happy and makes it clear
that there is no missing break statement.
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@HansenPartnership.com>
Christof Schmitt [Fri, 15 May 2009 11:18:17 +0000 (13:18 +0200)]
[SCSI] zfcp: Remove unnecessary default case and assignments
enum dma_data_direction only has the 4 values DMA_BIDIRECTIONAL,
DMA_TO_DEVICE, DMA_FROM_DEVICE and DMA_NONE. No need to have the
default case. While changing this, setup sbtype in one place to make
sparse happy.
The default value of retval is already -EIO, so remove the
additional assignment for these two cases.
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@HansenPartnership.com>
Christof Schmitt [Fri, 15 May 2009 11:18:16 +0000 (13:18 +0200)]
[SCSI] zfcp: Make queue_depth adjustable
zfcp did always set the queue_depth for SCSI devices to 32, not
allowing to change this. Introduce a kernel parameter zfcp.queue_depth
and the change_queue_depth callback to allow changing the queue_depth
when it is required.
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@HansenPartnership.com>
Christof Schmitt [Fri, 15 May 2009 11:18:15 +0000 (13:18 +0200)]
[SCSI] zfcp: Update message and add description
Update the newly introduced message for the boxed status to conform to
match the style of s390 and zfcp messages.
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@HansenPartnership.com>