2009-03-09 15:21:12 +08:00
|
|
|
/*
|
|
|
|
* This is the Fusion MPT base driver providing common API layer interface
|
|
|
|
* for access to MPT (Message Passing Technology) firmware.
|
|
|
|
*
|
|
|
|
* This code is based on drivers/scsi/mpt2sas/mpt2_base.h
|
2012-07-17 18:26:03 +08:00
|
|
|
* Copyright (C) 2007-2012 LSI Corporation
|
2009-03-09 15:21:12 +08:00
|
|
|
* (mailto:DL-MPTFusionLinux@lsi.com)
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* NO WARRANTY
|
|
|
|
* THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
|
|
* CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT
|
|
|
|
* LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
|
|
|
|
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
|
|
|
|
* solely responsible for determining the appropriateness of using and
|
|
|
|
* distributing the Program and assumes all risks associated with its
|
|
|
|
* exercise of rights under this Agreement, including but not limited to
|
|
|
|
* the risks and costs of program errors, damage to or loss of data,
|
|
|
|
* programs or equipment, and unavailability or interruption of operations.
|
|
|
|
|
|
|
|
* DISCLAIMER OF LIABILITY
|
|
|
|
* NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY
|
|
|
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND
|
|
|
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
|
|
|
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
|
|
|
* USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
|
|
|
|
* HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
|
|
|
* USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MPT2SAS_BASE_H_INCLUDED
|
|
|
|
#define MPT2SAS_BASE_H_INCLUDED
|
|
|
|
|
|
|
|
#include "mpi/mpi2_type.h"
|
|
|
|
#include "mpi/mpi2.h"
|
|
|
|
#include "mpi/mpi2_ioc.h"
|
|
|
|
#include "mpi/mpi2_cnfg.h"
|
|
|
|
#include "mpi/mpi2_init.h"
|
|
|
|
#include "mpi/mpi2_raid.h"
|
|
|
|
#include "mpi/mpi2_tool.h"
|
|
|
|
#include "mpi/mpi2_sas.h"
|
|
|
|
|
|
|
|
#include <scsi/scsi.h>
|
|
|
|
#include <scsi/scsi_cmnd.h>
|
|
|
|
#include <scsi/scsi_device.h>
|
|
|
|
#include <scsi/scsi_host.h>
|
|
|
|
#include <scsi/scsi_tcq.h>
|
|
|
|
#include <scsi/scsi_transport_sas.h>
|
|
|
|
#include <scsi/scsi_dbg.h>
|
2009-05-19 02:59:41 +08:00
|
|
|
#include <scsi/scsi_eh.h>
|
2009-03-09 15:21:12 +08:00
|
|
|
|
|
|
|
#include "mpt2sas_debug.h"
|
|
|
|
|
|
|
|
/* driver versioning info */
|
|
|
|
#define MPT2SAS_DRIVER_NAME "mpt2sas"
|
|
|
|
#define MPT2SAS_AUTHOR "LSI Corporation <DL-MPTFusionLinux@lsi.com>"
|
|
|
|
#define MPT2SAS_DESCRIPTION "LSI MPT Fusion SAS 2.0 Device Driver"
|
2012-03-20 14:40:28 +08:00
|
|
|
#define MPT2SAS_DRIVER_VERSION "13.100.00.00"
|
|
|
|
#define MPT2SAS_MAJOR_VERSION 13
|
2009-03-09 15:21:12 +08:00
|
|
|
#define MPT2SAS_MINOR_VERSION 100
|
2010-03-17 18:58:34 +08:00
|
|
|
#define MPT2SAS_BUILD_VERSION 00
|
2011-10-19 18:07:54 +08:00
|
|
|
#define MPT2SAS_RELEASE_VERSION 00
|
2009-03-09 15:21:12 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Set MPT2SAS_SG_DEPTH value based on user input.
|
|
|
|
*/
|
|
|
|
#ifdef CONFIG_SCSI_MPT2SAS_MAX_SGE
|
|
|
|
#if CONFIG_SCSI_MPT2SAS_MAX_SGE < 16
|
|
|
|
#define MPT2SAS_SG_DEPTH 16
|
|
|
|
#elif CONFIG_SCSI_MPT2SAS_MAX_SGE > 128
|
|
|
|
#define MPT2SAS_SG_DEPTH 128
|
|
|
|
#else
|
|
|
|
#define MPT2SAS_SG_DEPTH CONFIG_SCSI_MPT2SAS_MAX_SGE
|
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#define MPT2SAS_SG_DEPTH 128 /* MAX_HW_SEGMENTS */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Generic Defines
|
|
|
|
*/
|
|
|
|
#define MPT2SAS_SATA_QUEUE_DEPTH 32
|
|
|
|
#define MPT2SAS_SAS_QUEUE_DEPTH 254
|
|
|
|
#define MPT2SAS_RAID_QUEUE_DEPTH 128
|
|
|
|
|
|
|
|
#define MPT_NAME_LENGTH 32 /* generic length of strings */
|
|
|
|
#define MPT_STRING_LENGTH 64
|
|
|
|
|
2011-01-04 14:09:20 +08:00
|
|
|
#define MPT_MAX_CALLBACKS 16
|
|
|
|
|
2009-03-09 15:21:12 +08:00
|
|
|
|
|
|
|
#define CAN_SLEEP 1
|
|
|
|
#define NO_SLEEP 0
|
|
|
|
|
|
|
|
#define INTERNAL_CMDS_COUNT 10 /* reserved cmds */
|
|
|
|
|
|
|
|
#define MPI2_HIM_MASK 0xFFFFFFFF /* mask every bit*/
|
|
|
|
|
|
|
|
#define MPT2SAS_INVALID_DEVICE_HANDLE 0xFFFF
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* reset phases
|
|
|
|
*/
|
|
|
|
#define MPT2_IOC_PRE_RESET 1 /* prior to host reset */
|
|
|
|
#define MPT2_IOC_AFTER_RESET 2 /* just after host reset */
|
|
|
|
#define MPT2_IOC_DONE_RESET 3 /* links re-initialized */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* logging format
|
|
|
|
*/
|
|
|
|
#define MPT2SAS_FMT "%s: "
|
|
|
|
#define MPT2SAS_INFO_FMT KERN_INFO MPT2SAS_FMT
|
|
|
|
#define MPT2SAS_NOTE_FMT KERN_NOTICE MPT2SAS_FMT
|
|
|
|
#define MPT2SAS_WARN_FMT KERN_WARNING MPT2SAS_FMT
|
|
|
|
#define MPT2SAS_ERR_FMT KERN_ERR MPT2SAS_FMT
|
|
|
|
|
2009-04-22 05:40:48 +08:00
|
|
|
/*
|
|
|
|
* Dell HBA branding
|
|
|
|
*/
|
|
|
|
#define MPT2SAS_DELL_BRANDING_SIZE 32
|
|
|
|
|
|
|
|
#define MPT2SAS_DELL_6GBPS_SAS_HBA_BRANDING "Dell 6Gbps SAS HBA"
|
|
|
|
#define MPT2SAS_DELL_PERC_H200_ADAPTER_BRANDING "Dell PERC H200 Adapter"
|
|
|
|
#define MPT2SAS_DELL_PERC_H200_INTEGRATED_BRANDING "Dell PERC H200 Integrated"
|
|
|
|
#define MPT2SAS_DELL_PERC_H200_MODULAR_BRANDING "Dell PERC H200 Modular"
|
|
|
|
#define MPT2SAS_DELL_PERC_H200_EMBEDDED_BRANDING "Dell PERC H200 Embedded"
|
|
|
|
#define MPT2SAS_DELL_PERC_H200_BRANDING "Dell PERC H200"
|
|
|
|
#define MPT2SAS_DELL_6GBPS_SAS_BRANDING "Dell 6Gbps SAS"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Dell HBA SSDIDs
|
|
|
|
*/
|
|
|
|
#define MPT2SAS_DELL_6GBPS_SAS_HBA_SSDID 0x1F1C
|
|
|
|
#define MPT2SAS_DELL_PERC_H200_ADAPTER_SSDID 0x1F1D
|
|
|
|
#define MPT2SAS_DELL_PERC_H200_INTEGRATED_SSDID 0x1F1E
|
|
|
|
#define MPT2SAS_DELL_PERC_H200_MODULAR_SSDID 0x1F1F
|
|
|
|
#define MPT2SAS_DELL_PERC_H200_EMBEDDED_SSDID 0x1F20
|
|
|
|
#define MPT2SAS_DELL_PERC_H200_SSDID 0x1F21
|
|
|
|
#define MPT2SAS_DELL_6GBPS_SAS_SSDID 0x1F22
|
|
|
|
|
2011-01-04 14:06:37 +08:00
|
|
|
/*
|
|
|
|
* Intel HBA branding
|
|
|
|
*/
|
2011-12-01 10:22:42 +08:00
|
|
|
#define MPT2SAS_INTEL_RMS25JB080_BRANDING \
|
|
|
|
"Intel(R) Integrated RAID Module RMS25JB080"
|
|
|
|
#define MPT2SAS_INTEL_RMS25JB040_BRANDING \
|
|
|
|
"Intel(R) Integrated RAID Module RMS25JB040"
|
|
|
|
#define MPT2SAS_INTEL_RMS25KB080_BRANDING \
|
|
|
|
"Intel(R) Integrated RAID Module RMS25KB080"
|
|
|
|
#define MPT2SAS_INTEL_RMS25KB040_BRANDING \
|
|
|
|
"Intel(R) Integrated RAID Module RMS25KB040"
|
2011-01-04 14:06:37 +08:00
|
|
|
#define MPT2SAS_INTEL_RMS2LL080_BRANDING \
|
|
|
|
"Intel Integrated RAID Module RMS2LL080"
|
|
|
|
#define MPT2SAS_INTEL_RMS2LL040_BRANDING \
|
|
|
|
"Intel Integrated RAID Module RMS2LL040"
|
2011-06-14 13:27:31 +08:00
|
|
|
#define MPT2SAS_INTEL_RS25GB008_BRANDING \
|
|
|
|
"Intel(R) RAID Controller RS25GB008"
|
2012-07-17 18:26:05 +08:00
|
|
|
#define MPT2SAS_INTEL_SSD910_BRANDING \
|
|
|
|
"Intel(R) SSD 910 Series"
|
2011-01-04 14:06:37 +08:00
|
|
|
/*
|
|
|
|
* Intel HBA SSDIDs
|
|
|
|
*/
|
2011-12-01 10:22:42 +08:00
|
|
|
#define MPT2SAS_INTEL_RMS25JB080_SSDID 0x3516
|
|
|
|
#define MPT2SAS_INTEL_RMS25JB040_SSDID 0x3517
|
|
|
|
#define MPT2SAS_INTEL_RMS25KB080_SSDID 0x3518
|
|
|
|
#define MPT2SAS_INTEL_RMS25KB040_SSDID 0x3519
|
2011-01-04 14:06:37 +08:00
|
|
|
#define MPT2SAS_INTEL_RMS2LL080_SSDID 0x350E
|
|
|
|
#define MPT2SAS_INTEL_RMS2LL040_SSDID 0x350F
|
2011-06-14 13:27:31 +08:00
|
|
|
#define MPT2SAS_INTEL_RS25GB008_SSDID 0x3000
|
2012-07-17 18:26:05 +08:00
|
|
|
#define MPT2SAS_INTEL_SSD910_SSDID 0x3700
|
2011-03-15 22:34:26 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* HP HBA branding
|
|
|
|
*/
|
|
|
|
#define MPT2SAS_HP_3PAR_SSVID 0x1590
|
|
|
|
#define MPT2SAS_HP_2_4_INTERNAL_BRANDING "HP H220 Host Bus Adapter"
|
|
|
|
#define MPT2SAS_HP_2_4_EXTERNAL_BRANDING "HP H221 Host Bus Adapter"
|
|
|
|
#define MPT2SAS_HP_1_4_INTERNAL_1_4_EXTERNAL_BRANDING "HP H222 Host Bus Adapter"
|
|
|
|
#define MPT2SAS_HP_EMBEDDED_2_4_INTERNAL_BRANDING "HP H220i Host Bus Adapter"
|
|
|
|
#define MPT2SAS_HP_DAUGHTER_2_4_INTERNAL_BRANDING "HP H210i Host Bus Adapter"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* HO HBA SSDIDs
|
|
|
|
*/
|
|
|
|
#define MPT2SAS_HP_2_4_INTERNAL_SSDID 0x0041
|
|
|
|
#define MPT2SAS_HP_2_4_EXTERNAL_SSDID 0x0042
|
|
|
|
#define MPT2SAS_HP_1_4_INTERNAL_1_4_EXTERNAL_SSDID 0x0043
|
|
|
|
#define MPT2SAS_HP_EMBEDDED_2_4_INTERNAL_SSDID 0x0044
|
|
|
|
#define MPT2SAS_HP_DAUGHTER_2_4_INTERNAL_SSDID 0x0046
|
|
|
|
|
[SCSI] mpt2sas : WarpDrive New product SSS6200 support added
This patch has Support for the new solid state device product SSS6200
from LSI and relavent features w.r.t SSS6200.
The major feature added in this driver is supporting Direct-I/O to the
SSS6200 storage.There are some additional changes done to avoid exposing
the RAID member disks to the OS and hiding/exposing drives based on the
OEM Specific Flag in Manufacturing Page10 (this is required to handle
specific changes in the SSS6200 firmware).
Each and every changes are listed below.
1. Hiding IR related messages.
For SSS6200, the driver is modified not to print IR related events.
Even if the debugging is enabled the IR related messages will not be displayed.
In some places if there is a need to display a message related to IR the
string "IR" is replaced with string "DD" and the string "volume" is replaced
with "direct drive". But the function names are not changed hence there are
some places where the reference to volume can be seen if debug level is set.
2. Removed RAID transport support
In Linux the user can retrieve RAID volume information from the sysfs directory.
This support is removed for SSS6200.
3. Direct I/O support.
The driver tries to enable direct I/O when a volume is reported to the driver
by the firmware through IRCC events and the driver does this just before
reporting to the OS, hence all the OS issued I/O can go through direct path
if they can, The first validation is to see whether the manufacturing page10
flag is set to expose all drives always. If that is set, the driver will not
enable direct I/O and displays the message "DDIO" is disabled globally as
drives are exposed. The driver checks whether there is more than one volume
in the controller, if so the direct I/O will be disabled globally for all
volumes in the controller and the message displayed will be "DDIO is disabled
globally as number of drives > 1.
If retrieving number of PD is failed the driver will not enable direct I/O
and displays the message Failure in computing number of drives DDIO disabled.
If memory allocation for RAIDVolumePage0 is failed, the driver will not enable
direct I/O and displays the message Memory allocation failure for
RVPG0 DDIO disabled. If retrieving RAIDVolumePage0 is failed the driver will
not enable direct I/O and displays the message Failure in retrieving
RVPG0 DDIO disabled
If the number of PD in a volume is greater than 8, then the direct I/O will
be disabled.
If any of individual drives handle retrieval is failed then the DD-IO will
be disabled.
If the volume is not RAID0 or if the block size is not 512 then the DD-IO will
be disabled.
If the volume size is greater than 2TB then the DD-IO will be disabled.
If the driver is not able to find a valid stripe exponent using the configured
stripe size then the DD-IO will be disabled
When the DD-IO is enabled the driver will check every I/O request issued to
the storage and checks whether the request is either
READ6/WRITE6/READ10/WRITE10, if it is and if the complete I/O transfer
is within a stripe size then the I/O is redirected to
the drive directly instead of the volume.
On completion of every I/O, if the completion is failure means if the reply
is address reply with a reply frame associated with it, then the type of I/O
will be checked, if the I/O is direct then the I/O will be retried to
the volume once.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Reviewed-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-04-07 15:02:49 +08:00
|
|
|
/*
|
|
|
|
* WarpDrive Specific Log codes
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define MPT2_WARPDRIVE_LOGENTRY (0x8002)
|
|
|
|
#define MPT2_WARPDRIVE_LC_SSDT (0x41)
|
|
|
|
#define MPT2_WARPDRIVE_LC_SSDLW (0x43)
|
|
|
|
#define MPT2_WARPDRIVE_LC_SSDLF (0x44)
|
|
|
|
#define MPT2_WARPDRIVE_LC_BRMF (0x4D)
|
|
|
|
|
2009-03-09 15:21:12 +08:00
|
|
|
/*
|
|
|
|
* per target private data
|
|
|
|
*/
|
|
|
|
#define MPT_TARGET_FLAGS_RAID_COMPONENT 0x01
|
|
|
|
#define MPT_TARGET_FLAGS_VOLUME 0x02
|
|
|
|
#define MPT_TARGET_FLAGS_DELETED 0x04
|
|
|
|
|
|
|
|
/**
|
|
|
|
* struct MPT2SAS_TARGET - starget private hostdata
|
|
|
|
* @starget: starget object
|
|
|
|
* @sas_address: target sas address
|
[SCSI] mpt2sas : WarpDrive New product SSS6200 support added
This patch has Support for the new solid state device product SSS6200
from LSI and relavent features w.r.t SSS6200.
The major feature added in this driver is supporting Direct-I/O to the
SSS6200 storage.There are some additional changes done to avoid exposing
the RAID member disks to the OS and hiding/exposing drives based on the
OEM Specific Flag in Manufacturing Page10 (this is required to handle
specific changes in the SSS6200 firmware).
Each and every changes are listed below.
1. Hiding IR related messages.
For SSS6200, the driver is modified not to print IR related events.
Even if the debugging is enabled the IR related messages will not be displayed.
In some places if there is a need to display a message related to IR the
string "IR" is replaced with string "DD" and the string "volume" is replaced
with "direct drive". But the function names are not changed hence there are
some places where the reference to volume can be seen if debug level is set.
2. Removed RAID transport support
In Linux the user can retrieve RAID volume information from the sysfs directory.
This support is removed for SSS6200.
3. Direct I/O support.
The driver tries to enable direct I/O when a volume is reported to the driver
by the firmware through IRCC events and the driver does this just before
reporting to the OS, hence all the OS issued I/O can go through direct path
if they can, The first validation is to see whether the manufacturing page10
flag is set to expose all drives always. If that is set, the driver will not
enable direct I/O and displays the message "DDIO" is disabled globally as
drives are exposed. The driver checks whether there is more than one volume
in the controller, if so the direct I/O will be disabled globally for all
volumes in the controller and the message displayed will be "DDIO is disabled
globally as number of drives > 1.
If retrieving number of PD is failed the driver will not enable direct I/O
and displays the message Failure in computing number of drives DDIO disabled.
If memory allocation for RAIDVolumePage0 is failed, the driver will not enable
direct I/O and displays the message Memory allocation failure for
RVPG0 DDIO disabled. If retrieving RAIDVolumePage0 is failed the driver will
not enable direct I/O and displays the message Failure in retrieving
RVPG0 DDIO disabled
If the number of PD in a volume is greater than 8, then the direct I/O will
be disabled.
If any of individual drives handle retrieval is failed then the DD-IO will
be disabled.
If the volume is not RAID0 or if the block size is not 512 then the DD-IO will
be disabled.
If the volume size is greater than 2TB then the DD-IO will be disabled.
If the driver is not able to find a valid stripe exponent using the configured
stripe size then the DD-IO will be disabled
When the DD-IO is enabled the driver will check every I/O request issued to
the storage and checks whether the request is either
READ6/WRITE6/READ10/WRITE10, if it is and if the complete I/O transfer
is within a stripe size then the I/O is redirected to
the drive directly instead of the volume.
On completion of every I/O, if the completion is failure means if the reply
is address reply with a reply frame associated with it, then the type of I/O
will be checked, if the I/O is direct then the I/O will be retried to
the volume once.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Reviewed-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-04-07 15:02:49 +08:00
|
|
|
* @raid_device: raid_device pointer to access volume data
|
2009-03-09 15:21:12 +08:00
|
|
|
* @handle: device handle
|
|
|
|
* @num_luns: number luns
|
|
|
|
* @flags: MPT_TARGET_FLAGS_XXX flags
|
|
|
|
* @deleted: target flaged for deletion
|
|
|
|
* @tm_busy: target is busy with TM request.
|
|
|
|
*/
|
|
|
|
struct MPT2SAS_TARGET {
|
|
|
|
struct scsi_target *starget;
|
|
|
|
u64 sas_address;
|
[SCSI] mpt2sas : WarpDrive New product SSS6200 support added
This patch has Support for the new solid state device product SSS6200
from LSI and relavent features w.r.t SSS6200.
The major feature added in this driver is supporting Direct-I/O to the
SSS6200 storage.There are some additional changes done to avoid exposing
the RAID member disks to the OS and hiding/exposing drives based on the
OEM Specific Flag in Manufacturing Page10 (this is required to handle
specific changes in the SSS6200 firmware).
Each and every changes are listed below.
1. Hiding IR related messages.
For SSS6200, the driver is modified not to print IR related events.
Even if the debugging is enabled the IR related messages will not be displayed.
In some places if there is a need to display a message related to IR the
string "IR" is replaced with string "DD" and the string "volume" is replaced
with "direct drive". But the function names are not changed hence there are
some places where the reference to volume can be seen if debug level is set.
2. Removed RAID transport support
In Linux the user can retrieve RAID volume information from the sysfs directory.
This support is removed for SSS6200.
3. Direct I/O support.
The driver tries to enable direct I/O when a volume is reported to the driver
by the firmware through IRCC events and the driver does this just before
reporting to the OS, hence all the OS issued I/O can go through direct path
if they can, The first validation is to see whether the manufacturing page10
flag is set to expose all drives always. If that is set, the driver will not
enable direct I/O and displays the message "DDIO" is disabled globally as
drives are exposed. The driver checks whether there is more than one volume
in the controller, if so the direct I/O will be disabled globally for all
volumes in the controller and the message displayed will be "DDIO is disabled
globally as number of drives > 1.
If retrieving number of PD is failed the driver will not enable direct I/O
and displays the message Failure in computing number of drives DDIO disabled.
If memory allocation for RAIDVolumePage0 is failed, the driver will not enable
direct I/O and displays the message Memory allocation failure for
RVPG0 DDIO disabled. If retrieving RAIDVolumePage0 is failed the driver will
not enable direct I/O and displays the message Failure in retrieving
RVPG0 DDIO disabled
If the number of PD in a volume is greater than 8, then the direct I/O will
be disabled.
If any of individual drives handle retrieval is failed then the DD-IO will
be disabled.
If the volume is not RAID0 or if the block size is not 512 then the DD-IO will
be disabled.
If the volume size is greater than 2TB then the DD-IO will be disabled.
If the driver is not able to find a valid stripe exponent using the configured
stripe size then the DD-IO will be disabled
When the DD-IO is enabled the driver will check every I/O request issued to
the storage and checks whether the request is either
READ6/WRITE6/READ10/WRITE10, if it is and if the complete I/O transfer
is within a stripe size then the I/O is redirected to
the drive directly instead of the volume.
On completion of every I/O, if the completion is failure means if the reply
is address reply with a reply frame associated with it, then the type of I/O
will be checked, if the I/O is direct then the I/O will be retried to
the volume once.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Reviewed-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-04-07 15:02:49 +08:00
|
|
|
struct _raid_device *raid_device;
|
2009-03-09 15:21:12 +08:00
|
|
|
u16 handle;
|
|
|
|
int num_luns;
|
|
|
|
u32 flags;
|
|
|
|
u8 deleted;
|
|
|
|
u8 tm_busy;
|
|
|
|
};
|
|
|
|
|
[SCSI] mpt2sas : WarpDrive New product SSS6200 support added
This patch has Support for the new solid state device product SSS6200
from LSI and relavent features w.r.t SSS6200.
The major feature added in this driver is supporting Direct-I/O to the
SSS6200 storage.There are some additional changes done to avoid exposing
the RAID member disks to the OS and hiding/exposing drives based on the
OEM Specific Flag in Manufacturing Page10 (this is required to handle
specific changes in the SSS6200 firmware).
Each and every changes are listed below.
1. Hiding IR related messages.
For SSS6200, the driver is modified not to print IR related events.
Even if the debugging is enabled the IR related messages will not be displayed.
In some places if there is a need to display a message related to IR the
string "IR" is replaced with string "DD" and the string "volume" is replaced
with "direct drive". But the function names are not changed hence there are
some places where the reference to volume can be seen if debug level is set.
2. Removed RAID transport support
In Linux the user can retrieve RAID volume information from the sysfs directory.
This support is removed for SSS6200.
3. Direct I/O support.
The driver tries to enable direct I/O when a volume is reported to the driver
by the firmware through IRCC events and the driver does this just before
reporting to the OS, hence all the OS issued I/O can go through direct path
if they can, The first validation is to see whether the manufacturing page10
flag is set to expose all drives always. If that is set, the driver will not
enable direct I/O and displays the message "DDIO" is disabled globally as
drives are exposed. The driver checks whether there is more than one volume
in the controller, if so the direct I/O will be disabled globally for all
volumes in the controller and the message displayed will be "DDIO is disabled
globally as number of drives > 1.
If retrieving number of PD is failed the driver will not enable direct I/O
and displays the message Failure in computing number of drives DDIO disabled.
If memory allocation for RAIDVolumePage0 is failed, the driver will not enable
direct I/O and displays the message Memory allocation failure for
RVPG0 DDIO disabled. If retrieving RAIDVolumePage0 is failed the driver will
not enable direct I/O and displays the message Failure in retrieving
RVPG0 DDIO disabled
If the number of PD in a volume is greater than 8, then the direct I/O will
be disabled.
If any of individual drives handle retrieval is failed then the DD-IO will
be disabled.
If the volume is not RAID0 or if the block size is not 512 then the DD-IO will
be disabled.
If the volume size is greater than 2TB then the DD-IO will be disabled.
If the driver is not able to find a valid stripe exponent using the configured
stripe size then the DD-IO will be disabled
When the DD-IO is enabled the driver will check every I/O request issued to
the storage and checks whether the request is either
READ6/WRITE6/READ10/WRITE10, if it is and if the complete I/O transfer
is within a stripe size then the I/O is redirected to
the drive directly instead of the volume.
On completion of every I/O, if the completion is failure means if the reply
is address reply with a reply frame associated with it, then the type of I/O
will be checked, if the I/O is direct then the I/O will be retried to
the volume once.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Reviewed-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-04-07 15:02:49 +08:00
|
|
|
|
2009-03-09 15:21:12 +08:00
|
|
|
/*
|
|
|
|
* per device private data
|
|
|
|
*/
|
|
|
|
#define MPT_DEVICE_FLAGS_INIT 0x01
|
|
|
|
#define MPT_DEVICE_TLR_ON 0x02
|
|
|
|
|
|
|
|
/**
|
|
|
|
* struct MPT2SAS_DEVICE - sdev private hostdata
|
|
|
|
* @sas_target: starget private hostdata
|
|
|
|
* @lun: lun number
|
|
|
|
* @flags: MPT_DEVICE_XXX flags
|
|
|
|
* @configured_lun: lun is configured
|
|
|
|
* @block: device is in SDEV_BLOCK state
|
|
|
|
* @tlr_snoop_check: flag used in determining whether to disable TLR
|
|
|
|
*/
|
2009-08-20 15:53:49 +08:00
|
|
|
|
|
|
|
/* OEM Identifiers */
|
|
|
|
#define MFG10_OEM_ID_INVALID (0x00000000)
|
|
|
|
#define MFG10_OEM_ID_DELL (0x00000001)
|
|
|
|
#define MFG10_OEM_ID_FSC (0x00000002)
|
|
|
|
#define MFG10_OEM_ID_SUN (0x00000003)
|
|
|
|
#define MFG10_OEM_ID_IBM (0x00000004)
|
|
|
|
|
|
|
|
/* GENERIC Flags 0*/
|
|
|
|
#define MFG10_GF0_OCE_DISABLED (0x00000001)
|
|
|
|
#define MFG10_GF0_R1E_DRIVE_COUNT (0x00000002)
|
|
|
|
#define MFG10_GF0_R10_DISPLAY (0x00000004)
|
|
|
|
#define MFG10_GF0_SSD_DATA_SCRUB_DISABLE (0x00000008)
|
|
|
|
#define MFG10_GF0_SINGLE_DRIVE_R0 (0x00000010)
|
|
|
|
|
|
|
|
/* OEM Specific Flags will come from OEM specific header files */
|
|
|
|
typedef struct _MPI2_CONFIG_PAGE_MAN_10 {
|
|
|
|
MPI2_CONFIG_PAGE_HEADER Header; /* 00h */
|
|
|
|
U8 OEMIdentifier; /* 04h */
|
|
|
|
U8 Reserved1; /* 05h */
|
|
|
|
U16 Reserved2; /* 08h */
|
|
|
|
U32 Reserved3; /* 0Ch */
|
|
|
|
U32 GenericFlags0; /* 10h */
|
|
|
|
U32 GenericFlags1; /* 14h */
|
|
|
|
U32 Reserved4; /* 18h */
|
|
|
|
U32 OEMSpecificFlags0; /* 1Ch */
|
|
|
|
U32 OEMSpecificFlags1; /* 20h */
|
|
|
|
U32 Reserved5[18]; /* 24h-60h*/
|
|
|
|
} MPI2_CONFIG_PAGE_MAN_10,
|
|
|
|
MPI2_POINTER PTR_MPI2_CONFIG_PAGE_MAN_10,
|
|
|
|
Mpi2ManufacturingPage10_t, MPI2_POINTER pMpi2ManufacturingPage10_t;
|
|
|
|
|
[SCSI] mpt2sas : WarpDrive New product SSS6200 support added
This patch has Support for the new solid state device product SSS6200
from LSI and relavent features w.r.t SSS6200.
The major feature added in this driver is supporting Direct-I/O to the
SSS6200 storage.There are some additional changes done to avoid exposing
the RAID member disks to the OS and hiding/exposing drives based on the
OEM Specific Flag in Manufacturing Page10 (this is required to handle
specific changes in the SSS6200 firmware).
Each and every changes are listed below.
1. Hiding IR related messages.
For SSS6200, the driver is modified not to print IR related events.
Even if the debugging is enabled the IR related messages will not be displayed.
In some places if there is a need to display a message related to IR the
string "IR" is replaced with string "DD" and the string "volume" is replaced
with "direct drive". But the function names are not changed hence there are
some places where the reference to volume can be seen if debug level is set.
2. Removed RAID transport support
In Linux the user can retrieve RAID volume information from the sysfs directory.
This support is removed for SSS6200.
3. Direct I/O support.
The driver tries to enable direct I/O when a volume is reported to the driver
by the firmware through IRCC events and the driver does this just before
reporting to the OS, hence all the OS issued I/O can go through direct path
if they can, The first validation is to see whether the manufacturing page10
flag is set to expose all drives always. If that is set, the driver will not
enable direct I/O and displays the message "DDIO" is disabled globally as
drives are exposed. The driver checks whether there is more than one volume
in the controller, if so the direct I/O will be disabled globally for all
volumes in the controller and the message displayed will be "DDIO is disabled
globally as number of drives > 1.
If retrieving number of PD is failed the driver will not enable direct I/O
and displays the message Failure in computing number of drives DDIO disabled.
If memory allocation for RAIDVolumePage0 is failed, the driver will not enable
direct I/O and displays the message Memory allocation failure for
RVPG0 DDIO disabled. If retrieving RAIDVolumePage0 is failed the driver will
not enable direct I/O and displays the message Failure in retrieving
RVPG0 DDIO disabled
If the number of PD in a volume is greater than 8, then the direct I/O will
be disabled.
If any of individual drives handle retrieval is failed then the DD-IO will
be disabled.
If the volume is not RAID0 or if the block size is not 512 then the DD-IO will
be disabled.
If the volume size is greater than 2TB then the DD-IO will be disabled.
If the driver is not able to find a valid stripe exponent using the configured
stripe size then the DD-IO will be disabled
When the DD-IO is enabled the driver will check every I/O request issued to
the storage and checks whether the request is either
READ6/WRITE6/READ10/WRITE10, if it is and if the complete I/O transfer
is within a stripe size then the I/O is redirected to
the drive directly instead of the volume.
On completion of every I/O, if the completion is failure means if the reply
is address reply with a reply frame associated with it, then the type of I/O
will be checked, if the I/O is direct then the I/O will be retried to
the volume once.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Reviewed-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-04-07 15:02:49 +08:00
|
|
|
#define MFG_PAGE10_HIDE_SSDS_MASK (0x00000003)
|
|
|
|
#define MFG_PAGE10_HIDE_ALL_DISKS (0x00)
|
|
|
|
#define MFG_PAGE10_EXPOSE_ALL_DISKS (0x01)
|
|
|
|
#define MFG_PAGE10_HIDE_IF_VOL_PRESENT (0x02)
|
|
|
|
|
|
|
|
|
2009-03-09 15:21:12 +08:00
|
|
|
struct MPT2SAS_DEVICE {
|
|
|
|
struct MPT2SAS_TARGET *sas_target;
|
|
|
|
unsigned int lun;
|
|
|
|
u32 flags;
|
|
|
|
u8 configured_lun;
|
|
|
|
u8 block;
|
|
|
|
u8 tlr_snoop_check;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define MPT2_CMD_NOT_USED 0x8000 /* free */
|
|
|
|
#define MPT2_CMD_COMPLETE 0x0001 /* completed */
|
|
|
|
#define MPT2_CMD_PENDING 0x0002 /* pending */
|
|
|
|
#define MPT2_CMD_REPLY_VALID 0x0004 /* reply is valid */
|
|
|
|
#define MPT2_CMD_RESET 0x0008 /* host reset dropped the command */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* struct _internal_cmd - internal commands struct
|
|
|
|
* @mutex: mutex
|
|
|
|
* @done: completion
|
|
|
|
* @reply: reply message pointer
|
2010-06-17 16:19:28 +08:00
|
|
|
* @sense: sense data
|
2009-03-09 15:21:12 +08:00
|
|
|
* @status: MPT2_CMD_XXX status
|
|
|
|
* @smid: system message id
|
|
|
|
*/
|
|
|
|
struct _internal_cmd {
|
|
|
|
struct mutex mutex;
|
|
|
|
struct completion done;
|
|
|
|
void *reply;
|
2010-06-17 16:19:28 +08:00
|
|
|
void *sense;
|
2009-03-09 15:21:12 +08:00
|
|
|
u16 status;
|
|
|
|
u16 smid;
|
|
|
|
};
|
|
|
|
|
2009-09-14 13:32:48 +08:00
|
|
|
|
2009-03-09 15:21:12 +08:00
|
|
|
/**
|
|
|
|
* struct _sas_device - attached device information
|
|
|
|
* @list: sas device list
|
|
|
|
* @starget: starget object
|
|
|
|
* @sas_address: device sas address
|
|
|
|
* @device_name: retrieved from the SAS IDENTIFY frame.
|
|
|
|
* @handle: device handle
|
2009-09-23 19:51:29 +08:00
|
|
|
* @sas_address_parent: sas address of parent expander or sas host
|
2009-03-09 15:21:12 +08:00
|
|
|
* @enclosure_handle: enclosure handle
|
|
|
|
* @enclosure_logical_id: enclosure logical identifier
|
|
|
|
* @volume_handle: volume handle (valid when hidden raid member)
|
|
|
|
* @volume_wwid: volume unique identifier
|
|
|
|
* @device_info: bitfield provides detailed info about the device
|
|
|
|
* @id: target id
|
|
|
|
* @channel: target channel
|
|
|
|
* @slot: number number
|
2010-06-17 16:15:17 +08:00
|
|
|
* @phy: phy identifier provided in sas device page 0
|
2009-03-09 15:21:12 +08:00
|
|
|
* @responding: used in _scsih_sas_device_mark_responding
|
|
|
|
*/
|
|
|
|
struct _sas_device {
|
|
|
|
struct list_head list;
|
|
|
|
struct scsi_target *starget;
|
|
|
|
u64 sas_address;
|
|
|
|
u64 device_name;
|
|
|
|
u16 handle;
|
2009-09-23 19:51:29 +08:00
|
|
|
u64 sas_address_parent;
|
2009-03-09 15:21:12 +08:00
|
|
|
u16 enclosure_handle;
|
|
|
|
u64 enclosure_logical_id;
|
|
|
|
u16 volume_handle;
|
|
|
|
u64 volume_wwid;
|
|
|
|
u32 device_info;
|
|
|
|
int id;
|
|
|
|
int channel;
|
|
|
|
u16 slot;
|
2010-06-17 16:15:17 +08:00
|
|
|
u8 phy;
|
2009-03-09 15:21:12 +08:00
|
|
|
u8 responding;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* struct _raid_device - raid volume link list
|
|
|
|
* @list: sas device list
|
|
|
|
* @starget: starget object
|
|
|
|
* @sdev: scsi device struct (volumes are single lun)
|
|
|
|
* @wwid: unique identifier for the volume
|
|
|
|
* @handle: device handle
|
[SCSI] mpt2sas : WarpDrive New product SSS6200 support added
This patch has Support for the new solid state device product SSS6200
from LSI and relavent features w.r.t SSS6200.
The major feature added in this driver is supporting Direct-I/O to the
SSS6200 storage.There are some additional changes done to avoid exposing
the RAID member disks to the OS and hiding/exposing drives based on the
OEM Specific Flag in Manufacturing Page10 (this is required to handle
specific changes in the SSS6200 firmware).
Each and every changes are listed below.
1. Hiding IR related messages.
For SSS6200, the driver is modified not to print IR related events.
Even if the debugging is enabled the IR related messages will not be displayed.
In some places if there is a need to display a message related to IR the
string "IR" is replaced with string "DD" and the string "volume" is replaced
with "direct drive". But the function names are not changed hence there are
some places where the reference to volume can be seen if debug level is set.
2. Removed RAID transport support
In Linux the user can retrieve RAID volume information from the sysfs directory.
This support is removed for SSS6200.
3. Direct I/O support.
The driver tries to enable direct I/O when a volume is reported to the driver
by the firmware through IRCC events and the driver does this just before
reporting to the OS, hence all the OS issued I/O can go through direct path
if they can, The first validation is to see whether the manufacturing page10
flag is set to expose all drives always. If that is set, the driver will not
enable direct I/O and displays the message "DDIO" is disabled globally as
drives are exposed. The driver checks whether there is more than one volume
in the controller, if so the direct I/O will be disabled globally for all
volumes in the controller and the message displayed will be "DDIO is disabled
globally as number of drives > 1.
If retrieving number of PD is failed the driver will not enable direct I/O
and displays the message Failure in computing number of drives DDIO disabled.
If memory allocation for RAIDVolumePage0 is failed, the driver will not enable
direct I/O and displays the message Memory allocation failure for
RVPG0 DDIO disabled. If retrieving RAIDVolumePage0 is failed the driver will
not enable direct I/O and displays the message Failure in retrieving
RVPG0 DDIO disabled
If the number of PD in a volume is greater than 8, then the direct I/O will
be disabled.
If any of individual drives handle retrieval is failed then the DD-IO will
be disabled.
If the volume is not RAID0 or if the block size is not 512 then the DD-IO will
be disabled.
If the volume size is greater than 2TB then the DD-IO will be disabled.
If the driver is not able to find a valid stripe exponent using the configured
stripe size then the DD-IO will be disabled
When the DD-IO is enabled the driver will check every I/O request issued to
the storage and checks whether the request is either
READ6/WRITE6/READ10/WRITE10, if it is and if the complete I/O transfer
is within a stripe size then the I/O is redirected to
the drive directly instead of the volume.
On completion of every I/O, if the completion is failure means if the reply
is address reply with a reply frame associated with it, then the type of I/O
will be checked, if the I/O is direct then the I/O will be retried to
the volume once.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Reviewed-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-04-07 15:02:49 +08:00
|
|
|
* @block_size: Block size of the volume
|
2009-03-09 15:21:12 +08:00
|
|
|
* @id: target id
|
|
|
|
* @channel: target channel
|
|
|
|
* @volume_type: the raid level
|
|
|
|
* @device_info: bitfield provides detailed info about the hidden components
|
|
|
|
* @num_pds: number of hidden raid components
|
|
|
|
* @responding: used in _scsih_raid_device_mark_responding
|
2009-12-16 21:24:42 +08:00
|
|
|
* @percent_complete: resync percent complete
|
[SCSI] mpt2sas : WarpDrive New product SSS6200 support added
This patch has Support for the new solid state device product SSS6200
from LSI and relavent features w.r.t SSS6200.
The major feature added in this driver is supporting Direct-I/O to the
SSS6200 storage.There are some additional changes done to avoid exposing
the RAID member disks to the OS and hiding/exposing drives based on the
OEM Specific Flag in Manufacturing Page10 (this is required to handle
specific changes in the SSS6200 firmware).
Each and every changes are listed below.
1. Hiding IR related messages.
For SSS6200, the driver is modified not to print IR related events.
Even if the debugging is enabled the IR related messages will not be displayed.
In some places if there is a need to display a message related to IR the
string "IR" is replaced with string "DD" and the string "volume" is replaced
with "direct drive". But the function names are not changed hence there are
some places where the reference to volume can be seen if debug level is set.
2. Removed RAID transport support
In Linux the user can retrieve RAID volume information from the sysfs directory.
This support is removed for SSS6200.
3. Direct I/O support.
The driver tries to enable direct I/O when a volume is reported to the driver
by the firmware through IRCC events and the driver does this just before
reporting to the OS, hence all the OS issued I/O can go through direct path
if they can, The first validation is to see whether the manufacturing page10
flag is set to expose all drives always. If that is set, the driver will not
enable direct I/O and displays the message "DDIO" is disabled globally as
drives are exposed. The driver checks whether there is more than one volume
in the controller, if so the direct I/O will be disabled globally for all
volumes in the controller and the message displayed will be "DDIO is disabled
globally as number of drives > 1.
If retrieving number of PD is failed the driver will not enable direct I/O
and displays the message Failure in computing number of drives DDIO disabled.
If memory allocation for RAIDVolumePage0 is failed, the driver will not enable
direct I/O and displays the message Memory allocation failure for
RVPG0 DDIO disabled. If retrieving RAIDVolumePage0 is failed the driver will
not enable direct I/O and displays the message Failure in retrieving
RVPG0 DDIO disabled
If the number of PD in a volume is greater than 8, then the direct I/O will
be disabled.
If any of individual drives handle retrieval is failed then the DD-IO will
be disabled.
If the volume is not RAID0 or if the block size is not 512 then the DD-IO will
be disabled.
If the volume size is greater than 2TB then the DD-IO will be disabled.
If the driver is not able to find a valid stripe exponent using the configured
stripe size then the DD-IO will be disabled
When the DD-IO is enabled the driver will check every I/O request issued to
the storage and checks whether the request is either
READ6/WRITE6/READ10/WRITE10, if it is and if the complete I/O transfer
is within a stripe size then the I/O is redirected to
the drive directly instead of the volume.
On completion of every I/O, if the completion is failure means if the reply
is address reply with a reply frame associated with it, then the type of I/O
will be checked, if the I/O is direct then the I/O will be retried to
the volume once.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Reviewed-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-04-07 15:02:49 +08:00
|
|
|
* @direct_io_enabled: Whether direct io to PDs are allowed or not
|
|
|
|
* @stripe_exponent: X where 2powX is the stripe sz in blocks
|
2011-12-01 10:21:55 +08:00
|
|
|
* @block_exponent: X where 2powX is the block sz in bytes
|
[SCSI] mpt2sas : WarpDrive New product SSS6200 support added
This patch has Support for the new solid state device product SSS6200
from LSI and relavent features w.r.t SSS6200.
The major feature added in this driver is supporting Direct-I/O to the
SSS6200 storage.There are some additional changes done to avoid exposing
the RAID member disks to the OS and hiding/exposing drives based on the
OEM Specific Flag in Manufacturing Page10 (this is required to handle
specific changes in the SSS6200 firmware).
Each and every changes are listed below.
1. Hiding IR related messages.
For SSS6200, the driver is modified not to print IR related events.
Even if the debugging is enabled the IR related messages will not be displayed.
In some places if there is a need to display a message related to IR the
string "IR" is replaced with string "DD" and the string "volume" is replaced
with "direct drive". But the function names are not changed hence there are
some places where the reference to volume can be seen if debug level is set.
2. Removed RAID transport support
In Linux the user can retrieve RAID volume information from the sysfs directory.
This support is removed for SSS6200.
3. Direct I/O support.
The driver tries to enable direct I/O when a volume is reported to the driver
by the firmware through IRCC events and the driver does this just before
reporting to the OS, hence all the OS issued I/O can go through direct path
if they can, The first validation is to see whether the manufacturing page10
flag is set to expose all drives always. If that is set, the driver will not
enable direct I/O and displays the message "DDIO" is disabled globally as
drives are exposed. The driver checks whether there is more than one volume
in the controller, if so the direct I/O will be disabled globally for all
volumes in the controller and the message displayed will be "DDIO is disabled
globally as number of drives > 1.
If retrieving number of PD is failed the driver will not enable direct I/O
and displays the message Failure in computing number of drives DDIO disabled.
If memory allocation for RAIDVolumePage0 is failed, the driver will not enable
direct I/O and displays the message Memory allocation failure for
RVPG0 DDIO disabled. If retrieving RAIDVolumePage0 is failed the driver will
not enable direct I/O and displays the message Failure in retrieving
RVPG0 DDIO disabled
If the number of PD in a volume is greater than 8, then the direct I/O will
be disabled.
If any of individual drives handle retrieval is failed then the DD-IO will
be disabled.
If the volume is not RAID0 or if the block size is not 512 then the DD-IO will
be disabled.
If the volume size is greater than 2TB then the DD-IO will be disabled.
If the driver is not able to find a valid stripe exponent using the configured
stripe size then the DD-IO will be disabled
When the DD-IO is enabled the driver will check every I/O request issued to
the storage and checks whether the request is either
READ6/WRITE6/READ10/WRITE10, if it is and if the complete I/O transfer
is within a stripe size then the I/O is redirected to
the drive directly instead of the volume.
On completion of every I/O, if the completion is failure means if the reply
is address reply with a reply frame associated with it, then the type of I/O
will be checked, if the I/O is direct then the I/O will be retried to
the volume once.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Reviewed-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-04-07 15:02:49 +08:00
|
|
|
* @max_lba: Maximum number of LBA in the volume
|
|
|
|
* @stripe_sz: Stripe Size of the volume
|
|
|
|
* @device_info: Device info of the volume member disk
|
|
|
|
* @pd_handle: Array of handles of the physical drives for direct I/O in le16
|
2009-03-09 15:21:12 +08:00
|
|
|
*/
|
[SCSI] mpt2sas : WarpDrive New product SSS6200 support added
This patch has Support for the new solid state device product SSS6200
from LSI and relavent features w.r.t SSS6200.
The major feature added in this driver is supporting Direct-I/O to the
SSS6200 storage.There are some additional changes done to avoid exposing
the RAID member disks to the OS and hiding/exposing drives based on the
OEM Specific Flag in Manufacturing Page10 (this is required to handle
specific changes in the SSS6200 firmware).
Each and every changes are listed below.
1. Hiding IR related messages.
For SSS6200, the driver is modified not to print IR related events.
Even if the debugging is enabled the IR related messages will not be displayed.
In some places if there is a need to display a message related to IR the
string "IR" is replaced with string "DD" and the string "volume" is replaced
with "direct drive". But the function names are not changed hence there are
some places where the reference to volume can be seen if debug level is set.
2. Removed RAID transport support
In Linux the user can retrieve RAID volume information from the sysfs directory.
This support is removed for SSS6200.
3. Direct I/O support.
The driver tries to enable direct I/O when a volume is reported to the driver
by the firmware through IRCC events and the driver does this just before
reporting to the OS, hence all the OS issued I/O can go through direct path
if they can, The first validation is to see whether the manufacturing page10
flag is set to expose all drives always. If that is set, the driver will not
enable direct I/O and displays the message "DDIO" is disabled globally as
drives are exposed. The driver checks whether there is more than one volume
in the controller, if so the direct I/O will be disabled globally for all
volumes in the controller and the message displayed will be "DDIO is disabled
globally as number of drives > 1.
If retrieving number of PD is failed the driver will not enable direct I/O
and displays the message Failure in computing number of drives DDIO disabled.
If memory allocation for RAIDVolumePage0 is failed, the driver will not enable
direct I/O and displays the message Memory allocation failure for
RVPG0 DDIO disabled. If retrieving RAIDVolumePage0 is failed the driver will
not enable direct I/O and displays the message Failure in retrieving
RVPG0 DDIO disabled
If the number of PD in a volume is greater than 8, then the direct I/O will
be disabled.
If any of individual drives handle retrieval is failed then the DD-IO will
be disabled.
If the volume is not RAID0 or if the block size is not 512 then the DD-IO will
be disabled.
If the volume size is greater than 2TB then the DD-IO will be disabled.
If the driver is not able to find a valid stripe exponent using the configured
stripe size then the DD-IO will be disabled
When the DD-IO is enabled the driver will check every I/O request issued to
the storage and checks whether the request is either
READ6/WRITE6/READ10/WRITE10, if it is and if the complete I/O transfer
is within a stripe size then the I/O is redirected to
the drive directly instead of the volume.
On completion of every I/O, if the completion is failure means if the reply
is address reply with a reply frame associated with it, then the type of I/O
will be checked, if the I/O is direct then the I/O will be retried to
the volume once.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Reviewed-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-04-07 15:02:49 +08:00
|
|
|
#define MPT_MAX_WARPDRIVE_PDS 8
|
2009-03-09 15:21:12 +08:00
|
|
|
struct _raid_device {
|
|
|
|
struct list_head list;
|
|
|
|
struct scsi_target *starget;
|
|
|
|
struct scsi_device *sdev;
|
|
|
|
u64 wwid;
|
|
|
|
u16 handle;
|
[SCSI] mpt2sas : WarpDrive New product SSS6200 support added
This patch has Support for the new solid state device product SSS6200
from LSI and relavent features w.r.t SSS6200.
The major feature added in this driver is supporting Direct-I/O to the
SSS6200 storage.There are some additional changes done to avoid exposing
the RAID member disks to the OS and hiding/exposing drives based on the
OEM Specific Flag in Manufacturing Page10 (this is required to handle
specific changes in the SSS6200 firmware).
Each and every changes are listed below.
1. Hiding IR related messages.
For SSS6200, the driver is modified not to print IR related events.
Even if the debugging is enabled the IR related messages will not be displayed.
In some places if there is a need to display a message related to IR the
string "IR" is replaced with string "DD" and the string "volume" is replaced
with "direct drive". But the function names are not changed hence there are
some places where the reference to volume can be seen if debug level is set.
2. Removed RAID transport support
In Linux the user can retrieve RAID volume information from the sysfs directory.
This support is removed for SSS6200.
3. Direct I/O support.
The driver tries to enable direct I/O when a volume is reported to the driver
by the firmware through IRCC events and the driver does this just before
reporting to the OS, hence all the OS issued I/O can go through direct path
if they can, The first validation is to see whether the manufacturing page10
flag is set to expose all drives always. If that is set, the driver will not
enable direct I/O and displays the message "DDIO" is disabled globally as
drives are exposed. The driver checks whether there is more than one volume
in the controller, if so the direct I/O will be disabled globally for all
volumes in the controller and the message displayed will be "DDIO is disabled
globally as number of drives > 1.
If retrieving number of PD is failed the driver will not enable direct I/O
and displays the message Failure in computing number of drives DDIO disabled.
If memory allocation for RAIDVolumePage0 is failed, the driver will not enable
direct I/O and displays the message Memory allocation failure for
RVPG0 DDIO disabled. If retrieving RAIDVolumePage0 is failed the driver will
not enable direct I/O and displays the message Failure in retrieving
RVPG0 DDIO disabled
If the number of PD in a volume is greater than 8, then the direct I/O will
be disabled.
If any of individual drives handle retrieval is failed then the DD-IO will
be disabled.
If the volume is not RAID0 or if the block size is not 512 then the DD-IO will
be disabled.
If the volume size is greater than 2TB then the DD-IO will be disabled.
If the driver is not able to find a valid stripe exponent using the configured
stripe size then the DD-IO will be disabled
When the DD-IO is enabled the driver will check every I/O request issued to
the storage and checks whether the request is either
READ6/WRITE6/READ10/WRITE10, if it is and if the complete I/O transfer
is within a stripe size then the I/O is redirected to
the drive directly instead of the volume.
On completion of every I/O, if the completion is failure means if the reply
is address reply with a reply frame associated with it, then the type of I/O
will be checked, if the I/O is direct then the I/O will be retried to
the volume once.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Reviewed-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-04-07 15:02:49 +08:00
|
|
|
u16 block_sz;
|
2009-03-09 15:21:12 +08:00
|
|
|
int id;
|
|
|
|
int channel;
|
|
|
|
u8 volume_type;
|
|
|
|
u8 num_pds;
|
|
|
|
u8 responding;
|
2009-12-16 21:24:42 +08:00
|
|
|
u8 percent_complete;
|
[SCSI] mpt2sas : WarpDrive New product SSS6200 support added
This patch has Support for the new solid state device product SSS6200
from LSI and relavent features w.r.t SSS6200.
The major feature added in this driver is supporting Direct-I/O to the
SSS6200 storage.There are some additional changes done to avoid exposing
the RAID member disks to the OS and hiding/exposing drives based on the
OEM Specific Flag in Manufacturing Page10 (this is required to handle
specific changes in the SSS6200 firmware).
Each and every changes are listed below.
1. Hiding IR related messages.
For SSS6200, the driver is modified not to print IR related events.
Even if the debugging is enabled the IR related messages will not be displayed.
In some places if there is a need to display a message related to IR the
string "IR" is replaced with string "DD" and the string "volume" is replaced
with "direct drive". But the function names are not changed hence there are
some places where the reference to volume can be seen if debug level is set.
2. Removed RAID transport support
In Linux the user can retrieve RAID volume information from the sysfs directory.
This support is removed for SSS6200.
3. Direct I/O support.
The driver tries to enable direct I/O when a volume is reported to the driver
by the firmware through IRCC events and the driver does this just before
reporting to the OS, hence all the OS issued I/O can go through direct path
if they can, The first validation is to see whether the manufacturing page10
flag is set to expose all drives always. If that is set, the driver will not
enable direct I/O and displays the message "DDIO" is disabled globally as
drives are exposed. The driver checks whether there is more than one volume
in the controller, if so the direct I/O will be disabled globally for all
volumes in the controller and the message displayed will be "DDIO is disabled
globally as number of drives > 1.
If retrieving number of PD is failed the driver will not enable direct I/O
and displays the message Failure in computing number of drives DDIO disabled.
If memory allocation for RAIDVolumePage0 is failed, the driver will not enable
direct I/O and displays the message Memory allocation failure for
RVPG0 DDIO disabled. If retrieving RAIDVolumePage0 is failed the driver will
not enable direct I/O and displays the message Failure in retrieving
RVPG0 DDIO disabled
If the number of PD in a volume is greater than 8, then the direct I/O will
be disabled.
If any of individual drives handle retrieval is failed then the DD-IO will
be disabled.
If the volume is not RAID0 or if the block size is not 512 then the DD-IO will
be disabled.
If the volume size is greater than 2TB then the DD-IO will be disabled.
If the driver is not able to find a valid stripe exponent using the configured
stripe size then the DD-IO will be disabled
When the DD-IO is enabled the driver will check every I/O request issued to
the storage and checks whether the request is either
READ6/WRITE6/READ10/WRITE10, if it is and if the complete I/O transfer
is within a stripe size then the I/O is redirected to
the drive directly instead of the volume.
On completion of every I/O, if the completion is failure means if the reply
is address reply with a reply frame associated with it, then the type of I/O
will be checked, if the I/O is direct then the I/O will be retried to
the volume once.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Reviewed-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-04-07 15:02:49 +08:00
|
|
|
u8 direct_io_enabled;
|
|
|
|
u8 stripe_exponent;
|
2011-12-01 10:21:55 +08:00
|
|
|
u8 block_exponent;
|
[SCSI] mpt2sas : WarpDrive New product SSS6200 support added
This patch has Support for the new solid state device product SSS6200
from LSI and relavent features w.r.t SSS6200.
The major feature added in this driver is supporting Direct-I/O to the
SSS6200 storage.There are some additional changes done to avoid exposing
the RAID member disks to the OS and hiding/exposing drives based on the
OEM Specific Flag in Manufacturing Page10 (this is required to handle
specific changes in the SSS6200 firmware).
Each and every changes are listed below.
1. Hiding IR related messages.
For SSS6200, the driver is modified not to print IR related events.
Even if the debugging is enabled the IR related messages will not be displayed.
In some places if there is a need to display a message related to IR the
string "IR" is replaced with string "DD" and the string "volume" is replaced
with "direct drive". But the function names are not changed hence there are
some places where the reference to volume can be seen if debug level is set.
2. Removed RAID transport support
In Linux the user can retrieve RAID volume information from the sysfs directory.
This support is removed for SSS6200.
3. Direct I/O support.
The driver tries to enable direct I/O when a volume is reported to the driver
by the firmware through IRCC events and the driver does this just before
reporting to the OS, hence all the OS issued I/O can go through direct path
if they can, The first validation is to see whether the manufacturing page10
flag is set to expose all drives always. If that is set, the driver will not
enable direct I/O and displays the message "DDIO" is disabled globally as
drives are exposed. The driver checks whether there is more than one volume
in the controller, if so the direct I/O will be disabled globally for all
volumes in the controller and the message displayed will be "DDIO is disabled
globally as number of drives > 1.
If retrieving number of PD is failed the driver will not enable direct I/O
and displays the message Failure in computing number of drives DDIO disabled.
If memory allocation for RAIDVolumePage0 is failed, the driver will not enable
direct I/O and displays the message Memory allocation failure for
RVPG0 DDIO disabled. If retrieving RAIDVolumePage0 is failed the driver will
not enable direct I/O and displays the message Failure in retrieving
RVPG0 DDIO disabled
If the number of PD in a volume is greater than 8, then the direct I/O will
be disabled.
If any of individual drives handle retrieval is failed then the DD-IO will
be disabled.
If the volume is not RAID0 or if the block size is not 512 then the DD-IO will
be disabled.
If the volume size is greater than 2TB then the DD-IO will be disabled.
If the driver is not able to find a valid stripe exponent using the configured
stripe size then the DD-IO will be disabled
When the DD-IO is enabled the driver will check every I/O request issued to
the storage and checks whether the request is either
READ6/WRITE6/READ10/WRITE10, if it is and if the complete I/O transfer
is within a stripe size then the I/O is redirected to
the drive directly instead of the volume.
On completion of every I/O, if the completion is failure means if the reply
is address reply with a reply frame associated with it, then the type of I/O
will be checked, if the I/O is direct then the I/O will be retried to
the volume once.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Reviewed-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-04-07 15:02:49 +08:00
|
|
|
u64 max_lba;
|
|
|
|
u32 stripe_sz;
|
|
|
|
u32 device_info;
|
|
|
|
u16 pd_handle[MPT_MAX_WARPDRIVE_PDS];
|
2009-03-09 15:21:12 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* struct _boot_device - boot device info
|
|
|
|
* @is_raid: flag to indicate whether this is volume
|
|
|
|
* @device: holds pointer for either struct _sas_device or
|
|
|
|
* struct _raid_device
|
|
|
|
*/
|
|
|
|
struct _boot_device {
|
|
|
|
u8 is_raid;
|
|
|
|
void *device;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* struct _sas_port - wide/narrow sas port information
|
|
|
|
* @port_list: list of ports belonging to expander
|
|
|
|
* @num_phys: number of phys belonging to this port
|
|
|
|
* @remote_identify: attached device identification
|
|
|
|
* @rphy: sas transport rphy object
|
|
|
|
* @port: sas transport wide/narrow port object
|
|
|
|
* @phy_list: _sas_phy list objects belonging to this port
|
|
|
|
*/
|
|
|
|
struct _sas_port {
|
|
|
|
struct list_head port_list;
|
|
|
|
u8 num_phys;
|
|
|
|
struct sas_identify remote_identify;
|
|
|
|
struct sas_rphy *rphy;
|
|
|
|
struct sas_port *port;
|
|
|
|
struct list_head phy_list;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* struct _sas_phy - phy information
|
|
|
|
* @port_siblings: list of phys belonging to a port
|
|
|
|
* @identify: phy identification
|
|
|
|
* @remote_identify: attached device identification
|
|
|
|
* @phy: sas transport phy object
|
|
|
|
* @phy_id: unique phy id
|
|
|
|
* @handle: device handle for this phy
|
|
|
|
* @attached_handle: device handle for attached device
|
2010-04-05 16:48:34 +08:00
|
|
|
* @phy_belongs_to_port: port has been created for this phy
|
2009-03-09 15:21:12 +08:00
|
|
|
*/
|
|
|
|
struct _sas_phy {
|
|
|
|
struct list_head port_siblings;
|
|
|
|
struct sas_identify identify;
|
|
|
|
struct sas_identify remote_identify;
|
|
|
|
struct sas_phy *phy;
|
|
|
|
u8 phy_id;
|
|
|
|
u16 handle;
|
|
|
|
u16 attached_handle;
|
2010-04-05 16:48:34 +08:00
|
|
|
u8 phy_belongs_to_port;
|
2009-03-09 15:21:12 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* struct _sas_node - sas_host/expander information
|
|
|
|
* @list: list of expanders
|
|
|
|
* @parent_dev: parent device class
|
|
|
|
* @num_phys: number phys belonging to this sas_host/expander
|
|
|
|
* @sas_address: sas address of this sas_host/expander
|
|
|
|
* @handle: handle for this sas_host/expander
|
2009-09-23 19:51:29 +08:00
|
|
|
* @sas_address_parent: sas address of parent expander or sas host
|
2009-03-09 15:21:12 +08:00
|
|
|
* @enclosure_handle: handle for this a member of an enclosure
|
|
|
|
* @device_info: bitwise defining capabilities of this sas_host/expander
|
|
|
|
* @responding: used in _scsih_expander_device_mark_responding
|
|
|
|
* @phy: a list of phys that make up this sas_host/expander
|
|
|
|
* @sas_port_list: list of ports attached to this sas_host/expander
|
|
|
|
*/
|
|
|
|
struct _sas_node {
|
|
|
|
struct list_head list;
|
|
|
|
struct device *parent_dev;
|
|
|
|
u8 num_phys;
|
|
|
|
u64 sas_address;
|
|
|
|
u16 handle;
|
2009-09-23 19:51:29 +08:00
|
|
|
u64 sas_address_parent;
|
2009-03-09 15:21:12 +08:00
|
|
|
u16 enclosure_handle;
|
|
|
|
u64 enclosure_logical_id;
|
|
|
|
u8 responding;
|
|
|
|
struct _sas_phy *phy;
|
|
|
|
struct list_head sas_port_list;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* enum reset_type - reset state
|
|
|
|
* @FORCE_BIG_HAMMER: issue diagnostic reset
|
|
|
|
* @SOFT_RESET: issue message_unit_reset, if fails to to big hammer
|
|
|
|
*/
|
|
|
|
enum reset_type {
|
|
|
|
FORCE_BIG_HAMMER,
|
|
|
|
SOFT_RESET,
|
|
|
|
};
|
|
|
|
|
2010-11-13 07:04:06 +08:00
|
|
|
/**
|
|
|
|
* struct chain_tracker - firmware chain tracker
|
|
|
|
* @chain_buffer: chain buffer
|
|
|
|
* @chain_buffer_dma: physical address
|
|
|
|
* @tracker_list: list of free request (ioc->free_chain_list)
|
|
|
|
*/
|
|
|
|
struct chain_tracker {
|
|
|
|
void *chain_buffer;
|
|
|
|
dma_addr_t chain_buffer_dma;
|
|
|
|
struct list_head tracker_list;
|
|
|
|
};
|
|
|
|
|
2009-03-09 15:21:12 +08:00
|
|
|
/**
|
2011-01-04 14:09:20 +08:00
|
|
|
* struct scsiio_tracker - scsi mf request tracker
|
2009-03-09 15:21:12 +08:00
|
|
|
* @smid: system message id
|
|
|
|
* @scmd: scsi request pointer
|
|
|
|
* @cb_idx: callback index
|
[SCSI] mpt2sas : WarpDrive New product SSS6200 support added
This patch has Support for the new solid state device product SSS6200
from LSI and relavent features w.r.t SSS6200.
The major feature added in this driver is supporting Direct-I/O to the
SSS6200 storage.There are some additional changes done to avoid exposing
the RAID member disks to the OS and hiding/exposing drives based on the
OEM Specific Flag in Manufacturing Page10 (this is required to handle
specific changes in the SSS6200 firmware).
Each and every changes are listed below.
1. Hiding IR related messages.
For SSS6200, the driver is modified not to print IR related events.
Even if the debugging is enabled the IR related messages will not be displayed.
In some places if there is a need to display a message related to IR the
string "IR" is replaced with string "DD" and the string "volume" is replaced
with "direct drive". But the function names are not changed hence there are
some places where the reference to volume can be seen if debug level is set.
2. Removed RAID transport support
In Linux the user can retrieve RAID volume information from the sysfs directory.
This support is removed for SSS6200.
3. Direct I/O support.
The driver tries to enable direct I/O when a volume is reported to the driver
by the firmware through IRCC events and the driver does this just before
reporting to the OS, hence all the OS issued I/O can go through direct path
if they can, The first validation is to see whether the manufacturing page10
flag is set to expose all drives always. If that is set, the driver will not
enable direct I/O and displays the message "DDIO" is disabled globally as
drives are exposed. The driver checks whether there is more than one volume
in the controller, if so the direct I/O will be disabled globally for all
volumes in the controller and the message displayed will be "DDIO is disabled
globally as number of drives > 1.
If retrieving number of PD is failed the driver will not enable direct I/O
and displays the message Failure in computing number of drives DDIO disabled.
If memory allocation for RAIDVolumePage0 is failed, the driver will not enable
direct I/O and displays the message Memory allocation failure for
RVPG0 DDIO disabled. If retrieving RAIDVolumePage0 is failed the driver will
not enable direct I/O and displays the message Failure in retrieving
RVPG0 DDIO disabled
If the number of PD in a volume is greater than 8, then the direct I/O will
be disabled.
If any of individual drives handle retrieval is failed then the DD-IO will
be disabled.
If the volume is not RAID0 or if the block size is not 512 then the DD-IO will
be disabled.
If the volume size is greater than 2TB then the DD-IO will be disabled.
If the driver is not able to find a valid stripe exponent using the configured
stripe size then the DD-IO will be disabled
When the DD-IO is enabled the driver will check every I/O request issued to
the storage and checks whether the request is either
READ6/WRITE6/READ10/WRITE10, if it is and if the complete I/O transfer
is within a stripe size then the I/O is redirected to
the drive directly instead of the volume.
On completion of every I/O, if the completion is failure means if the reply
is address reply with a reply frame associated with it, then the type of I/O
will be checked, if the I/O is direct then the I/O will be retried to
the volume once.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Reviewed-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-04-07 15:02:49 +08:00
|
|
|
* @direct_io: To indicate whether I/O is direct (WARPDRIVE)
|
2009-03-09 15:21:12 +08:00
|
|
|
* @chain_list: list of chains associated to this IO
|
|
|
|
* @tracker_list: list of free request (ioc->free_list)
|
|
|
|
*/
|
2011-01-04 14:09:20 +08:00
|
|
|
struct scsiio_tracker {
|
2009-03-09 15:21:12 +08:00
|
|
|
u16 smid;
|
|
|
|
struct scsi_cmnd *scmd;
|
|
|
|
u8 cb_idx;
|
[SCSI] mpt2sas : WarpDrive New product SSS6200 support added
This patch has Support for the new solid state device product SSS6200
from LSI and relavent features w.r.t SSS6200.
The major feature added in this driver is supporting Direct-I/O to the
SSS6200 storage.There are some additional changes done to avoid exposing
the RAID member disks to the OS and hiding/exposing drives based on the
OEM Specific Flag in Manufacturing Page10 (this is required to handle
specific changes in the SSS6200 firmware).
Each and every changes are listed below.
1. Hiding IR related messages.
For SSS6200, the driver is modified not to print IR related events.
Even if the debugging is enabled the IR related messages will not be displayed.
In some places if there is a need to display a message related to IR the
string "IR" is replaced with string "DD" and the string "volume" is replaced
with "direct drive". But the function names are not changed hence there are
some places where the reference to volume can be seen if debug level is set.
2. Removed RAID transport support
In Linux the user can retrieve RAID volume information from the sysfs directory.
This support is removed for SSS6200.
3. Direct I/O support.
The driver tries to enable direct I/O when a volume is reported to the driver
by the firmware through IRCC events and the driver does this just before
reporting to the OS, hence all the OS issued I/O can go through direct path
if they can, The first validation is to see whether the manufacturing page10
flag is set to expose all drives always. If that is set, the driver will not
enable direct I/O and displays the message "DDIO" is disabled globally as
drives are exposed. The driver checks whether there is more than one volume
in the controller, if so the direct I/O will be disabled globally for all
volumes in the controller and the message displayed will be "DDIO is disabled
globally as number of drives > 1.
If retrieving number of PD is failed the driver will not enable direct I/O
and displays the message Failure in computing number of drives DDIO disabled.
If memory allocation for RAIDVolumePage0 is failed, the driver will not enable
direct I/O and displays the message Memory allocation failure for
RVPG0 DDIO disabled. If retrieving RAIDVolumePage0 is failed the driver will
not enable direct I/O and displays the message Failure in retrieving
RVPG0 DDIO disabled
If the number of PD in a volume is greater than 8, then the direct I/O will
be disabled.
If any of individual drives handle retrieval is failed then the DD-IO will
be disabled.
If the volume is not RAID0 or if the block size is not 512 then the DD-IO will
be disabled.
If the volume size is greater than 2TB then the DD-IO will be disabled.
If the driver is not able to find a valid stripe exponent using the configured
stripe size then the DD-IO will be disabled
When the DD-IO is enabled the driver will check every I/O request issued to
the storage and checks whether the request is either
READ6/WRITE6/READ10/WRITE10, if it is and if the complete I/O transfer
is within a stripe size then the I/O is redirected to
the drive directly instead of the volume.
On completion of every I/O, if the completion is failure means if the reply
is address reply with a reply frame associated with it, then the type of I/O
will be checked, if the I/O is direct then the I/O will be retried to
the volume once.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Reviewed-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-04-07 15:02:49 +08:00
|
|
|
u8 direct_io;
|
2010-11-13 07:04:06 +08:00
|
|
|
struct list_head chain_list;
|
2009-03-09 15:21:12 +08:00
|
|
|
struct list_head tracker_list;
|
|
|
|
};
|
|
|
|
|
2011-01-04 14:09:20 +08:00
|
|
|
/**
|
[SCSI] mpt2sas : WarpDrive New product SSS6200 support added
This patch has Support for the new solid state device product SSS6200
from LSI and relavent features w.r.t SSS6200.
The major feature added in this driver is supporting Direct-I/O to the
SSS6200 storage.There are some additional changes done to avoid exposing
the RAID member disks to the OS and hiding/exposing drives based on the
OEM Specific Flag in Manufacturing Page10 (this is required to handle
specific changes in the SSS6200 firmware).
Each and every changes are listed below.
1. Hiding IR related messages.
For SSS6200, the driver is modified not to print IR related events.
Even if the debugging is enabled the IR related messages will not be displayed.
In some places if there is a need to display a message related to IR the
string "IR" is replaced with string "DD" and the string "volume" is replaced
with "direct drive". But the function names are not changed hence there are
some places where the reference to volume can be seen if debug level is set.
2. Removed RAID transport support
In Linux the user can retrieve RAID volume information from the sysfs directory.
This support is removed for SSS6200.
3. Direct I/O support.
The driver tries to enable direct I/O when a volume is reported to the driver
by the firmware through IRCC events and the driver does this just before
reporting to the OS, hence all the OS issued I/O can go through direct path
if they can, The first validation is to see whether the manufacturing page10
flag is set to expose all drives always. If that is set, the driver will not
enable direct I/O and displays the message "DDIO" is disabled globally as
drives are exposed. The driver checks whether there is more than one volume
in the controller, if so the direct I/O will be disabled globally for all
volumes in the controller and the message displayed will be "DDIO is disabled
globally as number of drives > 1.
If retrieving number of PD is failed the driver will not enable direct I/O
and displays the message Failure in computing number of drives DDIO disabled.
If memory allocation for RAIDVolumePage0 is failed, the driver will not enable
direct I/O and displays the message Memory allocation failure for
RVPG0 DDIO disabled. If retrieving RAIDVolumePage0 is failed the driver will
not enable direct I/O and displays the message Failure in retrieving
RVPG0 DDIO disabled
If the number of PD in a volume is greater than 8, then the direct I/O will
be disabled.
If any of individual drives handle retrieval is failed then the DD-IO will
be disabled.
If the volume is not RAID0 or if the block size is not 512 then the DD-IO will
be disabled.
If the volume size is greater than 2TB then the DD-IO will be disabled.
If the driver is not able to find a valid stripe exponent using the configured
stripe size then the DD-IO will be disabled
When the DD-IO is enabled the driver will check every I/O request issued to
the storage and checks whether the request is either
READ6/WRITE6/READ10/WRITE10, if it is and if the complete I/O transfer
is within a stripe size then the I/O is redirected to
the drive directly instead of the volume.
On completion of every I/O, if the completion is failure means if the reply
is address reply with a reply frame associated with it, then the type of I/O
will be checked, if the I/O is direct then the I/O will be retried to
the volume once.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Reviewed-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-04-07 15:02:49 +08:00
|
|
|
* struct request_tracker - firmware request tracker
|
2011-01-04 14:09:20 +08:00
|
|
|
* @smid: system message id
|
|
|
|
* @cb_idx: callback index
|
|
|
|
* @tracker_list: list of free request (ioc->free_list)
|
|
|
|
*/
|
|
|
|
struct request_tracker {
|
|
|
|
u16 smid;
|
|
|
|
u8 cb_idx;
|
|
|
|
struct list_head tracker_list;
|
|
|
|
};
|
|
|
|
|
2009-09-14 13:34:23 +08:00
|
|
|
/**
|
|
|
|
* struct _tr_list - target reset list
|
|
|
|
* @handle: device handle
|
|
|
|
* @state: state machine
|
|
|
|
*/
|
|
|
|
struct _tr_list {
|
|
|
|
struct list_head list;
|
|
|
|
u16 handle;
|
|
|
|
u16 state;
|
|
|
|
};
|
|
|
|
|
2009-03-09 15:21:12 +08:00
|
|
|
typedef void (*MPT_ADD_SGE)(void *paddr, u32 flags_length, dma_addr_t dma_addr);
|
|
|
|
|
2011-09-08 08:48:50 +08:00
|
|
|
/**
|
|
|
|
* struct adapter_reply_queue - the reply queue struct
|
|
|
|
* @ioc: per adapter object
|
|
|
|
* @msix_index: msix index into vector table
|
|
|
|
* @vector: irq vector
|
|
|
|
* @reply_post_host_index: head index in the pool where FW completes IO
|
|
|
|
* @reply_post_free: reply post base virt address
|
|
|
|
* @name: the name registered to request_irq()
|
|
|
|
* @busy: isr is actively processing replies on another cpu
|
|
|
|
* @list: this list
|
|
|
|
*/
|
|
|
|
struct adapter_reply_queue {
|
|
|
|
struct MPT2SAS_ADAPTER *ioc;
|
|
|
|
u8 msix_index;
|
|
|
|
unsigned int vector;
|
|
|
|
u32 reply_post_host_index;
|
|
|
|
Mpi2ReplyDescriptorsUnion_t *reply_post_free;
|
|
|
|
char name[MPT_NAME_LENGTH];
|
|
|
|
atomic_t busy;
|
|
|
|
struct list_head list;
|
|
|
|
};
|
|
|
|
|
2011-06-14 13:24:56 +08:00
|
|
|
/* IOC Facts and Port Facts converted from little endian to cpu */
|
|
|
|
union mpi2_version_union {
|
|
|
|
MPI2_VERSION_STRUCT Struct;
|
|
|
|
u32 Word;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct mpt2sas_facts {
|
|
|
|
u16 MsgVersion;
|
|
|
|
u16 HeaderVersion;
|
|
|
|
u8 IOCNumber;
|
|
|
|
u8 VP_ID;
|
|
|
|
u8 VF_ID;
|
|
|
|
u16 IOCExceptions;
|
|
|
|
u16 IOCStatus;
|
|
|
|
u32 IOCLogInfo;
|
|
|
|
u8 MaxChainDepth;
|
|
|
|
u8 WhoInit;
|
|
|
|
u8 NumberOfPorts;
|
|
|
|
u8 MaxMSIxVectors;
|
|
|
|
u16 RequestCredit;
|
|
|
|
u16 ProductID;
|
|
|
|
u32 IOCCapabilities;
|
|
|
|
union mpi2_version_union FWVersion;
|
|
|
|
u16 IOCRequestFrameSize;
|
|
|
|
u16 Reserved3;
|
|
|
|
u16 MaxInitiators;
|
|
|
|
u16 MaxTargets;
|
|
|
|
u16 MaxSasExpanders;
|
|
|
|
u16 MaxEnclosures;
|
|
|
|
u16 ProtocolFlags;
|
|
|
|
u16 HighPriorityCredit;
|
|
|
|
u16 MaxReplyDescriptorPostQueueDepth;
|
|
|
|
u8 ReplyFrameSize;
|
|
|
|
u8 MaxVolumes;
|
|
|
|
u16 MaxDevHandle;
|
|
|
|
u16 MaxPersistentEntries;
|
|
|
|
u16 MinDevHandle;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct mpt2sas_port_facts {
|
|
|
|
u8 PortNumber;
|
|
|
|
u8 VP_ID;
|
|
|
|
u8 VF_ID;
|
|
|
|
u8 PortType;
|
|
|
|
u16 MaxPostedCmdBuffers;
|
|
|
|
};
|
|
|
|
|
2011-06-14 13:26:43 +08:00
|
|
|
/**
|
|
|
|
* enum mutex_type - task management mutex type
|
|
|
|
* @TM_MUTEX_OFF: mutex is not required becuase calling function is acquiring it
|
|
|
|
* @TM_MUTEX_ON: mutex is required
|
|
|
|
*/
|
|
|
|
enum mutex_type {
|
|
|
|
TM_MUTEX_OFF = 0,
|
|
|
|
TM_MUTEX_ON = 1,
|
|
|
|
};
|
|
|
|
|
2011-12-01 10:12:04 +08:00
|
|
|
typedef void (*MPT2SAS_FLUSH_RUNNING_CMDS)(struct MPT2SAS_ADAPTER *ioc);
|
2009-03-09 15:21:12 +08:00
|
|
|
/**
|
|
|
|
* struct MPT2SAS_ADAPTER - per adapter struct
|
|
|
|
* @list: ioc_list
|
|
|
|
* @shost: shost object
|
|
|
|
* @id: unique adapter id
|
2011-09-08 08:48:50 +08:00
|
|
|
* @cpu_count: number online cpus
|
2009-03-09 15:21:12 +08:00
|
|
|
* @name: generic ioc string
|
|
|
|
* @tmp_string: tmp string used for logging
|
|
|
|
* @pdev: pci pdev object
|
|
|
|
* @chip: memory mapped register space
|
|
|
|
* @chip_phys: physical addrss prior to mapping
|
|
|
|
* @logging_level: see mpt2sas_debug.h
|
2009-09-23 19:56:58 +08:00
|
|
|
* @fwfault_debug: debuging FW timeouts
|
2009-03-09 15:21:12 +08:00
|
|
|
* @ir_firmware: IR firmware present
|
|
|
|
* @bars: bitmask of BAR's that must be configured
|
|
|
|
* @mask_interrupts: ignore interrupt
|
|
|
|
* @fault_reset_work_q_name: fw fault work queue
|
|
|
|
* @fault_reset_work_q: ""
|
|
|
|
* @fault_reset_work: ""
|
|
|
|
* @firmware_event_name: fw event work queue
|
|
|
|
* @firmware_event_thread: ""
|
|
|
|
* @fw_events_off: flag to turn off fw event handling
|
|
|
|
* @fw_event_lock:
|
|
|
|
* @fw_event_list: list of fw events
|
|
|
|
* @aen_event_read_flag: event log was read
|
|
|
|
* @broadcast_aen_busy: broadcast aen waiting to be serviced
|
2009-08-20 15:52:00 +08:00
|
|
|
* @shost_recovery: host reset in progress
|
2009-03-09 15:21:12 +08:00
|
|
|
* @ioc_reset_in_progress_lock:
|
|
|
|
* @ioc_link_reset_in_progress: phy/hard reset in progress
|
2010-06-11 18:17:01 +08:00
|
|
|
* @ignore_loginfos: ignore loginfos during task management
|
2009-03-09 15:21:12 +08:00
|
|
|
* @remove_host: flag for when driver unloads, to avoid sending dev resets
|
2010-07-09 04:44:34 +08:00
|
|
|
* @pci_error_recovery: flag to prevent ioc access until slot reset completes
|
2011-10-19 18:06:26 +08:00
|
|
|
* @wait_for_discovery_to_complete: flag set at driver load time when
|
|
|
|
* waiting on reporting devices
|
|
|
|
* @is_driver_loading: flag set at driver load time
|
|
|
|
* @port_enable_failed: flag set when port enable has failed
|
|
|
|
* @start_scan: flag set from scan_start callback, cleared from _mpt2sas_fw_work
|
|
|
|
* @start_scan_failed: means port enable failed, return's the ioc_status
|
2009-03-09 15:21:12 +08:00
|
|
|
* @msix_enable: flag indicating msix is enabled
|
|
|
|
* @msix_vector_count: number msix vectors
|
2011-09-08 08:48:50 +08:00
|
|
|
* @cpu_msix_table: table for mapping cpus to msix index
|
|
|
|
* @cpu_msix_table_sz: table size
|
2011-12-01 10:12:04 +08:00
|
|
|
* @schedule_dead_ioc_flush_running_cmds: callback to flush pending commands
|
2009-03-09 15:21:12 +08:00
|
|
|
* @scsi_io_cb_idx: shost generated commands
|
|
|
|
* @tm_cb_idx: task management commands
|
2009-10-05 18:26:56 +08:00
|
|
|
* @scsih_cb_idx: scsih internal commands
|
2009-03-09 15:21:12 +08:00
|
|
|
* @transport_cb_idx: transport internal commands
|
|
|
|
* @ctl_cb_idx: clt internal commands
|
|
|
|
* @base_cb_idx: base internal commands
|
|
|
|
* @config_cb_idx: base internal commands
|
2010-06-17 16:16:13 +08:00
|
|
|
* @tm_tr_cb_idx : device removal target reset handshake
|
|
|
|
* @tm_tr_volume_cb_idx : volume removal target reset
|
2009-03-09 15:21:12 +08:00
|
|
|
* @base_cmds:
|
|
|
|
* @transport_cmds:
|
2009-10-05 18:26:56 +08:00
|
|
|
* @scsih_cmds:
|
2009-03-09 15:21:12 +08:00
|
|
|
* @tm_cmds:
|
|
|
|
* @ctl_cmds:
|
|
|
|
* @config_cmds:
|
|
|
|
* @base_add_sg_single: handler for either 32/64 bit sgl's
|
|
|
|
* @event_type: bits indicating which events to log
|
|
|
|
* @event_context: unique id for each logged event
|
|
|
|
* @event_log: event log pointer
|
|
|
|
* @event_masks: events that are masked
|
|
|
|
* @facts: static facts data
|
|
|
|
* @pfacts: static port facts data
|
|
|
|
* @manu_pg0: static manufacturing page 0
|
2009-08-20 15:53:49 +08:00
|
|
|
* @manu_pg10: static manufacturing page 10
|
2009-03-09 15:21:12 +08:00
|
|
|
* @bios_pg2: static bios page 2
|
|
|
|
* @bios_pg3: static bios page 3
|
|
|
|
* @ioc_pg8: static ioc page 8
|
|
|
|
* @iounit_pg0: static iounit page 0
|
|
|
|
* @iounit_pg1: static iounit page 1
|
|
|
|
* @sas_hba: sas host object
|
|
|
|
* @sas_expander_list: expander object list
|
|
|
|
* @sas_node_lock:
|
|
|
|
* @sas_device_list: sas device object list
|
|
|
|
* @sas_device_init_list: sas device object list (used only at init time)
|
|
|
|
* @sas_device_lock:
|
|
|
|
* @io_missing_delay: time for IO completed by fw when PDR enabled
|
|
|
|
* @device_missing_delay: time for device missing by fw when PDR enabled
|
2010-06-17 16:16:13 +08:00
|
|
|
* @sas_id : used for setting volume target IDs
|
2012-03-20 14:36:50 +08:00
|
|
|
* @blocking_handles: bitmask used to identify which devices need blocking
|
2010-06-17 16:16:13 +08:00
|
|
|
* @pd_handles : bitmask for PD handles
|
|
|
|
* @pd_handles_sz : size of pd_handle bitmask
|
2009-03-09 15:21:12 +08:00
|
|
|
* @config_page_sz: config page size
|
|
|
|
* @config_page: reserve memory for config page payload
|
|
|
|
* @config_page_dma:
|
2009-09-14 13:32:48 +08:00
|
|
|
* @hba_queue_depth: hba request queue depth
|
2009-03-09 15:21:12 +08:00
|
|
|
* @sge_size: sg element size for either 32/64 bit
|
2009-09-14 13:32:48 +08:00
|
|
|
* @scsiio_depth: SCSI_IO queue depth
|
2009-03-09 15:21:12 +08:00
|
|
|
* @request_sz: per request frame size
|
|
|
|
* @request: pool of request frames
|
|
|
|
* @request_dma:
|
|
|
|
* @request_dma_sz:
|
|
|
|
* @scsi_lookup: firmware request tracker list
|
|
|
|
* @scsi_lookup_lock:
|
|
|
|
* @free_list: free list of request
|
|
|
|
* @chain: pool of chains
|
|
|
|
* @pending_io_count:
|
|
|
|
* @reset_wq:
|
|
|
|
* @chain_dma:
|
|
|
|
* @max_sges_in_main_message: number sg elements in main message
|
|
|
|
* @max_sges_in_chain_message: number sg elements per chain
|
|
|
|
* @chains_needed_per_io: max chains per io
|
|
|
|
* @chain_offset_value_for_main_message: location 1st sg in main
|
|
|
|
* @chain_depth: total chains allocated
|
2009-09-14 13:32:48 +08:00
|
|
|
* @hi_priority_smid:
|
|
|
|
* @hi_priority:
|
|
|
|
* @hi_priority_dma:
|
|
|
|
* @hi_priority_depth:
|
|
|
|
* @hpr_lookup:
|
|
|
|
* @hpr_free_list:
|
|
|
|
* @internal_smid:
|
|
|
|
* @internal:
|
|
|
|
* @internal_dma:
|
|
|
|
* @internal_depth:
|
|
|
|
* @internal_lookup:
|
|
|
|
* @internal_free_list:
|
2009-03-09 15:21:12 +08:00
|
|
|
* @sense: pool of sense
|
|
|
|
* @sense_dma:
|
|
|
|
* @sense_dma_pool:
|
|
|
|
* @reply_depth: hba reply queue depth:
|
|
|
|
* @reply_sz: per reply frame size:
|
|
|
|
* @reply: pool of replys:
|
|
|
|
* @reply_dma:
|
|
|
|
* @reply_dma_pool:
|
|
|
|
* @reply_free_queue_depth: reply free depth
|
|
|
|
* @reply_free: pool for reply free queue (32 bit addr)
|
|
|
|
* @reply_free_dma:
|
|
|
|
* @reply_free_dma_pool:
|
|
|
|
* @reply_free_host_index: tail index in pool to insert free replys
|
|
|
|
* @reply_post_queue_depth: reply post queue depth
|
|
|
|
* @reply_post_free: pool for reply post (64bit descriptor)
|
|
|
|
* @reply_post_free_dma:
|
2011-09-08 08:48:50 +08:00
|
|
|
* @reply_queue_count: number of reply queue's
|
|
|
|
* @reply_queue_list: link list contaning the reply queue info
|
2009-03-09 15:21:12 +08:00
|
|
|
* @reply_post_host_index: head index in the pool where FW completes IO
|
2010-06-17 16:16:13 +08:00
|
|
|
* @delayed_tr_list: target reset link list
|
|
|
|
* @delayed_tr_volume_list: volume target reset link list
|
2009-03-09 15:21:12 +08:00
|
|
|
*/
|
|
|
|
struct MPT2SAS_ADAPTER {
|
|
|
|
struct list_head list;
|
|
|
|
struct Scsi_Host *shost;
|
|
|
|
u8 id;
|
2011-09-08 08:48:50 +08:00
|
|
|
int cpu_count;
|
2009-03-09 15:21:12 +08:00
|
|
|
char name[MPT_NAME_LENGTH];
|
|
|
|
char tmp_string[MPT_STRING_LENGTH];
|
|
|
|
struct pci_dev *pdev;
|
|
|
|
Mpi2SystemInterfaceRegs_t __iomem *chip;
|
2009-12-16 21:21:45 +08:00
|
|
|
resource_size_t chip_phys;
|
2009-03-09 15:21:12 +08:00
|
|
|
int logging_level;
|
2009-09-23 19:56:58 +08:00
|
|
|
int fwfault_debug;
|
2009-03-09 15:21:12 +08:00
|
|
|
u8 ir_firmware;
|
|
|
|
int bars;
|
|
|
|
u8 mask_interrupts;
|
|
|
|
|
|
|
|
/* fw fault handler */
|
|
|
|
char fault_reset_work_q_name[20];
|
|
|
|
struct workqueue_struct *fault_reset_work_q;
|
|
|
|
struct delayed_work fault_reset_work;
|
|
|
|
|
|
|
|
/* fw event handler */
|
|
|
|
char firmware_event_name[20];
|
|
|
|
struct workqueue_struct *firmware_event_thread;
|
|
|
|
spinlock_t fw_event_lock;
|
|
|
|
struct list_head fw_event_list;
|
|
|
|
|
|
|
|
/* misc flags */
|
|
|
|
int aen_event_read_flag;
|
|
|
|
u8 broadcast_aen_busy;
|
2011-06-14 13:26:43 +08:00
|
|
|
u16 broadcast_aen_pending;
|
2009-03-09 15:21:12 +08:00
|
|
|
u8 shost_recovery;
|
2010-06-17 15:58:55 +08:00
|
|
|
|
|
|
|
struct mutex reset_in_progress_mutex;
|
2009-03-09 15:21:12 +08:00
|
|
|
spinlock_t ioc_reset_in_progress_lock;
|
|
|
|
u8 ioc_link_reset_in_progress;
|
2011-10-19 18:06:26 +08:00
|
|
|
u8 ioc_reset_in_progress_status;
|
2010-06-17 15:58:55 +08:00
|
|
|
|
2009-03-09 15:21:12 +08:00
|
|
|
u8 ignore_loginfos;
|
|
|
|
u8 remove_host;
|
2010-07-09 04:44:34 +08:00
|
|
|
u8 pci_error_recovery;
|
2011-10-19 18:06:26 +08:00
|
|
|
u8 wait_for_discovery_to_complete;
|
|
|
|
struct completion port_enable_done;
|
|
|
|
u8 is_driver_loading;
|
|
|
|
u8 port_enable_failed;
|
|
|
|
|
|
|
|
u8 start_scan;
|
|
|
|
u16 start_scan_failed;
|
2009-03-09 15:21:12 +08:00
|
|
|
|
|
|
|
u8 msix_enable;
|
|
|
|
u16 msix_vector_count;
|
2011-09-08 08:48:50 +08:00
|
|
|
u8 *cpu_msix_table;
|
|
|
|
resource_size_t **reply_post_host_index;
|
|
|
|
u16 cpu_msix_table_sz;
|
2010-06-17 16:06:53 +08:00
|
|
|
u32 ioc_reset_count;
|
2011-12-01 10:12:04 +08:00
|
|
|
MPT2SAS_FLUSH_RUNNING_CMDS schedule_dead_ioc_flush_running_cmds;
|
2009-03-09 15:21:12 +08:00
|
|
|
|
|
|
|
/* internal commands, callback index */
|
|
|
|
u8 scsi_io_cb_idx;
|
|
|
|
u8 tm_cb_idx;
|
|
|
|
u8 transport_cb_idx;
|
2009-10-05 18:26:56 +08:00
|
|
|
u8 scsih_cb_idx;
|
2009-03-09 15:21:12 +08:00
|
|
|
u8 ctl_cb_idx;
|
|
|
|
u8 base_cb_idx;
|
2011-10-19 18:06:26 +08:00
|
|
|
u8 port_enable_cb_idx;
|
2009-03-09 15:21:12 +08:00
|
|
|
u8 config_cb_idx;
|
2009-09-14 13:34:23 +08:00
|
|
|
u8 tm_tr_cb_idx;
|
2010-06-17 16:16:13 +08:00
|
|
|
u8 tm_tr_volume_cb_idx;
|
2009-09-14 13:34:23 +08:00
|
|
|
u8 tm_sas_control_cb_idx;
|
2009-03-09 15:21:12 +08:00
|
|
|
struct _internal_cmd base_cmds;
|
2011-10-19 18:06:26 +08:00
|
|
|
struct _internal_cmd port_enable_cmds;
|
2009-03-09 15:21:12 +08:00
|
|
|
struct _internal_cmd transport_cmds;
|
2009-10-05 18:26:56 +08:00
|
|
|
struct _internal_cmd scsih_cmds;
|
2009-03-09 15:21:12 +08:00
|
|
|
struct _internal_cmd tm_cmds;
|
|
|
|
struct _internal_cmd ctl_cmds;
|
|
|
|
struct _internal_cmd config_cmds;
|
|
|
|
|
|
|
|
MPT_ADD_SGE base_add_sg_single;
|
|
|
|
|
|
|
|
/* event log */
|
|
|
|
u32 event_type[MPI2_EVENT_NOTIFY_EVENTMASK_WORDS];
|
|
|
|
u32 event_context;
|
|
|
|
void *event_log;
|
|
|
|
u32 event_masks[MPI2_EVENT_NOTIFY_EVENTMASK_WORDS];
|
|
|
|
|
|
|
|
/* static config pages */
|
2011-06-14 13:24:56 +08:00
|
|
|
struct mpt2sas_facts facts;
|
|
|
|
struct mpt2sas_port_facts *pfacts;
|
2009-03-09 15:21:12 +08:00
|
|
|
Mpi2ManufacturingPage0_t manu_pg0;
|
|
|
|
Mpi2BiosPage2_t bios_pg2;
|
|
|
|
Mpi2BiosPage3_t bios_pg3;
|
|
|
|
Mpi2IOCPage8_t ioc_pg8;
|
|
|
|
Mpi2IOUnitPage0_t iounit_pg0;
|
|
|
|
Mpi2IOUnitPage1_t iounit_pg1;
|
|
|
|
|
|
|
|
struct _boot_device req_boot_device;
|
|
|
|
struct _boot_device req_alt_boot_device;
|
|
|
|
struct _boot_device current_boot_device;
|
|
|
|
|
|
|
|
/* sas hba, expander, and device list */
|
|
|
|
struct _sas_node sas_hba;
|
|
|
|
struct list_head sas_expander_list;
|
|
|
|
spinlock_t sas_node_lock;
|
|
|
|
struct list_head sas_device_list;
|
|
|
|
struct list_head sas_device_init_list;
|
|
|
|
spinlock_t sas_device_lock;
|
|
|
|
struct list_head raid_device_list;
|
|
|
|
spinlock_t raid_device_lock;
|
|
|
|
u8 io_missing_delay;
|
|
|
|
u16 device_missing_delay;
|
|
|
|
int sas_id;
|
2012-03-20 14:36:50 +08:00
|
|
|
void *blocking_handles;
|
2010-06-17 16:16:13 +08:00
|
|
|
void *pd_handles;
|
|
|
|
u16 pd_handles_sz;
|
|
|
|
|
2009-03-09 15:21:12 +08:00
|
|
|
/* config page */
|
|
|
|
u16 config_page_sz;
|
|
|
|
void *config_page;
|
|
|
|
dma_addr_t config_page_dma;
|
|
|
|
|
2009-09-14 13:32:48 +08:00
|
|
|
/* scsiio request */
|
|
|
|
u16 hba_queue_depth;
|
2009-03-09 15:21:12 +08:00
|
|
|
u16 sge_size;
|
2009-09-14 13:32:48 +08:00
|
|
|
u16 scsiio_depth;
|
2009-03-09 15:21:12 +08:00
|
|
|
u16 request_sz;
|
|
|
|
u8 *request;
|
|
|
|
dma_addr_t request_dma;
|
|
|
|
u32 request_dma_sz;
|
2011-01-04 14:09:20 +08:00
|
|
|
struct scsiio_tracker *scsi_lookup;
|
2010-03-17 18:52:52 +08:00
|
|
|
ulong scsi_lookup_pages;
|
|
|
|
spinlock_t scsi_lookup_lock;
|
2009-03-09 15:21:12 +08:00
|
|
|
struct list_head free_list;
|
|
|
|
int pending_io_count;
|
|
|
|
wait_queue_head_t reset_wq;
|
|
|
|
|
|
|
|
/* chain */
|
2010-11-13 07:04:06 +08:00
|
|
|
struct chain_tracker *chain_lookup;
|
|
|
|
struct list_head free_chain_list;
|
|
|
|
struct dma_pool *chain_dma_pool;
|
|
|
|
ulong chain_pages;
|
2009-03-09 15:21:12 +08:00
|
|
|
u16 max_sges_in_main_message;
|
|
|
|
u16 max_sges_in_chain_message;
|
|
|
|
u16 chains_needed_per_io;
|
|
|
|
u16 chain_offset_value_for_main_message;
|
2010-03-17 18:52:52 +08:00
|
|
|
u32 chain_depth;
|
2009-03-09 15:21:12 +08:00
|
|
|
|
2009-09-14 13:32:48 +08:00
|
|
|
/* hi-priority queue */
|
|
|
|
u16 hi_priority_smid;
|
|
|
|
u8 *hi_priority;
|
|
|
|
dma_addr_t hi_priority_dma;
|
|
|
|
u16 hi_priority_depth;
|
|
|
|
struct request_tracker *hpr_lookup;
|
|
|
|
struct list_head hpr_free_list;
|
|
|
|
|
|
|
|
/* internal queue */
|
|
|
|
u16 internal_smid;
|
|
|
|
u8 *internal;
|
|
|
|
dma_addr_t internal_dma;
|
|
|
|
u16 internal_depth;
|
|
|
|
struct request_tracker *internal_lookup;
|
|
|
|
struct list_head internal_free_list;
|
|
|
|
|
2009-03-09 15:21:12 +08:00
|
|
|
/* sense */
|
|
|
|
u8 *sense;
|
|
|
|
dma_addr_t sense_dma;
|
|
|
|
struct dma_pool *sense_dma_pool;
|
|
|
|
|
|
|
|
/* reply */
|
|
|
|
u16 reply_sz;
|
|
|
|
u8 *reply;
|
|
|
|
dma_addr_t reply_dma;
|
2010-11-13 07:01:14 +08:00
|
|
|
u32 reply_dma_max_address;
|
|
|
|
u32 reply_dma_min_address;
|
2009-03-09 15:21:12 +08:00
|
|
|
struct dma_pool *reply_dma_pool;
|
|
|
|
|
|
|
|
/* reply free queue */
|
|
|
|
u16 reply_free_queue_depth;
|
2011-06-14 13:24:56 +08:00
|
|
|
__le32 *reply_free;
|
2009-03-09 15:21:12 +08:00
|
|
|
dma_addr_t reply_free_dma;
|
|
|
|
struct dma_pool *reply_free_dma_pool;
|
|
|
|
u32 reply_free_host_index;
|
|
|
|
|
|
|
|
/* reply post queue */
|
|
|
|
u16 reply_post_queue_depth;
|
|
|
|
Mpi2ReplyDescriptorsUnion_t *reply_post_free;
|
|
|
|
dma_addr_t reply_post_free_dma;
|
|
|
|
struct dma_pool *reply_post_free_dma_pool;
|
2011-09-08 08:48:50 +08:00
|
|
|
u8 reply_queue_count;
|
|
|
|
struct list_head reply_queue_list;
|
2009-03-09 15:21:12 +08:00
|
|
|
|
2009-09-14 13:34:23 +08:00
|
|
|
struct list_head delayed_tr_list;
|
2010-06-17 16:16:13 +08:00
|
|
|
struct list_head delayed_tr_volume_list;
|
2009-09-14 13:34:23 +08:00
|
|
|
|
2009-03-09 15:21:12 +08:00
|
|
|
/* diag buffer support */
|
|
|
|
u8 *diag_buffer[MPI2_DIAG_BUF_TYPE_COUNT];
|
|
|
|
u32 diag_buffer_sz[MPI2_DIAG_BUF_TYPE_COUNT];
|
|
|
|
dma_addr_t diag_buffer_dma[MPI2_DIAG_BUF_TYPE_COUNT];
|
|
|
|
u8 diag_buffer_status[MPI2_DIAG_BUF_TYPE_COUNT];
|
|
|
|
u32 unique_id[MPI2_DIAG_BUF_TYPE_COUNT];
|
2009-08-20 15:53:49 +08:00
|
|
|
Mpi2ManufacturingPage10_t manu_pg10;
|
2009-03-09 15:21:12 +08:00
|
|
|
u32 product_specific[MPI2_DIAG_BUF_TYPE_COUNT][23];
|
|
|
|
u32 diagnostic_flags[MPI2_DIAG_BUF_TYPE_COUNT];
|
2010-06-17 16:13:17 +08:00
|
|
|
u32 ring_buffer_offset;
|
|
|
|
u32 ring_buffer_sz;
|
[SCSI] mpt2sas : WarpDrive New product SSS6200 support added
This patch has Support for the new solid state device product SSS6200
from LSI and relavent features w.r.t SSS6200.
The major feature added in this driver is supporting Direct-I/O to the
SSS6200 storage.There are some additional changes done to avoid exposing
the RAID member disks to the OS and hiding/exposing drives based on the
OEM Specific Flag in Manufacturing Page10 (this is required to handle
specific changes in the SSS6200 firmware).
Each and every changes are listed below.
1. Hiding IR related messages.
For SSS6200, the driver is modified not to print IR related events.
Even if the debugging is enabled the IR related messages will not be displayed.
In some places if there is a need to display a message related to IR the
string "IR" is replaced with string "DD" and the string "volume" is replaced
with "direct drive". But the function names are not changed hence there are
some places where the reference to volume can be seen if debug level is set.
2. Removed RAID transport support
In Linux the user can retrieve RAID volume information from the sysfs directory.
This support is removed for SSS6200.
3. Direct I/O support.
The driver tries to enable direct I/O when a volume is reported to the driver
by the firmware through IRCC events and the driver does this just before
reporting to the OS, hence all the OS issued I/O can go through direct path
if they can, The first validation is to see whether the manufacturing page10
flag is set to expose all drives always. If that is set, the driver will not
enable direct I/O and displays the message "DDIO" is disabled globally as
drives are exposed. The driver checks whether there is more than one volume
in the controller, if so the direct I/O will be disabled globally for all
volumes in the controller and the message displayed will be "DDIO is disabled
globally as number of drives > 1.
If retrieving number of PD is failed the driver will not enable direct I/O
and displays the message Failure in computing number of drives DDIO disabled.
If memory allocation for RAIDVolumePage0 is failed, the driver will not enable
direct I/O and displays the message Memory allocation failure for
RVPG0 DDIO disabled. If retrieving RAIDVolumePage0 is failed the driver will
not enable direct I/O and displays the message Failure in retrieving
RVPG0 DDIO disabled
If the number of PD in a volume is greater than 8, then the direct I/O will
be disabled.
If any of individual drives handle retrieval is failed then the DD-IO will
be disabled.
If the volume is not RAID0 or if the block size is not 512 then the DD-IO will
be disabled.
If the volume size is greater than 2TB then the DD-IO will be disabled.
If the driver is not able to find a valid stripe exponent using the configured
stripe size then the DD-IO will be disabled
When the DD-IO is enabled the driver will check every I/O request issued to
the storage and checks whether the request is either
READ6/WRITE6/READ10/WRITE10, if it is and if the complete I/O transfer
is within a stripe size then the I/O is redirected to
the drive directly instead of the volume.
On completion of every I/O, if the completion is failure means if the reply
is address reply with a reply frame associated with it, then the type of I/O
will be checked, if the I/O is direct then the I/O will be retried to
the volume once.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Reviewed-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-04-07 15:02:49 +08:00
|
|
|
u8 is_warpdrive;
|
|
|
|
u8 hide_ir_msg;
|
|
|
|
u8 mfg_pg10_hide_flag;
|
|
|
|
u8 hide_drives;
|
|
|
|
|
2009-03-09 15:21:12 +08:00
|
|
|
};
|
|
|
|
|
2009-09-14 13:34:23 +08:00
|
|
|
typedef u8 (*MPT_CALLBACK)(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index,
|
|
|
|
u32 reply);
|
2009-03-09 15:21:12 +08:00
|
|
|
|
|
|
|
|
|
|
|
/* base shared API */
|
2009-03-16 11:37:18 +08:00
|
|
|
extern struct list_head mpt2sas_ioc_list;
|
2009-08-07 22:07:59 +08:00
|
|
|
void mpt2sas_base_start_watchdog(struct MPT2SAS_ADAPTER *ioc);
|
|
|
|
void mpt2sas_base_stop_watchdog(struct MPT2SAS_ADAPTER *ioc);
|
2009-03-09 15:21:12 +08:00
|
|
|
|
|
|
|
int mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc);
|
|
|
|
void mpt2sas_base_detach(struct MPT2SAS_ADAPTER *ioc);
|
|
|
|
int mpt2sas_base_map_resources(struct MPT2SAS_ADAPTER *ioc);
|
|
|
|
void mpt2sas_base_free_resources(struct MPT2SAS_ADAPTER *ioc);
|
|
|
|
int mpt2sas_base_hard_reset_handler(struct MPT2SAS_ADAPTER *ioc, int sleep_flag,
|
|
|
|
enum reset_type type);
|
|
|
|
|
|
|
|
void *mpt2sas_base_get_msg_frame(struct MPT2SAS_ADAPTER *ioc, u16 smid);
|
|
|
|
void *mpt2sas_base_get_sense_buffer(struct MPT2SAS_ADAPTER *ioc, u16 smid);
|
|
|
|
void mpt2sas_base_build_zero_len_sge(struct MPT2SAS_ADAPTER *ioc, void *paddr);
|
2009-09-23 20:04:13 +08:00
|
|
|
__le32 mpt2sas_base_get_sense_buffer_dma(struct MPT2SAS_ADAPTER *ioc,
|
2009-09-14 13:34:23 +08:00
|
|
|
u16 smid);
|
2011-09-08 08:48:50 +08:00
|
|
|
void mpt2sas_base_flush_reply_queues(struct MPT2SAS_ADAPTER *ioc);
|
2009-03-09 15:21:12 +08:00
|
|
|
|
2009-09-14 13:32:48 +08:00
|
|
|
/* hi-priority queue */
|
|
|
|
u16 mpt2sas_base_get_smid_hpr(struct MPT2SAS_ADAPTER *ioc, u8 cb_idx);
|
|
|
|
u16 mpt2sas_base_get_smid_scsiio(struct MPT2SAS_ADAPTER *ioc, u8 cb_idx,
|
|
|
|
struct scsi_cmnd *scmd);
|
|
|
|
|
2009-03-09 15:21:12 +08:00
|
|
|
u16 mpt2sas_base_get_smid(struct MPT2SAS_ADAPTER *ioc, u8 cb_idx);
|
|
|
|
void mpt2sas_base_free_smid(struct MPT2SAS_ADAPTER *ioc, u16 smid);
|
2009-09-25 14:14:41 +08:00
|
|
|
void mpt2sas_base_put_smid_scsi_io(struct MPT2SAS_ADAPTER *ioc, u16 smid,
|
2009-03-09 15:21:12 +08:00
|
|
|
u16 handle);
|
2009-09-25 14:14:41 +08:00
|
|
|
void mpt2sas_base_put_smid_hi_priority(struct MPT2SAS_ADAPTER *ioc, u16 smid);
|
2009-03-09 15:21:12 +08:00
|
|
|
void mpt2sas_base_put_smid_target_assist(struct MPT2SAS_ADAPTER *ioc, u16 smid,
|
2009-09-25 14:14:41 +08:00
|
|
|
u16 io_index);
|
|
|
|
void mpt2sas_base_put_smid_default(struct MPT2SAS_ADAPTER *ioc, u16 smid);
|
2009-03-09 15:21:12 +08:00
|
|
|
void mpt2sas_base_initialize_callback_handler(void);
|
|
|
|
u8 mpt2sas_base_register_callback_handler(MPT_CALLBACK cb_func);
|
|
|
|
void mpt2sas_base_release_callback_handler(u8 cb_idx);
|
|
|
|
|
2009-09-14 13:34:23 +08:00
|
|
|
u8 mpt2sas_base_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index,
|
2009-09-25 14:14:41 +08:00
|
|
|
u32 reply);
|
2011-10-19 18:06:26 +08:00
|
|
|
u8 mpt2sas_port_enable_done(struct MPT2SAS_ADAPTER *ioc, u16 smid,
|
|
|
|
u8 msix_index, u32 reply);
|
2009-03-09 15:21:12 +08:00
|
|
|
void *mpt2sas_base_get_reply_virt_addr(struct MPT2SAS_ADAPTER *ioc, u32 phys_addr);
|
|
|
|
|
|
|
|
u32 mpt2sas_base_get_iocstate(struct MPT2SAS_ADAPTER *ioc, int cooked);
|
|
|
|
|
|
|
|
void mpt2sas_base_fault_info(struct MPT2SAS_ADAPTER *ioc , u16 fault_code);
|
|
|
|
int mpt2sas_base_sas_iounit_control(struct MPT2SAS_ADAPTER *ioc,
|
|
|
|
Mpi2SasIoUnitControlReply_t *mpi_reply, Mpi2SasIoUnitControlRequest_t
|
|
|
|
*mpi_request);
|
|
|
|
int mpt2sas_base_scsi_enclosure_processor(struct MPT2SAS_ADAPTER *ioc,
|
|
|
|
Mpi2SepReply_t *mpi_reply, Mpi2SepRequest_t *mpi_request);
|
|
|
|
void mpt2sas_base_validate_event_type(struct MPT2SAS_ADAPTER *ioc, u32 *event_type);
|
|
|
|
|
2009-09-23 19:56:58 +08:00
|
|
|
void mpt2sas_halt_firmware(struct MPT2SAS_ADAPTER *ioc);
|
|
|
|
|
2011-10-19 18:06:26 +08:00
|
|
|
int mpt2sas_port_enable(struct MPT2SAS_ADAPTER *ioc);
|
|
|
|
|
2009-03-09 15:21:12 +08:00
|
|
|
/* scsih shared API */
|
2009-09-14 13:34:23 +08:00
|
|
|
u8 mpt2sas_scsih_event_callback(struct MPT2SAS_ADAPTER *ioc, u8 msix_index,
|
|
|
|
u32 reply);
|
2010-03-17 18:55:59 +08:00
|
|
|
int mpt2sas_scsih_issue_tm(struct MPT2SAS_ADAPTER *ioc, u16 handle,
|
2011-06-14 13:26:43 +08:00
|
|
|
uint channel, uint id, uint lun, u8 type, u16 smid_task,
|
|
|
|
ulong timeout, unsigned long serial_number, enum mutex_type m_type);
|
2009-03-09 15:21:12 +08:00
|
|
|
void mpt2sas_scsih_set_tm_flag(struct MPT2SAS_ADAPTER *ioc, u16 handle);
|
|
|
|
void mpt2sas_scsih_clear_tm_flag(struct MPT2SAS_ADAPTER *ioc, u16 handle);
|
2010-11-13 07:05:30 +08:00
|
|
|
void mpt2sas_expander_remove(struct MPT2SAS_ADAPTER *ioc, u64 sas_address);
|
2012-03-20 14:36:50 +08:00
|
|
|
void mpt2sas_device_remove_by_sas_address(struct MPT2SAS_ADAPTER *ioc,
|
|
|
|
u64 sas_address);
|
2009-03-09 15:21:12 +08:00
|
|
|
struct _sas_node *mpt2sas_scsih_expander_find_by_handle(struct MPT2SAS_ADAPTER *ioc,
|
|
|
|
u16 handle);
|
|
|
|
struct _sas_node *mpt2sas_scsih_expander_find_by_sas_address(struct MPT2SAS_ADAPTER
|
|
|
|
*ioc, u64 sas_address);
|
|
|
|
struct _sas_device *mpt2sas_scsih_sas_device_find_by_sas_address(
|
|
|
|
struct MPT2SAS_ADAPTER *ioc, u64 sas_address);
|
|
|
|
|
2011-10-19 18:06:26 +08:00
|
|
|
void mpt2sas_port_enable_complete(struct MPT2SAS_ADAPTER *ioc);
|
|
|
|
|
2009-03-09 15:21:12 +08:00
|
|
|
void mpt2sas_scsih_reset_handler(struct MPT2SAS_ADAPTER *ioc, int reset_phase);
|
|
|
|
|
|
|
|
/* config shared API */
|
2009-09-14 13:34:23 +08:00
|
|
|
u8 mpt2sas_config_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index,
|
2009-09-25 14:14:41 +08:00
|
|
|
u32 reply);
|
2009-03-09 15:21:12 +08:00
|
|
|
int mpt2sas_config_get_number_hba_phys(struct MPT2SAS_ADAPTER *ioc, u8 *num_phys);
|
|
|
|
int mpt2sas_config_get_manufacturing_pg0(struct MPT2SAS_ADAPTER *ioc,
|
|
|
|
Mpi2ConfigReply_t *mpi_reply, Mpi2ManufacturingPage0_t *config_page);
|
2009-08-20 15:53:49 +08:00
|
|
|
int mpt2sas_config_get_manufacturing_pg10(struct MPT2SAS_ADAPTER *ioc,
|
|
|
|
Mpi2ConfigReply_t *mpi_reply, Mpi2ManufacturingPage10_t *config_page);
|
2009-03-09 15:21:12 +08:00
|
|
|
int mpt2sas_config_get_bios_pg2(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|
|
|
*mpi_reply, Mpi2BiosPage2_t *config_page);
|
|
|
|
int mpt2sas_config_get_bios_pg3(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|
|
|
*mpi_reply, Mpi2BiosPage3_t *config_page);
|
|
|
|
int mpt2sas_config_get_iounit_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|
|
|
*mpi_reply, Mpi2IOUnitPage0_t *config_page);
|
|
|
|
int mpt2sas_config_get_sas_device_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|
|
|
*mpi_reply, Mpi2SasDevicePage0_t *config_page, u32 form, u32 handle);
|
|
|
|
int mpt2sas_config_get_sas_device_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|
|
|
*mpi_reply, Mpi2SasDevicePage1_t *config_page, u32 form, u32 handle);
|
|
|
|
int mpt2sas_config_get_sas_iounit_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|
|
|
*mpi_reply, Mpi2SasIOUnitPage0_t *config_page, u16 sz);
|
|
|
|
int mpt2sas_config_get_iounit_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|
|
|
*mpi_reply, Mpi2IOUnitPage1_t *config_page);
|
|
|
|
int mpt2sas_config_set_iounit_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
2009-08-20 15:54:31 +08:00
|
|
|
*mpi_reply, Mpi2IOUnitPage1_t *config_page);
|
2009-03-09 15:21:12 +08:00
|
|
|
int mpt2sas_config_get_sas_iounit_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|
|
|
*mpi_reply, Mpi2SasIOUnitPage1_t *config_page, u16 sz);
|
2009-12-16 21:25:26 +08:00
|
|
|
int mpt2sas_config_set_sas_iounit_pg1(struct MPT2SAS_ADAPTER *ioc,
|
|
|
|
Mpi2ConfigReply_t *mpi_reply, Mpi2SasIOUnitPage1_t *config_page, u16 sz);
|
2009-03-09 15:21:12 +08:00
|
|
|
int mpt2sas_config_get_ioc_pg8(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|
|
|
*mpi_reply, Mpi2IOCPage8_t *config_page);
|
|
|
|
int mpt2sas_config_get_expander_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|
|
|
*mpi_reply, Mpi2ExpanderPage0_t *config_page, u32 form, u32 handle);
|
|
|
|
int mpt2sas_config_get_expander_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|
|
|
*mpi_reply, Mpi2ExpanderPage1_t *config_page, u32 phy_number, u16 handle);
|
|
|
|
int mpt2sas_config_get_enclosure_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|
|
|
*mpi_reply, Mpi2SasEnclosurePage0_t *config_page, u32 form, u32 handle);
|
|
|
|
int mpt2sas_config_get_phy_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|
|
|
*mpi_reply, Mpi2SasPhyPage0_t *config_page, u32 phy_number);
|
|
|
|
int mpt2sas_config_get_phy_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|
|
|
*mpi_reply, Mpi2SasPhyPage1_t *config_page, u32 phy_number);
|
|
|
|
int mpt2sas_config_get_raid_volume_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|
|
|
*mpi_reply, Mpi2RaidVolPage1_t *config_page, u32 form, u32 handle);
|
|
|
|
int mpt2sas_config_get_number_pds(struct MPT2SAS_ADAPTER *ioc, u16 handle, u8 *num_pds);
|
|
|
|
int mpt2sas_config_get_raid_volume_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|
|
|
*mpi_reply, Mpi2RaidVolPage0_t *config_page, u32 form, u32 handle, u16 sz);
|
|
|
|
int mpt2sas_config_get_phys_disk_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|
|
|
*mpi_reply, Mpi2RaidPhysDiskPage0_t *config_page, u32 form,
|
|
|
|
u32 form_specific);
|
|
|
|
int mpt2sas_config_get_volume_handle(struct MPT2SAS_ADAPTER *ioc, u16 pd_handle,
|
|
|
|
u16 *volume_handle);
|
|
|
|
int mpt2sas_config_get_volume_wwid(struct MPT2SAS_ADAPTER *ioc, u16 volume_handle,
|
|
|
|
u64 *wwid);
|
|
|
|
/* ctl shared API */
|
|
|
|
extern struct device_attribute *mpt2sas_host_attrs[];
|
|
|
|
extern struct device_attribute *mpt2sas_dev_attrs[];
|
|
|
|
void mpt2sas_ctl_init(void);
|
|
|
|
void mpt2sas_ctl_exit(void);
|
2009-09-14 13:34:23 +08:00
|
|
|
u8 mpt2sas_ctl_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index,
|
2009-09-25 14:14:41 +08:00
|
|
|
u32 reply);
|
2009-03-09 15:21:12 +08:00
|
|
|
void mpt2sas_ctl_reset_handler(struct MPT2SAS_ADAPTER *ioc, int reset_phase);
|
2009-09-14 13:34:23 +08:00
|
|
|
u8 mpt2sas_ctl_event_callback(struct MPT2SAS_ADAPTER *ioc, u8 msix_index,
|
2009-09-25 14:14:41 +08:00
|
|
|
u32 reply);
|
2009-03-09 15:21:12 +08:00
|
|
|
void mpt2sas_ctl_add_to_event_log(struct MPT2SAS_ADAPTER *ioc,
|
|
|
|
Mpi2EventNotificationReply_t *mpi_reply);
|
|
|
|
|
2009-09-23 19:58:09 +08:00
|
|
|
void mpt2sas_enable_diag_buffer(struct MPT2SAS_ADAPTER *ioc,
|
|
|
|
u8 bits_to_regsiter);
|
|
|
|
|
2009-03-09 15:21:12 +08:00
|
|
|
/* transport shared API */
|
2009-09-14 13:34:23 +08:00
|
|
|
u8 mpt2sas_transport_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index,
|
|
|
|
u32 reply);
|
2009-03-09 15:21:12 +08:00
|
|
|
struct _sas_port *mpt2sas_transport_port_add(struct MPT2SAS_ADAPTER *ioc,
|
2009-09-23 19:51:29 +08:00
|
|
|
u16 handle, u64 sas_address);
|
2009-03-09 15:21:12 +08:00
|
|
|
void mpt2sas_transport_port_remove(struct MPT2SAS_ADAPTER *ioc, u64 sas_address,
|
2009-09-23 19:51:29 +08:00
|
|
|
u64 sas_address_parent);
|
2009-03-09 15:21:12 +08:00
|
|
|
int mpt2sas_transport_add_host_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_phy
|
|
|
|
*mpt2sas_phy, Mpi2SasPhyPage0_t phy_pg0, struct device *parent_dev);
|
|
|
|
int mpt2sas_transport_add_expander_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_phy
|
|
|
|
*mpt2sas_phy, Mpi2ExpanderPage1_t expander_pg1, struct device *parent_dev);
|
2009-09-23 19:51:29 +08:00
|
|
|
void mpt2sas_transport_update_links(struct MPT2SAS_ADAPTER *ioc,
|
|
|
|
u64 sas_address, u16 handle, u8 phy_number, u8 link_rate);
|
2009-03-09 15:21:12 +08:00
|
|
|
extern struct sas_function_template mpt2sas_transport_functions;
|
|
|
|
extern struct scsi_transport_template *mpt2sas_transport_template;
|
2009-08-20 15:53:19 +08:00
|
|
|
extern int scsi_internal_device_block(struct scsi_device *sdev);
|
2009-09-14 13:34:23 +08:00
|
|
|
extern u8 mpt2sas_stm_zero_smid_handler(struct MPT2SAS_ADAPTER *ioc,
|
|
|
|
u8 msix_index, u32 reply);
|
2012-05-18 12:56:57 +08:00
|
|
|
extern int scsi_internal_device_unblock(struct scsi_device *sdev,
|
|
|
|
enum scsi_device_state new_state);
|
2009-03-09 15:21:12 +08:00
|
|
|
|
|
|
|
#endif /* MPT2SAS_BASE_H_INCLUDED */
|