mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (166 commits)
[SCSI] ibmvscsi: convert to use the data buffer accessors
[SCSI] dc395x: convert to use the data buffer accessors
[SCSI] ncr53c8xx: convert to use the data buffer accessors
[SCSI] sym53c8xx: convert to use the data buffer accessors
[SCSI] ppa: coding police and printk levels
[SCSI] aic7xxx_old: remove redundant GFP_ATOMIC from kmalloc
[SCSI] i2o: remove redundant GFP_ATOMIC from kmalloc from device.c
[SCSI] remove the dead CYBERSTORMIII_SCSI option
[SCSI] don't build scsi_dma_{map,unmap} for !HAS_DMA
[SCSI] Clean up scsi_add_lun a bit
[SCSI] 53c700: Remove printk, which triggers because of low scsi clock on SNI RMs
[SCSI] sni_53c710: Cleanup
[SCSI] qla4xxx: Fix underrun/overrun conditions
[SCSI] megaraid_mbox: use mutex instead of semaphore
[SCSI] aacraid: add 51245, 51645 and 52245 adapters to documentation.
[SCSI] qla2xxx: update version to 8.02.00-k1.
[SCSI] qla2xxx: add support for NPIV
[SCSI] stex: use resid for xfer len information
[SCSI] Add Brownie 1200U3P to blacklist
[SCSI] scsi.c: convert to use the data buffer accessors
...
This commit is contained in:
@@ -50,6 +50,9 @@ Supported Cards/Chipsets
|
||||
9005:0285:9005:02be Adaptec 31605 (Marauder160)
|
||||
9005:0285:9005:02c3 Adaptec 51205 (Voodoo120)
|
||||
9005:0285:9005:02c4 Adaptec 51605 (Voodoo160)
|
||||
9005:0285:9005:02ce Adaptec 51245 (Voodoo124)
|
||||
9005:0285:9005:02cf Adaptec 51645 (Voodoo164)
|
||||
9005:0285:9005:02d0 Adaptec 52445 (Voodoo244)
|
||||
1011:0046:9005:0364 Adaptec 5400S (Mustang)
|
||||
9005:0287:9005:0800 Adaptec Themisto (Jupiter)
|
||||
9005:0200:9005:0200 Adaptec Themisto (Jupiter)
|
||||
|
||||
450
Documentation/scsi/scsi_fc_transport.txt
Normal file
450
Documentation/scsi/scsi_fc_transport.txt
Normal file
@@ -0,0 +1,450 @@
|
||||
SCSI FC Tansport
|
||||
=============================================
|
||||
|
||||
Date: 4/12/2007
|
||||
Kernel Revisions for features:
|
||||
rports : <<TBS>>
|
||||
vports : 2.6.22 (? TBD)
|
||||
|
||||
|
||||
Introduction
|
||||
============
|
||||
This file documents the features and components of the SCSI FC Transport.
|
||||
It also provides documents the API between the transport and FC LLDDs.
|
||||
The FC transport can be found at:
|
||||
drivers/scsi/scsi_transport_fc.c
|
||||
include/scsi/scsi_transport_fc.h
|
||||
include/scsi/scsi_netlink_fc.h
|
||||
|
||||
This file is found at Documentation/scsi/scsi_fc_transport.txt
|
||||
|
||||
|
||||
FC Remote Ports (rports)
|
||||
========================================================================
|
||||
<< To Be Supplied >>
|
||||
|
||||
|
||||
FC Virtual Ports (vports)
|
||||
========================================================================
|
||||
|
||||
Overview:
|
||||
-------------------------------
|
||||
|
||||
New FC standards have defined mechanisms which allows for a single physical
|
||||
port to appear on as multiple communication ports. Using the N_Port Id
|
||||
Virtualization (NPIV) mechanism, a point-to-point connection to a Fabric
|
||||
can be assigned more than 1 N_Port_ID. Each N_Port_ID appears as a
|
||||
separate port to other endpoints on the fabric, even though it shares one
|
||||
physical link to the switch for communication. Each N_Port_ID can have a
|
||||
unique view of the fabric based on fabric zoning and array lun-masking
|
||||
(just like a normal non-NPIV adapter). Using the Virtual Fabric (VF)
|
||||
mechanism, adding a fabric header to each frame allows the port to
|
||||
interact with the Fabric Port to join multiple fabrics. The port will
|
||||
obtain an N_Port_ID on each fabric it joins. Each fabric will have its
|
||||
own unique view of endpoints and configuration parameters. NPIV may be
|
||||
used together with VF so that the port can obtain multiple N_Port_IDs
|
||||
on each virtual fabric.
|
||||
|
||||
The FC transport is now recognizing a new object - a vport. A vport is
|
||||
an entity that has a world-wide unique World Wide Port Name (wwpn) and
|
||||
World Wide Node Name (wwnn). The transport also allows for the FC4's to
|
||||
be specified for the vport, with FCP_Initiator being the primary role
|
||||
expected. Once instantiated by one of the above methods, it will have a
|
||||
distinct N_Port_ID and view of fabric endpoints and storage entities.
|
||||
The fc_host associated with the physical adapter will export the ability
|
||||
to create vports. The transport will create the vport object within the
|
||||
Linux device tree, and instruct the fc_host's driver to instantiate the
|
||||
virtual port. Typically, the driver will create a new scsi_host instance
|
||||
on the vport, resulting in a unique <H,C,T,L> namespace for the vport.
|
||||
Thus, whether a FC port is based on a physical port or on a virtual port,
|
||||
each will appear as a unique scsi_host with its own target and lun space.
|
||||
|
||||
Note: At this time, the transport is written to create only NPIV-based
|
||||
vports. However, consideration was given to VF-based vports and it
|
||||
should be a minor change to add support if needed. The remaining
|
||||
discussion will concentrate on NPIV.
|
||||
|
||||
Note: World Wide Name assignment (and uniqueness guarantees) are left
|
||||
up to an administrative entity controling the vport. For example,
|
||||
if vports are to be associated with virtual machines, a XEN mgmt
|
||||
utility would be responsible for creating wwpn/wwnn's for the vport,
|
||||
using it's own naming authority and OUI. (Note: it already does this
|
||||
for virtual MAC addresses).
|
||||
|
||||
|
||||
Device Trees and Vport Objects:
|
||||
-------------------------------
|
||||
|
||||
Today, the device tree typically contains the scsi_host object,
|
||||
with rports and scsi target objects underneath it. Currently the FC
|
||||
transport creates the vport object and places it under the scsi_host
|
||||
object corresponding to the physical adapter. The LLDD will allocate
|
||||
a new scsi_host for the vport and link it's object under the vport.
|
||||
The remainder of the tree under the vports scsi_host is the same
|
||||
as the non-NPIV case. The transport is written currently to easily
|
||||
allow the parent of the vport to be something other than the scsi_host.
|
||||
This could be used in the future to link the object onto a vm-specific
|
||||
device tree. If the vport's parent is not the physical port's scsi_host,
|
||||
a symbolic link to the vport object will be placed in the physical
|
||||
port's scsi_host.
|
||||
|
||||
Here's what to expect in the device tree :
|
||||
The typical Physical Port's Scsi_Host:
|
||||
/sys/devices/.../host17/
|
||||
and it has the typical decendent tree:
|
||||
/sys/devices/.../host17/rport-17:0-0/target17:0:0/17:0:0:0:
|
||||
and then the vport is created on the Physical Port:
|
||||
/sys/devices/.../host17/vport-17:0-0
|
||||
and the vport's Scsi_Host is then created:
|
||||
/sys/devices/.../host17/vport-17:0-0/host18
|
||||
and then the rest of the tree progresses, such as:
|
||||
/sys/devices/.../host17/vport-17:0-0/host18/rport-18:0-0/target18:0:0/18:0:0:0:
|
||||
|
||||
Here's what to expect in the sysfs tree :
|
||||
scsi_hosts:
|
||||
/sys/class/scsi_host/host17 physical port's scsi_host
|
||||
/sys/class/scsi_host/host18 vport's scsi_host
|
||||
fc_hosts:
|
||||
/sys/class/fc_host/host17 physical port's fc_host
|
||||
/sys/class/fc_host/host18 vport's fc_host
|
||||
fc_vports:
|
||||
/sys/class/fc_vports/vport-17:0-0 the vport's fc_vport
|
||||
fc_rports:
|
||||
/sys/class/fc_remote_ports/rport-17:0-0 rport on the physical port
|
||||
/sys/class/fc_remote_ports/rport-18:0-0 rport on the vport
|
||||
|
||||
|
||||
Vport Attributes:
|
||||
-------------------------------
|
||||
|
||||
The new fc_vport class object has the following attributes
|
||||
|
||||
node_name: Read_Only
|
||||
The WWNN of the vport
|
||||
|
||||
port_name: Read_Only
|
||||
The WWPN of the vport
|
||||
|
||||
roles: Read_Only
|
||||
Indicates the FC4 roles enabled on the vport.
|
||||
|
||||
symbolic_name: Read_Write
|
||||
A string, appended to the driver's symbolic port name string, which
|
||||
is registered with the switch to identify the vport. For example,
|
||||
a hypervisor could set this string to "Xen Domain 2 VM 5 Vport 2",
|
||||
and this set of identifiers can be seen on switch management screens
|
||||
to identify the port.
|
||||
|
||||
vport_delete: Write_Only
|
||||
When written with a "1", will tear down the vport.
|
||||
|
||||
vport_disable: Write_Only
|
||||
When written with a "1", will transition the vport to a disabled.
|
||||
state. The vport will still be instantiated with the Linux kernel,
|
||||
but it will not be active on the FC link.
|
||||
When written with a "0", will enable the vport.
|
||||
|
||||
vport_last_state: Read_Only
|
||||
Indicates the previous state of the vport. See the section below on
|
||||
"Vport States".
|
||||
|
||||
vport_state: Read_Only
|
||||
Indicates the state of the vport. See the section below on
|
||||
"Vport States".
|
||||
|
||||
vport_type: Read_Only
|
||||
Reflects the FC mechanism used to create the virtual port.
|
||||
Only NPIV is supported currently.
|
||||
|
||||
|
||||
For the fc_host class object, the following attributes are added for vports:
|
||||
|
||||
max_npiv_vports: Read_Only
|
||||
Indicates the maximum number of NPIV-based vports that the
|
||||
driver/adapter can support on the fc_host.
|
||||
|
||||
npiv_vports_inuse: Read_Only
|
||||
Indicates how many NPIV-based vports have been instantiated on the
|
||||
fc_host.
|
||||
|
||||
vport_create: Write_Only
|
||||
A "simple" create interface to instantiate a vport on an fc_host.
|
||||
A "<WWPN>:<WWNN>" string is written to the attribute. The transport
|
||||
then instantiates the vport object and calls the LLDD to create the
|
||||
vport with the role of FCP_Initiator. Each WWN is specified as 16
|
||||
hex characters and may *not* contain any prefixes (e.g. 0x, x, etc).
|
||||
|
||||
vport_delete: Write_Only
|
||||
A "simple" delete interface to teardown a vport. A "<WWPN>:<WWNN>"
|
||||
string is written to the attribute. The transport will locate the
|
||||
vport on the fc_host with the same WWNs and tear it down. Each WWN
|
||||
is specified as 16 hex characters and may *not* contain any prefixes
|
||||
(e.g. 0x, x, etc).
|
||||
|
||||
|
||||
Vport States:
|
||||
-------------------------------
|
||||
|
||||
Vport instantiation consists of two parts:
|
||||
- Creation with the kernel and LLDD. This means all transport and
|
||||
driver data structures are built up, and device objects created.
|
||||
This is equivalent to a driver "attach" on an adapter, which is
|
||||
independent of the adapter's link state.
|
||||
- Instantiation of the vport on the FC link via ELS traffic, etc.
|
||||
This is equivalent to a "link up" and successfull link initialization.
|
||||
Futher information can be found in the interfaces section below for
|
||||
Vport Creation.
|
||||
|
||||
Once a vport has been instantiated with the kernel/LLDD, a vport state
|
||||
can be reported via the sysfs attribute. The following states exist:
|
||||
|
||||
FC_VPORT_UNKNOWN - Unknown
|
||||
An temporary state, typically set only while the vport is being
|
||||
instantiated with the kernel and LLDD.
|
||||
|
||||
FC_VPORT_ACTIVE - Active
|
||||
The vport has been successfully been created on the FC link.
|
||||
It is fully functional.
|
||||
|
||||
FC_VPORT_DISABLED - Disabled
|
||||
The vport instantiated, but "disabled". The vport is not instantiated
|
||||
on the FC link. This is equivalent to a physical port with the
|
||||
link "down".
|
||||
|
||||
FC_VPORT_LINKDOWN - Linkdown
|
||||
The vport is not operational as the physical link is not operational.
|
||||
|
||||
FC_VPORT_INITIALIZING - Initializing
|
||||
The vport is in the process of instantiating on the FC link.
|
||||
The LLDD will set this state just prior to starting the ELS traffic
|
||||
to create the vport. This state will persist until the vport is
|
||||
successfully created (state becomes FC_VPORT_ACTIVE) or it fails
|
||||
(state is one of the values below). As this state is transitory,
|
||||
it will not be preserved in the "vport_last_state".
|
||||
|
||||
FC_VPORT_NO_FABRIC_SUPP - No Fabric Support
|
||||
The vport is not operational. One of the following conditions were
|
||||
encountered:
|
||||
- The FC topology is not Point-to-Point
|
||||
- The FC port is not connected to an F_Port
|
||||
- The F_Port has indicated that NPIV is not supported.
|
||||
|
||||
FC_VPORT_NO_FABRIC_RSCS - No Fabric Resources
|
||||
The vport is not operational. The Fabric failed FDISC with a status
|
||||
indicating that it does not have sufficient resources to complete
|
||||
the operation.
|
||||
|
||||
FC_VPORT_FABRIC_LOGOUT - Fabric Logout
|
||||
The vport is not operational. The Fabric has LOGO'd the N_Port_ID
|
||||
associated with the vport.
|
||||
|
||||
FC_VPORT_FABRIC_REJ_WWN - Fabric Rejected WWN
|
||||
The vport is not operational. The Fabric failed FDISC with a status
|
||||
indicating that the WWN's are not valid.
|
||||
|
||||
FC_VPORT_FAILED - VPort Failed
|
||||
The vport is not operational. This is a catchall for all other
|
||||
error conditions.
|
||||
|
||||
|
||||
The following state table indicates the different state transitions:
|
||||
|
||||
State Event New State
|
||||
--------------------------------------------------------------------
|
||||
n/a Initialization Unknown
|
||||
Unknown: Link Down Linkdown
|
||||
Link Up & Loop No Fabric Support
|
||||
Link Up & no Fabric No Fabric Support
|
||||
Link Up & FLOGI response No Fabric Support
|
||||
indicates no NPIV support
|
||||
Link Up & FDISC being sent Initializing
|
||||
Disable request Disable
|
||||
Linkdown: Link Up Unknown
|
||||
Initializing: FDISC ACC Active
|
||||
FDISC LS_RJT w/ no resources No Fabric Resources
|
||||
FDISC LS_RJT w/ invalid Fabric Rejected WWN
|
||||
pname or invalid nport_id
|
||||
FDISC LS_RJT failed for Vport Failed
|
||||
other reasons
|
||||
Link Down Linkdown
|
||||
Disable request Disable
|
||||
Disable: Enable request Unknown
|
||||
Active: LOGO received from fabric Fabric Logout
|
||||
Link Down Linkdown
|
||||
Disable request Disable
|
||||
Fabric Logout: Link still up Unknown
|
||||
|
||||
The following 4 error states all have the same transitions:
|
||||
No Fabric Support:
|
||||
No Fabric Resources:
|
||||
Fabric Rejected WWN:
|
||||
Vport Failed:
|
||||
Disable request Disable
|
||||
Link goes down Linkdown
|
||||
|
||||
|
||||
Transport <-> LLDD Interfaces :
|
||||
-------------------------------
|
||||
|
||||
Vport support by LLDD:
|
||||
|
||||
The LLDD indicates support for vports by supplying a vport_create()
|
||||
function in the transport template. The presense of this function will
|
||||
cause the creation of the new attributes on the fc_host. As part of
|
||||
the physical port completing its initialization relative to the
|
||||
transport, it should set the max_npiv_vports attribute to indicate the
|
||||
maximum number of vports the driver and/or adapter supports.
|
||||
|
||||
|
||||
Vport Creation:
|
||||
|
||||
The LLDD vport_create() syntax is:
|
||||
|
||||
int vport_create(struct fc_vport *vport, bool disable)
|
||||
|
||||
where:
|
||||
vport: Is the newly allocated vport object
|
||||
disable: If "true", the vport is to be created in a disabled stated.
|
||||
If "false", the vport is to be enabled upon creation.
|
||||
|
||||
When a request is made to create a new vport (via sgio/netlink, or the
|
||||
vport_create fc_host attribute), the transport will validate that the LLDD
|
||||
can support another vport (e.g. max_npiv_vports > npiv_vports_inuse).
|
||||
If not, the create request will be failed. If space remains, the transport
|
||||
will increment the vport count, create the vport object, and then call the
|
||||
LLDD's vport_create() function with the newly allocated vport object.
|
||||
|
||||
As mentioned above, vport creation is divided into two parts:
|
||||
- Creation with the kernel and LLDD. This means all transport and
|
||||
driver data structures are built up, and device objects created.
|
||||
This is equivalent to a driver "attach" on an adapter, which is
|
||||
independent of the adapter's link state.
|
||||
- Instantiation of the vport on the FC link via ELS traffic, etc.
|
||||
This is equivalent to a "link up" and successfull link initialization.
|
||||
|
||||
The LLDD's vport_create() function will not synchronously wait for both
|
||||
parts to be fully completed before returning. It must validate that the
|
||||
infrastructure exists to support NPIV, and complete the first part of
|
||||
vport creation (data structure build up) before returning. We do not
|
||||
hinge vport_create() on the link-side operation mainly because:
|
||||
- The link may be down. It is not a failure if it is. It simply
|
||||
means the vport is in an inoperable state until the link comes up.
|
||||
This is consistent with the link bouncing post vport creation.
|
||||
- The vport may be created in a disabled state.
|
||||
- This is consistent with a model where: the vport equates to a
|
||||
FC adapter. The vport_create is synonymous with driver attachment
|
||||
to the adapter, which is independent of link state.
|
||||
|
||||
Note: special error codes have been defined to delineate infrastructure
|
||||
failure cases for quicker resolution.
|
||||
|
||||
The expected behavior for the LLDD's vport_create() function is:
|
||||
- Validate Infrastructure:
|
||||
- If the driver or adapter cannot support another vport, whether
|
||||
due to improper firmware, (a lie about) max_npiv, or a lack of
|
||||
some other resource - return VPCERR_UNSUPPORTED.
|
||||
- If the driver validates the WWN's against those already active on
|
||||
the adapter and detects an overlap - return VPCERR_BAD_WWN.
|
||||
- If the driver detects the topology is loop, non-fabric, or the
|
||||
FLOGI did not support NPIV - return VPCERR_NO_FABRIC_SUPP.
|
||||
- Allocate data structures. If errors are encountered, such as out
|
||||
of memory conditions, return the respective negative Exxx error code.
|
||||
- If the role is FCP Initiator, the LLDD is to :
|
||||
- Call scsi_host_alloc() to allocate a scsi_host for the vport.
|
||||
- Call scsi_add_host(new_shost, &vport->dev) to start the scsi_host
|
||||
and bind it as a child of the vport device.
|
||||
- Initializes the fc_host attribute values.
|
||||
- Kick of further vport state transitions based on the disable flag and
|
||||
link state - and return success (zero).
|
||||
|
||||
LLDD Implementers Notes:
|
||||
- It is suggested that there be a different fc_function_templates for
|
||||
the physical port and the virtual port. The physical port's template
|
||||
would have the vport_create, vport_delete, and vport_disable functions,
|
||||
while the vports would not.
|
||||
- It is suggested that there be different scsi_host_templates
|
||||
for the physical port and virtual port. Likely, there are driver
|
||||
attributes, embedded into the scsi_host_template, that are applicable
|
||||
for the physical port only (link speed, topology setting, etc). This
|
||||
ensures that the attributes are applicable to the respective scsi_host.
|
||||
|
||||
|
||||
Vport Disable/Enable:
|
||||
|
||||
The LLDD vport_disable() syntax is:
|
||||
|
||||
int vport_disable(struct fc_vport *vport, bool disable)
|
||||
|
||||
where:
|
||||
vport: Is vport to to be enabled or disabled
|
||||
disable: If "true", the vport is to be disabled.
|
||||
If "false", the vport is to be enabled.
|
||||
|
||||
When a request is made to change the disabled state on a vport, the
|
||||
transport will validate the request against the existing vport state.
|
||||
If the request is to disable and the vport is already disabled, the
|
||||
request will fail. Similarly, if the request is to enable, and the
|
||||
vport is not in a disabled state, the request will fail. If the request
|
||||
is valid for the vport state, the transport will call the LLDD to
|
||||
change the vport's state.
|
||||
|
||||
Within the LLDD, if a vport is disabled, it remains instantiated with
|
||||
the kernel and LLDD, but it is not active or visible on the FC link in
|
||||
any way. (see Vport Creation and the 2 part instantiation discussion).
|
||||
The vport will remain in this state until it is deleted or re-enabled.
|
||||
When enabling a vport, the LLDD reinstantiates the vport on the FC
|
||||
link - essentially restarting the LLDD statemachine (see Vport States
|
||||
above).
|
||||
|
||||
|
||||
Vport Deletion:
|
||||
|
||||
The LLDD vport_delete() syntax is:
|
||||
|
||||
int vport_delete(struct fc_vport *vport)
|
||||
|
||||
where:
|
||||
vport: Is vport to delete
|
||||
|
||||
When a request is made to delete a vport (via sgio/netlink, or via the
|
||||
fc_host or fc_vport vport_delete attributes), the transport will call
|
||||
the LLDD to terminate the vport on the FC link, and teardown all other
|
||||
datastructures and references. If the LLDD completes successfully,
|
||||
the transport will teardown the vport objects and complete the vport
|
||||
removal. If the LLDD delete request fails, the vport object will remain,
|
||||
but will be in an indeterminate state.
|
||||
|
||||
Within the LLDD, the normal code paths for a scsi_host teardown should
|
||||
be followed. E.g. If the vport has a FCP Initiator role, the LLDD
|
||||
will call fc_remove_host() for the vports scsi_host, followed by
|
||||
scsi_remove_host() and scsi_host_put() for the vports scsi_host.
|
||||
|
||||
|
||||
Other:
|
||||
fc_host port_type attribute:
|
||||
There is a new fc_host port_type value - FC_PORTTYPE_NPIV. This value
|
||||
must be set on all vport-based fc_hosts. Normally, on a physical port,
|
||||
the port_type attribute would be set to NPORT, NLPORT, etc based on the
|
||||
topology type and existence of the fabric. As this is not applicable to
|
||||
a vport, it makes more sense to report the FC mechanism used to create
|
||||
the vport.
|
||||
|
||||
Driver unload:
|
||||
FC drivers are required to call fc_remove_host() prior to calling
|
||||
scsi_remove_host(). This allows the fc_host to tear down all remote
|
||||
ports prior the scsi_host being torn down. The fc_remove_host() call
|
||||
was updated to remove all vports for the fc_host as well.
|
||||
|
||||
|
||||
Credits
|
||||
=======
|
||||
The following people have contributed to this document:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
James Smart
|
||||
james.smart@emulex.com
|
||||
|
||||
@@ -555,7 +555,6 @@ complete_scsi_command( CommandList_struct *cp, int timeout, __u32 tag)
|
||||
{
|
||||
struct scsi_cmnd *cmd;
|
||||
ctlr_info_t *ctlr;
|
||||
u64bit addr64;
|
||||
ErrorInfo_struct *ei;
|
||||
|
||||
ei = cp->err_info;
|
||||
@@ -569,20 +568,7 @@ complete_scsi_command( CommandList_struct *cp, int timeout, __u32 tag)
|
||||
cmd = (struct scsi_cmnd *) cp->scsi_cmd;
|
||||
ctlr = hba[cp->ctlr];
|
||||
|
||||
/* undo the DMA mappings */
|
||||
|
||||
if (cmd->use_sg) {
|
||||
pci_unmap_sg(ctlr->pdev,
|
||||
cmd->request_buffer, cmd->use_sg,
|
||||
cmd->sc_data_direction);
|
||||
}
|
||||
else if (cmd->request_bufflen) {
|
||||
addr64.val32.lower = cp->SG[0].Addr.lower;
|
||||
addr64.val32.upper = cp->SG[0].Addr.upper;
|
||||
pci_unmap_single(ctlr->pdev, (dma_addr_t) addr64.val,
|
||||
cmd->request_bufflen,
|
||||
cmd->sc_data_direction);
|
||||
}
|
||||
scsi_dma_unmap(cmd);
|
||||
|
||||
cmd->result = (DID_OK << 16); /* host byte */
|
||||
cmd->result |= (COMMAND_COMPLETE << 8); /* msg byte */
|
||||
@@ -597,7 +583,7 @@ complete_scsi_command( CommandList_struct *cp, int timeout, __u32 tag)
|
||||
ei->SenseLen > SCSI_SENSE_BUFFERSIZE ?
|
||||
SCSI_SENSE_BUFFERSIZE :
|
||||
ei->SenseLen);
|
||||
cmd->resid = ei->ResidualCnt;
|
||||
scsi_set_resid(cmd, ei->ResidualCnt);
|
||||
|
||||
if(ei->CommandStatus != 0)
|
||||
{ /* an error has occurred */
|
||||
@@ -1204,46 +1190,29 @@ cciss_scatter_gather(struct pci_dev *pdev,
|
||||
CommandList_struct *cp,
|
||||
struct scsi_cmnd *cmd)
|
||||
{
|
||||
unsigned int use_sg, nsegs=0, len;
|
||||
struct scatterlist *scatter = (struct scatterlist *) cmd->request_buffer;
|
||||
unsigned int len;
|
||||
struct scatterlist *sg;
|
||||
__u64 addr64;
|
||||
int use_sg, i;
|
||||
|
||||
/* is it just one virtual address? */
|
||||
if (!cmd->use_sg) {
|
||||
if (cmd->request_bufflen) { /* anything to xfer? */
|
||||
BUG_ON(scsi_sg_count(cmd) > MAXSGENTRIES);
|
||||
|
||||
addr64 = (__u64) pci_map_single(pdev,
|
||||
cmd->request_buffer,
|
||||
cmd->request_bufflen,
|
||||
cmd->sc_data_direction);
|
||||
|
||||
cp->SG[0].Addr.lower =
|
||||
(__u32) (addr64 & (__u64) 0x00000000FFFFFFFF);
|
||||
cp->SG[0].Addr.upper =
|
||||
(__u32) ((addr64 >> 32) & (__u64) 0x00000000FFFFFFFF);
|
||||
cp->SG[0].Len = cmd->request_bufflen;
|
||||
nsegs=1;
|
||||
use_sg = scsi_dma_map(cmd);
|
||||
if (use_sg) { /* not too many addrs? */
|
||||
scsi_for_each_sg(cmd, sg, use_sg, i) {
|
||||
addr64 = (__u64) sg_dma_address(sg);
|
||||
len = sg_dma_len(sg);
|
||||
cp->SG[i].Addr.lower =
|
||||
(__u32) (addr64 & (__u64) 0x00000000FFFFFFFF);
|
||||
cp->SG[i].Addr.upper =
|
||||
(__u32) ((addr64 >> 32) & (__u64) 0x00000000FFFFFFFF);
|
||||
cp->SG[i].Len = len;
|
||||
cp->SG[i].Ext = 0; // we are not chaining
|
||||
}
|
||||
} /* else, must be a list of virtual addresses.... */
|
||||
else if (cmd->use_sg <= MAXSGENTRIES) { /* not too many addrs? */
|
||||
}
|
||||
|
||||
use_sg = pci_map_sg(pdev, cmd->request_buffer, cmd->use_sg,
|
||||
cmd->sc_data_direction);
|
||||
|
||||
for (nsegs=0; nsegs < use_sg; nsegs++) {
|
||||
addr64 = (__u64) sg_dma_address(&scatter[nsegs]);
|
||||
len = sg_dma_len(&scatter[nsegs]);
|
||||
cp->SG[nsegs].Addr.lower =
|
||||
(__u32) (addr64 & (__u64) 0x00000000FFFFFFFF);
|
||||
cp->SG[nsegs].Addr.upper =
|
||||
(__u32) ((addr64 >> 32) & (__u64) 0x00000000FFFFFFFF);
|
||||
cp->SG[nsegs].Len = len;
|
||||
cp->SG[nsegs].Ext = 0; // we are not chaining
|
||||
}
|
||||
} else BUG();
|
||||
|
||||
cp->Header.SGList = (__u8) nsegs; /* no. SGs contig in this cmd */
|
||||
cp->Header.SGTotal = (__u16) nsegs; /* total sgs in this cmd list */
|
||||
cp->Header.SGList = (__u8) use_sg; /* no. SGs contig in this cmd */
|
||||
cp->Header.SGTotal = (__u16) use_sg; /* total sgs in this cmd list */
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1509,69 +1509,6 @@ static void sbp2_prep_command_orb_sg(struct sbp2_command_orb *orb,
|
||||
}
|
||||
}
|
||||
|
||||
static void sbp2_prep_command_orb_no_sg(struct sbp2_command_orb *orb,
|
||||
struct sbp2_fwhost_info *hi,
|
||||
struct sbp2_command_info *cmd,
|
||||
struct scatterlist *sgpnt,
|
||||
u32 orb_direction,
|
||||
unsigned int scsi_request_bufflen,
|
||||
void *scsi_request_buffer,
|
||||
enum dma_data_direction dma_dir)
|
||||
{
|
||||
cmd->dma_dir = dma_dir;
|
||||
cmd->dma_size = scsi_request_bufflen;
|
||||
cmd->dma_type = CMD_DMA_SINGLE;
|
||||
cmd->cmd_dma = dma_map_single(hi->host->device.parent,
|
||||
scsi_request_buffer,
|
||||
cmd->dma_size, cmd->dma_dir);
|
||||
orb->data_descriptor_hi = ORB_SET_NODE_ID(hi->host->node_id);
|
||||
orb->misc |= ORB_SET_DIRECTION(orb_direction);
|
||||
|
||||
/* handle case where we get a command w/o s/g enabled
|
||||
* (but check for transfers larger than 64K) */
|
||||
if (scsi_request_bufflen <= SBP2_MAX_SG_ELEMENT_LENGTH) {
|
||||
|
||||
orb->data_descriptor_lo = cmd->cmd_dma;
|
||||
orb->misc |= ORB_SET_DATA_SIZE(scsi_request_bufflen);
|
||||
|
||||
} else {
|
||||
/* The buffer is too large. Turn this into page tables. */
|
||||
|
||||
struct sbp2_unrestricted_page_table *sg_element =
|
||||
&cmd->scatter_gather_element[0];
|
||||
u32 sg_count, sg_len;
|
||||
dma_addr_t sg_addr;
|
||||
|
||||
orb->data_descriptor_lo = cmd->sge_dma;
|
||||
orb->misc |= ORB_SET_PAGE_TABLE_PRESENT(0x1);
|
||||
|
||||
/* fill out our SBP-2 page tables; split up the large buffer */
|
||||
sg_count = 0;
|
||||
sg_len = scsi_request_bufflen;
|
||||
sg_addr = cmd->cmd_dma;
|
||||
while (sg_len) {
|
||||
sg_element[sg_count].segment_base_lo = sg_addr;
|
||||
if (sg_len > SBP2_MAX_SG_ELEMENT_LENGTH) {
|
||||
sg_element[sg_count].length_segment_base_hi =
|
||||
PAGE_TABLE_SET_SEGMENT_LENGTH(SBP2_MAX_SG_ELEMENT_LENGTH);
|
||||
sg_addr += SBP2_MAX_SG_ELEMENT_LENGTH;
|
||||
sg_len -= SBP2_MAX_SG_ELEMENT_LENGTH;
|
||||
} else {
|
||||
sg_element[sg_count].length_segment_base_hi =
|
||||
PAGE_TABLE_SET_SEGMENT_LENGTH(sg_len);
|
||||
sg_len = 0;
|
||||
}
|
||||
sg_count++;
|
||||
}
|
||||
|
||||
orb->misc |= ORB_SET_DATA_SIZE(sg_count);
|
||||
|
||||
sbp2util_cpu_to_be32_buffer(sg_element,
|
||||
(sizeof(struct sbp2_unrestricted_page_table)) *
|
||||
sg_count);
|
||||
}
|
||||
}
|
||||
|
||||
static void sbp2_create_command_orb(struct sbp2_lu *lu,
|
||||
struct sbp2_command_info *cmd,
|
||||
unchar *scsi_cmd,
|
||||
@@ -1615,13 +1552,9 @@ static void sbp2_create_command_orb(struct sbp2_lu *lu,
|
||||
orb->data_descriptor_hi = 0x0;
|
||||
orb->data_descriptor_lo = 0x0;
|
||||
orb->misc |= ORB_SET_DIRECTION(1);
|
||||
} else if (scsi_use_sg)
|
||||
} else
|
||||
sbp2_prep_command_orb_sg(orb, hi, cmd, scsi_use_sg, sgpnt,
|
||||
orb_direction, dma_dir);
|
||||
else
|
||||
sbp2_prep_command_orb_no_sg(orb, hi, cmd, sgpnt, orb_direction,
|
||||
scsi_request_bufflen,
|
||||
scsi_request_buffer, dma_dir);
|
||||
|
||||
sbp2util_cpu_to_be32_buffer(orb, sizeof(*orb));
|
||||
|
||||
@@ -1710,15 +1643,15 @@ static int sbp2_send_command(struct sbp2_lu *lu, struct scsi_cmnd *SCpnt,
|
||||
void (*done)(struct scsi_cmnd *))
|
||||
{
|
||||
unchar *scsi_cmd = (unchar *)SCpnt->cmnd;
|
||||
unsigned int request_bufflen = SCpnt->request_bufflen;
|
||||
unsigned int request_bufflen = scsi_bufflen(SCpnt);
|
||||
struct sbp2_command_info *cmd;
|
||||
|
||||
cmd = sbp2util_allocate_command_orb(lu, SCpnt, done);
|
||||
if (!cmd)
|
||||
return -EIO;
|
||||
|
||||
sbp2_create_command_orb(lu, cmd, scsi_cmd, SCpnt->use_sg,
|
||||
request_bufflen, SCpnt->request_buffer,
|
||||
sbp2_create_command_orb(lu, cmd, scsi_cmd, scsi_sg_count(SCpnt),
|
||||
request_bufflen, scsi_sglist(SCpnt),
|
||||
SCpnt->sc_data_direction);
|
||||
sbp2_link_orb_command(lu, cmd);
|
||||
|
||||
|
||||
@@ -134,19 +134,9 @@ iscsi_iser_cmd_init(struct iscsi_cmd_task *ctask)
|
||||
{
|
||||
struct iscsi_iser_conn *iser_conn = ctask->conn->dd_data;
|
||||
struct iscsi_iser_cmd_task *iser_ctask = ctask->dd_data;
|
||||
struct scsi_cmnd *sc = ctask->sc;
|
||||
|
||||
iser_ctask->command_sent = 0;
|
||||
iser_ctask->iser_conn = iser_conn;
|
||||
|
||||
if (sc->sc_data_direction == DMA_TO_DEVICE) {
|
||||
BUG_ON(ctask->total_length == 0);
|
||||
|
||||
debug_scsi("cmd [itt %x total %d imm %d unsol_data %d\n",
|
||||
ctask->itt, ctask->total_length, ctask->imm_count,
|
||||
ctask->unsol_count);
|
||||
}
|
||||
|
||||
iser_ctask_rdma_init(iser_ctask);
|
||||
}
|
||||
|
||||
@@ -219,6 +209,14 @@ iscsi_iser_ctask_xmit(struct iscsi_conn *conn,
|
||||
struct iscsi_iser_cmd_task *iser_ctask = ctask->dd_data;
|
||||
int error = 0;
|
||||
|
||||
if (ctask->sc->sc_data_direction == DMA_TO_DEVICE) {
|
||||
BUG_ON(scsi_bufflen(ctask->sc) == 0);
|
||||
|
||||
debug_scsi("cmd [itt %x total %d imm %d unsol_data %d\n",
|
||||
ctask->itt, scsi_bufflen(ctask->sc),
|
||||
ctask->imm_count, ctask->unsol_count);
|
||||
}
|
||||
|
||||
debug_scsi("ctask deq [cid %d itt 0x%x]\n",
|
||||
conn->id, ctask->itt);
|
||||
|
||||
@@ -375,7 +373,8 @@ static struct iscsi_transport iscsi_iser_transport;
|
||||
static struct iscsi_cls_session *
|
||||
iscsi_iser_session_create(struct iscsi_transport *iscsit,
|
||||
struct scsi_transport_template *scsit,
|
||||
uint32_t initial_cmdsn, uint32_t *hostno)
|
||||
uint16_t cmds_max, uint16_t qdepth,
|
||||
uint32_t initial_cmdsn, uint32_t *hostno)
|
||||
{
|
||||
struct iscsi_cls_session *cls_session;
|
||||
struct iscsi_session *session;
|
||||
@@ -386,7 +385,13 @@ iscsi_iser_session_create(struct iscsi_transport *iscsit,
|
||||
struct iscsi_iser_cmd_task *iser_ctask;
|
||||
struct iser_desc *desc;
|
||||
|
||||
/*
|
||||
* we do not support setting can_queue cmd_per_lun from userspace yet
|
||||
* because we preallocate so many resources
|
||||
*/
|
||||
cls_session = iscsi_session_setup(iscsit, scsit,
|
||||
ISCSI_DEF_XMIT_CMDS_MAX,
|
||||
ISCSI_MAX_CMD_PER_LUN,
|
||||
sizeof(struct iscsi_iser_cmd_task),
|
||||
sizeof(struct iser_desc),
|
||||
initial_cmdsn, &hn);
|
||||
@@ -545,7 +550,7 @@ iscsi_iser_ep_disconnect(__u64 ep_handle)
|
||||
static struct scsi_host_template iscsi_iser_sht = {
|
||||
.name = "iSCSI Initiator over iSER, v." DRV_VER,
|
||||
.queuecommand = iscsi_queuecommand,
|
||||
.can_queue = ISCSI_XMIT_CMDS_MAX - 1,
|
||||
.can_queue = ISCSI_DEF_XMIT_CMDS_MAX - 1,
|
||||
.sg_tablesize = ISCSI_ISER_SG_TABLESIZE,
|
||||
.max_sectors = 1024,
|
||||
.cmd_per_lun = ISCSI_MAX_CMD_PER_LUN,
|
||||
@@ -574,8 +579,12 @@ static struct iscsi_transport iscsi_iser_transport = {
|
||||
ISCSI_EXP_STATSN |
|
||||
ISCSI_PERSISTENT_PORT |
|
||||
ISCSI_PERSISTENT_ADDRESS |
|
||||
ISCSI_TARGET_NAME |
|
||||
ISCSI_TPGT,
|
||||
ISCSI_TARGET_NAME | ISCSI_TPGT |
|
||||
ISCSI_USERNAME | ISCSI_PASSWORD |
|
||||
ISCSI_USERNAME_IN | ISCSI_PASSWORD_IN,
|
||||
.host_param_mask = ISCSI_HOST_HWADDRESS |
|
||||
ISCSI_HOST_NETDEV_NAME |
|
||||
ISCSI_HOST_INITIATOR_NAME,
|
||||
.host_template = &iscsi_iser_sht,
|
||||
.conndata_size = sizeof(struct iscsi_conn),
|
||||
.max_lun = ISCSI_ISER_MAX_LUN,
|
||||
@@ -592,6 +601,9 @@ static struct iscsi_transport iscsi_iser_transport = {
|
||||
.get_session_param = iscsi_session_get_param,
|
||||
.start_conn = iscsi_iser_conn_start,
|
||||
.stop_conn = iscsi_conn_stop,
|
||||
/* iscsi host params */
|
||||
.get_host_param = iscsi_host_get_param,
|
||||
.set_host_param = iscsi_host_set_param,
|
||||
/* IO */
|
||||
.send_pdu = iscsi_conn_send_pdu,
|
||||
.get_stats = iscsi_iser_conn_get_stats,
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
#define ISER_MAX_TX_MISC_PDUS 6 /* NOOP_OUT(2), TEXT(1), *
|
||||
* SCSI_TMFUNC(2), LOGOUT(1) */
|
||||
|
||||
#define ISER_QP_MAX_RECV_DTOS (ISCSI_XMIT_CMDS_MAX + \
|
||||
#define ISER_QP_MAX_RECV_DTOS (ISCSI_DEF_XMIT_CMDS_MAX + \
|
||||
ISER_MAX_RX_MISC_PDUS + \
|
||||
ISER_MAX_TX_MISC_PDUS)
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
#define ISER_INFLIGHT_DATAOUTS 8
|
||||
|
||||
#define ISER_QP_MAX_REQ_DTOS (ISCSI_XMIT_CMDS_MAX * \
|
||||
#define ISER_QP_MAX_REQ_DTOS (ISCSI_DEF_XMIT_CMDS_MAX * \
|
||||
(1 + ISER_INFLIGHT_DATAOUTS) + \
|
||||
ISER_MAX_TX_MISC_PDUS + \
|
||||
ISER_MAX_RX_MISC_PDUS)
|
||||
|
||||
@@ -351,18 +351,12 @@ int iser_send_command(struct iscsi_conn *conn,
|
||||
else
|
||||
data_buf = &iser_ctask->data[ISER_DIR_OUT];
|
||||
|
||||
if (sc->use_sg) { /* using a scatter list */
|
||||
data_buf->buf = sc->request_buffer;
|
||||
data_buf->size = sc->use_sg;
|
||||
} else if (sc->request_bufflen) {
|
||||
/* using a single buffer - convert it into one entry SG */
|
||||
sg_init_one(&data_buf->sg_single,
|
||||
sc->request_buffer, sc->request_bufflen);
|
||||
data_buf->buf = &data_buf->sg_single;
|
||||
data_buf->size = 1;
|
||||
if (scsi_sg_count(sc)) { /* using a scatter list */
|
||||
data_buf->buf = scsi_sglist(sc);
|
||||
data_buf->size = scsi_sg_count(sc);
|
||||
}
|
||||
|
||||
data_buf->data_len = sc->request_bufflen;
|
||||
data_buf->data_len = scsi_bufflen(sc);
|
||||
|
||||
if (hdr->flags & ISCSI_FLAG_CMD_READ) {
|
||||
err = iser_prepare_read_cmd(ctask, edtl);
|
||||
|
||||
@@ -155,8 +155,8 @@ static int iser_create_ib_conn_res(struct iser_conn *ib_conn)
|
||||
params.max_pages_per_fmr = ISCSI_ISER_SG_TABLESIZE + 1;
|
||||
/* make the pool size twice the max number of SCSI commands *
|
||||
* the ML is expected to queue, watermark for unmap at 50% */
|
||||
params.pool_size = ISCSI_XMIT_CMDS_MAX * 2;
|
||||
params.dirty_watermark = ISCSI_XMIT_CMDS_MAX;
|
||||
params.pool_size = ISCSI_DEF_XMIT_CMDS_MAX * 2;
|
||||
params.dirty_watermark = ISCSI_DEF_XMIT_CMDS_MAX;
|
||||
params.cache = 0;
|
||||
params.flush_function = NULL;
|
||||
params.access = (IB_ACCESS_LOCAL_WRITE |
|
||||
|
||||
@@ -455,10 +455,7 @@ static void srp_unmap_data(struct scsi_cmnd *scmnd,
|
||||
struct srp_target_port *target,
|
||||
struct srp_request *req)
|
||||
{
|
||||
struct scatterlist *scat;
|
||||
int nents;
|
||||
|
||||
if (!scmnd->request_buffer ||
|
||||
if (!scsi_sglist(scmnd) ||
|
||||
(scmnd->sc_data_direction != DMA_TO_DEVICE &&
|
||||
scmnd->sc_data_direction != DMA_FROM_DEVICE))
|
||||
return;
|
||||
@@ -468,20 +465,8 @@ static void srp_unmap_data(struct scsi_cmnd *scmnd,
|
||||
req->fmr = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* This handling of non-SG commands can be killed when the
|
||||
* SCSI midlayer no longer generates non-SG commands.
|
||||
*/
|
||||
if (likely(scmnd->use_sg)) {
|
||||
nents = scmnd->use_sg;
|
||||
scat = scmnd->request_buffer;
|
||||
} else {
|
||||
nents = 1;
|
||||
scat = &req->fake_sg;
|
||||
}
|
||||
|
||||
ib_dma_unmap_sg(target->srp_host->dev->dev, scat, nents,
|
||||
scmnd->sc_data_direction);
|
||||
ib_dma_unmap_sg(target->srp_host->dev->dev, scsi_sglist(scmnd),
|
||||
scsi_sg_count(scmnd), scmnd->sc_data_direction);
|
||||
}
|
||||
|
||||
static void srp_remove_req(struct srp_target_port *target, struct srp_request *req)
|
||||
@@ -595,6 +580,7 @@ static int srp_map_fmr(struct srp_target_port *target, struct scatterlist *scat,
|
||||
int ret;
|
||||
struct srp_device *dev = target->srp_host->dev;
|
||||
struct ib_device *ibdev = dev->dev;
|
||||
struct scatterlist *sg;
|
||||
|
||||
if (!dev->fmr_pool)
|
||||
return -ENODEV;
|
||||
@@ -604,16 +590,16 @@ static int srp_map_fmr(struct srp_target_port *target, struct scatterlist *scat,
|
||||
return -EINVAL;
|
||||
|
||||
len = page_cnt = 0;
|
||||
for (i = 0; i < sg_cnt; ++i) {
|
||||
unsigned int dma_len = ib_sg_dma_len(ibdev, &scat[i]);
|
||||
scsi_for_each_sg(req->scmnd, sg, sg_cnt, i) {
|
||||
unsigned int dma_len = ib_sg_dma_len(ibdev, sg);
|
||||
|
||||
if (ib_sg_dma_address(ibdev, &scat[i]) & ~dev->fmr_page_mask) {
|
||||
if (ib_sg_dma_address(ibdev, sg) & ~dev->fmr_page_mask) {
|
||||
if (i > 0)
|
||||
return -EINVAL;
|
||||
else
|
||||
++page_cnt;
|
||||
}
|
||||
if ((ib_sg_dma_address(ibdev, &scat[i]) + dma_len) &
|
||||
if ((ib_sg_dma_address(ibdev, sg) + dma_len) &
|
||||
~dev->fmr_page_mask) {
|
||||
if (i < sg_cnt - 1)
|
||||
return -EINVAL;
|
||||
@@ -633,12 +619,12 @@ static int srp_map_fmr(struct srp_target_port *target, struct scatterlist *scat,
|
||||
return -ENOMEM;
|
||||
|
||||
page_cnt = 0;
|
||||
for (i = 0; i < sg_cnt; ++i) {
|
||||
unsigned int dma_len = ib_sg_dma_len(ibdev, &scat[i]);
|
||||
scsi_for_each_sg(req->scmnd, sg, sg_cnt, i) {
|
||||
unsigned int dma_len = ib_sg_dma_len(ibdev, sg);
|
||||
|
||||
for (j = 0; j < dma_len; j += dev->fmr_page_size)
|
||||
dma_pages[page_cnt++] =
|
||||
(ib_sg_dma_address(ibdev, &scat[i]) &
|
||||
(ib_sg_dma_address(ibdev, sg) &
|
||||
dev->fmr_page_mask) + j;
|
||||
}
|
||||
|
||||
@@ -673,7 +659,7 @@ static int srp_map_data(struct scsi_cmnd *scmnd, struct srp_target_port *target,
|
||||
struct srp_device *dev;
|
||||
struct ib_device *ibdev;
|
||||
|
||||
if (!scmnd->request_buffer || scmnd->sc_data_direction == DMA_NONE)
|
||||
if (!scsi_sglist(scmnd) || scmnd->sc_data_direction == DMA_NONE)
|
||||
return sizeof (struct srp_cmd);
|
||||
|
||||
if (scmnd->sc_data_direction != DMA_FROM_DEVICE &&
|
||||
@@ -683,18 +669,8 @@ static int srp_map_data(struct scsi_cmnd *scmnd, struct srp_target_port *target,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* This handling of non-SG commands can be killed when the
|
||||
* SCSI midlayer no longer generates non-SG commands.
|
||||
*/
|
||||
if (likely(scmnd->use_sg)) {
|
||||
nents = scmnd->use_sg;
|
||||
scat = scmnd->request_buffer;
|
||||
} else {
|
||||
nents = 1;
|
||||
scat = &req->fake_sg;
|
||||
sg_init_one(scat, scmnd->request_buffer, scmnd->request_bufflen);
|
||||
}
|
||||
nents = scsi_sg_count(scmnd);
|
||||
scat = scsi_sglist(scmnd);
|
||||
|
||||
dev = target->srp_host->dev;
|
||||
ibdev = dev->dev;
|
||||
@@ -724,6 +700,7 @@ static int srp_map_data(struct scsi_cmnd *scmnd, struct srp_target_port *target,
|
||||
* descriptor.
|
||||
*/
|
||||
struct srp_indirect_buf *buf = (void *) cmd->add_data;
|
||||
struct scatterlist *sg;
|
||||
u32 datalen = 0;
|
||||
int i;
|
||||
|
||||
@@ -732,11 +709,11 @@ static int srp_map_data(struct scsi_cmnd *scmnd, struct srp_target_port *target,
|
||||
sizeof (struct srp_indirect_buf) +
|
||||
count * sizeof (struct srp_direct_buf);
|
||||
|
||||
for (i = 0; i < count; ++i) {
|
||||
unsigned int dma_len = ib_sg_dma_len(ibdev, &scat[i]);
|
||||
scsi_for_each_sg(scmnd, sg, count, i) {
|
||||
unsigned int dma_len = ib_sg_dma_len(ibdev, sg);
|
||||
|
||||
buf->desc_list[i].va =
|
||||
cpu_to_be64(ib_sg_dma_address(ibdev, &scat[i]));
|
||||
cpu_to_be64(ib_sg_dma_address(ibdev, sg));
|
||||
buf->desc_list[i].key =
|
||||
cpu_to_be32(dev->mr->rkey);
|
||||
buf->desc_list[i].len = cpu_to_be32(dma_len);
|
||||
@@ -802,9 +779,9 @@ static void srp_process_rsp(struct srp_target_port *target, struct srp_rsp *rsp)
|
||||
}
|
||||
|
||||
if (rsp->flags & (SRP_RSP_FLAG_DOOVER | SRP_RSP_FLAG_DOUNDER))
|
||||
scmnd->resid = be32_to_cpu(rsp->data_out_res_cnt);
|
||||
scsi_set_resid(scmnd, be32_to_cpu(rsp->data_out_res_cnt));
|
||||
else if (rsp->flags & (SRP_RSP_FLAG_DIOVER | SRP_RSP_FLAG_DIUNDER))
|
||||
scmnd->resid = be32_to_cpu(rsp->data_in_res_cnt);
|
||||
scsi_set_resid(scmnd, be32_to_cpu(rsp->data_in_res_cnt));
|
||||
|
||||
if (!req->tsk_mgmt) {
|
||||
scmnd->host_scribble = (void *) -1L;
|
||||
|
||||
@@ -106,11 +106,6 @@ struct srp_request {
|
||||
struct srp_iu *cmd;
|
||||
struct srp_iu *tsk_mgmt;
|
||||
struct ib_pool_fmr *fmr;
|
||||
/*
|
||||
* Fake scatterlist used when scmnd->use_sg==0. Can be killed
|
||||
* when the SCSI midlayer no longer generates non-SG commands.
|
||||
*/
|
||||
struct scatterlist fake_sg;
|
||||
struct completion done;
|
||||
short index;
|
||||
u8 cmd_done;
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
/* drivers/message/fusion/linux_compat.h */
|
||||
|
||||
#ifndef FUSION_LINUX_COMPAT_H
|
||||
#define FUSION_LINUX_COMPAT_H
|
||||
|
||||
#include <linux/version.h>
|
||||
#include <scsi/scsi_device.h>
|
||||
|
||||
#endif /* _LINUX_COMPAT_H */
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2006 LSI Logic Corporation.
|
||||
* Copyright (c) 2000-2007 LSI Logic Corporation.
|
||||
*
|
||||
*
|
||||
* Name: mpi.h
|
||||
* Title: MPI Message independent structures and definitions
|
||||
* Creation Date: July 27, 2000
|
||||
*
|
||||
* mpi.h Version: 01.05.12
|
||||
* mpi.h Version: 01.05.13
|
||||
*
|
||||
* Version History
|
||||
* ---------------
|
||||
@@ -78,6 +78,7 @@
|
||||
* 08-30-05 01.05.10 Added 2 new IOCStatus codes for Target.
|
||||
* 03-27-06 01.05.11 Bumped MPI_HEADER_VERSION_UNIT.
|
||||
* 10-11-06 01.05.12 Bumped MPI_HEADER_VERSION_UNIT.
|
||||
* 05-24-07 01.05.13 Bumped MPI_HEADER_VERSION_UNIT.
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@@ -108,7 +109,7 @@
|
||||
/* Note: The major versions of 0xe0 through 0xff are reserved */
|
||||
|
||||
/* versioning for this MPI header set */
|
||||
#define MPI_HEADER_VERSION_UNIT (0x0E)
|
||||
#define MPI_HEADER_VERSION_UNIT (0x10)
|
||||
#define MPI_HEADER_VERSION_DEV (0x00)
|
||||
#define MPI_HEADER_VERSION_UNIT_MASK (0xFF00)
|
||||
#define MPI_HEADER_VERSION_UNIT_SHIFT (8)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2006 LSI Logic Corporation.
|
||||
* Copyright (c) 2000-2007 LSI Logic Corporation.
|
||||
*
|
||||
*
|
||||
* Name: mpi_cnfg.h
|
||||
* Title: MPI Config message, structures, and Pages
|
||||
* Creation Date: July 27, 2000
|
||||
*
|
||||
* mpi_cnfg.h Version: 01.05.13
|
||||
* mpi_cnfg.h Version: 01.05.15
|
||||
*
|
||||
* Version History
|
||||
* ---------------
|
||||
@@ -293,6 +293,21 @@
|
||||
* Added more AccessStatus values for SAS Device Page 0.
|
||||
* Added bit for SATA Asynchronous Notification Support in
|
||||
* Flags field of SAS Device Page 0.
|
||||
* 02-28-07 01.05.14 Added ExtFlags field to Manufacturing Page 4.
|
||||
* Added Disable SMART Polling for CapabilitiesFlags of
|
||||
* IOC Page 6.
|
||||
* Added Disable SMART Polling to DeviceSettings of BIOS
|
||||
* Page 1.
|
||||
* Added Multi-Port Domain bit for DiscoveryStatus field
|
||||
* of SAS IO Unit Page.
|
||||
* Added Multi-Port Domain Illegal flag for SAS IO Unit
|
||||
* Page 1 AdditionalControlFlags field.
|
||||
* 05-24-07 01.05.15 Added Hide Physical Disks with Non-Integrated RAID
|
||||
* Metadata bit to Manufacturing Page 4 ExtFlags field.
|
||||
* Added Internal Connector to End Device Present bit to
|
||||
* Expander Page 0 Flags field.
|
||||
* Fixed define for
|
||||
* MPI_SAS_EXPANDER1_DISCINFO_BAD_PHY_DISABLED.
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@@ -639,7 +654,7 @@ typedef struct _CONFIG_PAGE_MANUFACTURING_4
|
||||
U8 InfoSize1; /* 0Bh */
|
||||
U8 InquirySize; /* 0Ch */
|
||||
U8 Flags; /* 0Dh */
|
||||
U16 Reserved2; /* 0Eh */
|
||||
U16 ExtFlags; /* 0Eh */
|
||||
U8 InquiryData[56]; /* 10h */
|
||||
U32 ISVolumeSettings; /* 48h */
|
||||
U32 IMEVolumeSettings; /* 4Ch */
|
||||
@@ -658,7 +673,7 @@ typedef struct _CONFIG_PAGE_MANUFACTURING_4
|
||||
} CONFIG_PAGE_MANUFACTURING_4, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_4,
|
||||
ManufacturingPage4_t, MPI_POINTER pManufacturingPage4_t;
|
||||
|
||||
#define MPI_MANUFACTURING4_PAGEVERSION (0x04)
|
||||
#define MPI_MANUFACTURING4_PAGEVERSION (0x05)
|
||||
|
||||
/* defines for the Flags field */
|
||||
#define MPI_MANPAGE4_FORCE_BAD_BLOCK_TABLE (0x80)
|
||||
@@ -670,6 +685,12 @@ typedef struct _CONFIG_PAGE_MANUFACTURING_4
|
||||
#define MPI_MANPAGE4_IM_RESYNC_CACHE_ENABLE (0x02)
|
||||
#define MPI_MANPAGE4_IR_NO_MIX_SAS_SATA (0x01)
|
||||
|
||||
/* defines for the ExtFlags field */
|
||||
#define MPI_MANPAGE4_EXTFLAGS_HIDE_NON_IR_METADATA (0x0008)
|
||||
#define MPI_MANPAGE4_EXTFLAGS_SAS_CACHE_DISABLE (0x0004)
|
||||
#define MPI_MANPAGE4_EXTFLAGS_SATA_CACHE_DISABLE (0x0002)
|
||||
#define MPI_MANPAGE4_EXTFLAGS_LEGACY_MODE (0x0001)
|
||||
|
||||
|
||||
#ifndef MPI_MANPAGE5_NUM_FORCEWWID
|
||||
#define MPI_MANPAGE5_NUM_FORCEWWID (1)
|
||||
@@ -781,7 +802,7 @@ typedef struct _CONFIG_PAGE_MANUFACTURING_9
|
||||
} CONFIG_PAGE_MANUFACTURING_9, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_9,
|
||||
ManufacturingPage9_t, MPI_POINTER pManufacturingPage9_t;
|
||||
|
||||
#define MPI_MANUFACTURING6_PAGEVERSION (0x00)
|
||||
#define MPI_MANUFACTURING9_PAGEVERSION (0x00)
|
||||
|
||||
|
||||
typedef struct _CONFIG_PAGE_MANUFACTURING_10
|
||||
@@ -1138,6 +1159,8 @@ typedef struct _CONFIG_PAGE_IOC_6
|
||||
|
||||
/* IOC Page 6 Capabilities Flags */
|
||||
|
||||
#define MPI_IOCPAGE6_CAP_FLAGS_DISABLE_SMART_POLLING (0x00000008)
|
||||
|
||||
#define MPI_IOCPAGE6_CAP_FLAGS_MASK_METADATA_SIZE (0x00000006)
|
||||
#define MPI_IOCPAGE6_CAP_FLAGS_64MB_METADATA_SIZE (0x00000000)
|
||||
#define MPI_IOCPAGE6_CAP_FLAGS_512MB_METADATA_SIZE (0x00000002)
|
||||
@@ -1208,6 +1231,7 @@ typedef struct _CONFIG_PAGE_BIOS_1
|
||||
#define MPI_BIOSPAGE1_IOCSET_ALTERNATE_CHS (0x00000008)
|
||||
|
||||
/* values for the DeviceSettings field */
|
||||
#define MPI_BIOSPAGE1_DEVSET_DISABLE_SMART_POLLING (0x00000010)
|
||||
#define MPI_BIOSPAGE1_DEVSET_DISABLE_SEQ_LUN (0x00000008)
|
||||
#define MPI_BIOSPAGE1_DEVSET_DISABLE_RM_LUN (0x00000004)
|
||||
#define MPI_BIOSPAGE1_DEVSET_DISABLE_NON_RM_LUN (0x00000002)
|
||||
@@ -2281,11 +2305,11 @@ typedef struct _CONFIG_PAGE_RAID_VOL_0
|
||||
typedef struct _CONFIG_PAGE_RAID_VOL_1
|
||||
{
|
||||
CONFIG_PAGE_HEADER Header; /* 00h */
|
||||
U8 VolumeID; /* 01h */
|
||||
U8 VolumeBus; /* 02h */
|
||||
U8 VolumeIOC; /* 03h */
|
||||
U8 Reserved0; /* 04h */
|
||||
U8 GUID[24]; /* 05h */
|
||||
U8 VolumeID; /* 04h */
|
||||
U8 VolumeBus; /* 05h */
|
||||
U8 VolumeIOC; /* 06h */
|
||||
U8 Reserved0; /* 07h */
|
||||
U8 GUID[24]; /* 08h */
|
||||
U8 Name[32]; /* 20h */
|
||||
U64 WWID; /* 40h */
|
||||
U32 Reserved1; /* 48h */
|
||||
@@ -2340,7 +2364,7 @@ typedef struct _RAID_PHYS_DISK0_STATUS
|
||||
} RAID_PHYS_DISK0_STATUS, MPI_POINTER PTR_RAID_PHYS_DISK0_STATUS,
|
||||
RaidPhysDiskStatus_t, MPI_POINTER pRaidPhysDiskStatus_t;
|
||||
|
||||
/* RAID Volume 2 IM Physical Disk DiskStatus flags */
|
||||
/* RAID Physical Disk PhysDiskStatus flags */
|
||||
|
||||
#define MPI_PHYSDISK0_STATUS_FLAG_OUT_OF_SYNC (0x01)
|
||||
#define MPI_PHYSDISK0_STATUS_FLAG_QUIESCED (0x02)
|
||||
@@ -2544,6 +2568,7 @@ typedef struct _CONFIG_PAGE_SAS_IO_UNIT_0
|
||||
#define MPI_SAS_IOUNIT0_DS_TABLE_LINK (0x00000400)
|
||||
#define MPI_SAS_IOUNIT0_DS_UNSUPPORTED_DEVICE (0x00000800)
|
||||
#define MPI_SAS_IOUNIT0_DS_MAX_SATA_TARGETS (0x00001000)
|
||||
#define MPI_SAS_IOUNIT0_DS_MULTI_PORT_DOMAIN (0x00002000)
|
||||
|
||||
|
||||
typedef struct _MPI_SAS_IO_UNIT1_PHY_DATA
|
||||
@@ -2607,6 +2632,7 @@ typedef struct _CONFIG_PAGE_SAS_IO_UNIT_1
|
||||
#define MPI_SAS_IOUNIT1_CONTROL_CLEAR_AFFILIATION (0x0001)
|
||||
|
||||
/* values for SAS IO Unit Page 1 AdditionalControlFlags */
|
||||
#define MPI_SAS_IOUNIT1_ACONTROL_MULTI_PORT_DOMAIN_ILLEGAL (0x0080)
|
||||
#define MPI_SAS_IOUNIT1_ACONTROL_SATA_ASYNCHROUNOUS_NOTIFICATION (0x0040)
|
||||
#define MPI_SAS_IOUNIT1_ACONTROL_HIDE_NONZERO_ATTACHED_PHY_IDENT (0x0020)
|
||||
#define MPI_SAS_IOUNIT1_ACONTROL_PORT_ENABLE_ONLY_SATA_LINK_RESET (0x0010)
|
||||
@@ -2734,6 +2760,7 @@ typedef struct _CONFIG_PAGE_SAS_EXPANDER_0
|
||||
#define MPI_SAS_EXPANDER0_DS_UNSUPPORTED_DEVICE (0x00000800)
|
||||
|
||||
/* values for SAS Expander Page 0 Flags field */
|
||||
#define MPI_SAS_EXPANDER0_FLAGS_CONNECTOR_END_DEVICE (0x04)
|
||||
#define MPI_SAS_EXPANDER0_FLAGS_ROUTE_TABLE_CONFIG (0x02)
|
||||
#define MPI_SAS_EXPANDER0_FLAGS_CONFIG_IN_PROGRESS (0x01)
|
||||
|
||||
@@ -2774,7 +2801,7 @@ typedef struct _CONFIG_PAGE_SAS_EXPANDER_1
|
||||
/* see mpi_sas.h for values for SAS Expander Page 1 AttachedDeviceInfo values */
|
||||
|
||||
/* values for SAS Expander Page 1 DiscoveryInfo field */
|
||||
#define MPI_SAS_EXPANDER1_DISCINFO_BAD_PHY DISABLED (0x04)
|
||||
#define MPI_SAS_EXPANDER1_DISCINFO_BAD_PHY_DISABLED (0x04)
|
||||
#define MPI_SAS_EXPANDER1_DISCINFO_LINK_STATUS_CHANGE (0x02)
|
||||
#define MPI_SAS_EXPANDER1_DISCINFO_NO_ROUTING_ENTRIES (0x01)
|
||||
|
||||
@@ -2895,11 +2922,11 @@ typedef struct _CONFIG_PAGE_SAS_PHY_0
|
||||
U8 AttachedPhyIdentifier; /* 16h */
|
||||
U8 Reserved2; /* 17h */
|
||||
U32 AttachedDeviceInfo; /* 18h */
|
||||
U8 ProgrammedLinkRate; /* 20h */
|
||||
U8 HwLinkRate; /* 21h */
|
||||
U8 ChangeCount; /* 22h */
|
||||
U8 Flags; /* 23h */
|
||||
U32 PhyInfo; /* 24h */
|
||||
U8 ProgrammedLinkRate; /* 1Ch */
|
||||
U8 HwLinkRate; /* 1Dh */
|
||||
U8 ChangeCount; /* 1Eh */
|
||||
U8 Flags; /* 1Fh */
|
||||
U32 PhyInfo; /* 20h */
|
||||
} CONFIG_PAGE_SAS_PHY_0, MPI_POINTER PTR_CONFIG_PAGE_SAS_PHY_0,
|
||||
SasPhyPage0_t, MPI_POINTER pSasPhyPage0_t;
|
||||
|
||||
|
||||
@@ -3,28 +3,28 @@
|
||||
MPI Header File Change History
|
||||
==============================
|
||||
|
||||
Copyright (c) 2000-2006 LSI Logic Corporation.
|
||||
Copyright (c) 2000-2007 LSI Logic Corporation.
|
||||
|
||||
---------------------------------------
|
||||
Header Set Release Version: 01.05.14
|
||||
Header Set Release Date: 10-11-06
|
||||
Header Set Release Version: 01.05.16
|
||||
Header Set Release Date: 05-24-07
|
||||
---------------------------------------
|
||||
|
||||
Filename Current version Prior version
|
||||
---------- --------------- -------------
|
||||
mpi.h 01.05.12 01.05.11
|
||||
mpi_ioc.h 01.05.12 01.05.11
|
||||
mpi_cnfg.h 01.05.13 01.05.12
|
||||
mpi_init.h 01.05.08 01.05.07
|
||||
mpi.h 01.05.13 01.05.12
|
||||
mpi_ioc.h 01.05.14 01.05.13
|
||||
mpi_cnfg.h 01.05.15 01.05.14
|
||||
mpi_init.h 01.05.09 01.05.09
|
||||
mpi_targ.h 01.05.06 01.05.06
|
||||
mpi_fc.h 01.05.01 01.05.01
|
||||
mpi_lan.h 01.05.01 01.05.01
|
||||
mpi_raid.h 01.05.02 01.05.02
|
||||
mpi_raid.h 01.05.03 01.05.03
|
||||
mpi_tool.h 01.05.03 01.05.03
|
||||
mpi_inb.h 01.05.01 01.05.01
|
||||
mpi_sas.h 01.05.04 01.05.03
|
||||
mpi_sas.h 01.05.04 01.05.04
|
||||
mpi_type.h 01.05.02 01.05.02
|
||||
mpi_history.txt 01.05.14 01.05.13
|
||||
mpi_history.txt 01.05.14 01.05.14
|
||||
|
||||
|
||||
* Date Version Description
|
||||
@@ -95,6 +95,7 @@ mpi.h
|
||||
* 08-30-05 01.05.10 Added 2 new IOCStatus codes for Target.
|
||||
* 03-27-06 01.05.11 Bumped MPI_HEADER_VERSION_UNIT.
|
||||
* 10-11-06 01.05.12 Bumped MPI_HEADER_VERSION_UNIT.
|
||||
* 05-24-07 01.05.13 Bumped MPI_HEADER_VERSION_UNIT.
|
||||
* --------------------------------------------------------------------------
|
||||
|
||||
mpi_ioc.h
|
||||
@@ -191,6 +192,13 @@ mpi_ioc.h
|
||||
* data structure.
|
||||
* Added new ImageType values for FWDownload and FWUpload
|
||||
* requests.
|
||||
* 02-28-07 01.05.13 Added MPI_EVENT_PRIMITIVE_ASYNCHRONOUS_EVENT for SAS
|
||||
* Broadcast Event Data (replacing _RESERVED2).
|
||||
* For Discovery Error Event Data DiscoveryStatus field,
|
||||
* replaced _MULTPL_PATHS with _UNSUPPORTED_DEVICE and
|
||||
* added _MULTI_PORT_DOMAIN.
|
||||
* 05-24-07 01.05.14 Added Common Boot Block type to FWDownload Request.
|
||||
* Added Common Boot Block type to FWUpload Request.
|
||||
* --------------------------------------------------------------------------
|
||||
|
||||
mpi_cnfg.h
|
||||
@@ -473,6 +481,21 @@ mpi_cnfg.h
|
||||
* Added more AccessStatus values for SAS Device Page 0.
|
||||
* Added bit for SATA Asynchronous Notification Support in
|
||||
* Flags field of SAS Device Page 0.
|
||||
* 02-28-07 01.05.14 Added ExtFlags field to Manufacturing Page 4.
|
||||
* Added Disable SMART Polling for CapabilitiesFlags of
|
||||
* IOC Page 6.
|
||||
* Added Disable SMART Polling to DeviceSettings of BIOS
|
||||
* Page 1.
|
||||
* Added Multi-Port Domain bit for DiscoveryStatus field
|
||||
* of SAS IO Unit Page.
|
||||
* Added Multi-Port Domain Illegal flag for SAS IO Unit
|
||||
* Page 1 AdditionalControlFlags field.
|
||||
* 05-24-07 01.05.15 Added Hide Physical Disks with Non-Integrated RAID
|
||||
* Metadata bit to Manufacturing Page 4 ExtFlags field.
|
||||
* Added Internal Connector to End Device Present bit to
|
||||
* Expander Page 0 Flags field.
|
||||
* Fixed define for
|
||||
* MPI_SAS_EXPANDER1_DISCINFO_BAD_PHY_DISABLED.
|
||||
* --------------------------------------------------------------------------
|
||||
|
||||
mpi_init.h
|
||||
@@ -517,6 +540,8 @@ mpi_init.h
|
||||
* unique in the first 32 characters.
|
||||
* 03-27-06 01.05.07 Added Task Management type of Clear ACA.
|
||||
* 10-11-06 01.05.08 Shortened define for Task Management type of Clear ACA.
|
||||
* 02-28-07 01.05.09 Defined two new MsgFlags bits for SCSI Task Management
|
||||
* Request: Do Not Send Task IU and Soft Reset Option.
|
||||
* --------------------------------------------------------------------------
|
||||
|
||||
mpi_targ.h
|
||||
@@ -571,7 +596,7 @@ mpi_fc.h
|
||||
* 11-02-00 01.01.01 Original release for post 1.0 work
|
||||
* 12-04-00 01.01.02 Added messages for Common Transport Send and
|
||||
* Primitive Send.
|
||||
* 01-09-01 01.01.03 Modified some of the new flags to have an MPI prefix
|
||||
* 01-09-01 01.01.03 Modifed some of the new flags to have an MPI prefix
|
||||
* and modified the FcPrimitiveSend flags.
|
||||
* 01-25-01 01.01.04 Move InitiatorIndex in LinkServiceRsp reply to a larger
|
||||
* field.
|
||||
@@ -634,6 +659,8 @@ mpi_raid.h
|
||||
* 08-19-04 01.05.01 Original release for MPI v1.5.
|
||||
* 01-15-05 01.05.02 Added defines for the two new RAID Actions for
|
||||
* _SET_RESYNC_RATE and _SET_DATA_SCRUB_RATE.
|
||||
* 02-28-07 01.05.03 Added new RAID Action, Device FW Update Mode, and
|
||||
* associated defines.
|
||||
* --------------------------------------------------------------------------
|
||||
|
||||
mpi_tool.h
|
||||
@@ -682,7 +709,22 @@ mpi_type.h
|
||||
|
||||
mpi_history.txt Parts list history
|
||||
|
||||
Filename 01.05.13 01.05.13 01.05.12 01.05.11 01.05.10 01.05.09
|
||||
Filename 01.05.15 01.05.15
|
||||
---------- -------- --------
|
||||
mpi.h 01.05.12 01.05.13
|
||||
mpi_ioc.h 01.05.13 01.05.14
|
||||
mpi_cnfg.h 01.05.14 01.05.15
|
||||
mpi_init.h 01.05.09 01.05.09
|
||||
mpi_targ.h 01.05.06 01.05.06
|
||||
mpi_fc.h 01.05.01 01.05.01
|
||||
mpi_lan.h 01.05.01 01.05.01
|
||||
mpi_raid.h 01.05.03 01.05.03
|
||||
mpi_tool.h 01.05.03 01.05.03
|
||||
mpi_inb.h 01.05.01 01.05.01
|
||||
mpi_sas.h 01.05.04 01.05.04
|
||||
mpi_type.h 01.05.02 01.05.02
|
||||
|
||||
Filename 01.05.14 01.05.13 01.05.12 01.05.11 01.05.10 01.05.09
|
||||
---------- -------- -------- -------- -------- -------- --------
|
||||
mpi.h 01.05.12 01.05.11 01.05.10 01.05.09 01.05.08 01.05.07
|
||||
mpi_ioc.h 01.05.12 01.05.11 01.05.10 01.05.09 01.05.09 01.05.08
|
||||
|
||||
@@ -1,221 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2004 LSI Logic Corporation.
|
||||
*
|
||||
*
|
||||
* Name: mpi_inb.h
|
||||
* Title: MPI Inband structures and definitions
|
||||
* Creation Date: September 30, 2003
|
||||
*
|
||||
* mpi_inb.h Version: 01.05.01
|
||||
*
|
||||
* Version History
|
||||
* ---------------
|
||||
*
|
||||
* Date Version Description
|
||||
* -------- -------- ------------------------------------------------------
|
||||
* 05-11-04 01.03.01 Original release.
|
||||
* 08-19-04 01.05.01 Original release for MPI v1.5.
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef MPI_INB_H
|
||||
#define MPI_INB_H
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* I n b a n d M e s s a g e s
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
/* Inband Buffer Post Request */
|
||||
/****************************************************************************/
|
||||
|
||||
typedef struct _MSG_INBAND_BUFFER_POST_REQUEST
|
||||
{
|
||||
U8 Reserved1; /* 00h */
|
||||
U8 BufferCount; /* 01h */
|
||||
U8 ChainOffset; /* 02h */
|
||||
U8 Function; /* 03h */
|
||||
U16 Reserved2; /* 04h */
|
||||
U8 Reserved3; /* 06h */
|
||||
U8 MsgFlags; /* 07h */
|
||||
U32 MsgContext; /* 08h */
|
||||
U32 Reserved4; /* 0Ch */
|
||||
SGE_TRANS_SIMPLE_UNION SGL; /* 10h */
|
||||
} MSG_INBAND_BUFFER_POST_REQUEST, MPI_POINTER PTR_MSG_INBAND_BUFFER_POST_REQUEST,
|
||||
MpiInbandBufferPostRequest_t , MPI_POINTER pMpiInbandBufferPostRequest_t;
|
||||
|
||||
|
||||
typedef struct _WWN_FC_FORMAT
|
||||
{
|
||||
U64 NodeName; /* 00h */
|
||||
U64 PortName; /* 08h */
|
||||
} WWN_FC_FORMAT, MPI_POINTER PTR_WWN_FC_FORMAT,
|
||||
WwnFcFormat_t, MPI_POINTER pWwnFcFormat_t;
|
||||
|
||||
typedef struct _WWN_SAS_FORMAT
|
||||
{
|
||||
U64 WorldWideID; /* 00h */
|
||||
U32 Reserved1; /* 08h */
|
||||
U32 Reserved2; /* 0Ch */
|
||||
} WWN_SAS_FORMAT, MPI_POINTER PTR_WWN_SAS_FORMAT,
|
||||
WwnSasFormat_t, MPI_POINTER pWwnSasFormat_t;
|
||||
|
||||
typedef union _WWN_INBAND_FORMAT
|
||||
{
|
||||
WWN_FC_FORMAT Fc;
|
||||
WWN_SAS_FORMAT Sas;
|
||||
} WWN_INBAND_FORMAT, MPI_POINTER PTR_WWN_INBAND_FORMAT,
|
||||
WwnInbandFormat, MPI_POINTER pWwnInbandFormat;
|
||||
|
||||
|
||||
/* Inband Buffer Post reply message */
|
||||
|
||||
typedef struct _MSG_INBAND_BUFFER_POST_REPLY
|
||||
{
|
||||
U16 Reserved1; /* 00h */
|
||||
U8 MsgLength; /* 02h */
|
||||
U8 Function; /* 03h */
|
||||
U16 Reserved2; /* 04h */
|
||||
U8 Reserved3; /* 06h */
|
||||
U8 MsgFlags; /* 07h */
|
||||
U32 MsgContext; /* 08h */
|
||||
U16 Reserved4; /* 0Ch */
|
||||
U16 IOCStatus; /* 0Eh */
|
||||
U32 IOCLogInfo; /* 10h */
|
||||
U32 TransferLength; /* 14h */
|
||||
U32 TransactionContext; /* 18h */
|
||||
WWN_INBAND_FORMAT Wwn; /* 1Ch */
|
||||
U32 IOCIdentifier[4]; /* 2Ch */
|
||||
} MSG_INBAND_BUFFER_POST_REPLY, MPI_POINTER PTR_MSG_INBAND_BUFFER_POST_REPLY,
|
||||
MpiInbandBufferPostReply_t, MPI_POINTER pMpiInbandBufferPostReply_t;
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
/* Inband Send Request */
|
||||
/****************************************************************************/
|
||||
|
||||
typedef struct _MSG_INBAND_SEND_REQUEST
|
||||
{
|
||||
U16 Reserved1; /* 00h */
|
||||
U8 ChainOffset; /* 02h */
|
||||
U8 Function; /* 03h */
|
||||
U16 Reserved2; /* 04h */
|
||||
U8 Reserved3; /* 06h */
|
||||
U8 MsgFlags; /* 07h */
|
||||
U32 MsgContext; /* 08h */
|
||||
U32 Reserved4; /* 0Ch */
|
||||
WWN_INBAND_FORMAT Wwn; /* 10h */
|
||||
U32 Reserved5; /* 20h */
|
||||
SGE_IO_UNION SGL; /* 24h */
|
||||
} MSG_INBAND_SEND_REQUEST, MPI_POINTER PTR_MSG_INBAND_SEND_REQUEST,
|
||||
MpiInbandSendRequest_t , MPI_POINTER pMpiInbandSendRequest_t;
|
||||
|
||||
|
||||
/* Inband Send reply message */
|
||||
|
||||
typedef struct _MSG_INBAND_SEND_REPLY
|
||||
{
|
||||
U16 Reserved1; /* 00h */
|
||||
U8 MsgLength; /* 02h */
|
||||
U8 Function; /* 03h */
|
||||
U16 Reserved2; /* 04h */
|
||||
U8 Reserved3; /* 06h */
|
||||
U8 MsgFlags; /* 07h */
|
||||
U32 MsgContext; /* 08h */
|
||||
U16 Reserved4; /* 0Ch */
|
||||
U16 IOCStatus; /* 0Eh */
|
||||
U32 IOCLogInfo; /* 10h */
|
||||
U32 ResponseLength; /* 14h */
|
||||
} MSG_INBAND_SEND_REPLY, MPI_POINTER PTR_MSG_INBAND_SEND_REPLY,
|
||||
MpiInbandSendReply_t, MPI_POINTER pMpiInbandSendReply_t;
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
/* Inband Response Request */
|
||||
/****************************************************************************/
|
||||
|
||||
typedef struct _MSG_INBAND_RSP_REQUEST
|
||||
{
|
||||
U16 Reserved1; /* 00h */
|
||||
U8 ChainOffset; /* 02h */
|
||||
U8 Function; /* 03h */
|
||||
U16 Reserved2; /* 04h */
|
||||
U8 Reserved3; /* 06h */
|
||||
U8 MsgFlags; /* 07h */
|
||||
U32 MsgContext; /* 08h */
|
||||
U32 Reserved4; /* 0Ch */
|
||||
WWN_INBAND_FORMAT Wwn; /* 10h */
|
||||
U32 IOCIdentifier[4]; /* 20h */
|
||||
U32 ResponseLength; /* 30h */
|
||||
SGE_IO_UNION SGL; /* 34h */
|
||||
} MSG_INBAND_RSP_REQUEST, MPI_POINTER PTR_MSG_INBAND_RSP_REQUEST,
|
||||
MpiInbandRspRequest_t , MPI_POINTER pMpiInbandRspRequest_t;
|
||||
|
||||
|
||||
/* Inband Response reply message */
|
||||
|
||||
typedef struct _MSG_INBAND_RSP_REPLY
|
||||
{
|
||||
U16 Reserved1; /* 00h */
|
||||
U8 MsgLength; /* 02h */
|
||||
U8 Function; /* 03h */
|
||||
U16 Reserved2; /* 04h */
|
||||
U8 Reserved3; /* 06h */
|
||||
U8 MsgFlags; /* 07h */
|
||||
U32 MsgContext; /* 08h */
|
||||
U16 Reserved4; /* 0Ch */
|
||||
U16 IOCStatus; /* 0Eh */
|
||||
U32 IOCLogInfo; /* 10h */
|
||||
} MSG_INBAND_RSP_REPLY, MPI_POINTER PTR_MSG_INBAND_RSP_REPLY,
|
||||
MpiInbandRspReply_t, MPI_POINTER pMpiInbandRspReply_t;
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
/* Inband Abort Request */
|
||||
/****************************************************************************/
|
||||
|
||||
typedef struct _MSG_INBAND_ABORT_REQUEST
|
||||
{
|
||||
U8 Reserved1; /* 00h */
|
||||
U8 AbortType; /* 01h */
|
||||
U8 ChainOffset; /* 02h */
|
||||
U8 Function; /* 03h */
|
||||
U16 Reserved2; /* 04h */
|
||||
U8 Reserved3; /* 06h */
|
||||
U8 MsgFlags; /* 07h */
|
||||
U32 MsgContext; /* 08h */
|
||||
U32 Reserved4; /* 0Ch */
|
||||
U32 ContextToAbort; /* 10h */
|
||||
} MSG_INBAND_ABORT_REQUEST, MPI_POINTER PTR_MSG_INBAND_ABORT_REQUEST,
|
||||
MpiInbandAbortRequest_t , MPI_POINTER pMpiInbandAbortRequest_t;
|
||||
|
||||
#define MPI_INBAND_ABORT_TYPE_ALL_BUFFERS (0x00)
|
||||
#define MPI_INBAND_ABORT_TYPE_EXACT_BUFFER (0x01)
|
||||
#define MPI_INBAND_ABORT_TYPE_SEND_REQUEST (0x02)
|
||||
#define MPI_INBAND_ABORT_TYPE_RESPONSE_REQUEST (0x03)
|
||||
|
||||
|
||||
/* Inband Abort reply message */
|
||||
|
||||
typedef struct _MSG_INBAND_ABORT_REPLY
|
||||
{
|
||||
U8 Reserved1; /* 00h */
|
||||
U8 AbortType; /* 01h */
|
||||
U8 MsgLength; /* 02h */
|
||||
U8 Function; /* 03h */
|
||||
U16 Reserved2; /* 04h */
|
||||
U8 Reserved3; /* 06h */
|
||||
U8 MsgFlags; /* 07h */
|
||||
U32 MsgContext; /* 08h */
|
||||
U16 Reserved4; /* 0Ch */
|
||||
U16 IOCStatus; /* 0Eh */
|
||||
U32 IOCLogInfo; /* 10h */
|
||||
} MSG_INBAND_ABORT_REPLY, MPI_POINTER PTR_MSG_INBAND_ABORT_REPLY,
|
||||
MpiInbandAbortReply_t, MPI_POINTER pMpiInbandAbortReply_t;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2006 LSI Logic Corporation.
|
||||
* Copyright (c) 2000-2007 LSI Logic Corporation.
|
||||
*
|
||||
*
|
||||
* Name: mpi_init.h
|
||||
* Title: MPI initiator mode messages and structures
|
||||
* Creation Date: June 8, 2000
|
||||
*
|
||||
* mpi_init.h Version: 01.05.08
|
||||
* mpi_init.h Version: 01.05.09
|
||||
*
|
||||
* Version History
|
||||
* ---------------
|
||||
@@ -54,6 +54,8 @@
|
||||
* unique in the first 32 characters.
|
||||
* 03-27-06 01.05.07 Added Task Management type of Clear ACA.
|
||||
* 10-11-06 01.05.08 Shortened define for Task Management type of Clear ACA.
|
||||
* 02-28-07 01.05.09 Defined two new MsgFlags bits for SCSI Task Management
|
||||
* Request: Do Not Send Task IU and Soft Reset Option.
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@@ -432,10 +434,14 @@ typedef struct _MSG_SCSI_TASK_MGMT
|
||||
#define MPI_SCSITASKMGMT_TASKTYPE_CLR_ACA (0x08)
|
||||
|
||||
/* MsgFlags bits */
|
||||
#define MPI_SCSITASKMGMT_MSGFLAGS_DO_NOT_SEND_TASK_IU (0x01)
|
||||
|
||||
#define MPI_SCSITASKMGMT_MSGFLAGS_TARGET_RESET_OPTION (0x00)
|
||||
#define MPI_SCSITASKMGMT_MSGFLAGS_LIP_RESET_OPTION (0x02)
|
||||
#define MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION (0x04)
|
||||
|
||||
#define MPI_SCSITASKMGMT_MSGFLAGS_SOFT_RESET_OPTION (0x08)
|
||||
|
||||
/* SCSI Task Management Reply */
|
||||
typedef struct _MSG_SCSI_TASK_MGMT_REPLY
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2006 LSI Logic Corporation.
|
||||
* Copyright (c) 2000-2007 LSI Logic Corporation.
|
||||
*
|
||||
*
|
||||
* Name: mpi_ioc.h
|
||||
* Title: MPI IOC, Port, Event, FW Download, and FW Upload messages
|
||||
* Creation Date: August 11, 2000
|
||||
*
|
||||
* mpi_ioc.h Version: 01.05.12
|
||||
* mpi_ioc.h Version: 01.05.14
|
||||
*
|
||||
* Version History
|
||||
* ---------------
|
||||
@@ -106,6 +106,13 @@
|
||||
* data structure.
|
||||
* Added new ImageType values for FWDownload and FWUpload
|
||||
* requests.
|
||||
* 02-28-07 01.05.13 Added MPI_EVENT_PRIMITIVE_ASYNCHRONOUS_EVENT for SAS
|
||||
* Broadcast Event Data (replacing _RESERVED2).
|
||||
* For Discovery Error Event Data DiscoveryStatus field,
|
||||
* replaced _MULTPL_PATHS with _UNSUPPORTED_DEVICE and
|
||||
* added _MULTI_PORT_DOMAIN.
|
||||
* 05-24-07 01.05.14 Added Common Boot Block type to FWDownload Request.
|
||||
* Added Common Boot Block type to FWUpload Request.
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@@ -792,7 +799,7 @@ typedef struct _EVENT_DATA_SAS_BROADCAST_PRIMITIVE
|
||||
|
||||
#define MPI_EVENT_PRIMITIVE_CHANGE (0x01)
|
||||
#define MPI_EVENT_PRIMITIVE_EXPANDER (0x03)
|
||||
#define MPI_EVENT_PRIMITIVE_RESERVED2 (0x04)
|
||||
#define MPI_EVENT_PRIMITIVE_ASYNCHRONOUS_EVENT (0x04)
|
||||
#define MPI_EVENT_PRIMITIVE_RESERVED3 (0x05)
|
||||
#define MPI_EVENT_PRIMITIVE_RESERVED4 (0x06)
|
||||
#define MPI_EVENT_PRIMITIVE_CHANGE0_RESERVED (0x07)
|
||||
@@ -857,8 +864,9 @@ typedef struct _EVENT_DATA_DISCOVERY_ERROR
|
||||
#define MPI_EVENT_DSCVRY_ERR_DS_SMP_CRC_ERROR (0x00000100)
|
||||
#define MPI_EVENT_DSCVRY_ERR_DS_MULTPL_SUBTRACTIVE (0x00000200)
|
||||
#define MPI_EVENT_DSCVRY_ERR_DS_TABLE_TO_TABLE (0x00000400)
|
||||
#define MPI_EVENT_DSCVRY_ERR_DS_MULTPL_PATHS (0x00000800)
|
||||
#define MPI_EVENT_DSCVRY_ERR_DS_UNSUPPORTED_DEVICE (0x00000800)
|
||||
#define MPI_EVENT_DSCVRY_ERR_DS_MAX_SATA_TARGETS (0x00001000)
|
||||
#define MPI_EVENT_DSCVRY_ERR_DS_MULTI_PORT_DOMAIN (0x00002000)
|
||||
|
||||
/* SAS SMP Error Event data */
|
||||
|
||||
@@ -990,6 +998,7 @@ typedef struct _MSG_FW_DOWNLOAD
|
||||
#define MPI_FW_DOWNLOAD_ITYPE_CONFIG_1 (0x07)
|
||||
#define MPI_FW_DOWNLOAD_ITYPE_CONFIG_2 (0x08)
|
||||
#define MPI_FW_DOWNLOAD_ITYPE_MEGARAID (0x09)
|
||||
#define MPI_FW_DOWNLOAD_ITYPE_COMMON_BOOT_BLOCK (0x0B)
|
||||
|
||||
|
||||
typedef struct _FWDownloadTCSGE
|
||||
@@ -1038,17 +1047,18 @@ typedef struct _MSG_FW_UPLOAD
|
||||
} MSG_FW_UPLOAD, MPI_POINTER PTR_MSG_FW_UPLOAD,
|
||||
FWUpload_t, MPI_POINTER pFWUpload_t;
|
||||
|
||||
#define MPI_FW_UPLOAD_ITYPE_FW_IOC_MEM (0x00)
|
||||
#define MPI_FW_UPLOAD_ITYPE_FW_FLASH (0x01)
|
||||
#define MPI_FW_UPLOAD_ITYPE_BIOS_FLASH (0x02)
|
||||
#define MPI_FW_UPLOAD_ITYPE_NVDATA (0x03)
|
||||
#define MPI_FW_UPLOAD_ITYPE_BOOTLOADER (0x04)
|
||||
#define MPI_FW_UPLOAD_ITYPE_FW_BACKUP (0x05)
|
||||
#define MPI_FW_UPLOAD_ITYPE_MANUFACTURING (0x06)
|
||||
#define MPI_FW_UPLOAD_ITYPE_CONFIG_1 (0x07)
|
||||
#define MPI_FW_UPLOAD_ITYPE_CONFIG_2 (0x08)
|
||||
#define MPI_FW_UPLOAD_ITYPE_MEGARAID (0x09)
|
||||
#define MPI_FW_UPLOAD_ITYPE_COMPLETE (0x0A)
|
||||
#define MPI_FW_UPLOAD_ITYPE_FW_IOC_MEM (0x00)
|
||||
#define MPI_FW_UPLOAD_ITYPE_FW_FLASH (0x01)
|
||||
#define MPI_FW_UPLOAD_ITYPE_BIOS_FLASH (0x02)
|
||||
#define MPI_FW_UPLOAD_ITYPE_NVDATA (0x03)
|
||||
#define MPI_FW_UPLOAD_ITYPE_BOOTLOADER (0x04)
|
||||
#define MPI_FW_UPLOAD_ITYPE_FW_BACKUP (0x05)
|
||||
#define MPI_FW_UPLOAD_ITYPE_MANUFACTURING (0x06)
|
||||
#define MPI_FW_UPLOAD_ITYPE_CONFIG_1 (0x07)
|
||||
#define MPI_FW_UPLOAD_ITYPE_CONFIG_2 (0x08)
|
||||
#define MPI_FW_UPLOAD_ITYPE_MEGARAID (0x09)
|
||||
#define MPI_FW_UPLOAD_ITYPE_COMPLETE (0x0A)
|
||||
#define MPI_FW_UPLOAD_ITYPE_COMMON_BOOT_BLOCK (0x0B)
|
||||
|
||||
typedef struct _FWUploadTCSGE
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (c) 2001-2005 LSI Logic Corporation.
|
||||
* Copyright (c) 2001-2007 LSI Logic Corporation.
|
||||
*
|
||||
*
|
||||
* Name: mpi_raid.h
|
||||
* Title: MPI RAID message and structures
|
||||
* Creation Date: February 27, 2001
|
||||
*
|
||||
* mpi_raid.h Version: 01.05.02
|
||||
* mpi_raid.h Version: 01.05.03
|
||||
*
|
||||
* Version History
|
||||
* ---------------
|
||||
@@ -32,6 +32,8 @@
|
||||
* 08-19-04 01.05.01 Original release for MPI v1.5.
|
||||
* 01-15-05 01.05.02 Added defines for the two new RAID Actions for
|
||||
* _SET_RESYNC_RATE and _SET_DATA_SCRUB_RATE.
|
||||
* 02-28-07 01.05.03 Added new RAID Action, Device FW Update Mode, and
|
||||
* associated defines.
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@@ -90,6 +92,7 @@ typedef struct _MSG_RAID_ACTION
|
||||
#define MPI_RAID_ACTION_INACTIVATE_VOLUME (0x12)
|
||||
#define MPI_RAID_ACTION_SET_RESYNC_RATE (0x13)
|
||||
#define MPI_RAID_ACTION_SET_DATA_SCRUB_RATE (0x14)
|
||||
#define MPI_RAID_ACTION_DEVICE_FW_UPDATE_MODE (0x15)
|
||||
|
||||
/* ActionDataWord defines for use with MPI_RAID_ACTION_CREATE_VOLUME action */
|
||||
#define MPI_RAID_ACTION_ADATA_DO_NOT_SYNC (0x00000001)
|
||||
@@ -111,6 +114,10 @@ typedef struct _MSG_RAID_ACTION
|
||||
/* ActionDataWord defines for use with MPI_RAID_ACTION_SET_DATA_SCRUB_RATE action */
|
||||
#define MPI_RAID_ACTION_ADATA_DATA_SCRUB_RATE_MASK (0x000000FF)
|
||||
|
||||
/* ActionDataWord defines for use with MPI_RAID_ACTION_DEVICE_FW_UPDATE_MODE action */
|
||||
#define MPI_RAID_ACTION_ADATA_ENABLE_FW_UPDATE (0x00000001)
|
||||
#define MPI_RAID_ACTION_ADATA_MASK_FW_UPDATE_TIMEOUT (0x0000FF00)
|
||||
#define MPI_RAID_ACTION_ADATA_SHIFT_FW_UPDATE_TIMEOUT (8)
|
||||
|
||||
|
||||
/* RAID Action reply message */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* running LSI Logic Fusion MPT (Message Passing Technology) firmware.
|
||||
*
|
||||
* Copyright (c) 1999-2007 LSI Logic Corporation
|
||||
* (mailto:mpt_linux_developer@lsi.com)
|
||||
* (mailto:DL-MPTFusionLinux@lsi.com)
|
||||
*
|
||||
*/
|
||||
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
||||
@@ -64,6 +64,7 @@
|
||||
#endif
|
||||
|
||||
#include "mptbase.h"
|
||||
#include "lsi/mpi_log_fc.h"
|
||||
|
||||
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
||||
#define my_NAME "Fusion MPT base driver"
|
||||
@@ -6349,14 +6350,37 @@ ProcessEventNotification(MPT_ADAPTER *ioc, EventNotificationReply_t *pEventReply
|
||||
static void
|
||||
mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info)
|
||||
{
|
||||
static char *subcl_str[8] = {
|
||||
"FCP Initiator", "FCP Target", "LAN", "MPI Message Layer",
|
||||
"FC Link", "Context Manager", "Invalid Field Offset", "State Change Info"
|
||||
};
|
||||
u8 subcl = (log_info >> 24) & 0x7;
|
||||
char *desc = "unknown";
|
||||
|
||||
printk(MYIOC_s_INFO_FMT "LogInfo(0x%08x): SubCl={%s}\n",
|
||||
ioc->name, log_info, subcl_str[subcl]);
|
||||
switch (log_info & 0xFF000000) {
|
||||
case MPI_IOCLOGINFO_FC_INIT_BASE:
|
||||
desc = "FCP Initiator";
|
||||
break;
|
||||
case MPI_IOCLOGINFO_FC_TARGET_BASE:
|
||||
desc = "FCP Target";
|
||||
break;
|
||||
case MPI_IOCLOGINFO_FC_LAN_BASE:
|
||||
desc = "LAN";
|
||||
break;
|
||||
case MPI_IOCLOGINFO_FC_MSG_BASE:
|
||||
desc = "MPI Message Layer";
|
||||
break;
|
||||
case MPI_IOCLOGINFO_FC_LINK_BASE:
|
||||
desc = "FC Link";
|
||||
break;
|
||||
case MPI_IOCLOGINFO_FC_CTX_BASE:
|
||||
desc = "Context Manager";
|
||||
break;
|
||||
case MPI_IOCLOGINFO_FC_INVALID_FIELD_BYTE_OFFSET:
|
||||
desc = "Invalid Field Offset";
|
||||
break;
|
||||
case MPI_IOCLOGINFO_FC_STATE_CHANGE:
|
||||
desc = "State Change Info";
|
||||
break;
|
||||
}
|
||||
|
||||
printk(MYIOC_s_INFO_FMT "LogInfo(0x%08x): SubClass={%s}, Value=(0x%06x)\n",
|
||||
ioc->name, log_info, desc, (log_info & 0xFFFFFF));
|
||||
}
|
||||
|
||||
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* running LSI Logic Fusion MPT (Message Passing Technology) firmware.
|
||||
*
|
||||
* Copyright (c) 1999-2007 LSI Logic Corporation
|
||||
* (mailto:mpt_linux_developer@lsi.com)
|
||||
* (mailto:DL-MPTFusionLinux@lsi.com)
|
||||
*
|
||||
*/
|
||||
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
||||
@@ -75,8 +75,8 @@
|
||||
#define COPYRIGHT "Copyright (c) 1999-2007 " MODULEAUTHOR
|
||||
#endif
|
||||
|
||||
#define MPT_LINUX_VERSION_COMMON "3.04.04"
|
||||
#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.04"
|
||||
#define MPT_LINUX_VERSION_COMMON "3.04.05"
|
||||
#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.05"
|
||||
#define WHAT_MAGIC_STRING "@" "(" "#" ")"
|
||||
|
||||
#define show_mptmod_ver(s,ver) \
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user