mirror of
https://github.com/eLvErDe/hwraid.git
synced 2025-07-27 07:44:01 +02:00
Import mpt-status
This commit is contained in:
parent
1e0b89d1ed
commit
b46b471785
31
packaging/debian/mpt-status/README.Debian
Normal file
31
packaging/debian/mpt-status/README.Debian
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
README.Debian for mpt-status package
|
||||||
|
------------------------------------
|
||||||
|
|
||||||
|
Before you can use the mpt-status tool you have to make sure that the
|
||||||
|
mptctl module is loaded. You can do that with "modprobe mptctl" or with
|
||||||
|
adding mptctl to the file "/etc/modules" to make sure it is always
|
||||||
|
loaded during system startup.
|
||||||
|
|
||||||
|
Possible configuration:
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
If you want to change the default configuration of the init script you
|
||||||
|
can create the file /etc/default/mpt-statusd and specify the following
|
||||||
|
values.
|
||||||
|
|
||||||
|
MAILTO=
|
||||||
|
PERIOD=
|
||||||
|
REMIND=
|
||||||
|
ID=
|
||||||
|
|
||||||
|
Use MAILTO to specify which user shall get the status mails
|
||||||
|
(default is root).
|
||||||
|
|
||||||
|
With PERIOD you can fix the seconds between each check.
|
||||||
|
|
||||||
|
And REMIND specifies the seconds between each reminder.
|
||||||
|
|
||||||
|
By setting the ID field it is possible to specify the primary device,
|
||||||
|
which can be find out by using "mpt-status -p" (the default is 0).
|
||||||
|
|
||||||
|
-- Steffen Joeris <white@debian.org> Wed, 10 Jan 2007 14:37:46 +0100
|
201
packaging/debian/mpt-status/changelog
Normal file
201
packaging/debian/mpt-status/changelog
Normal file
@ -0,0 +1,201 @@
|
|||||||
|
mpt-status (1.2.0-4.2.hwraid1) unstable; urgency=low
|
||||||
|
|
||||||
|
* Non-maintainer upload.
|
||||||
|
* Based on debian's 1.2.0-4.2 release.
|
||||||
|
* Relax debhelper bdep to allow sarge builds.
|
||||||
|
* Allow pciutils-dev bdep as libpci-dev alternative.
|
||||||
|
|
||||||
|
-- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Thu, 21 Aug 2008 16:09:53 +0200
|
||||||
|
|
||||||
|
mpt-status (1.2.0-4.2) unstable; urgency=low
|
||||||
|
|
||||||
|
* Non-maintainer upload.
|
||||||
|
* Build depend on libpci-dev. Closes: #478386
|
||||||
|
|
||||||
|
-- Anibal Monsalve Salazar <anibal@debian.org> Sat, 03 May 2008 11:50:27 +1000
|
||||||
|
|
||||||
|
mpt-status (1.2.0-4.1) unstable; urgency=low
|
||||||
|
|
||||||
|
* Non-maintainer upload to solve release goal.
|
||||||
|
* Add LSB dependency header to init.d scripts (Closes: #470938).
|
||||||
|
|
||||||
|
-- Petter Reinholdtsen <pere@debian.org> Sat, 29 Mar 2008 13:40:47 +0100
|
||||||
|
|
||||||
|
mpt-status (1.2.0-4) unstable; urgency=high
|
||||||
|
|
||||||
|
* High urgency for RC bugfix
|
||||||
|
* Fix FTBFS with 20-compiler.patch to remove include for
|
||||||
|
linux/compiler.h from the header file, which is no longer available
|
||||||
|
with the switch to linux-libc-dev (Closes: #423789)
|
||||||
|
Thanks to Steve Langasek for the patch
|
||||||
|
* Change arch field to any as it might also be useful for other archs
|
||||||
|
* Bump debhelper level to 5
|
||||||
|
|
||||||
|
-- Steffen Joeris <white@debian.org> Mon, 14 May 2007 21:12:10 +1000
|
||||||
|
|
||||||
|
mpt-status (1.2.0-3) unstable; urgency=low
|
||||||
|
|
||||||
|
* Upload to unstable (Closes: #390923)
|
||||||
|
|
||||||
|
-- Steffen Joeris <white@debian.org> Mon, 23 Apr 2007 07:01:26 +1000
|
||||||
|
|
||||||
|
mpt-status (1.2.0-2) experimental; urgency=low
|
||||||
|
|
||||||
|
* Add dependency against mailx which is needed by the init script
|
||||||
|
to report failures (see #411746)
|
||||||
|
|
||||||
|
-- Steffen Joeris <white@debian.org> Thu, 22 Feb 2007 00:01:03 +1100
|
||||||
|
|
||||||
|
mpt-status (1.2.0-1) experimental; urgency=low
|
||||||
|
|
||||||
|
* New upstream release
|
||||||
|
- Fixed version string (Closes: #390921)
|
||||||
|
* Drop 20-nonlinux.patch as it got included by upstream
|
||||||
|
* Include mpi_raid.h from kernel source package to debian/includes
|
||||||
|
* Include patch to improve the output of mpt-statusd and internal
|
||||||
|
functions, thanks to Jochen Pawletta
|
||||||
|
* Drop debian/mpt-status.8 manpage as it is now included by upstream
|
||||||
|
* Thanks to Petter Reinholdtsen for testing and hardware access
|
||||||
|
|
||||||
|
-- Steffen Joeris <white@debian.org> Wed, 17 Jan 2007 17:23:34 +0100
|
||||||
|
|
||||||
|
mpt-status (1.1.6-12) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Severity set to medium as this upload fixes an important bug
|
||||||
|
* Provide the ID function to explicitely specify the primary id,
|
||||||
|
because the -p argument produces different output by different
|
||||||
|
ids (Closes: #404962)
|
||||||
|
* Thanks to Jochen Pawletta
|
||||||
|
|
||||||
|
-- Steffen Joeris <white@debian.org> Thu, 11 Jan 2007 17:12:36 +0100
|
||||||
|
|
||||||
|
mpt-status (1.1.6-11) unstable; urgency=high
|
||||||
|
|
||||||
|
* Severity is still high as it should go into etch
|
||||||
|
* Revert the debhelper change so that it is back to level 4
|
||||||
|
which was requested by the Release Team
|
||||||
|
|
||||||
|
-- Steffen Joeris <white@debian.org> Sun, 7 Jan 2007 23:23:01 +0100
|
||||||
|
|
||||||
|
mpt-status (1.1.6-10) unstable; urgency=high
|
||||||
|
|
||||||
|
* Set severity to high as it fixes an RC bug and should go into etch
|
||||||
|
* Bump debhelper level to 5
|
||||||
|
* Change my maintainer address
|
||||||
|
* Use the -p option to probe through the id's in case it is not on
|
||||||
|
id 0 (Closes: #404962)
|
||||||
|
* Remove useless additional log message about stopping the daemon in
|
||||||
|
d_stop()
|
||||||
|
* Provide the d_stop_by_restart() function which is needed for a
|
||||||
|
workaround to make sure the init script starts again
|
||||||
|
(Closes: #405938)
|
||||||
|
* Thanks to Petter Reinholdtsen for testing and hardware access
|
||||||
|
|
||||||
|
-- Steffen Joeris <white@debian.org> Wed, 3 Jan 2007 21:17:56 +0100
|
||||||
|
|
||||||
|
mpt-status (1.1.6-9) unstable; urgency=high
|
||||||
|
|
||||||
|
* Severity high because this upload fixes two RC bugs
|
||||||
|
* Make sure that d_start() exits with error code 0 if there is
|
||||||
|
already a running daemon (Closes: #401580)
|
||||||
|
Thanks to Morten Werner Olsen
|
||||||
|
* Add check to the d_stop() function to see if the daemon is already
|
||||||
|
stopped which according to lsb standards should exit with error
|
||||||
|
code 0
|
||||||
|
* Start the daemon with the --oknodo option which allows us to start
|
||||||
|
other daemons later, while the first one is defunct and waits for
|
||||||
|
the sleep call to exit afterwards (Closes: #401554)
|
||||||
|
* Remove the check for the "/proc/scsi/mptspi" directory, as there
|
||||||
|
might be others in use instead of this one, however the version
|
||||||
|
check should be enough and exits gracefully (see #387963)
|
||||||
|
* Include check_daemon() function to check if there is already a
|
||||||
|
running mpt-statusd which is not timing out at the moment
|
||||||
|
* Gracefully exit with code 0 after the run of start-stop-daemon
|
||||||
|
* Thanks to Klaus Ade Johnstad and Petter Reinholdtsen for feeding me
|
||||||
|
with enough tests and access to hardware
|
||||||
|
|
||||||
|
-- Steffen Joeris <steffen.joeris@skolelinux.de> Tue, 5 Dec 2006 18:54:08 +0100
|
||||||
|
|
||||||
|
mpt-status (1.1.6-8) unstable; urgency=low
|
||||||
|
|
||||||
|
* Add check to mpt-statusd if there are any mpt-devices
|
||||||
|
and exit with a normal message if there are none (Closes: #387963)
|
||||||
|
* Upload sponsored by Petter Reinholdtsen
|
||||||
|
|
||||||
|
-- Steffen Joeris <steffen.joeris@skolelinux.de> Mon, 18 Sep 2006 13:14:04 +1000
|
||||||
|
|
||||||
|
mpt-status (1.1.6-7) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Fix bad typo which causes in a broken init-script
|
||||||
|
|
||||||
|
-- Steffen Joeris <steffen.joeris@skolelinux.de> Fri, 18 Aug 2006 20:21:35 +1000
|
||||||
|
|
||||||
|
mpt-status (1.1.6-6) unstable; urgency=low
|
||||||
|
|
||||||
|
* Change check for mptctl modul to also honour it when it
|
||||||
|
is compiled into the kernel (Closes: #381926)
|
||||||
|
* Upload sponsored by Petter Reinholdtsen
|
||||||
|
|
||||||
|
-- Steffen Joeris <steffen.joeris@skolelinux.de> Tue, 8 Aug 2006 23:03:31 +1000
|
||||||
|
|
||||||
|
mpt-status (1.1.6-5) unstable; urgency=low
|
||||||
|
|
||||||
|
* Change exit code in init script to make sure that it
|
||||||
|
exits sane if it can't start
|
||||||
|
* Adjust stop call to let it sane exit if the daemon is
|
||||||
|
not running (Closes: #368537)
|
||||||
|
* Include code to check if it can run on the used hardware
|
||||||
|
* Change error message to get it more verbose
|
||||||
|
* Upload sponsored by Petter Reinholdtsen
|
||||||
|
|
||||||
|
-- Steffen Joeris <steffen.joeris@skolelinux.de> Wed, 24 May 2006 10:44:15 +0200
|
||||||
|
|
||||||
|
mpt-status (1.1.6-4) unstable; urgency=low
|
||||||
|
|
||||||
|
* Include RUN_DAEMON option for init script to have the
|
||||||
|
opportunity to use it or not (Closes: #356852)
|
||||||
|
* Bump standards version to 3.7.1
|
||||||
|
* Change priority from optional to extra to prevent
|
||||||
|
override disparities
|
||||||
|
* Upload sponsored by Petter Reinholdtsen
|
||||||
|
|
||||||
|
-- Steffen Joeris <steffen.joeris@skolelinux.de> Thu, 4 May 2006 19:14:43 +0200
|
||||||
|
|
||||||
|
mpt-status (1.1.6-3) unstable; urgency=low
|
||||||
|
|
||||||
|
* Remove linux/compiler.h from mpt-status.c to make this package
|
||||||
|
compatible with kfreebsd (Closes: #362647)
|
||||||
|
* Upload sponsored by Petter Reinholdtsen
|
||||||
|
|
||||||
|
-- Steffen Joeris <steffen.joeris@skolelinux.de> Sat, 15 Apr 2006 12:23:19 +0200
|
||||||
|
|
||||||
|
mpt-status (1.1.6-2) unstable; urgency=low
|
||||||
|
|
||||||
|
* Add kfreebsd-amd64 into architecture list (Closes: #361612)
|
||||||
|
|
||||||
|
-- Steffen Joeris <steffen.joeris@skolelinux.de> Sun, 9 Apr 2006 14:46:14 +0200
|
||||||
|
|
||||||
|
mpt-status (1.1.6-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* new upstream release
|
||||||
|
* small change to init-script to enable possible configuration via
|
||||||
|
file in /etc/default/mpt-statusd
|
||||||
|
* provide README.Debian to explain that the mptctl has to be loaded
|
||||||
|
in order to use mpt-status tool and that configuration can be made
|
||||||
|
in /etc/default/mpt-statusd
|
||||||
|
|
||||||
|
-- Steffen Joeris <steffen.joeris@skolelinux.de> Thu, 9 Mar 2006 12:38:22 +0100
|
||||||
|
|
||||||
|
mpt-status (1.1.4+1.1.5-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* Initial release (Closes: #352262)
|
||||||
|
* This version is a release candidate for 1.1.5 but it is mostly
|
||||||
|
finish and it works so I choose this version number
|
||||||
|
* The includes in debian/includes/ are neither packaged in the
|
||||||
|
kernel-headers package nor in any other package so i add
|
||||||
|
them to this package to be independent from future development
|
||||||
|
* Added patch (10-include.patch) to fix the includes in
|
||||||
|
mpt-status.h
|
||||||
|
|
||||||
|
-- Steffen Joeris <steffen.joeris@skolelinux.de> Fri, 10 Feb 2006 20:42:38 +0100
|
||||||
|
|
1
packaging/debian/mpt-status/compat
Normal file
1
packaging/debian/mpt-status/compat
Normal file
@ -0,0 +1 @@
|
|||||||
|
4
|
14
packaging/debian/mpt-status/control
Normal file
14
packaging/debian/mpt-status/control
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
Source: mpt-status
|
||||||
|
Section: admin
|
||||||
|
Priority: extra
|
||||||
|
Maintainer: Steffen Joeris <white@debian.org>
|
||||||
|
Build-Depends: cdbs, debhelper (>= 4), libpci-dev | pciutils-dev
|
||||||
|
Standards-Version: 3.7.2
|
||||||
|
|
||||||
|
Package: mpt-status
|
||||||
|
Architecture: any
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base, daemon, mailx
|
||||||
|
Description: get RAID status out of mpt (and other) HW RAID controllers
|
||||||
|
The mpt-status software is a query tool to access the running
|
||||||
|
configuration and status of LSI SCSI HBAs. mpt-status allows you to
|
||||||
|
monitor the health and status of your RAID setup.
|
27
packaging/debian/mpt-status/copyright
Normal file
27
packaging/debian/mpt-status/copyright
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
This package was debianized by Steffen Joeris <steffen.joeris@skolelinux.de> on
|
||||||
|
Fri, 10 Feb 2006 20:42:38 +0100.
|
||||||
|
|
||||||
|
It was downloaded from http://www.drugphish.ch/~ratz/mpt-status/
|
||||||
|
|
||||||
|
Copyright Holder: Copyright (C) 2005 Roberto Nibali <ratz@drugphish.ch>
|
||||||
|
|
||||||
|
Copyright (C) 2004 CNET Networks, Inc.
|
||||||
|
found in mpt-status.c
|
||||||
|
|
||||||
|
Copyright (c) 1997--2002 Martin Mares <mj@ucw.cz>
|
||||||
|
found in incl/header.h and incl/pci.h
|
||||||
|
|
||||||
|
License:
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License, version 2
|
||||||
|
as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANDABILITY of FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
See the GNU General Public License for details.
|
||||||
|
|
||||||
|
On Debian GNU/Linux systems, the complete text of the GNU General
|
||||||
|
Public License can be found in `/usr/share/common-licenses/GPL'.
|
||||||
|
|
5
packaging/debian/mpt-status/docs
Normal file
5
packaging/debian/mpt-status/docs
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
doc/README
|
||||||
|
doc/TODO
|
||||||
|
doc/ReleaseNotes
|
||||||
|
doc/DeveloperNotes
|
||||||
|
doc/Changelog
|
789
packaging/debian/mpt-status/includes/mpi.h
Normal file
789
packaging/debian/mpt-status/includes/mpi.h
Normal file
@ -0,0 +1,789 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2000-2005 LSI Logic Corporation.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Name: mpi.h
|
||||||
|
* Title: MPI Message independent structures and definitions
|
||||||
|
* Creation Date: July 27, 2000
|
||||||
|
*
|
||||||
|
* mpi.h Version: 01.05.08
|
||||||
|
*
|
||||||
|
* Version History
|
||||||
|
* ---------------
|
||||||
|
*
|
||||||
|
* Date Version Description
|
||||||
|
* -------- -------- ------------------------------------------------------
|
||||||
|
* 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000.
|
||||||
|
* 05-24-00 00.10.02 Added MPI_IOCSTATUS_SCSI_RESIDUAL_MISMATCH definition.
|
||||||
|
* 06-06-00 01.00.01 Update MPI_VERSION_MAJOR and MPI_VERSION_MINOR.
|
||||||
|
* 06-22-00 01.00.02 Added MPI_IOCSTATUS_LAN_ definitions.
|
||||||
|
* Removed LAN_SUSPEND function definition.
|
||||||
|
* Added MPI_MSGFLAGS_CONTINUATION_REPLY definition.
|
||||||
|
* 06-30-00 01.00.03 Added MPI_CONTEXT_REPLY_TYPE_LAN definition.
|
||||||
|
* Added MPI_GET/SET_CONTEXT_REPLY_TYPE macros.
|
||||||
|
* 07-27-00 01.00.04 Added MPI_FAULT_ definitions.
|
||||||
|
* Removed MPI_IOCSTATUS_MSG/DATA_XFER_ERROR definitions.
|
||||||
|
* Added MPI_IOCSTATUS_INTERNAL_ERROR definition.
|
||||||
|
* Added MPI_IOCSTATUS_TARGET_XFER_COUNT_MISMATCH.
|
||||||
|
* 11-02-00 01.01.01 Original release for post 1.0 work.
|
||||||
|
* 12-04-00 01.01.02 Added new function codes.
|
||||||
|
* 01-09-01 01.01.03 Added more definitions to the system interface section
|
||||||
|
* Added MPI_IOCSTATUS_TARGET_STS_DATA_NOT_SENT.
|
||||||
|
* 01-25-01 01.01.04 Changed MPI_VERSION_MINOR from 0x00 to 0x01.
|
||||||
|
* 02-20-01 01.01.05 Started using MPI_POINTER.
|
||||||
|
* Fixed value for MPI_DIAG_RW_ENABLE.
|
||||||
|
* Added defines for MPI_DIAG_PREVENT_IOC_BOOT and
|
||||||
|
* MPI_DIAG_CLEAR_FLASH_BAD_SIG.
|
||||||
|
* Obsoleted MPI_IOCSTATUS_TARGET_FC_ defines.
|
||||||
|
* 02-27-01 01.01.06 Removed MPI_HOST_INDEX_REGISTER define.
|
||||||
|
* Added function codes for RAID.
|
||||||
|
* 04-09-01 01.01.07 Added alternate define for MPI_DOORBELL_ACTIVE,
|
||||||
|
* MPI_DOORBELL_USED, to better match the spec.
|
||||||
|
* 08-08-01 01.02.01 Original release for v1.2 work.
|
||||||
|
* Changed MPI_VERSION_MINOR from 0x01 to 0x02.
|
||||||
|
* Added define MPI_FUNCTION_TOOLBOX.
|
||||||
|
* 09-28-01 01.02.02 New function code MPI_SCSI_ENCLOSURE_PROCESSOR.
|
||||||
|
* 11-01-01 01.02.03 Changed name to MPI_FUNCTION_SCSI_ENCLOSURE_PROCESSOR.
|
||||||
|
* 03-14-02 01.02.04 Added MPI_HEADER_VERSION_ defines.
|
||||||
|
* 05-31-02 01.02.05 Bumped MPI_HEADER_VERSION_UNIT.
|
||||||
|
* 07-12-02 01.02.06 Added define for MPI_FUNCTION_MAILBOX.
|
||||||
|
* 09-16-02 01.02.07 Bumped value for MPI_HEADER_VERSION_UNIT.
|
||||||
|
* 11-15-02 01.02.08 Added define MPI_IOCSTATUS_TARGET_INVALID_IO_INDEX and
|
||||||
|
* obsoleted define MPI_IOCSTATUS_TARGET_INVALID_IOCINDEX.
|
||||||
|
* 04-01-03 01.02.09 New IOCStatus code: MPI_IOCSTATUS_FC_EXCHANGE_CANCELED
|
||||||
|
* 06-26-03 01.02.10 Bumped MPI_HEADER_VERSION_UNIT value.
|
||||||
|
* 01-16-04 01.02.11 Added define for MPI_IOCLOGINFO_TYPE_SHIFT.
|
||||||
|
* 04-29-04 01.02.12 Added function codes for MPI_FUNCTION_DIAG_BUFFER_POST
|
||||||
|
* and MPI_FUNCTION_DIAG_RELEASE.
|
||||||
|
* Added MPI_IOCSTATUS_DIAGNOSTIC_RELEASED define.
|
||||||
|
* Bumped MPI_HEADER_VERSION_UNIT value.
|
||||||
|
* 05-11-04 01.03.01 Bumped MPI_VERSION_MINOR for MPI v1.3.
|
||||||
|
* Added codes for Inband.
|
||||||
|
* 08-19-04 01.05.01 Added defines for Host Buffer Access Control doorbell.
|
||||||
|
* Added define for offset of High Priority Request Queue.
|
||||||
|
* Added new function codes and new IOCStatus codes.
|
||||||
|
* Added a IOCLogInfo type of SAS.
|
||||||
|
* 12-07-04 01.05.02 Bumped MPI_HEADER_VERSION_UNIT.
|
||||||
|
* 12-09-04 01.05.03 Bumped MPI_HEADER_VERSION_UNIT.
|
||||||
|
* 01-15-05 01.05.04 Bumped MPI_HEADER_VERSION_UNIT.
|
||||||
|
* 02-09-05 01.05.05 Bumped MPI_HEADER_VERSION_UNIT.
|
||||||
|
* 02-22-05 01.05.06 Bumped MPI_HEADER_VERSION_UNIT.
|
||||||
|
* 03-11-05 01.05.07 Removed function codes for SCSI IO 32 and
|
||||||
|
* TargetAssistExtended requests.
|
||||||
|
* Removed EEDP IOCStatus codes.
|
||||||
|
* 06-24-05 01.05.08 Added function codes for SCSI IO 32 and
|
||||||
|
* TargetAssistExtended requests.
|
||||||
|
* Added EEDP IOCStatus codes.
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MPI_H
|
||||||
|
#define MPI_H
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
*
|
||||||
|
* M P I V e r s i o n D e f i n i t i o n s
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#define MPI_VERSION_MAJOR (0x01)
|
||||||
|
#define MPI_VERSION_MINOR (0x05)
|
||||||
|
#define MPI_VERSION_MAJOR_MASK (0xFF00)
|
||||||
|
#define MPI_VERSION_MAJOR_SHIFT (8)
|
||||||
|
#define MPI_VERSION_MINOR_MASK (0x00FF)
|
||||||
|
#define MPI_VERSION_MINOR_SHIFT (0)
|
||||||
|
#define MPI_VERSION ((MPI_VERSION_MAJOR << MPI_VERSION_MAJOR_SHIFT) | \
|
||||||
|
MPI_VERSION_MINOR)
|
||||||
|
|
||||||
|
#define MPI_VERSION_01_00 (0x0100)
|
||||||
|
#define MPI_VERSION_01_01 (0x0101)
|
||||||
|
#define MPI_VERSION_01_02 (0x0102)
|
||||||
|
#define MPI_VERSION_01_03 (0x0103)
|
||||||
|
#define MPI_VERSION_01_05 (0x0105)
|
||||||
|
/* Note: The major versions of 0xe0 through 0xff are reserved */
|
||||||
|
|
||||||
|
/* versioning for this MPI header set */
|
||||||
|
#define MPI_HEADER_VERSION_UNIT (0x0A)
|
||||||
|
#define MPI_HEADER_VERSION_DEV (0x00)
|
||||||
|
#define MPI_HEADER_VERSION_UNIT_MASK (0xFF00)
|
||||||
|
#define MPI_HEADER_VERSION_UNIT_SHIFT (8)
|
||||||
|
#define MPI_HEADER_VERSION_DEV_MASK (0x00FF)
|
||||||
|
#define MPI_HEADER_VERSION_DEV_SHIFT (0)
|
||||||
|
#define MPI_HEADER_VERSION ((MPI_HEADER_VERSION_UNIT << 8) | MPI_HEADER_VERSION_DEV)
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
*
|
||||||
|
* I O C S t a t e D e f i n i t i o n s
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#define MPI_IOC_STATE_RESET (0x00000000)
|
||||||
|
#define MPI_IOC_STATE_READY (0x10000000)
|
||||||
|
#define MPI_IOC_STATE_OPERATIONAL (0x20000000)
|
||||||
|
#define MPI_IOC_STATE_FAULT (0x40000000)
|
||||||
|
|
||||||
|
#define MPI_IOC_STATE_MASK (0xF0000000)
|
||||||
|
#define MPI_IOC_STATE_SHIFT (28)
|
||||||
|
|
||||||
|
/* Fault state codes (product independent range 0x8000-0xFFFF) */
|
||||||
|
|
||||||
|
#define MPI_FAULT_REQUEST_MESSAGE_PCI_PARITY_ERROR (0x8111)
|
||||||
|
#define MPI_FAULT_REQUEST_MESSAGE_PCI_BUS_FAULT (0x8112)
|
||||||
|
#define MPI_FAULT_REPLY_MESSAGE_PCI_PARITY_ERROR (0x8113)
|
||||||
|
#define MPI_FAULT_REPLY_MESSAGE_PCI_BUS_FAULT (0x8114)
|
||||||
|
#define MPI_FAULT_DATA_SEND_PCI_PARITY_ERROR (0x8115)
|
||||||
|
#define MPI_FAULT_DATA_SEND_PCI_BUS_FAULT (0x8116)
|
||||||
|
#define MPI_FAULT_DATA_RECEIVE_PCI_PARITY_ERROR (0x8117)
|
||||||
|
#define MPI_FAULT_DATA_RECEIVE_PCI_BUS_FAULT (0x8118)
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
*
|
||||||
|
* P C I S y s t e m I n t e r f a c e R e g i s t e r s
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Defines for working with the System Doorbell register.
|
||||||
|
* Values for doorbell function codes are included in the section that defines
|
||||||
|
* all the function codes (further on in this file).
|
||||||
|
*/
|
||||||
|
#define MPI_DOORBELL_OFFSET (0x00000000)
|
||||||
|
#define MPI_DOORBELL_ACTIVE (0x08000000) /* DoorbellUsed */
|
||||||
|
#define MPI_DOORBELL_USED (MPI_DOORBELL_ACTIVE)
|
||||||
|
#define MPI_DOORBELL_ACTIVE_SHIFT (27)
|
||||||
|
#define MPI_DOORBELL_WHO_INIT_MASK (0x07000000)
|
||||||
|
#define MPI_DOORBELL_WHO_INIT_SHIFT (24)
|
||||||
|
#define MPI_DOORBELL_FUNCTION_MASK (0xFF000000)
|
||||||
|
#define MPI_DOORBELL_FUNCTION_SHIFT (24)
|
||||||
|
#define MPI_DOORBELL_ADD_DWORDS_MASK (0x00FF0000)
|
||||||
|
#define MPI_DOORBELL_ADD_DWORDS_SHIFT (16)
|
||||||
|
#define MPI_DOORBELL_DATA_MASK (0x0000FFFF)
|
||||||
|
#define MPI_DOORBELL_FUNCTION_SPECIFIC_MASK (0x0000FFFF)
|
||||||
|
|
||||||
|
/* values for Host Buffer Access Control doorbell function */
|
||||||
|
#define MPI_DB_HPBAC_VALUE_MASK (0x0000F000)
|
||||||
|
#define MPI_DB_HPBAC_ENABLE_ACCESS (0x01)
|
||||||
|
#define MPI_DB_HPBAC_DISABLE_ACCESS (0x02)
|
||||||
|
#define MPI_DB_HPBAC_FREE_BUFFER (0x03)
|
||||||
|
|
||||||
|
|
||||||
|
#define MPI_WRITE_SEQUENCE_OFFSET (0x00000004)
|
||||||
|
#define MPI_WRSEQ_KEY_VALUE_MASK (0x0000000F)
|
||||||
|
#define MPI_WRSEQ_1ST_KEY_VALUE (0x04)
|
||||||
|
#define MPI_WRSEQ_2ND_KEY_VALUE (0x0B)
|
||||||
|
#define MPI_WRSEQ_3RD_KEY_VALUE (0x02)
|
||||||
|
#define MPI_WRSEQ_4TH_KEY_VALUE (0x07)
|
||||||
|
#define MPI_WRSEQ_5TH_KEY_VALUE (0x0D)
|
||||||
|
|
||||||
|
#define MPI_DIAGNOSTIC_OFFSET (0x00000008)
|
||||||
|
#define MPI_DIAG_CLEAR_FLASH_BAD_SIG (0x00000400)
|
||||||
|
#define MPI_DIAG_PREVENT_IOC_BOOT (0x00000200)
|
||||||
|
#define MPI_DIAG_DRWE (0x00000080)
|
||||||
|
#define MPI_DIAG_FLASH_BAD_SIG (0x00000040)
|
||||||
|
#define MPI_DIAG_RESET_HISTORY (0x00000020)
|
||||||
|
#define MPI_DIAG_RW_ENABLE (0x00000010)
|
||||||
|
#define MPI_DIAG_RESET_ADAPTER (0x00000004)
|
||||||
|
#define MPI_DIAG_DISABLE_ARM (0x00000002)
|
||||||
|
#define MPI_DIAG_MEM_ENABLE (0x00000001)
|
||||||
|
|
||||||
|
#define MPI_TEST_BASE_ADDRESS_OFFSET (0x0000000C)
|
||||||
|
|
||||||
|
#define MPI_DIAG_RW_DATA_OFFSET (0x00000010)
|
||||||
|
|
||||||
|
#define MPI_DIAG_RW_ADDRESS_OFFSET (0x00000014)
|
||||||
|
|
||||||
|
#define MPI_HOST_INTERRUPT_STATUS_OFFSET (0x00000030)
|
||||||
|
#define MPI_HIS_IOP_DOORBELL_STATUS (0x80000000)
|
||||||
|
#define MPI_HIS_REPLY_MESSAGE_INTERRUPT (0x00000008)
|
||||||
|
#define MPI_HIS_DOORBELL_INTERRUPT (0x00000001)
|
||||||
|
|
||||||
|
#define MPI_HOST_INTERRUPT_MASK_OFFSET (0x00000034)
|
||||||
|
#define MPI_HIM_RIM (0x00000008)
|
||||||
|
#define MPI_HIM_DIM (0x00000001)
|
||||||
|
|
||||||
|
#define MPI_REQUEST_QUEUE_OFFSET (0x00000040)
|
||||||
|
#define MPI_REQUEST_POST_FIFO_OFFSET (0x00000040)
|
||||||
|
|
||||||
|
#define MPI_REPLY_QUEUE_OFFSET (0x00000044)
|
||||||
|
#define MPI_REPLY_POST_FIFO_OFFSET (0x00000044)
|
||||||
|
#define MPI_REPLY_FREE_FIFO_OFFSET (0x00000044)
|
||||||
|
|
||||||
|
#define MPI_HI_PRI_REQUEST_QUEUE_OFFSET (0x00000048)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
*
|
||||||
|
* M e s s a g e F r a m e D e s c r i p t o r s
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#define MPI_REQ_MF_DESCRIPTOR_NB_MASK (0x00000003)
|
||||||
|
#define MPI_REQ_MF_DESCRIPTOR_F_BIT (0x00000004)
|
||||||
|
#define MPI_REQ_MF_DESCRIPTOR_ADDRESS_MASK (0xFFFFFFF8)
|
||||||
|
|
||||||
|
#define MPI_ADDRESS_REPLY_A_BIT (0x80000000)
|
||||||
|
#define MPI_ADDRESS_REPLY_ADDRESS_MASK (0x7FFFFFFF)
|
||||||
|
|
||||||
|
#define MPI_CONTEXT_REPLY_A_BIT (0x80000000)
|
||||||
|
#define MPI_CONTEXT_REPLY_TYPE_MASK (0x60000000)
|
||||||
|
#define MPI_CONTEXT_REPLY_TYPE_SCSI_INIT (0x00)
|
||||||
|
#define MPI_CONTEXT_REPLY_TYPE_SCSI_TARGET (0x01)
|
||||||
|
#define MPI_CONTEXT_REPLY_TYPE_LAN (0x02)
|
||||||
|
#define MPI_CONTEXT_REPLY_TYPE_SHIFT (29)
|
||||||
|
#define MPI_CONTEXT_REPLY_CONTEXT_MASK (0x1FFFFFFF)
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* Context Reply macros */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
#define MPI_GET_CONTEXT_REPLY_TYPE(x) (((x) & MPI_CONTEXT_REPLY_TYPE_MASK) \
|
||||||
|
>> MPI_CONTEXT_REPLY_TYPE_SHIFT)
|
||||||
|
|
||||||
|
#define MPI_SET_CONTEXT_REPLY_TYPE(x, typ) \
|
||||||
|
((x) = ((x) & ~MPI_CONTEXT_REPLY_TYPE_MASK) | \
|
||||||
|
(((typ) << MPI_CONTEXT_REPLY_TYPE_SHIFT) & \
|
||||||
|
MPI_CONTEXT_REPLY_TYPE_MASK))
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
*
|
||||||
|
* M e s s a g e F u n c t i o n s
|
||||||
|
* 0x80 -> 0x8F reserved for private message use per product
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#define MPI_FUNCTION_SCSI_IO_REQUEST (0x00)
|
||||||
|
#define MPI_FUNCTION_SCSI_TASK_MGMT (0x01)
|
||||||
|
#define MPI_FUNCTION_IOC_INIT (0x02)
|
||||||
|
#define MPI_FUNCTION_IOC_FACTS (0x03)
|
||||||
|
#define MPI_FUNCTION_CONFIG (0x04)
|
||||||
|
#define MPI_FUNCTION_PORT_FACTS (0x05)
|
||||||
|
#define MPI_FUNCTION_PORT_ENABLE (0x06)
|
||||||
|
#define MPI_FUNCTION_EVENT_NOTIFICATION (0x07)
|
||||||
|
#define MPI_FUNCTION_EVENT_ACK (0x08)
|
||||||
|
#define MPI_FUNCTION_FW_DOWNLOAD (0x09)
|
||||||
|
#define MPI_FUNCTION_TARGET_CMD_BUFFER_POST (0x0A)
|
||||||
|
#define MPI_FUNCTION_TARGET_ASSIST (0x0B)
|
||||||
|
#define MPI_FUNCTION_TARGET_STATUS_SEND (0x0C)
|
||||||
|
#define MPI_FUNCTION_TARGET_MODE_ABORT (0x0D)
|
||||||
|
#define MPI_FUNCTION_FC_LINK_SRVC_BUF_POST (0x0E)
|
||||||
|
#define MPI_FUNCTION_FC_LINK_SRVC_RSP (0x0F)
|
||||||
|
#define MPI_FUNCTION_FC_EX_LINK_SRVC_SEND (0x10)
|
||||||
|
#define MPI_FUNCTION_FC_ABORT (0x11)
|
||||||
|
#define MPI_FUNCTION_FW_UPLOAD (0x12)
|
||||||
|
#define MPI_FUNCTION_FC_COMMON_TRANSPORT_SEND (0x13)
|
||||||
|
#define MPI_FUNCTION_FC_PRIMITIVE_SEND (0x14)
|
||||||
|
|
||||||
|
#define MPI_FUNCTION_RAID_ACTION (0x15)
|
||||||
|
#define MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH (0x16)
|
||||||
|
|
||||||
|
#define MPI_FUNCTION_TOOLBOX (0x17)
|
||||||
|
|
||||||
|
#define MPI_FUNCTION_SCSI_ENCLOSURE_PROCESSOR (0x18)
|
||||||
|
|
||||||
|
#define MPI_FUNCTION_MAILBOX (0x19)
|
||||||
|
|
||||||
|
#define MPI_FUNCTION_SMP_PASSTHROUGH (0x1A)
|
||||||
|
#define MPI_FUNCTION_SAS_IO_UNIT_CONTROL (0x1B)
|
||||||
|
#define MPI_FUNCTION_SATA_PASSTHROUGH (0x1C)
|
||||||
|
|
||||||
|
#define MPI_FUNCTION_DIAG_BUFFER_POST (0x1D)
|
||||||
|
#define MPI_FUNCTION_DIAG_RELEASE (0x1E)
|
||||||
|
|
||||||
|
#define MPI_FUNCTION_SCSI_IO_32 (0x1F)
|
||||||
|
|
||||||
|
#define MPI_FUNCTION_LAN_SEND (0x20)
|
||||||
|
#define MPI_FUNCTION_LAN_RECEIVE (0x21)
|
||||||
|
#define MPI_FUNCTION_LAN_RESET (0x22)
|
||||||
|
|
||||||
|
#define MPI_FUNCTION_TARGET_ASSIST_EXTENDED (0x23)
|
||||||
|
#define MPI_FUNCTION_TARGET_CMD_BUF_BASE_POST (0x24)
|
||||||
|
#define MPI_FUNCTION_TARGET_CMD_BUF_LIST_POST (0x25)
|
||||||
|
|
||||||
|
#define MPI_FUNCTION_INBAND_BUFFER_POST (0x28)
|
||||||
|
#define MPI_FUNCTION_INBAND_SEND (0x29)
|
||||||
|
#define MPI_FUNCTION_INBAND_RSP (0x2A)
|
||||||
|
#define MPI_FUNCTION_INBAND_ABORT (0x2B)
|
||||||
|
|
||||||
|
#define MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET (0x40)
|
||||||
|
#define MPI_FUNCTION_IO_UNIT_RESET (0x41)
|
||||||
|
#define MPI_FUNCTION_HANDSHAKE (0x42)
|
||||||
|
#define MPI_FUNCTION_REPLY_FRAME_REMOVAL (0x43)
|
||||||
|
#define MPI_FUNCTION_HOST_PAGEBUF_ACCESS_CONTROL (0x44)
|
||||||
|
|
||||||
|
|
||||||
|
/* standard version format */
|
||||||
|
typedef struct _MPI_VERSION_STRUCT
|
||||||
|
{
|
||||||
|
U8 Dev; /* 00h */
|
||||||
|
U8 Unit; /* 01h */
|
||||||
|
U8 Minor; /* 02h */
|
||||||
|
U8 Major; /* 03h */
|
||||||
|
} MPI_VERSION_STRUCT, MPI_POINTER PTR_MPI_VERSION_STRUCT,
|
||||||
|
MpiVersionStruct_t, MPI_POINTER pMpiVersionStruct;
|
||||||
|
|
||||||
|
typedef union _MPI_VERSION_FORMAT
|
||||||
|
{
|
||||||
|
MPI_VERSION_STRUCT Struct;
|
||||||
|
U32 Word;
|
||||||
|
} MPI_VERSION_FORMAT, MPI_POINTER PTR_MPI_VERSION_FORMAT,
|
||||||
|
MpiVersionFormat_t, MPI_POINTER pMpiVersionFormat_t;
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
*
|
||||||
|
* S c a t t e r G a t h e r E l e m e n t s
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* Simple element structures */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _SGE_SIMPLE32
|
||||||
|
{
|
||||||
|
U32 FlagsLength;
|
||||||
|
U32 Address;
|
||||||
|
} SGE_SIMPLE32, MPI_POINTER PTR_SGE_SIMPLE32,
|
||||||
|
SGESimple32_t, MPI_POINTER pSGESimple32_t;
|
||||||
|
|
||||||
|
typedef struct _SGE_SIMPLE64
|
||||||
|
{
|
||||||
|
U32 FlagsLength;
|
||||||
|
U64 Address;
|
||||||
|
} SGE_SIMPLE64, MPI_POINTER PTR_SGE_SIMPLE64,
|
||||||
|
SGESimple64_t, MPI_POINTER pSGESimple64_t;
|
||||||
|
|
||||||
|
typedef struct _SGE_SIMPLE_UNION
|
||||||
|
{
|
||||||
|
U32 FlagsLength;
|
||||||
|
union
|
||||||
|
{
|
||||||
|
U32 Address32;
|
||||||
|
U64 Address64;
|
||||||
|
}u;
|
||||||
|
} SGE_SIMPLE_UNION, MPI_POINTER PTR_SGE_SIMPLE_UNION,
|
||||||
|
SGESimpleUnion_t, MPI_POINTER pSGESimpleUnion_t;
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* Chain element structures */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _SGE_CHAIN32
|
||||||
|
{
|
||||||
|
U16 Length;
|
||||||
|
U8 NextChainOffset;
|
||||||
|
U8 Flags;
|
||||||
|
U32 Address;
|
||||||
|
} SGE_CHAIN32, MPI_POINTER PTR_SGE_CHAIN32,
|
||||||
|
SGEChain32_t, MPI_POINTER pSGEChain32_t;
|
||||||
|
|
||||||
|
typedef struct _SGE_CHAIN64
|
||||||
|
{
|
||||||
|
U16 Length;
|
||||||
|
U8 NextChainOffset;
|
||||||
|
U8 Flags;
|
||||||
|
U64 Address;
|
||||||
|
} SGE_CHAIN64, MPI_POINTER PTR_SGE_CHAIN64,
|
||||||
|
SGEChain64_t, MPI_POINTER pSGEChain64_t;
|
||||||
|
|
||||||
|
typedef struct _SGE_CHAIN_UNION
|
||||||
|
{
|
||||||
|
U16 Length;
|
||||||
|
U8 NextChainOffset;
|
||||||
|
U8 Flags;
|
||||||
|
union
|
||||||
|
{
|
||||||
|
U32 Address32;
|
||||||
|
U64 Address64;
|
||||||
|
}u;
|
||||||
|
} SGE_CHAIN_UNION, MPI_POINTER PTR_SGE_CHAIN_UNION,
|
||||||
|
SGEChainUnion_t, MPI_POINTER pSGEChainUnion_t;
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* Transaction Context element */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _SGE_TRANSACTION32
|
||||||
|
{
|
||||||
|
U8 Reserved;
|
||||||
|
U8 ContextSize;
|
||||||
|
U8 DetailsLength;
|
||||||
|
U8 Flags;
|
||||||
|
U32 TransactionContext[1];
|
||||||
|
U32 TransactionDetails[1];
|
||||||
|
} SGE_TRANSACTION32, MPI_POINTER PTR_SGE_TRANSACTION32,
|
||||||
|
SGETransaction32_t, MPI_POINTER pSGETransaction32_t;
|
||||||
|
|
||||||
|
typedef struct _SGE_TRANSACTION64
|
||||||
|
{
|
||||||
|
U8 Reserved;
|
||||||
|
U8 ContextSize;
|
||||||
|
U8 DetailsLength;
|
||||||
|
U8 Flags;
|
||||||
|
U32 TransactionContext[2];
|
||||||
|
U32 TransactionDetails[1];
|
||||||
|
} SGE_TRANSACTION64, MPI_POINTER PTR_SGE_TRANSACTION64,
|
||||||
|
SGETransaction64_t, MPI_POINTER pSGETransaction64_t;
|
||||||
|
|
||||||
|
typedef struct _SGE_TRANSACTION96
|
||||||
|
{
|
||||||
|
U8 Reserved;
|
||||||
|
U8 ContextSize;
|
||||||
|
U8 DetailsLength;
|
||||||
|
U8 Flags;
|
||||||
|
U32 TransactionContext[3];
|
||||||
|
U32 TransactionDetails[1];
|
||||||
|
} SGE_TRANSACTION96, MPI_POINTER PTR_SGE_TRANSACTION96,
|
||||||
|
SGETransaction96_t, MPI_POINTER pSGETransaction96_t;
|
||||||
|
|
||||||
|
typedef struct _SGE_TRANSACTION128
|
||||||
|
{
|
||||||
|
U8 Reserved;
|
||||||
|
U8 ContextSize;
|
||||||
|
U8 DetailsLength;
|
||||||
|
U8 Flags;
|
||||||
|
U32 TransactionContext[4];
|
||||||
|
U32 TransactionDetails[1];
|
||||||
|
} SGE_TRANSACTION128, MPI_POINTER PTR_SGE_TRANSACTION128,
|
||||||
|
SGETransaction_t128, MPI_POINTER pSGETransaction_t128;
|
||||||
|
|
||||||
|
typedef struct _SGE_TRANSACTION_UNION
|
||||||
|
{
|
||||||
|
U8 Reserved;
|
||||||
|
U8 ContextSize;
|
||||||
|
U8 DetailsLength;
|
||||||
|
U8 Flags;
|
||||||
|
union
|
||||||
|
{
|
||||||
|
U32 TransactionContext32[1];
|
||||||
|
U32 TransactionContext64[2];
|
||||||
|
U32 TransactionContext96[3];
|
||||||
|
U32 TransactionContext128[4];
|
||||||
|
}u;
|
||||||
|
U32 TransactionDetails[1];
|
||||||
|
} SGE_TRANSACTION_UNION, MPI_POINTER PTR_SGE_TRANSACTION_UNION,
|
||||||
|
SGETransactionUnion_t, MPI_POINTER pSGETransactionUnion_t;
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* SGE IO types union for IO SGL's */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _SGE_IO_UNION
|
||||||
|
{
|
||||||
|
union
|
||||||
|
{
|
||||||
|
SGE_SIMPLE_UNION Simple;
|
||||||
|
SGE_CHAIN_UNION Chain;
|
||||||
|
} u;
|
||||||
|
} SGE_IO_UNION, MPI_POINTER PTR_SGE_IO_UNION,
|
||||||
|
SGEIOUnion_t, MPI_POINTER pSGEIOUnion_t;
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* SGE union for SGL's with Simple and Transaction elements */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _SGE_TRANS_SIMPLE_UNION
|
||||||
|
{
|
||||||
|
union
|
||||||
|
{
|
||||||
|
SGE_SIMPLE_UNION Simple;
|
||||||
|
SGE_TRANSACTION_UNION Transaction;
|
||||||
|
} u;
|
||||||
|
} SGE_TRANS_SIMPLE_UNION, MPI_POINTER PTR_SGE_TRANS_SIMPLE_UNION,
|
||||||
|
SGETransSimpleUnion_t, MPI_POINTER pSGETransSimpleUnion_t;
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* All SGE types union */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _SGE_MPI_UNION
|
||||||
|
{
|
||||||
|
union
|
||||||
|
{
|
||||||
|
SGE_SIMPLE_UNION Simple;
|
||||||
|
SGE_CHAIN_UNION Chain;
|
||||||
|
SGE_TRANSACTION_UNION Transaction;
|
||||||
|
} u;
|
||||||
|
} SGE_MPI_UNION, MPI_POINTER PTR_SGE_MPI_UNION,
|
||||||
|
MPI_SGE_UNION_t, MPI_POINTER pMPI_SGE_UNION_t,
|
||||||
|
SGEAllUnion_t, MPI_POINTER pSGEAllUnion_t;
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* SGE field definition and masks */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
/* Flags field bit definitions */
|
||||||
|
|
||||||
|
#define MPI_SGE_FLAGS_LAST_ELEMENT (0x80)
|
||||||
|
#define MPI_SGE_FLAGS_END_OF_BUFFER (0x40)
|
||||||
|
#define MPI_SGE_FLAGS_ELEMENT_TYPE_MASK (0x30)
|
||||||
|
#define MPI_SGE_FLAGS_LOCAL_ADDRESS (0x08)
|
||||||
|
#define MPI_SGE_FLAGS_DIRECTION (0x04)
|
||||||
|
#define MPI_SGE_FLAGS_ADDRESS_SIZE (0x02)
|
||||||
|
#define MPI_SGE_FLAGS_END_OF_LIST (0x01)
|
||||||
|
|
||||||
|
#define MPI_SGE_FLAGS_SHIFT (24)
|
||||||
|
|
||||||
|
#define MPI_SGE_LENGTH_MASK (0x00FFFFFF)
|
||||||
|
#define MPI_SGE_CHAIN_LENGTH_MASK (0x0000FFFF)
|
||||||
|
|
||||||
|
/* Element Type */
|
||||||
|
|
||||||
|
#define MPI_SGE_FLAGS_TRANSACTION_ELEMENT (0x00)
|
||||||
|
#define MPI_SGE_FLAGS_SIMPLE_ELEMENT (0x10)
|
||||||
|
#define MPI_SGE_FLAGS_CHAIN_ELEMENT (0x30)
|
||||||
|
#define MPI_SGE_FLAGS_ELEMENT_MASK (0x30)
|
||||||
|
|
||||||
|
/* Address location */
|
||||||
|
|
||||||
|
#define MPI_SGE_FLAGS_SYSTEM_ADDRESS (0x00)
|
||||||
|
|
||||||
|
/* Direction */
|
||||||
|
|
||||||
|
#define MPI_SGE_FLAGS_IOC_TO_HOST (0x00)
|
||||||
|
#define MPI_SGE_FLAGS_HOST_TO_IOC (0x04)
|
||||||
|
|
||||||
|
/* Address Size */
|
||||||
|
|
||||||
|
#define MPI_SGE_FLAGS_32_BIT_ADDRESSING (0x00)
|
||||||
|
#define MPI_SGE_FLAGS_64_BIT_ADDRESSING (0x02)
|
||||||
|
|
||||||
|
/* Context Size */
|
||||||
|
|
||||||
|
#define MPI_SGE_FLAGS_32_BIT_CONTEXT (0x00)
|
||||||
|
#define MPI_SGE_FLAGS_64_BIT_CONTEXT (0x02)
|
||||||
|
#define MPI_SGE_FLAGS_96_BIT_CONTEXT (0x04)
|
||||||
|
#define MPI_SGE_FLAGS_128_BIT_CONTEXT (0x06)
|
||||||
|
|
||||||
|
#define MPI_SGE_CHAIN_OFFSET_MASK (0x00FF0000)
|
||||||
|
#define MPI_SGE_CHAIN_OFFSET_SHIFT (16)
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* SGE operation Macros */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
/* SIMPLE FlagsLength manipulations... */
|
||||||
|
#define MPI_SGE_SET_FLAGS(f) ((U32)(f) << MPI_SGE_FLAGS_SHIFT)
|
||||||
|
#define MPI_SGE_GET_FLAGS(fl) (((fl) & ~MPI_SGE_LENGTH_MASK) >> MPI_SGE_FLAGS_SHIFT)
|
||||||
|
#define MPI_SGE_LENGTH(fl) ((fl) & MPI_SGE_LENGTH_MASK)
|
||||||
|
#define MPI_SGE_CHAIN_LENGTH(fl) ((fl) & MPI_SGE_CHAIN_LENGTH_MASK)
|
||||||
|
|
||||||
|
#define MPI_SGE_SET_FLAGS_LENGTH(f,l) (MPI_SGE_SET_FLAGS(f) | MPI_SGE_LENGTH(l))
|
||||||
|
|
||||||
|
#define MPI_pSGE_GET_FLAGS(psg) MPI_SGE_GET_FLAGS((psg)->FlagsLength)
|
||||||
|
#define MPI_pSGE_GET_LENGTH(psg) MPI_SGE_LENGTH((psg)->FlagsLength)
|
||||||
|
#define MPI_pSGE_SET_FLAGS_LENGTH(psg,f,l) (psg)->FlagsLength = MPI_SGE_SET_FLAGS_LENGTH(f,l)
|
||||||
|
/* CAUTION - The following are READ-MODIFY-WRITE! */
|
||||||
|
#define MPI_pSGE_SET_FLAGS(psg,f) (psg)->FlagsLength |= MPI_SGE_SET_FLAGS(f)
|
||||||
|
#define MPI_pSGE_SET_LENGTH(psg,l) (psg)->FlagsLength |= MPI_SGE_LENGTH(l)
|
||||||
|
|
||||||
|
#define MPI_GET_CHAIN_OFFSET(x) ((x&MPI_SGE_CHAIN_OFFSET_MASK)>>MPI_SGE_CHAIN_OFFSET_SHIFT)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
*
|
||||||
|
* S t a n d a r d M e s s a g e S t r u c t u r e s
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* Standard message request header for all request messages */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _MSG_REQUEST_HEADER
|
||||||
|
{
|
||||||
|
U8 Reserved[2]; /* function specific */
|
||||||
|
U8 ChainOffset;
|
||||||
|
U8 Function;
|
||||||
|
U8 Reserved1[3]; /* function specific */
|
||||||
|
U8 MsgFlags;
|
||||||
|
U32 MsgContext;
|
||||||
|
} MSG_REQUEST_HEADER, MPI_POINTER PTR_MSG_REQUEST_HEADER,
|
||||||
|
MPIHeader_t, MPI_POINTER pMPIHeader_t;
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* Default Reply */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _MSG_DEFAULT_REPLY
|
||||||
|
{
|
||||||
|
U8 Reserved[2]; /* function specific */
|
||||||
|
U8 MsgLength;
|
||||||
|
U8 Function;
|
||||||
|
U8 Reserved1[3]; /* function specific */
|
||||||
|
U8 MsgFlags;
|
||||||
|
U32 MsgContext;
|
||||||
|
U8 Reserved2[2]; /* function specific */
|
||||||
|
U16 IOCStatus;
|
||||||
|
U32 IOCLogInfo;
|
||||||
|
} MSG_DEFAULT_REPLY, MPI_POINTER PTR_MSG_DEFAULT_REPLY,
|
||||||
|
MPIDefaultReply_t, MPI_POINTER pMPIDefaultReply_t;
|
||||||
|
|
||||||
|
|
||||||
|
/* MsgFlags definition for all replies */
|
||||||
|
|
||||||
|
#define MPI_MSGFLAGS_CONTINUATION_REPLY (0x80)
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
*
|
||||||
|
* I O C S t a t u s V a l u e s
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* Common IOCStatus values for all replies */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
#define MPI_IOCSTATUS_SUCCESS (0x0000)
|
||||||
|
#define MPI_IOCSTATUS_INVALID_FUNCTION (0x0001)
|
||||||
|
#define MPI_IOCSTATUS_BUSY (0x0002)
|
||||||
|
#define MPI_IOCSTATUS_INVALID_SGL (0x0003)
|
||||||
|
#define MPI_IOCSTATUS_INTERNAL_ERROR (0x0004)
|
||||||
|
#define MPI_IOCSTATUS_RESERVED (0x0005)
|
||||||
|
#define MPI_IOCSTATUS_INSUFFICIENT_RESOURCES (0x0006)
|
||||||
|
#define MPI_IOCSTATUS_INVALID_FIELD (0x0007)
|
||||||
|
#define MPI_IOCSTATUS_INVALID_STATE (0x0008)
|
||||||
|
#define MPI_IOCSTATUS_OP_STATE_NOT_SUPPORTED (0x0009)
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* Config IOCStatus values */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
#define MPI_IOCSTATUS_CONFIG_INVALID_ACTION (0x0020)
|
||||||
|
#define MPI_IOCSTATUS_CONFIG_INVALID_TYPE (0x0021)
|
||||||
|
#define MPI_IOCSTATUS_CONFIG_INVALID_PAGE (0x0022)
|
||||||
|
#define MPI_IOCSTATUS_CONFIG_INVALID_DATA (0x0023)
|
||||||
|
#define MPI_IOCSTATUS_CONFIG_NO_DEFAULTS (0x0024)
|
||||||
|
#define MPI_IOCSTATUS_CONFIG_CANT_COMMIT (0x0025)
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* SCSIIO Reply (SPI & FCP) initiator values */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
#define MPI_IOCSTATUS_SCSI_RECOVERED_ERROR (0x0040)
|
||||||
|
#define MPI_IOCSTATUS_SCSI_INVALID_BUS (0x0041)
|
||||||
|
#define MPI_IOCSTATUS_SCSI_INVALID_TARGETID (0x0042)
|
||||||
|
#define MPI_IOCSTATUS_SCSI_DEVICE_NOT_THERE (0x0043)
|
||||||
|
#define MPI_IOCSTATUS_SCSI_DATA_OVERRUN (0x0044)
|
||||||
|
#define MPI_IOCSTATUS_SCSI_DATA_UNDERRUN (0x0045)
|
||||||
|
#define MPI_IOCSTATUS_SCSI_IO_DATA_ERROR (0x0046)
|
||||||
|
#define MPI_IOCSTATUS_SCSI_PROTOCOL_ERROR (0x0047)
|
||||||
|
#define MPI_IOCSTATUS_SCSI_TASK_TERMINATED (0x0048)
|
||||||
|
#define MPI_IOCSTATUS_SCSI_RESIDUAL_MISMATCH (0x0049)
|
||||||
|
#define MPI_IOCSTATUS_SCSI_TASK_MGMT_FAILED (0x004A)
|
||||||
|
#define MPI_IOCSTATUS_SCSI_IOC_TERMINATED (0x004B)
|
||||||
|
#define MPI_IOCSTATUS_SCSI_EXT_TERMINATED (0x004C)
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* For use by SCSI Initiator and SCSI Target end-to-end data protection */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
#define MPI_IOCSTATUS_EEDP_GUARD_ERROR (0x004D)
|
||||||
|
#define MPI_IOCSTATUS_EEDP_REF_TAG_ERROR (0x004E)
|
||||||
|
#define MPI_IOCSTATUS_EEDP_APP_TAG_ERROR (0x004F)
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* SCSI Target values */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
#define MPI_IOCSTATUS_TARGET_PRIORITY_IO (0x0060)
|
||||||
|
#define MPI_IOCSTATUS_TARGET_INVALID_PORT (0x0061)
|
||||||
|
#define MPI_IOCSTATUS_TARGET_INVALID_IOCINDEX (0x0062) /* obsolete name */
|
||||||
|
#define MPI_IOCSTATUS_TARGET_INVALID_IO_INDEX (0x0062)
|
||||||
|
#define MPI_IOCSTATUS_TARGET_ABORTED (0x0063)
|
||||||
|
#define MPI_IOCSTATUS_TARGET_NO_CONN_RETRYABLE (0x0064)
|
||||||
|
#define MPI_IOCSTATUS_TARGET_NO_CONNECTION (0x0065)
|
||||||
|
#define MPI_IOCSTATUS_TARGET_XFER_COUNT_MISMATCH (0x006A)
|
||||||
|
#define MPI_IOCSTATUS_TARGET_STS_DATA_NOT_SENT (0x006B)
|
||||||
|
#define MPI_IOCSTATUS_TARGET_DATA_OFFSET_ERROR (0x006D)
|
||||||
|
#define MPI_IOCSTATUS_TARGET_TOO_MUCH_WRITE_DATA (0x006E)
|
||||||
|
#define MPI_IOCSTATUS_TARGET_IU_TOO_SHORT (0x006F)
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* Additional FCP target values (obsolete) */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
#define MPI_IOCSTATUS_TARGET_FC_ABORTED (0x0066) /* obsolete */
|
||||||
|
#define MPI_IOCSTATUS_TARGET_FC_RX_ID_INVALID (0x0067) /* obsolete */
|
||||||
|
#define MPI_IOCSTATUS_TARGET_FC_DID_INVALID (0x0068) /* obsolete */
|
||||||
|
#define MPI_IOCSTATUS_TARGET_FC_NODE_LOGGED_OUT (0x0069) /* obsolete */
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* Fibre Channel Direct Access values */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
#define MPI_IOCSTATUS_FC_ABORTED (0x0066)
|
||||||
|
#define MPI_IOCSTATUS_FC_RX_ID_INVALID (0x0067)
|
||||||
|
#define MPI_IOCSTATUS_FC_DID_INVALID (0x0068)
|
||||||
|
#define MPI_IOCSTATUS_FC_NODE_LOGGED_OUT (0x0069)
|
||||||
|
#define MPI_IOCSTATUS_FC_EXCHANGE_CANCELED (0x006C)
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* LAN values */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
#define MPI_IOCSTATUS_LAN_DEVICE_NOT_FOUND (0x0080)
|
||||||
|
#define MPI_IOCSTATUS_LAN_DEVICE_FAILURE (0x0081)
|
||||||
|
#define MPI_IOCSTATUS_LAN_TRANSMIT_ERROR (0x0082)
|
||||||
|
#define MPI_IOCSTATUS_LAN_TRANSMIT_ABORTED (0x0083)
|
||||||
|
#define MPI_IOCSTATUS_LAN_RECEIVE_ERROR (0x0084)
|
||||||
|
#define MPI_IOCSTATUS_LAN_RECEIVE_ABORTED (0x0085)
|
||||||
|
#define MPI_IOCSTATUS_LAN_PARTIAL_PACKET (0x0086)
|
||||||
|
#define MPI_IOCSTATUS_LAN_CANCELED (0x0087)
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* Serial Attached SCSI values */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
#define MPI_IOCSTATUS_SAS_SMP_REQUEST_FAILED (0x0090)
|
||||||
|
#define MPI_IOCSTATUS_SAS_SMP_DATA_OVERRUN (0x0091)
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* Inband values */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
#define MPI_IOCSTATUS_INBAND_ABORTED (0x0098)
|
||||||
|
#define MPI_IOCSTATUS_INBAND_NO_CONNECTION (0x0099)
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* Diagnostic Tools values */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
#define MPI_IOCSTATUS_DIAGNOSTIC_RELEASED (0x00A0)
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* IOCStatus flag to indicate that log info is available */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
#define MPI_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE (0x8000)
|
||||||
|
#define MPI_IOCSTATUS_MASK (0x7FFF)
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* LogInfo Types */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
#define MPI_IOCLOGINFO_TYPE_MASK (0xF0000000)
|
||||||
|
#define MPI_IOCLOGINFO_TYPE_SHIFT (28)
|
||||||
|
#define MPI_IOCLOGINFO_TYPE_NONE (0x0)
|
||||||
|
#define MPI_IOCLOGINFO_TYPE_SCSI (0x1)
|
||||||
|
#define MPI_IOCLOGINFO_TYPE_FC (0x2)
|
||||||
|
#define MPI_IOCLOGINFO_TYPE_SAS (0x3)
|
||||||
|
#define MPI_IOCLOGINFO_TYPE_ISCSI (0x4)
|
||||||
|
#define MPI_IOCLOGINFO_LOG_DATA_MASK (0x0FFFFFFF)
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
2801
packaging/debian/mpt-status/includes/mpi_cnfg.h
Normal file
2801
packaging/debian/mpt-status/includes/mpi_cnfg.h
Normal file
File diff suppressed because it is too large
Load Diff
897
packaging/debian/mpt-status/includes/mpi_ioc.h
Normal file
897
packaging/debian/mpt-status/includes/mpi_ioc.h
Normal file
@ -0,0 +1,897 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2000-2005 LSI Logic Corporation.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Name: mpi_ioc.h
|
||||||
|
* Title: MPI IOC, Port, Event, FW Download, and FW Upload messages
|
||||||
|
* Creation Date: August 11, 2000
|
||||||
|
*
|
||||||
|
* mpi_ioc.h Version: 01.05.09
|
||||||
|
*
|
||||||
|
* Version History
|
||||||
|
* ---------------
|
||||||
|
*
|
||||||
|
* Date Version Description
|
||||||
|
* -------- -------- ------------------------------------------------------
|
||||||
|
* 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000.
|
||||||
|
* 05-24-00 00.10.02 Added _MSG_IOC_INIT_REPLY structure.
|
||||||
|
* 06-06-00 01.00.01 Added CurReplyFrameSize field to _MSG_IOC_FACTS_REPLY.
|
||||||
|
* 06-12-00 01.00.02 Added _MSG_PORT_ENABLE_REPLY structure.
|
||||||
|
* Added _MSG_EVENT_ACK_REPLY structure.
|
||||||
|
* Added _MSG_FW_DOWNLOAD_REPLY structure.
|
||||||
|
* Added _MSG_TOOLBOX_REPLY structure.
|
||||||
|
* 06-30-00 01.00.03 Added MaxLanBuckets to _PORT_FACT_REPLY structure.
|
||||||
|
* 07-27-00 01.00.04 Added _EVENT_DATA structure definitions for _SCSI,
|
||||||
|
* _LINK_STATUS, _LOOP_STATE and _LOGOUT.
|
||||||
|
* 08-11-00 01.00.05 Switched positions of MsgLength and Function fields in
|
||||||
|
* _MSG_EVENT_ACK_REPLY structure to match specification.
|
||||||
|
* 11-02-00 01.01.01 Original release for post 1.0 work.
|
||||||
|
* Added a value for Manufacturer to WhoInit.
|
||||||
|
* 12-04-00 01.01.02 Modified IOCFacts reply, added FWUpload messages, and
|
||||||
|
* removed toolbox message.
|
||||||
|
* 01-09-01 01.01.03 Added event enabled and disabled defines.
|
||||||
|
* Added structures for FwHeader and DataHeader.
|
||||||
|
* Added ImageType to FwUpload reply.
|
||||||
|
* 02-20-01 01.01.04 Started using MPI_POINTER.
|
||||||
|
* 02-27-01 01.01.05 Added event for RAID status change and its event data.
|
||||||
|
* Added IocNumber field to MSG_IOC_FACTS_REPLY.
|
||||||
|
* 03-27-01 01.01.06 Added defines for ProductId field of MPI_FW_HEADER.
|
||||||
|
* Added structure offset comments.
|
||||||
|
* 04-09-01 01.01.07 Added structure EVENT_DATA_EVENT_CHANGE.
|
||||||
|
* 08-08-01 01.02.01 Original release for v1.2 work.
|
||||||
|
* New format for FWVersion and ProductId in
|
||||||
|
* MSG_IOC_FACTS_REPLY and MPI_FW_HEADER.
|
||||||
|
* 08-31-01 01.02.02 Addded event MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE and
|
||||||
|
* related structure and defines.
|
||||||
|
* Added event MPI_EVENT_ON_BUS_TIMER_EXPIRED.
|
||||||
|
* Added MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE.
|
||||||
|
* Replaced a reserved field in MSG_IOC_FACTS_REPLY with
|
||||||
|
* IOCExceptions and changed DataImageSize to reserved.
|
||||||
|
* Added MPI_FW_DOWNLOAD_ITYPE_NVSTORE_DATA and
|
||||||
|
* MPI_FW_UPLOAD_ITYPE_NVDATA.
|
||||||
|
* 09-28-01 01.02.03 Modified Event Data for Integrated RAID.
|
||||||
|
* 11-01-01 01.02.04 Added defines for MPI_EXT_IMAGE_HEADER ImageType field.
|
||||||
|
* 03-14-02 01.02.05 Added HeaderVersion field to MSG_IOC_FACTS_REPLY.
|
||||||
|
* 05-31-02 01.02.06 Added define for
|
||||||
|
* MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID.
|
||||||
|
* Added AliasIndex to EVENT_DATA_LOGOUT structure.
|
||||||
|
* 04-01-03 01.02.07 Added defines for MPI_FW_HEADER_SIGNATURE_.
|
||||||
|
* 06-26-03 01.02.08 Added new values to the product family defines.
|
||||||
|
* 04-29-04 01.02.09 Added IOCCapabilities field to MSG_IOC_FACTS_REPLY and
|
||||||
|
* added related defines.
|
||||||
|
* 05-11-04 01.03.01 Original release for MPI v1.3.
|
||||||
|
* 08-19-04 01.05.01 Added four new fields to MSG_IOC_INIT.
|
||||||
|
* Added three new fields to MSG_IOC_FACTS_REPLY.
|
||||||
|
* Defined four new bits for the IOCCapabilities field of
|
||||||
|
* the IOCFacts reply.
|
||||||
|
* Added two new PortTypes for the PortFacts reply.
|
||||||
|
* Added six new events along with their EventData
|
||||||
|
* structures.
|
||||||
|
* Added a new MsgFlag to the FwDownload request to
|
||||||
|
* indicate last segment.
|
||||||
|
* Defined a new image type of boot loader.
|
||||||
|
* Added FW family codes for SAS product families.
|
||||||
|
* 10-05-04 01.05.02 Added ReplyFifoHostSignalingAddr field to
|
||||||
|
* MSG_IOC_FACTS_REPLY.
|
||||||
|
* 12-07-04 01.05.03 Added more defines for SAS Discovery Error event.
|
||||||
|
* 12-09-04 01.05.04 Added Unsupported device to SAS Device event.
|
||||||
|
* 01-15-05 01.05.05 Added event data for SAS SES Event.
|
||||||
|
* 02-09-05 01.05.06 Added MPI_FW_UPLOAD_ITYPE_FW_BACKUP define.
|
||||||
|
* 02-22-05 01.05.07 Added Host Page Buffer Persistent flag to IOC Facts
|
||||||
|
* Reply and IOC Init Request.
|
||||||
|
* 03-11-05 01.05.08 Added family code for 1068E family.
|
||||||
|
* Removed IOCFacts Reply EEDP Capability bit.
|
||||||
|
* 06-24-05 01.05.09 Added 5 new IOCFacts Reply IOCCapabilities bits.
|
||||||
|
* Added Max SATA Targets to SAS Discovery Error event.
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MPI_IOC_H
|
||||||
|
#define MPI_IOC_H
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
*
|
||||||
|
* I O C M e s s a g e s
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* IOCInit message */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _MSG_IOC_INIT
|
||||||
|
{
|
||||||
|
U8 WhoInit; /* 00h */
|
||||||
|
U8 Reserved; /* 01h */
|
||||||
|
U8 ChainOffset; /* 02h */
|
||||||
|
U8 Function; /* 03h */
|
||||||
|
U8 Flags; /* 04h */
|
||||||
|
U8 MaxDevices; /* 05h */
|
||||||
|
U8 MaxBuses; /* 06h */
|
||||||
|
U8 MsgFlags; /* 07h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
U16 ReplyFrameSize; /* 0Ch */
|
||||||
|
U8 Reserved1[2]; /* 0Eh */
|
||||||
|
U32 HostMfaHighAddr; /* 10h */
|
||||||
|
U32 SenseBufferHighAddr; /* 14h */
|
||||||
|
U32 ReplyFifoHostSignalingAddr; /* 18h */
|
||||||
|
SGE_SIMPLE_UNION HostPageBufferSGE; /* 1Ch */
|
||||||
|
U16 MsgVersion; /* 28h */
|
||||||
|
U16 HeaderVersion; /* 2Ah */
|
||||||
|
} MSG_IOC_INIT, MPI_POINTER PTR_MSG_IOC_INIT,
|
||||||
|
IOCInit_t, MPI_POINTER pIOCInit_t;
|
||||||
|
|
||||||
|
/* WhoInit values */
|
||||||
|
#define MPI_WHOINIT_NO_ONE (0x00)
|
||||||
|
#define MPI_WHOINIT_SYSTEM_BIOS (0x01)
|
||||||
|
#define MPI_WHOINIT_ROM_BIOS (0x02)
|
||||||
|
#define MPI_WHOINIT_PCI_PEER (0x03)
|
||||||
|
#define MPI_WHOINIT_HOST_DRIVER (0x04)
|
||||||
|
#define MPI_WHOINIT_MANUFACTURER (0x05)
|
||||||
|
|
||||||
|
/* Flags values */
|
||||||
|
#define MPI_IOCINIT_FLAGS_HOST_PAGE_BUFFER_PERSISTENT (0x04)
|
||||||
|
#define MPI_IOCINIT_FLAGS_REPLY_FIFO_HOST_SIGNAL (0x02)
|
||||||
|
#define MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE (0x01)
|
||||||
|
|
||||||
|
/* MsgVersion */
|
||||||
|
#define MPI_IOCINIT_MSGVERSION_MAJOR_MASK (0xFF00)
|
||||||
|
#define MPI_IOCINIT_MSGVERSION_MAJOR_SHIFT (8)
|
||||||
|
#define MPI_IOCINIT_MSGVERSION_MINOR_MASK (0x00FF)
|
||||||
|
#define MPI_IOCINIT_MSGVERSION_MINOR_SHIFT (0)
|
||||||
|
|
||||||
|
/* HeaderVersion */
|
||||||
|
#define MPI_IOCINIT_HEADERVERSION_UNIT_MASK (0xFF00)
|
||||||
|
#define MPI_IOCINIT_HEADERVERSION_UNIT_SHIFT (8)
|
||||||
|
#define MPI_IOCINIT_HEADERVERSION_DEV_MASK (0x00FF)
|
||||||
|
#define MPI_IOCINIT_HEADERVERSION_DEV_SHIFT (0)
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _MSG_IOC_INIT_REPLY
|
||||||
|
{
|
||||||
|
U8 WhoInit; /* 00h */
|
||||||
|
U8 Reserved; /* 01h */
|
||||||
|
U8 MsgLength; /* 02h */
|
||||||
|
U8 Function; /* 03h */
|
||||||
|
U8 Flags; /* 04h */
|
||||||
|
U8 MaxDevices; /* 05h */
|
||||||
|
U8 MaxBuses; /* 06h */
|
||||||
|
U8 MsgFlags; /* 07h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
U16 Reserved2; /* 0Ch */
|
||||||
|
U16 IOCStatus; /* 0Eh */
|
||||||
|
U32 IOCLogInfo; /* 10h */
|
||||||
|
} MSG_IOC_INIT_REPLY, MPI_POINTER PTR_MSG_IOC_INIT_REPLY,
|
||||||
|
IOCInitReply_t, MPI_POINTER pIOCInitReply_t;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* IOC Facts message */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _MSG_IOC_FACTS
|
||||||
|
{
|
||||||
|
U8 Reserved[2]; /* 00h */
|
||||||
|
U8 ChainOffset; /* 01h */
|
||||||
|
U8 Function; /* 02h */
|
||||||
|
U8 Reserved1[3]; /* 03h */
|
||||||
|
U8 MsgFlags; /* 04h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
} MSG_IOC_FACTS, MPI_POINTER PTR_IOC_FACTS,
|
||||||
|
IOCFacts_t, MPI_POINTER pIOCFacts_t;
|
||||||
|
|
||||||
|
typedef struct _MPI_FW_VERSION_STRUCT
|
||||||
|
{
|
||||||
|
U8 Dev; /* 00h */
|
||||||
|
U8 Unit; /* 01h */
|
||||||
|
U8 Minor; /* 02h */
|
||||||
|
U8 Major; /* 03h */
|
||||||
|
} MPI_FW_VERSION_STRUCT;
|
||||||
|
|
||||||
|
typedef union _MPI_FW_VERSION
|
||||||
|
{
|
||||||
|
MPI_FW_VERSION_STRUCT Struct;
|
||||||
|
U32 Word;
|
||||||
|
} MPI_FW_VERSION;
|
||||||
|
|
||||||
|
/* IOC Facts Reply */
|
||||||
|
typedef struct _MSG_IOC_FACTS_REPLY
|
||||||
|
{
|
||||||
|
U16 MsgVersion; /* 00h */
|
||||||
|
U8 MsgLength; /* 02h */
|
||||||
|
U8 Function; /* 03h */
|
||||||
|
U16 HeaderVersion; /* 04h */
|
||||||
|
U8 IOCNumber; /* 06h */
|
||||||
|
U8 MsgFlags; /* 07h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
U16 IOCExceptions; /* 0Ch */
|
||||||
|
U16 IOCStatus; /* 0Eh */
|
||||||
|
U32 IOCLogInfo; /* 10h */
|
||||||
|
U8 MaxChainDepth; /* 14h */
|
||||||
|
U8 WhoInit; /* 15h */
|
||||||
|
U8 BlockSize; /* 16h */
|
||||||
|
U8 Flags; /* 17h */
|
||||||
|
U16 ReplyQueueDepth; /* 18h */
|
||||||
|
U16 RequestFrameSize; /* 1Ah */
|
||||||
|
U16 Reserved_0101_FWVersion; /* 1Ch */ /* obsolete 16-bit FWVersion */
|
||||||
|
U16 ProductID; /* 1Eh */
|
||||||
|
U32 CurrentHostMfaHighAddr; /* 20h */
|
||||||
|
U16 GlobalCredits; /* 24h */
|
||||||
|
U8 NumberOfPorts; /* 26h */
|
||||||
|
U8 EventState; /* 27h */
|
||||||
|
U32 CurrentSenseBufferHighAddr; /* 28h */
|
||||||
|
U16 CurReplyFrameSize; /* 2Ch */
|
||||||
|
U8 MaxDevices; /* 2Eh */
|
||||||
|
U8 MaxBuses; /* 2Fh */
|
||||||
|
U32 FWImageSize; /* 30h */
|
||||||
|
U32 IOCCapabilities; /* 34h */
|
||||||
|
MPI_FW_VERSION FWVersion; /* 38h */
|
||||||
|
U16 HighPriorityQueueDepth; /* 3Ch */
|
||||||
|
U16 Reserved2; /* 3Eh */
|
||||||
|
SGE_SIMPLE_UNION HostPageBufferSGE; /* 40h */
|
||||||
|
U32 ReplyFifoHostSignalingAddr; /* 4Ch */
|
||||||
|
} MSG_IOC_FACTS_REPLY, MPI_POINTER PTR_MSG_IOC_FACTS_REPLY,
|
||||||
|
IOCFactsReply_t, MPI_POINTER pIOCFactsReply_t;
|
||||||
|
|
||||||
|
#define MPI_IOCFACTS_MSGVERSION_MAJOR_MASK (0xFF00)
|
||||||
|
#define MPI_IOCFACTS_MSGVERSION_MAJOR_SHIFT (8)
|
||||||
|
#define MPI_IOCFACTS_MSGVERSION_MINOR_MASK (0x00FF)
|
||||||
|
#define MPI_IOCFACTS_MSGVERSION_MINOR_SHIFT (0)
|
||||||
|
|
||||||
|
#define MPI_IOCFACTS_HDRVERSION_UNIT_MASK (0xFF00)
|
||||||
|
#define MPI_IOCFACTS_HDRVERSION_UNIT_SHIFT (8)
|
||||||
|
#define MPI_IOCFACTS_HDRVERSION_DEV_MASK (0x00FF)
|
||||||
|
#define MPI_IOCFACTS_HDRVERSION_DEV_SHIFT (0)
|
||||||
|
|
||||||
|
#define MPI_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL (0x0001)
|
||||||
|
#define MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID (0x0002)
|
||||||
|
#define MPI_IOCFACTS_EXCEPT_FW_CHECKSUM_FAIL (0x0004)
|
||||||
|
#define MPI_IOCFACTS_EXCEPT_PERSISTENT_TABLE_FULL (0x0008)
|
||||||
|
|
||||||
|
#define MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT (0x01)
|
||||||
|
#define MPI_IOCFACTS_FLAGS_REPLY_FIFO_HOST_SIGNAL (0x02)
|
||||||
|
#define MPI_IOCFACTS_FLAGS_HOST_PAGE_BUFFER_PERSISTENT (0x04)
|
||||||
|
|
||||||
|
#define MPI_IOCFACTS_EVENTSTATE_DISABLED (0x00)
|
||||||
|
#define MPI_IOCFACTS_EVENTSTATE_ENABLED (0x01)
|
||||||
|
|
||||||
|
#define MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q (0x00000001)
|
||||||
|
#define MPI_IOCFACTS_CAPABILITY_REPLY_HOST_SIGNAL (0x00000002)
|
||||||
|
#define MPI_IOCFACTS_CAPABILITY_QUEUE_FULL_HANDLING (0x00000004)
|
||||||
|
#define MPI_IOCFACTS_CAPABILITY_DIAG_TRACE_BUFFER (0x00000008)
|
||||||
|
#define MPI_IOCFACTS_CAPABILITY_SNAPSHOT_BUFFER (0x00000010)
|
||||||
|
#define MPI_IOCFACTS_CAPABILITY_EXTENDED_BUFFER (0x00000020)
|
||||||
|
#define MPI_IOCFACTS_CAPABILITY_EEDP (0x00000040)
|
||||||
|
#define MPI_IOCFACTS_CAPABILITY_BIDIRECTIONAL (0x00000080)
|
||||||
|
#define MPI_IOCFACTS_CAPABILITY_MULTICAST (0x00000100)
|
||||||
|
#define MPI_IOCFACTS_CAPABILITY_SCSIIO32 (0x00000200)
|
||||||
|
#define MPI_IOCFACTS_CAPABILITY_NO_SCSIIO16 (0x00000400)
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
*
|
||||||
|
* P o r t M e s s a g e s
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* Port Facts message and Reply */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _MSG_PORT_FACTS
|
||||||
|
{
|
||||||
|
U8 Reserved[2]; /* 00h */
|
||||||
|
U8 ChainOffset; /* 02h */
|
||||||
|
U8 Function; /* 03h */
|
||||||
|
U8 Reserved1[2]; /* 04h */
|
||||||
|
U8 PortNumber; /* 06h */
|
||||||
|
U8 MsgFlags; /* 07h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
} MSG_PORT_FACTS, MPI_POINTER PTR_MSG_PORT_FACTS,
|
||||||
|
PortFacts_t, MPI_POINTER pPortFacts_t;
|
||||||
|
|
||||||
|
typedef struct _MSG_PORT_FACTS_REPLY
|
||||||
|
{
|
||||||
|
U16 Reserved; /* 00h */
|
||||||
|
U8 MsgLength; /* 02h */
|
||||||
|
U8 Function; /* 03h */
|
||||||
|
U16 Reserved1; /* 04h */
|
||||||
|
U8 PortNumber; /* 06h */
|
||||||
|
U8 MsgFlags; /* 07h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
U16 Reserved2; /* 0Ch */
|
||||||
|
U16 IOCStatus; /* 0Eh */
|
||||||
|
U32 IOCLogInfo; /* 10h */
|
||||||
|
U8 Reserved3; /* 14h */
|
||||||
|
U8 PortType; /* 15h */
|
||||||
|
U16 MaxDevices; /* 16h */
|
||||||
|
U16 PortSCSIID; /* 18h */
|
||||||
|
U16 ProtocolFlags; /* 1Ah */
|
||||||
|
U16 MaxPostedCmdBuffers; /* 1Ch */
|
||||||
|
U16 MaxPersistentIDs; /* 1Eh */
|
||||||
|
U16 MaxLanBuckets; /* 20h */
|
||||||
|
U16 Reserved4; /* 22h */
|
||||||
|
U32 Reserved5; /* 24h */
|
||||||
|
} MSG_PORT_FACTS_REPLY, MPI_POINTER PTR_MSG_PORT_FACTS_REPLY,
|
||||||
|
PortFactsReply_t, MPI_POINTER pPortFactsReply_t;
|
||||||
|
|
||||||
|
|
||||||
|
/* PortTypes values */
|
||||||
|
|
||||||
|
#define MPI_PORTFACTS_PORTTYPE_INACTIVE (0x00)
|
||||||
|
#define MPI_PORTFACTS_PORTTYPE_SCSI (0x01)
|
||||||
|
#define MPI_PORTFACTS_PORTTYPE_FC (0x10)
|
||||||
|
#define MPI_PORTFACTS_PORTTYPE_ISCSI (0x20)
|
||||||
|
#define MPI_PORTFACTS_PORTTYPE_SAS (0x30)
|
||||||
|
|
||||||
|
/* ProtocolFlags values */
|
||||||
|
|
||||||
|
#define MPI_PORTFACTS_PROTOCOL_LOGBUSADDR (0x01)
|
||||||
|
#define MPI_PORTFACTS_PROTOCOL_LAN (0x02)
|
||||||
|
#define MPI_PORTFACTS_PROTOCOL_TARGET (0x04)
|
||||||
|
#define MPI_PORTFACTS_PROTOCOL_INITIATOR (0x08)
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* Port Enable Message */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _MSG_PORT_ENABLE
|
||||||
|
{
|
||||||
|
U8 Reserved[2]; /* 00h */
|
||||||
|
U8 ChainOffset; /* 02h */
|
||||||
|
U8 Function; /* 03h */
|
||||||
|
U8 Reserved1[2]; /* 04h */
|
||||||
|
U8 PortNumber; /* 06h */
|
||||||
|
U8 MsgFlags; /* 07h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
} MSG_PORT_ENABLE, MPI_POINTER PTR_MSG_PORT_ENABLE,
|
||||||
|
PortEnable_t, MPI_POINTER pPortEnable_t;
|
||||||
|
|
||||||
|
typedef struct _MSG_PORT_ENABLE_REPLY
|
||||||
|
{
|
||||||
|
U8 Reserved[2]; /* 00h */
|
||||||
|
U8 MsgLength; /* 02h */
|
||||||
|
U8 Function; /* 03h */
|
||||||
|
U8 Reserved1[2]; /* 04h */
|
||||||
|
U8 PortNumber; /* 05h */
|
||||||
|
U8 MsgFlags; /* 07h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
U16 Reserved2; /* 0Ch */
|
||||||
|
U16 IOCStatus; /* 0Eh */
|
||||||
|
U32 IOCLogInfo; /* 10h */
|
||||||
|
} MSG_PORT_ENABLE_REPLY, MPI_POINTER PTR_MSG_PORT_ENABLE_REPLY,
|
||||||
|
PortEnableReply_t, MPI_POINTER pPortEnableReply_t;
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
*
|
||||||
|
* E v e n t M e s s a g e s
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* Event Notification messages */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _MSG_EVENT_NOTIFY
|
||||||
|
{
|
||||||
|
U8 Switch; /* 00h */
|
||||||
|
U8 Reserved; /* 01h */
|
||||||
|
U8 ChainOffset; /* 02h */
|
||||||
|
U8 Function; /* 03h */
|
||||||
|
U8 Reserved1[3]; /* 04h */
|
||||||
|
U8 MsgFlags; /* 07h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
} MSG_EVENT_NOTIFY, MPI_POINTER PTR_MSG_EVENT_NOTIFY,
|
||||||
|
EventNotification_t, MPI_POINTER pEventNotification_t;
|
||||||
|
|
||||||
|
/* Event Notification Reply */
|
||||||
|
|
||||||
|
typedef struct _MSG_EVENT_NOTIFY_REPLY
|
||||||
|
{
|
||||||
|
U16 EventDataLength; /* 00h */
|
||||||
|
U8 MsgLength; /* 02h */
|
||||||
|
U8 Function; /* 03h */
|
||||||
|
U8 Reserved1[2]; /* 04h */
|
||||||
|
U8 AckRequired; /* 06h */
|
||||||
|
U8 MsgFlags; /* 07h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
U8 Reserved2[2]; /* 0Ch */
|
||||||
|
U16 IOCStatus; /* 0Eh */
|
||||||
|
U32 IOCLogInfo; /* 10h */
|
||||||
|
U32 Event; /* 14h */
|
||||||
|
U32 EventContext; /* 18h */
|
||||||
|
U32 Data[1]; /* 1Ch */
|
||||||
|
} MSG_EVENT_NOTIFY_REPLY, MPI_POINTER PTR_MSG_EVENT_NOTIFY_REPLY,
|
||||||
|
EventNotificationReply_t, MPI_POINTER pEventNotificationReply_t;
|
||||||
|
|
||||||
|
/* Event Acknowledge */
|
||||||
|
|
||||||
|
typedef struct _MSG_EVENT_ACK
|
||||||
|
{
|
||||||
|
U8 Reserved[2]; /* 00h */
|
||||||
|
U8 ChainOffset; /* 02h */
|
||||||
|
U8 Function; /* 03h */
|
||||||
|
U8 Reserved1[3]; /* 04h */
|
||||||
|
U8 MsgFlags; /* 07h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
U32 Event; /* 0Ch */
|
||||||
|
U32 EventContext; /* 10h */
|
||||||
|
} MSG_EVENT_ACK, MPI_POINTER PTR_MSG_EVENT_ACK,
|
||||||
|
EventAck_t, MPI_POINTER pEventAck_t;
|
||||||
|
|
||||||
|
typedef struct _MSG_EVENT_ACK_REPLY
|
||||||
|
{
|
||||||
|
U8 Reserved[2]; /* 00h */
|
||||||
|
U8 MsgLength; /* 02h */
|
||||||
|
U8 Function; /* 03h */
|
||||||
|
U8 Reserved1[3]; /* 04h */
|
||||||
|
U8 MsgFlags; /* 07h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
U16 Reserved2; /* 0Ch */
|
||||||
|
U16 IOCStatus; /* 0Eh */
|
||||||
|
U32 IOCLogInfo; /* 10h */
|
||||||
|
} MSG_EVENT_ACK_REPLY, MPI_POINTER PTR_MSG_EVENT_ACK_REPLY,
|
||||||
|
EventAckReply_t, MPI_POINTER pEventAckReply_t;
|
||||||
|
|
||||||
|
/* Switch */
|
||||||
|
|
||||||
|
#define MPI_EVENT_NOTIFICATION_SWITCH_OFF (0x00)
|
||||||
|
#define MPI_EVENT_NOTIFICATION_SWITCH_ON (0x01)
|
||||||
|
|
||||||
|
/* Event */
|
||||||
|
|
||||||
|
#define MPI_EVENT_NONE (0x00000000)
|
||||||
|
#define MPI_EVENT_LOG_DATA (0x00000001)
|
||||||
|
#define MPI_EVENT_STATE_CHANGE (0x00000002)
|
||||||
|
#define MPI_EVENT_UNIT_ATTENTION (0x00000003)
|
||||||
|
#define MPI_EVENT_IOC_BUS_RESET (0x00000004)
|
||||||
|
#define MPI_EVENT_EXT_BUS_RESET (0x00000005)
|
||||||
|
#define MPI_EVENT_RESCAN (0x00000006)
|
||||||
|
#define MPI_EVENT_LINK_STATUS_CHANGE (0x00000007)
|
||||||
|
#define MPI_EVENT_LOOP_STATE_CHANGE (0x00000008)
|
||||||
|
#define MPI_EVENT_LOGOUT (0x00000009)
|
||||||
|
#define MPI_EVENT_EVENT_CHANGE (0x0000000A)
|
||||||
|
#define MPI_EVENT_INTEGRATED_RAID (0x0000000B)
|
||||||
|
#define MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE (0x0000000C)
|
||||||
|
#define MPI_EVENT_ON_BUS_TIMER_EXPIRED (0x0000000D)
|
||||||
|
#define MPI_EVENT_QUEUE_FULL (0x0000000E)
|
||||||
|
#define MPI_EVENT_SAS_DEVICE_STATUS_CHANGE (0x0000000F)
|
||||||
|
#define MPI_EVENT_SAS_SES (0x00000010)
|
||||||
|
#define MPI_EVENT_PERSISTENT_TABLE_FULL (0x00000011)
|
||||||
|
#define MPI_EVENT_SAS_PHY_LINK_STATUS (0x00000012)
|
||||||
|
#define MPI_EVENT_SAS_DISCOVERY_ERROR (0x00000013)
|
||||||
|
|
||||||
|
/* AckRequired field values */
|
||||||
|
|
||||||
|
#define MPI_EVENT_NOTIFICATION_ACK_NOT_REQUIRED (0x00)
|
||||||
|
#define MPI_EVENT_NOTIFICATION_ACK_REQUIRED (0x01)
|
||||||
|
|
||||||
|
/* EventChange Event data */
|
||||||
|
|
||||||
|
typedef struct _EVENT_DATA_EVENT_CHANGE
|
||||||
|
{
|
||||||
|
U8 EventState; /* 00h */
|
||||||
|
U8 Reserved; /* 01h */
|
||||||
|
U16 Reserved1; /* 02h */
|
||||||
|
} EVENT_DATA_EVENT_CHANGE, MPI_POINTER PTR_EVENT_DATA_EVENT_CHANGE,
|
||||||
|
EventDataEventChange_t, MPI_POINTER pEventDataEventChange_t;
|
||||||
|
|
||||||
|
/* SCSI Event data for Port, Bus and Device forms */
|
||||||
|
|
||||||
|
typedef struct _EVENT_DATA_SCSI
|
||||||
|
{
|
||||||
|
U8 TargetID; /* 00h */
|
||||||
|
U8 BusPort; /* 01h */
|
||||||
|
U16 Reserved; /* 02h */
|
||||||
|
} EVENT_DATA_SCSI, MPI_POINTER PTR_EVENT_DATA_SCSI,
|
||||||
|
EventDataScsi_t, MPI_POINTER pEventDataScsi_t;
|
||||||
|
|
||||||
|
/* SCSI Device Status Change Event data */
|
||||||
|
|
||||||
|
typedef struct _EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE
|
||||||
|
{
|
||||||
|
U8 TargetID; /* 00h */
|
||||||
|
U8 Bus; /* 01h */
|
||||||
|
U8 ReasonCode; /* 02h */
|
||||||
|
U8 LUN; /* 03h */
|
||||||
|
U8 ASC; /* 04h */
|
||||||
|
U8 ASCQ; /* 05h */
|
||||||
|
U16 Reserved; /* 06h */
|
||||||
|
} EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE,
|
||||||
|
MPI_POINTER PTR_EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE,
|
||||||
|
MpiEventDataScsiDeviceStatusChange_t,
|
||||||
|
MPI_POINTER pMpiEventDataScsiDeviceStatusChange_t;
|
||||||
|
|
||||||
|
/* MPI SCSI Device Status Change Event data ReasonCode values */
|
||||||
|
#define MPI_EVENT_SCSI_DEV_STAT_RC_ADDED (0x03)
|
||||||
|
#define MPI_EVENT_SCSI_DEV_STAT_RC_NOT_RESPONDING (0x04)
|
||||||
|
#define MPI_EVENT_SCSI_DEV_STAT_RC_SMART_DATA (0x05)
|
||||||
|
|
||||||
|
/* SAS Device Status Change Event data */
|
||||||
|
|
||||||
|
typedef struct _EVENT_DATA_SAS_DEVICE_STATUS_CHANGE
|
||||||
|
{
|
||||||
|
U8 TargetID; /* 00h */
|
||||||
|
U8 Bus; /* 01h */
|
||||||
|
U8 ReasonCode; /* 02h */
|
||||||
|
U8 Reserved; /* 03h */
|
||||||
|
U8 ASC; /* 04h */
|
||||||
|
U8 ASCQ; /* 05h */
|
||||||
|
U16 DevHandle; /* 06h */
|
||||||
|
U32 DeviceInfo; /* 08h */
|
||||||
|
U16 ParentDevHandle; /* 0Ch */
|
||||||
|
U8 PhyNum; /* 0Eh */
|
||||||
|
U8 Reserved1; /* 0Fh */
|
||||||
|
U64 SASAddress; /* 10h */
|
||||||
|
} EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
|
||||||
|
MPI_POINTER PTR_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
|
||||||
|
MpiEventDataSasDeviceStatusChange_t,
|
||||||
|
MPI_POINTER pMpiEventDataSasDeviceStatusChange_t;
|
||||||
|
|
||||||
|
/* MPI SAS Device Status Change Event data ReasonCode values */
|
||||||
|
#define MPI_EVENT_SAS_DEV_STAT_RC_ADDED (0x03)
|
||||||
|
#define MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING (0x04)
|
||||||
|
#define MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA (0x05)
|
||||||
|
#define MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED (0x06)
|
||||||
|
#define MPI_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED (0x07)
|
||||||
|
|
||||||
|
|
||||||
|
/* SCSI Event data for Queue Full event */
|
||||||
|
|
||||||
|
typedef struct _EVENT_DATA_QUEUE_FULL
|
||||||
|
{
|
||||||
|
U8 TargetID; /* 00h */
|
||||||
|
U8 Bus; /* 01h */
|
||||||
|
U16 CurrentDepth; /* 02h */
|
||||||
|
} EVENT_DATA_QUEUE_FULL, MPI_POINTER PTR_EVENT_DATA_QUEUE_FULL,
|
||||||
|
EventDataQueueFull_t, MPI_POINTER pEventDataQueueFull_t;
|
||||||
|
|
||||||
|
/* MPI Integrated RAID Event data */
|
||||||
|
|
||||||
|
typedef struct _EVENT_DATA_RAID
|
||||||
|
{
|
||||||
|
U8 VolumeID; /* 00h */
|
||||||
|
U8 VolumeBus; /* 01h */
|
||||||
|
U8 ReasonCode; /* 02h */
|
||||||
|
U8 PhysDiskNum; /* 03h */
|
||||||
|
U8 ASC; /* 04h */
|
||||||
|
U8 ASCQ; /* 05h */
|
||||||
|
U16 Reserved; /* 06h */
|
||||||
|
U32 SettingsStatus; /* 08h */
|
||||||
|
} EVENT_DATA_RAID, MPI_POINTER PTR_EVENT_DATA_RAID,
|
||||||
|
MpiEventDataRaid_t, MPI_POINTER pMpiEventDataRaid_t;
|
||||||
|
|
||||||
|
/* MPI Integrated RAID Event data ReasonCode values */
|
||||||
|
#define MPI_EVENT_RAID_RC_VOLUME_CREATED (0x00)
|
||||||
|
#define MPI_EVENT_RAID_RC_VOLUME_DELETED (0x01)
|
||||||
|
#define MPI_EVENT_RAID_RC_VOLUME_SETTINGS_CHANGED (0x02)
|
||||||
|
#define MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED (0x03)
|
||||||
|
#define MPI_EVENT_RAID_RC_VOLUME_PHYSDISK_CHANGED (0x04)
|
||||||
|
#define MPI_EVENT_RAID_RC_PHYSDISK_CREATED (0x05)
|
||||||
|
#define MPI_EVENT_RAID_RC_PHYSDISK_DELETED (0x06)
|
||||||
|
#define MPI_EVENT_RAID_RC_PHYSDISK_SETTINGS_CHANGED (0x07)
|
||||||
|
#define MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED (0x08)
|
||||||
|
#define MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED (0x09)
|
||||||
|
#define MPI_EVENT_RAID_RC_SMART_DATA (0x0A)
|
||||||
|
#define MPI_EVENT_RAID_RC_REPLACE_ACTION_STARTED (0x0B)
|
||||||
|
|
||||||
|
/* MPI Link Status Change Event data */
|
||||||
|
|
||||||
|
typedef struct _EVENT_DATA_LINK_STATUS
|
||||||
|
{
|
||||||
|
U8 State; /* 00h */
|
||||||
|
U8 Reserved; /* 01h */
|
||||||
|
U16 Reserved1; /* 02h */
|
||||||
|
U8 Reserved2; /* 04h */
|
||||||
|
U8 Port; /* 05h */
|
||||||
|
U16 Reserved3; /* 06h */
|
||||||
|
} EVENT_DATA_LINK_STATUS, MPI_POINTER PTR_EVENT_DATA_LINK_STATUS,
|
||||||
|
EventDataLinkStatus_t, MPI_POINTER pEventDataLinkStatus_t;
|
||||||
|
|
||||||
|
#define MPI_EVENT_LINK_STATUS_FAILURE (0x00000000)
|
||||||
|
#define MPI_EVENT_LINK_STATUS_ACTIVE (0x00000001)
|
||||||
|
|
||||||
|
/* MPI Loop State Change Event data */
|
||||||
|
|
||||||
|
typedef struct _EVENT_DATA_LOOP_STATE
|
||||||
|
{
|
||||||
|
U8 Character4; /* 00h */
|
||||||
|
U8 Character3; /* 01h */
|
||||||
|
U8 Type; /* 02h */
|
||||||
|
U8 Reserved; /* 03h */
|
||||||
|
U8 Reserved1; /* 04h */
|
||||||
|
U8 Port; /* 05h */
|
||||||
|
U16 Reserved2; /* 06h */
|
||||||
|
} EVENT_DATA_LOOP_STATE, MPI_POINTER PTR_EVENT_DATA_LOOP_STATE,
|
||||||
|
EventDataLoopState_t, MPI_POINTER pEventDataLoopState_t;
|
||||||
|
|
||||||
|
#define MPI_EVENT_LOOP_STATE_CHANGE_LIP (0x0001)
|
||||||
|
#define MPI_EVENT_LOOP_STATE_CHANGE_LPE (0x0002)
|
||||||
|
#define MPI_EVENT_LOOP_STATE_CHANGE_LPB (0x0003)
|
||||||
|
|
||||||
|
/* MPI LOGOUT Event data */
|
||||||
|
|
||||||
|
typedef struct _EVENT_DATA_LOGOUT
|
||||||
|
{
|
||||||
|
U32 NPortID; /* 00h */
|
||||||
|
U8 AliasIndex; /* 04h */
|
||||||
|
U8 Port; /* 05h */
|
||||||
|
U16 Reserved1; /* 06h */
|
||||||
|
} EVENT_DATA_LOGOUT, MPI_POINTER PTR_EVENT_DATA_LOGOUT,
|
||||||
|
EventDataLogout_t, MPI_POINTER pEventDataLogout_t;
|
||||||
|
|
||||||
|
#define MPI_EVENT_LOGOUT_ALL_ALIASES (0xFF)
|
||||||
|
|
||||||
|
/* SAS SES Event data */
|
||||||
|
|
||||||
|
typedef struct _EVENT_DATA_SAS_SES
|
||||||
|
{
|
||||||
|
U8 PhyNum; /* 00h */
|
||||||
|
U8 Port; /* 01h */
|
||||||
|
U8 PortWidth; /* 02h */
|
||||||
|
U8 Reserved1; /* 04h */
|
||||||
|
} EVENT_DATA_SAS_SES, MPI_POINTER PTR_EVENT_DATA_SAS_SES,
|
||||||
|
MpiEventDataSasSes_t, MPI_POINTER pMpiEventDataSasSes_t;
|
||||||
|
|
||||||
|
/* SAS Phy Link Status Event data */
|
||||||
|
|
||||||
|
typedef struct _EVENT_DATA_SAS_PHY_LINK_STATUS
|
||||||
|
{
|
||||||
|
U8 PhyNum; /* 00h */
|
||||||
|
U8 LinkRates; /* 01h */
|
||||||
|
U16 DevHandle; /* 02h */
|
||||||
|
U64 SASAddress; /* 04h */
|
||||||
|
} EVENT_DATA_SAS_PHY_LINK_STATUS, MPI_POINTER PTR_EVENT_DATA_SAS_PHY_LINK_STATUS,
|
||||||
|
MpiEventDataSasPhyLinkStatus_t, MPI_POINTER pMpiEventDataSasPhyLinkStatus_t;
|
||||||
|
|
||||||
|
/* defines for the LinkRates field of the SAS PHY Link Status event */
|
||||||
|
#define MPI_EVENT_SAS_PLS_LR_CURRENT_MASK (0xF0)
|
||||||
|
#define MPI_EVENT_SAS_PLS_LR_CURRENT_SHIFT (4)
|
||||||
|
#define MPI_EVENT_SAS_PLS_LR_PREVIOUS_MASK (0x0F)
|
||||||
|
#define MPI_EVENT_SAS_PLS_LR_PREVIOUS_SHIFT (0)
|
||||||
|
#define MPI_EVENT_SAS_PLS_LR_RATE_UNKNOWN (0x00)
|
||||||
|
#define MPI_EVENT_SAS_PLS_LR_RATE_PHY_DISABLED (0x01)
|
||||||
|
#define MPI_EVENT_SAS_PLS_LR_RATE_FAILED_SPEED_NEGOTIATION (0x02)
|
||||||
|
#define MPI_EVENT_SAS_PLS_LR_RATE_SATA_OOB_COMPLETE (0x03)
|
||||||
|
#define MPI_EVENT_SAS_PLS_LR_RATE_1_5 (0x08)
|
||||||
|
#define MPI_EVENT_SAS_PLS_LR_RATE_3_0 (0x09)
|
||||||
|
|
||||||
|
/* SAS Discovery Errror Event data */
|
||||||
|
|
||||||
|
typedef struct _EVENT_DATA_DISCOVERY_ERROR
|
||||||
|
{
|
||||||
|
U32 DiscoveryStatus; /* 00h */
|
||||||
|
U8 Port; /* 04h */
|
||||||
|
U8 Reserved1; /* 05h */
|
||||||
|
U16 Reserved2; /* 06h */
|
||||||
|
} EVENT_DATA_DISCOVERY_ERROR, MPI_POINTER PTR_EVENT_DATA_DISCOVERY_ERROR,
|
||||||
|
EventDataDiscoveryError_t, MPI_POINTER pEventDataDiscoveryError_t;
|
||||||
|
|
||||||
|
#define MPI_EVENT_DSCVRY_ERR_DS_LOOP_DETECTED (0x00000001)
|
||||||
|
#define MPI_EVENT_DSCVRY_ERR_DS_UNADDRESSABLE_DEVICE (0x00000002)
|
||||||
|
#define MPI_EVENT_DSCVRY_ERR_DS_MULTIPLE_PORTS (0x00000004)
|
||||||
|
#define MPI_EVENT_DSCVRY_ERR_DS_EXPANDER_ERR (0x00000008)
|
||||||
|
#define MPI_EVENT_DSCVRY_ERR_DS_SMP_TIMEOUT (0x00000010)
|
||||||
|
#define MPI_EVENT_DSCVRY_ERR_DS_OUT_ROUTE_ENTRIES (0x00000020)
|
||||||
|
#define MPI_EVENT_DSCVRY_ERR_DS_INDEX_NOT_EXIST (0x00000040)
|
||||||
|
#define MPI_EVENT_DSCVRY_ERR_DS_SMP_FUNCTION_FAILED (0x00000080)
|
||||||
|
#define MPI_EVENT_DSCVRY_ERR_DS_SMP_CRC_ERROR (0x00000100)
|
||||||
|
#define MPI_EVENT_DSCVRY_ERR_DS_MULTPL_SUBTRACTIVE (0x00000200)
|
||||||
|
#define MPI_EVENT_DSCVRY_ERR_DS_TABLE_TO_TABLE (0x00000400)
|
||||||
|
#define MPI_EVENT_DSCVRY_ERR_DS_MULTPL_PATHS (0x00000800)
|
||||||
|
#define MPI_EVENT_DSCVRY_ERR_DS_MAX_SATA_TARGETS (0x00001000)
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
*
|
||||||
|
* F i r m w a r e L o a d M e s s a g e s
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* Firmware Download message and associated structures */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _MSG_FW_DOWNLOAD
|
||||||
|
{
|
||||||
|
U8 ImageType; /* 00h */
|
||||||
|
U8 Reserved; /* 01h */
|
||||||
|
U8 ChainOffset; /* 02h */
|
||||||
|
U8 Function; /* 03h */
|
||||||
|
U8 Reserved1[3]; /* 04h */
|
||||||
|
U8 MsgFlags; /* 07h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
SGE_MPI_UNION SGL; /* 0Ch */
|
||||||
|
} MSG_FW_DOWNLOAD, MPI_POINTER PTR_MSG_FW_DOWNLOAD,
|
||||||
|
FWDownload_t, MPI_POINTER pFWDownload_t;
|
||||||
|
|
||||||
|
#define MPI_FW_DOWNLOAD_MSGFLGS_LAST_SEGMENT (0x01)
|
||||||
|
|
||||||
|
#define MPI_FW_DOWNLOAD_ITYPE_RESERVED (0x00)
|
||||||
|
#define MPI_FW_DOWNLOAD_ITYPE_FW (0x01)
|
||||||
|
#define MPI_FW_DOWNLOAD_ITYPE_BIOS (0x02)
|
||||||
|
#define MPI_FW_DOWNLOAD_ITYPE_NVDATA (0x03)
|
||||||
|
#define MPI_FW_DOWNLOAD_ITYPE_BOOTLOADER (0x04)
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _FWDownloadTCSGE
|
||||||
|
{
|
||||||
|
U8 Reserved; /* 00h */
|
||||||
|
U8 ContextSize; /* 01h */
|
||||||
|
U8 DetailsLength; /* 02h */
|
||||||
|
U8 Flags; /* 03h */
|
||||||
|
U32 Reserved_0100_Checksum; /* 04h */ /* obsolete Checksum */
|
||||||
|
U32 ImageOffset; /* 08h */
|
||||||
|
U32 ImageSize; /* 0Ch */
|
||||||
|
} FW_DOWNLOAD_TCSGE, MPI_POINTER PTR_FW_DOWNLOAD_TCSGE,
|
||||||
|
FWDownloadTCSGE_t, MPI_POINTER pFWDownloadTCSGE_t;
|
||||||
|
|
||||||
|
/* Firmware Download reply */
|
||||||
|
typedef struct _MSG_FW_DOWNLOAD_REPLY
|
||||||
|
{
|
||||||
|
U8 ImageType; /* 00h */
|
||||||
|
U8 Reserved; /* 01h */
|
||||||
|
U8 MsgLength; /* 02h */
|
||||||
|
U8 Function; /* 03h */
|
||||||
|
U8 Reserved1[3]; /* 04h */
|
||||||
|
U8 MsgFlags; /* 07h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
U16 Reserved2; /* 0Ch */
|
||||||
|
U16 IOCStatus; /* 0Eh */
|
||||||
|
U32 IOCLogInfo; /* 10h */
|
||||||
|
} MSG_FW_DOWNLOAD_REPLY, MPI_POINTER PTR_MSG_FW_DOWNLOAD_REPLY,
|
||||||
|
FWDownloadReply_t, MPI_POINTER pFWDownloadReply_t;
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* Firmware Upload message and associated structures */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _MSG_FW_UPLOAD
|
||||||
|
{
|
||||||
|
U8 ImageType; /* 00h */
|
||||||
|
U8 Reserved; /* 01h */
|
||||||
|
U8 ChainOffset; /* 02h */
|
||||||
|
U8 Function; /* 03h */
|
||||||
|
U8 Reserved1[3]; /* 04h */
|
||||||
|
U8 MsgFlags; /* 07h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
SGE_MPI_UNION SGL; /* 0Ch */
|
||||||
|
} MSG_FW_UPLOAD, MPI_POINTER PTR_MSG_FW_UPLOAD,
|
||||||
|
FWUpload_t, MPI_POINTER pFWUpload_t;
|
||||||
|
|
||||||
|
#define MPI_FW_UPLOAD_ITYPE_FW_IOC_MEM (0x00)
|
||||||
|
#define MPI_FW_UPLOAD_ITYPE_FW_FLASH (0x01)
|
||||||
|
#define MPI_FW_UPLOAD_ITYPE_BIOS_FLASH (0x02)
|
||||||
|
#define MPI_FW_UPLOAD_ITYPE_NVDATA (0x03)
|
||||||
|
#define MPI_FW_UPLOAD_ITYPE_BOOTLOADER (0x04)
|
||||||
|
#define MPI_FW_UPLOAD_ITYPE_FW_BACKUP (0x05)
|
||||||
|
|
||||||
|
typedef struct _FWUploadTCSGE
|
||||||
|
{
|
||||||
|
U8 Reserved; /* 00h */
|
||||||
|
U8 ContextSize; /* 01h */
|
||||||
|
U8 DetailsLength; /* 02h */
|
||||||
|
U8 Flags; /* 03h */
|
||||||
|
U32 Reserved1; /* 04h */
|
||||||
|
U32 ImageOffset; /* 08h */
|
||||||
|
U32 ImageSize; /* 0Ch */
|
||||||
|
} FW_UPLOAD_TCSGE, MPI_POINTER PTR_FW_UPLOAD_TCSGE,
|
||||||
|
FWUploadTCSGE_t, MPI_POINTER pFWUploadTCSGE_t;
|
||||||
|
|
||||||
|
/* Firmware Upload reply */
|
||||||
|
typedef struct _MSG_FW_UPLOAD_REPLY
|
||||||
|
{
|
||||||
|
U8 ImageType; /* 00h */
|
||||||
|
U8 Reserved; /* 01h */
|
||||||
|
U8 MsgLength; /* 02h */
|
||||||
|
U8 Function; /* 03h */
|
||||||
|
U8 Reserved1[3]; /* 04h */
|
||||||
|
U8 MsgFlags; /* 07h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
U16 Reserved2; /* 0Ch */
|
||||||
|
U16 IOCStatus; /* 0Eh */
|
||||||
|
U32 IOCLogInfo; /* 10h */
|
||||||
|
U32 ActualImageSize; /* 14h */
|
||||||
|
} MSG_FW_UPLOAD_REPLY, MPI_POINTER PTR_MSG_FW_UPLOAD_REPLY,
|
||||||
|
FWUploadReply_t, MPI_POINTER pFWUploadReply_t;
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _MPI_FW_HEADER
|
||||||
|
{
|
||||||
|
U32 ArmBranchInstruction0; /* 00h */
|
||||||
|
U32 Signature0; /* 04h */
|
||||||
|
U32 Signature1; /* 08h */
|
||||||
|
U32 Signature2; /* 0Ch */
|
||||||
|
U32 ArmBranchInstruction1; /* 10h */
|
||||||
|
U32 ArmBranchInstruction2; /* 14h */
|
||||||
|
U32 Reserved; /* 18h */
|
||||||
|
U32 Checksum; /* 1Ch */
|
||||||
|
U16 VendorId; /* 20h */
|
||||||
|
U16 ProductId; /* 22h */
|
||||||
|
MPI_FW_VERSION FWVersion; /* 24h */
|
||||||
|
U32 SeqCodeVersion; /* 28h */
|
||||||
|
U32 ImageSize; /* 2Ch */
|
||||||
|
U32 NextImageHeaderOffset; /* 30h */
|
||||||
|
U32 LoadStartAddress; /* 34h */
|
||||||
|
U32 IopResetVectorValue; /* 38h */
|
||||||
|
U32 IopResetRegAddr; /* 3Ch */
|
||||||
|
U32 VersionNameWhat; /* 40h */
|
||||||
|
U8 VersionName[32]; /* 44h */
|
||||||
|
U32 VendorNameWhat; /* 64h */
|
||||||
|
U8 VendorName[32]; /* 68h */
|
||||||
|
} MPI_FW_HEADER, MPI_POINTER PTR_MPI_FW_HEADER,
|
||||||
|
MpiFwHeader_t, MPI_POINTER pMpiFwHeader_t;
|
||||||
|
|
||||||
|
#define MPI_FW_HEADER_WHAT_SIGNATURE (0x29232840)
|
||||||
|
|
||||||
|
/* defines for using the ProductId field */
|
||||||
|
#define MPI_FW_HEADER_PID_TYPE_MASK (0xF000)
|
||||||
|
#define MPI_FW_HEADER_PID_TYPE_SCSI (0x0000)
|
||||||
|
#define MPI_FW_HEADER_PID_TYPE_FC (0x1000)
|
||||||
|
#define MPI_FW_HEADER_PID_TYPE_SAS (0x2000)
|
||||||
|
|
||||||
|
#define MPI_FW_HEADER_SIGNATURE_0 (0x5AEAA55A)
|
||||||
|
#define MPI_FW_HEADER_SIGNATURE_1 (0xA55AEAA5)
|
||||||
|
#define MPI_FW_HEADER_SIGNATURE_2 (0x5AA55AEA)
|
||||||
|
|
||||||
|
#define MPI_FW_HEADER_PID_PROD_MASK (0x0F00)
|
||||||
|
#define MPI_FW_HEADER_PID_PROD_INITIATOR_SCSI (0x0100)
|
||||||
|
#define MPI_FW_HEADER_PID_PROD_TARGET_INITIATOR_SCSI (0x0200)
|
||||||
|
#define MPI_FW_HEADER_PID_PROD_TARGET_SCSI (0x0300)
|
||||||
|
#define MPI_FW_HEADER_PID_PROD_IM_SCSI (0x0400)
|
||||||
|
#define MPI_FW_HEADER_PID_PROD_IS_SCSI (0x0500)
|
||||||
|
#define MPI_FW_HEADER_PID_PROD_CTX_SCSI (0x0600)
|
||||||
|
#define MPI_FW_HEADER_PID_PROD_IR_SCSI (0x0700)
|
||||||
|
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_MASK (0x00FF)
|
||||||
|
/* SCSI */
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_1030A0_SCSI (0x0001)
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_1030B0_SCSI (0x0002)
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_1030B1_SCSI (0x0003)
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_1030C0_SCSI (0x0004)
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_1020A0_SCSI (0x0005)
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_1020B0_SCSI (0x0006)
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_1020B1_SCSI (0x0007)
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_1020C0_SCSI (0x0008)
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_1035A0_SCSI (0x0009)
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_1035B0_SCSI (0x000A)
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_1030TA0_SCSI (0x000B)
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_1020TA0_SCSI (0x000C)
|
||||||
|
/* Fibre Channel */
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_909_FC (0x0000)
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_919_FC (0x0001) /* 919 and 929 */
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_919X_FC (0x0002) /* 919X and 929X */
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_919XL_FC (0x0003) /* 919XL and 929XL */
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_939X_FC (0x0004) /* 939X and 949X */
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_959_FC (0x0005)
|
||||||
|
/* SAS */
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_1064_SAS (0x0001)
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_1068_SAS (0x0002)
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_1078_SAS (0x0003)
|
||||||
|
#define MPI_FW_HEADER_PID_FAMILY_106xE_SAS (0x0004) /* 1068E, 1066E, and 1064E */
|
||||||
|
|
||||||
|
typedef struct _MPI_EXT_IMAGE_HEADER
|
||||||
|
{
|
||||||
|
U8 ImageType; /* 00h */
|
||||||
|
U8 Reserved; /* 01h */
|
||||||
|
U16 Reserved1; /* 02h */
|
||||||
|
U32 Checksum; /* 04h */
|
||||||
|
U32 ImageSize; /* 08h */
|
||||||
|
U32 NextImageHeaderOffset; /* 0Ch */
|
||||||
|
U32 LoadStartAddress; /* 10h */
|
||||||
|
U32 Reserved2; /* 14h */
|
||||||
|
} MPI_EXT_IMAGE_HEADER, MPI_POINTER PTR_MPI_EXT_IMAGE_HEADER,
|
||||||
|
MpiExtImageHeader_t, MPI_POINTER pMpiExtImageHeader_t;
|
||||||
|
|
||||||
|
/* defines for the ImageType field */
|
||||||
|
#define MPI_EXT_IMAGE_TYPE_UNSPECIFIED (0x00)
|
||||||
|
#define MPI_EXT_IMAGE_TYPE_FW (0x01)
|
||||||
|
#define MPI_EXT_IMAGE_TYPE_NVDATA (0x03)
|
||||||
|
#define MPI_EXT_IMAGE_TYPE_BOOTLOADER (0x04)
|
||||||
|
|
||||||
|
#endif
|
245
packaging/debian/mpt-status/includes/mpi_raid.h
Normal file
245
packaging/debian/mpt-status/includes/mpi_raid.h
Normal file
@ -0,0 +1,245 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2001-2005 LSI Logic Corporation.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Name: mpi_raid.h
|
||||||
|
* Title: MPI RAID message and structures
|
||||||
|
* Creation Date: February 27, 2001
|
||||||
|
*
|
||||||
|
* mpi_raid.h Version: 01.05.02
|
||||||
|
*
|
||||||
|
* Version History
|
||||||
|
* ---------------
|
||||||
|
*
|
||||||
|
* Date Version Description
|
||||||
|
* -------- -------- ------------------------------------------------------
|
||||||
|
* 02-27-01 01.01.01 Original release for this file.
|
||||||
|
* 03-27-01 01.01.02 Added structure offset comments.
|
||||||
|
* 08-08-01 01.02.01 Original release for v1.2 work.
|
||||||
|
* 09-28-01 01.02.02 Major rework for MPI v1.2 Integrated RAID changes.
|
||||||
|
* 10-04-01 01.02.03 Added ActionData defines for
|
||||||
|
* MPI_RAID_ACTION_DELETE_VOLUME action.
|
||||||
|
* 11-01-01 01.02.04 Added define for MPI_RAID_ACTION_ADATA_DO_NOT_SYNC.
|
||||||
|
* 03-14-02 01.02.05 Added define for MPI_RAID_ACTION_ADATA_LOW_LEVEL_INIT.
|
||||||
|
* 05-07-02 01.02.06 Added define for MPI_RAID_ACTION_ACTIVATE_VOLUME,
|
||||||
|
* MPI_RAID_ACTION_INACTIVATE_VOLUME, and
|
||||||
|
* MPI_RAID_ACTION_ADATA_INACTIVATE_ALL.
|
||||||
|
* 07-12-02 01.02.07 Added structures for Mailbox request and reply.
|
||||||
|
* 11-15-02 01.02.08 Added missing MsgContext field to MSG_MAILBOX_REQUEST.
|
||||||
|
* 04-01-03 01.02.09 New action data option flag for
|
||||||
|
* MPI_RAID_ACTION_DELETE_VOLUME.
|
||||||
|
* 05-11-04 01.03.01 Original release for MPI v1.3.
|
||||||
|
* 08-19-04 01.05.01 Original release for MPI v1.5.
|
||||||
|
* 01-15-05 01.05.02 Added defines for the two new RAID Actions for
|
||||||
|
* _SET_RESYNC_RATE and _SET_DATA_SCRUB_RATE.
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MPI_RAID_H
|
||||||
|
#define MPI_RAID_H
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* R A I D M e s s a g e s
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* RAID Action Request */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _MSG_RAID_ACTION
|
||||||
|
{
|
||||||
|
U8 Action; /* 00h */
|
||||||
|
U8 Reserved1; /* 01h */
|
||||||
|
U8 ChainOffset; /* 02h */
|
||||||
|
U8 Function; /* 03h */
|
||||||
|
U8 VolumeID; /* 04h */
|
||||||
|
U8 VolumeBus; /* 05h */
|
||||||
|
U8 PhysDiskNum; /* 06h */
|
||||||
|
U8 MsgFlags; /* 07h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
U32 Reserved2; /* 0Ch */
|
||||||
|
U32 ActionDataWord; /* 10h */
|
||||||
|
SGE_SIMPLE_UNION ActionDataSGE; /* 14h */
|
||||||
|
} MSG_RAID_ACTION_REQUEST, MPI_POINTER PTR_MSG_RAID_ACTION_REQUEST,
|
||||||
|
MpiRaidActionRequest_t , MPI_POINTER pMpiRaidActionRequest_t;
|
||||||
|
|
||||||
|
|
||||||
|
/* RAID Action request Action values */
|
||||||
|
|
||||||
|
#define MPI_RAID_ACTION_STATUS (0x00)
|
||||||
|
#define MPI_RAID_ACTION_INDICATOR_STRUCT (0x01)
|
||||||
|
#define MPI_RAID_ACTION_CREATE_VOLUME (0x02)
|
||||||
|
#define MPI_RAID_ACTION_DELETE_VOLUME (0x03)
|
||||||
|
#define MPI_RAID_ACTION_DISABLE_VOLUME (0x04)
|
||||||
|
#define MPI_RAID_ACTION_ENABLE_VOLUME (0x05)
|
||||||
|
#define MPI_RAID_ACTION_QUIESCE_PHYS_IO (0x06)
|
||||||
|
#define MPI_RAID_ACTION_ENABLE_PHYS_IO (0x07)
|
||||||
|
#define MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS (0x08)
|
||||||
|
#define MPI_RAID_ACTION_PHYSDISK_OFFLINE (0x0A)
|
||||||
|
#define MPI_RAID_ACTION_PHYSDISK_ONLINE (0x0B)
|
||||||
|
#define MPI_RAID_ACTION_CHANGE_PHYSDISK_SETTINGS (0x0C)
|
||||||
|
#define MPI_RAID_ACTION_CREATE_PHYSDISK (0x0D)
|
||||||
|
#define MPI_RAID_ACTION_DELETE_PHYSDISK (0x0E)
|
||||||
|
#define MPI_RAID_ACTION_FAIL_PHYSDISK (0x0F)
|
||||||
|
#define MPI_RAID_ACTION_REPLACE_PHYSDISK (0x10)
|
||||||
|
#define MPI_RAID_ACTION_ACTIVATE_VOLUME (0x11)
|
||||||
|
#define MPI_RAID_ACTION_INACTIVATE_VOLUME (0x12)
|
||||||
|
#define MPI_RAID_ACTION_SET_RESYNC_RATE (0x13)
|
||||||
|
#define MPI_RAID_ACTION_SET_DATA_SCRUB_RATE (0x14)
|
||||||
|
|
||||||
|
/* ActionDataWord defines for use with MPI_RAID_ACTION_CREATE_VOLUME action */
|
||||||
|
#define MPI_RAID_ACTION_ADATA_DO_NOT_SYNC (0x00000001)
|
||||||
|
#define MPI_RAID_ACTION_ADATA_LOW_LEVEL_INIT (0x00000002)
|
||||||
|
|
||||||
|
/* ActionDataWord defines for use with MPI_RAID_ACTION_DELETE_VOLUME action */
|
||||||
|
#define MPI_RAID_ACTION_ADATA_KEEP_PHYS_DISKS (0x00000000)
|
||||||
|
#define MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS (0x00000001)
|
||||||
|
|
||||||
|
#define MPI_RAID_ACTION_ADATA_KEEP_LBA0 (0x00000000)
|
||||||
|
#define MPI_RAID_ACTION_ADATA_ZERO_LBA0 (0x00000002)
|
||||||
|
|
||||||
|
/* ActionDataWord defines for use with MPI_RAID_ACTION_ACTIVATE_VOLUME action */
|
||||||
|
#define MPI_RAID_ACTION_ADATA_INACTIVATE_ALL (0x00000001)
|
||||||
|
|
||||||
|
/* ActionDataWord defines for use with MPI_RAID_ACTION_SET_RESYNC_RATE action */
|
||||||
|
#define MPI_RAID_ACTION_ADATA_RESYNC_RATE_MASK (0x000000FF)
|
||||||
|
|
||||||
|
/* ActionDataWord defines for use with MPI_RAID_ACTION_SET_DATA_SCRUB_RATE action */
|
||||||
|
#define MPI_RAID_ACTION_ADATA_DATA_SCRUB_RATE_MASK (0x000000FF)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RAID Action reply message */
|
||||||
|
|
||||||
|
typedef struct _MSG_RAID_ACTION_REPLY
|
||||||
|
{
|
||||||
|
U8 Action; /* 00h */
|
||||||
|
U8 Reserved; /* 01h */
|
||||||
|
U8 MsgLength; /* 02h */
|
||||||
|
U8 Function; /* 03h */
|
||||||
|
U8 VolumeID; /* 04h */
|
||||||
|
U8 VolumeBus; /* 05h */
|
||||||
|
U8 PhysDiskNum; /* 06h */
|
||||||
|
U8 MsgFlags; /* 07h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
U16 ActionStatus; /* 0Ch */
|
||||||
|
U16 IOCStatus; /* 0Eh */
|
||||||
|
U32 IOCLogInfo; /* 10h */
|
||||||
|
U32 VolumeStatus; /* 14h */
|
||||||
|
U32 ActionData; /* 18h */
|
||||||
|
} MSG_RAID_ACTION_REPLY, MPI_POINTER PTR_MSG_RAID_ACTION_REPLY,
|
||||||
|
MpiRaidActionReply_t, MPI_POINTER pMpiRaidActionReply_t;
|
||||||
|
|
||||||
|
|
||||||
|
/* RAID Volume reply ActionStatus values */
|
||||||
|
|
||||||
|
#define MPI_RAID_ACTION_ASTATUS_SUCCESS (0x0000)
|
||||||
|
#define MPI_RAID_ACTION_ASTATUS_INVALID_ACTION (0x0001)
|
||||||
|
#define MPI_RAID_ACTION_ASTATUS_FAILURE (0x0002)
|
||||||
|
#define MPI_RAID_ACTION_ASTATUS_IN_PROGRESS (0x0003)
|
||||||
|
|
||||||
|
|
||||||
|
/* RAID Volume reply RAID Volume Indicator structure */
|
||||||
|
|
||||||
|
typedef struct _MPI_RAID_VOL_INDICATOR
|
||||||
|
{
|
||||||
|
U64 TotalBlocks; /* 00h */
|
||||||
|
U64 BlocksRemaining; /* 08h */
|
||||||
|
} MPI_RAID_VOL_INDICATOR, MPI_POINTER PTR_MPI_RAID_VOL_INDICATOR,
|
||||||
|
MpiRaidVolIndicator_t, MPI_POINTER pMpiRaidVolIndicator_t;
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* SCSI IO RAID Passthrough Request */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _MSG_SCSI_IO_RAID_PT_REQUEST
|
||||||
|
{
|
||||||
|
U8 PhysDiskNum; /* 00h */
|
||||||
|
U8 Reserved1; /* 01h */
|
||||||
|
U8 ChainOffset; /* 02h */
|
||||||
|
U8 Function; /* 03h */
|
||||||
|
U8 CDBLength; /* 04h */
|
||||||
|
U8 SenseBufferLength; /* 05h */
|
||||||
|
U8 Reserved2; /* 06h */
|
||||||
|
U8 MsgFlags; /* 07h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
U8 LUN[8]; /* 0Ch */
|
||||||
|
U32 Control; /* 14h */
|
||||||
|
U8 CDB[16]; /* 18h */
|
||||||
|
U32 DataLength; /* 28h */
|
||||||
|
U32 SenseBufferLowAddr; /* 2Ch */
|
||||||
|
SGE_IO_UNION SGL; /* 30h */
|
||||||
|
} MSG_SCSI_IO_RAID_PT_REQUEST, MPI_POINTER PTR_MSG_SCSI_IO_RAID_PT_REQUEST,
|
||||||
|
SCSIIORaidPassthroughRequest_t, MPI_POINTER pSCSIIORaidPassthroughRequest_t;
|
||||||
|
|
||||||
|
|
||||||
|
/* SCSI IO RAID Passthrough reply structure */
|
||||||
|
|
||||||
|
typedef struct _MSG_SCSI_IO_RAID_PT_REPLY
|
||||||
|
{
|
||||||
|
U8 PhysDiskNum; /* 00h */
|
||||||
|
U8 Reserved1; /* 01h */
|
||||||
|
U8 MsgLength; /* 02h */
|
||||||
|
U8 Function; /* 03h */
|
||||||
|
U8 CDBLength; /* 04h */
|
||||||
|
U8 SenseBufferLength; /* 05h */
|
||||||
|
U8 Reserved2; /* 06h */
|
||||||
|
U8 MsgFlags; /* 07h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
U8 SCSIStatus; /* 0Ch */
|
||||||
|
U8 SCSIState; /* 0Dh */
|
||||||
|
U16 IOCStatus; /* 0Eh */
|
||||||
|
U32 IOCLogInfo; /* 10h */
|
||||||
|
U32 TransferCount; /* 14h */
|
||||||
|
U32 SenseCount; /* 18h */
|
||||||
|
U32 ResponseInfo; /* 1Ch */
|
||||||
|
} MSG_SCSI_IO_RAID_PT_REPLY, MPI_POINTER PTR_MSG_SCSI_IO_RAID_PT_REPLY,
|
||||||
|
SCSIIORaidPassthroughReply_t, MPI_POINTER pSCSIIORaidPassthroughReply_t;
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* Mailbox reqeust structure */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct _MSG_MAILBOX_REQUEST
|
||||||
|
{
|
||||||
|
U16 Reserved1;
|
||||||
|
U8 ChainOffset;
|
||||||
|
U8 Function;
|
||||||
|
U16 Reserved2;
|
||||||
|
U8 Reserved3;
|
||||||
|
U8 MsgFlags;
|
||||||
|
U32 MsgContext;
|
||||||
|
U8 Command[10];
|
||||||
|
U16 Reserved4;
|
||||||
|
SGE_IO_UNION SGL;
|
||||||
|
} MSG_MAILBOX_REQUEST, MPI_POINTER PTR_MSG_MAILBOX_REQUEST,
|
||||||
|
MailboxRequest_t, MPI_POINTER pMailboxRequest_t;
|
||||||
|
|
||||||
|
|
||||||
|
/* Mailbox reply structure */
|
||||||
|
typedef struct _MSG_MAILBOX_REPLY
|
||||||
|
{
|
||||||
|
U16 Reserved1; /* 00h */
|
||||||
|
U8 MsgLength; /* 02h */
|
||||||
|
U8 Function; /* 03h */
|
||||||
|
U16 Reserved2; /* 04h */
|
||||||
|
U8 Reserved3; /* 06h */
|
||||||
|
U8 MsgFlags; /* 07h */
|
||||||
|
U32 MsgContext; /* 08h */
|
||||||
|
U16 MailboxStatus; /* 0Ch */
|
||||||
|
U16 IOCStatus; /* 0Eh */
|
||||||
|
U32 IOCLogInfo; /* 10h */
|
||||||
|
U32 Reserved4; /* 14h */
|
||||||
|
} MSG_MAILBOX_REPLY, MPI_POINTER PTR_MSG_MAILBOX_REPLY,
|
||||||
|
MailboxReply_t, MPI_POINTER pMailboxReply_t;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
83
packaging/debian/mpt-status/includes/mpi_type.h
Normal file
83
packaging/debian/mpt-status/includes/mpi_type.h
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2000-2004 LSI Logic Corporation.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Name: mpi_type.h
|
||||||
|
* Title: MPI Basic type definitions
|
||||||
|
* Creation Date: June 6, 2000
|
||||||
|
*
|
||||||
|
* mpi_type.h Version: 01.05.01
|
||||||
|
*
|
||||||
|
* Version History
|
||||||
|
* ---------------
|
||||||
|
*
|
||||||
|
* Date Version Description
|
||||||
|
* -------- -------- ------------------------------------------------------
|
||||||
|
* 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000.
|
||||||
|
* 06-06-00 01.00.01 Update version number for 1.0 release.
|
||||||
|
* 11-02-00 01.01.01 Original release for post 1.0 work
|
||||||
|
* 02-20-01 01.01.02 Added define and ifdef for MPI_POINTER.
|
||||||
|
* 08-08-01 01.02.01 Original release for v1.2 work.
|
||||||
|
* 05-11-04 01.03.01 Original release for MPI v1.3.
|
||||||
|
* 08-19-04 01.05.01 Original release for MPI v1.5.
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MPI_TYPE_H
|
||||||
|
#define MPI_TYPE_H
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* Define MPI_POINTER if it hasn't already been defined. By default MPI_POINTER
|
||||||
|
* is defined to be a near pointer. MPI_POINTER can be defined as a far pointer
|
||||||
|
* by defining MPI_POINTER as "far *" before this header file is included.
|
||||||
|
*/
|
||||||
|
#ifndef MPI_POINTER
|
||||||
|
#define MPI_POINTER *
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
*
|
||||||
|
* B a s i c T y p e s
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
typedef signed char S8;
|
||||||
|
typedef unsigned char U8;
|
||||||
|
typedef signed short S16;
|
||||||
|
typedef unsigned short U16;
|
||||||
|
|
||||||
|
|
||||||
|
typedef int32_t S32;
|
||||||
|
typedef u_int32_t U32;
|
||||||
|
|
||||||
|
typedef struct _S64
|
||||||
|
{
|
||||||
|
U32 Low;
|
||||||
|
S32 High;
|
||||||
|
} S64;
|
||||||
|
|
||||||
|
typedef struct _U64
|
||||||
|
{
|
||||||
|
U32 Low;
|
||||||
|
U32 High;
|
||||||
|
} U64;
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* Pointers */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
typedef S8 *PS8;
|
||||||
|
typedef U8 *PU8;
|
||||||
|
typedef S16 *PS16;
|
||||||
|
typedef U16 *PU16;
|
||||||
|
typedef S32 *PS32;
|
||||||
|
typedef U32 *PU32;
|
||||||
|
typedef S64 *PS64;
|
||||||
|
typedef U64 *PU64;
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
470
packaging/debian/mpt-status/includes/mptctl.h
Normal file
470
packaging/debian/mpt-status/includes/mptctl.h
Normal file
@ -0,0 +1,470 @@
|
|||||||
|
/*
|
||||||
|
* linux/drivers/message/fusion/mptioctl.h
|
||||||
|
* Fusion MPT misc device (ioctl) driver.
|
||||||
|
* For use with PCI chip/adapter(s):
|
||||||
|
* LSIFC9xx/LSI409xx Fibre Channel
|
||||||
|
* running LSI Logic Fusion MPT (Message Passing Technology) firmware.
|
||||||
|
*
|
||||||
|
* Copyright (c) 1999-2005 LSI Logic Corporation
|
||||||
|
* (mailto:mpt_linux_developer@lsil.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; version 2 of the License.
|
||||||
|
|
||||||
|
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MPTCTL_H_INCLUDED
|
||||||
|
#define MPTCTL_H_INCLUDED
|
||||||
|
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MPT_MISCDEV_BASENAME "mptctl"
|
||||||
|
#define MPT_MISCDEV_PATHNAME "/dev/" MPT_MISCDEV_BASENAME
|
||||||
|
|
||||||
|
#define MPT_PRODUCT_LENGTH 12
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Generic MPT Control IOCTLs and structures
|
||||||
|
*/
|
||||||
|
#define MPT_MAGIC_NUMBER 'm'
|
||||||
|
|
||||||
|
#define MPTRWPERF _IOWR(MPT_MAGIC_NUMBER,0,struct mpt_raw_r_w)
|
||||||
|
|
||||||
|
#define MPTFWDOWNLOAD _IOWR(MPT_MAGIC_NUMBER,15,struct mpt_fw_xfer)
|
||||||
|
#define MPTCOMMAND _IOWR(MPT_MAGIC_NUMBER,20,struct mpt_ioctl_command)
|
||||||
|
|
||||||
|
#if defined(__KERNEL__) && defined(CONFIG_COMPAT)
|
||||||
|
#define MPTFWDOWNLOAD32 _IOWR(MPT_MAGIC_NUMBER,15,struct mpt_fw_xfer32)
|
||||||
|
#define MPTCOMMAND32 _IOWR(MPT_MAGIC_NUMBER,20,struct mpt_ioctl_command32)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define MPTIOCINFO _IOWR(MPT_MAGIC_NUMBER,17,struct mpt_ioctl_iocinfo)
|
||||||
|
#define MPTIOCINFO1 _IOWR(MPT_MAGIC_NUMBER,17,struct mpt_ioctl_iocinfo_rev0)
|
||||||
|
#define MPTIOCINFO2 _IOWR(MPT_MAGIC_NUMBER,17,struct mpt_ioctl_iocinfo_rev1)
|
||||||
|
#define MPTTARGETINFO _IOWR(MPT_MAGIC_NUMBER,18,struct mpt_ioctl_targetinfo)
|
||||||
|
#define MPTTEST _IOWR(MPT_MAGIC_NUMBER,19,struct mpt_ioctl_test)
|
||||||
|
#define MPTEVENTQUERY _IOWR(MPT_MAGIC_NUMBER,21,struct mpt_ioctl_eventquery)
|
||||||
|
#define MPTEVENTENABLE _IOWR(MPT_MAGIC_NUMBER,22,struct mpt_ioctl_eventenable)
|
||||||
|
#define MPTEVENTREPORT _IOWR(MPT_MAGIC_NUMBER,23,struct mpt_ioctl_eventreport)
|
||||||
|
#define MPTHARDRESET _IOWR(MPT_MAGIC_NUMBER,24,struct mpt_ioctl_diag_reset)
|
||||||
|
#define MPTFWREPLACE _IOWR(MPT_MAGIC_NUMBER,25,struct mpt_ioctl_replace_fw)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPARC PLATFORM REMARKS:
|
||||||
|
* IOCTL data structures that contain pointers
|
||||||
|
* will have different sizes in the driver and applications
|
||||||
|
* (as the app. will not use 8-byte pointers).
|
||||||
|
* Apps should use MPTFWDOWNLOAD and MPTCOMMAND.
|
||||||
|
* The driver will convert data from
|
||||||
|
* mpt_fw_xfer32 (mpt_ioctl_command32) to mpt_fw_xfer (mpt_ioctl_command)
|
||||||
|
* internally.
|
||||||
|
*
|
||||||
|
* If data structures change size, must handle as in IOCGETINFO.
|
||||||
|
*/
|
||||||
|
struct mpt_fw_xfer {
|
||||||
|
unsigned int iocnum; /* IOC unit number */
|
||||||
|
unsigned int fwlen;
|
||||||
|
void __user *bufp; /* Pointer to firmware buffer */
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined(__KERNEL__) && defined(CONFIG_COMPAT)
|
||||||
|
struct mpt_fw_xfer32 {
|
||||||
|
unsigned int iocnum;
|
||||||
|
unsigned int fwlen;
|
||||||
|
u32 bufp;
|
||||||
|
};
|
||||||
|
#endif /*}*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IOCTL header structure.
|
||||||
|
* iocnum - must be defined.
|
||||||
|
* port - must be defined for all IOCTL commands other than MPTIOCINFO
|
||||||
|
* maxDataSize - ignored on MPTCOMMAND commands
|
||||||
|
* - ignored on MPTFWREPLACE commands
|
||||||
|
* - on query commands, reports the maximum number of bytes to be returned
|
||||||
|
* to the host driver (count includes the header).
|
||||||
|
* That is, set to sizeof(struct mpt_ioctl_iocinfo) for fixed sized commands.
|
||||||
|
* Set to sizeof(struct mpt_ioctl_targetinfo) + datasize for variable
|
||||||
|
* sized commands. (MPTTARGETINFO, MPTEVENTREPORT)
|
||||||
|
*/
|
||||||
|
typedef struct _mpt_ioctl_header {
|
||||||
|
unsigned int iocnum; /* IOC unit number */
|
||||||
|
unsigned int port; /* IOC port number */
|
||||||
|
int maxDataSize; /* Maximum Num. bytes to transfer on read */
|
||||||
|
} mpt_ioctl_header;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Issue a diagnostic reset
|
||||||
|
*/
|
||||||
|
struct mpt_ioctl_diag_reset {
|
||||||
|
mpt_ioctl_header hdr;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* PCI bus/device/function information structure.
|
||||||
|
*/
|
||||||
|
struct mpt_ioctl_pci_info {
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
unsigned int deviceNumber : 5;
|
||||||
|
unsigned int functionNumber : 3;
|
||||||
|
unsigned int busNumber : 24;
|
||||||
|
} bits;
|
||||||
|
unsigned int asUlong;
|
||||||
|
} u;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mpt_ioctl_pci_info2 {
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
unsigned int deviceNumber : 5;
|
||||||
|
unsigned int functionNumber : 3;
|
||||||
|
unsigned int busNumber : 24;
|
||||||
|
} bits;
|
||||||
|
unsigned int asUlong;
|
||||||
|
} u;
|
||||||
|
int segmentID;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Adapter Information Page
|
||||||
|
* Read only.
|
||||||
|
* Data starts at offset 0xC
|
||||||
|
*/
|
||||||
|
#define MPT_IOCTL_INTERFACE_FC (0x01)
|
||||||
|
#define MPT_IOCTL_INTERFACE_SCSI (0x00)
|
||||||
|
#define MPT_IOCTL_VERSION_LENGTH (32)
|
||||||
|
|
||||||
|
struct mpt_ioctl_iocinfo {
|
||||||
|
mpt_ioctl_header hdr;
|
||||||
|
int adapterType; /* SCSI or FCP */
|
||||||
|
int port; /* port number */
|
||||||
|
int pciId; /* PCI Id. */
|
||||||
|
int hwRev; /* hardware revision */
|
||||||
|
int subSystemDevice; /* PCI subsystem Device ID */
|
||||||
|
int subSystemVendor; /* PCI subsystem Vendor ID */
|
||||||
|
int numDevices; /* number of devices */
|
||||||
|
int FWVersion; /* FW Version (integer) */
|
||||||
|
int BIOSVersion; /* BIOS Version (integer) */
|
||||||
|
char driverVersion[MPT_IOCTL_VERSION_LENGTH]; /* Driver Version (string) */
|
||||||
|
char busChangeEvent;
|
||||||
|
char hostId;
|
||||||
|
char rsvd[2];
|
||||||
|
struct mpt_ioctl_pci_info2 pciInfo; /* Added Rev 2 */
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mpt_ioctl_iocinfo_rev1 {
|
||||||
|
mpt_ioctl_header hdr;
|
||||||
|
int adapterType; /* SCSI or FCP */
|
||||||
|
int port; /* port number */
|
||||||
|
int pciId; /* PCI Id. */
|
||||||
|
int hwRev; /* hardware revision */
|
||||||
|
int subSystemDevice; /* PCI subsystem Device ID */
|
||||||
|
int subSystemVendor; /* PCI subsystem Vendor ID */
|
||||||
|
int numDevices; /* number of devices */
|
||||||
|
int FWVersion; /* FW Version (integer) */
|
||||||
|
int BIOSVersion; /* BIOS Version (integer) */
|
||||||
|
char driverVersion[MPT_IOCTL_VERSION_LENGTH]; /* Driver Version (string) */
|
||||||
|
char busChangeEvent;
|
||||||
|
char hostId;
|
||||||
|
char rsvd[2];
|
||||||
|
struct mpt_ioctl_pci_info pciInfo; /* Added Rev 1 */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Original structure, must always accept these
|
||||||
|
* IOCTLs. 4 byte pads can occur based on arch with
|
||||||
|
* above structure. Wish to re-align, but cannot.
|
||||||
|
*/
|
||||||
|
struct mpt_ioctl_iocinfo_rev0 {
|
||||||
|
mpt_ioctl_header hdr;
|
||||||
|
int adapterType; /* SCSI or FCP */
|
||||||
|
int port; /* port number */
|
||||||
|
int pciId; /* PCI Id. */
|
||||||
|
int hwRev; /* hardware revision */
|
||||||
|
int subSystemDevice; /* PCI subsystem Device ID */
|
||||||
|
int subSystemVendor; /* PCI subsystem Vendor ID */
|
||||||
|
int numDevices; /* number of devices */
|
||||||
|
int FWVersion; /* FW Version (integer) */
|
||||||
|
int BIOSVersion; /* BIOS Version (integer) */
|
||||||
|
char driverVersion[MPT_IOCTL_VERSION_LENGTH]; /* Driver Version (string) */
|
||||||
|
char busChangeEvent;
|
||||||
|
char hostId;
|
||||||
|
char rsvd[2];
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Device Information Page
|
||||||
|
* Report the number of, and ids of, all targets
|
||||||
|
* on this IOC. The ids array is a packed structure
|
||||||
|
* of the known targetInfo.
|
||||||
|
* bits 31-24: reserved
|
||||||
|
* 23-16: LUN
|
||||||
|
* 15- 8: Bus Number
|
||||||
|
* 7- 0: Target ID
|
||||||
|
*/
|
||||||
|
struct mpt_ioctl_targetinfo {
|
||||||
|
mpt_ioctl_header hdr;
|
||||||
|
int numDevices; /* Num targets on this ioc */
|
||||||
|
int targetInfo[1];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Event reporting IOCTL's. These IOCTL's will
|
||||||
|
* use the following defines:
|
||||||
|
*/
|
||||||
|
struct mpt_ioctl_eventquery {
|
||||||
|
mpt_ioctl_header hdr;
|
||||||
|
unsigned short eventEntries;
|
||||||
|
unsigned short reserved;
|
||||||
|
unsigned int eventTypes;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mpt_ioctl_eventenable {
|
||||||
|
mpt_ioctl_header hdr;
|
||||||
|
unsigned int eventTypes;
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifndef __KERNEL__
|
||||||
|
typedef struct {
|
||||||
|
uint event;
|
||||||
|
uint eventContext;
|
||||||
|
uint data[2];
|
||||||
|
} MPT_IOCTL_EVENTS;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
struct mpt_ioctl_eventreport {
|
||||||
|
mpt_ioctl_header hdr;
|
||||||
|
MPT_IOCTL_EVENTS eventData[1];
|
||||||
|
};
|
||||||
|
|
||||||
|
#define MPT_MAX_NAME 32
|
||||||
|
struct mpt_ioctl_test {
|
||||||
|
mpt_ioctl_header hdr;
|
||||||
|
u8 name[MPT_MAX_NAME];
|
||||||
|
int chip_type;
|
||||||
|
u8 product [MPT_PRODUCT_LENGTH];
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Replace the FW image cached in host driver memory
|
||||||
|
* newImageSize - image size in bytes
|
||||||
|
* newImage - first byte of the new image
|
||||||
|
*/
|
||||||
|
typedef struct mpt_ioctl_replace_fw {
|
||||||
|
mpt_ioctl_header hdr;
|
||||||
|
int newImageSize;
|
||||||
|
u8 newImage[1];
|
||||||
|
} mpt_ioctl_replace_fw_t;
|
||||||
|
|
||||||
|
/* General MPT Pass through data strucutre
|
||||||
|
*
|
||||||
|
* iocnum
|
||||||
|
* timeout - in seconds, command timeout. If 0, set by driver to
|
||||||
|
* default value.
|
||||||
|
* replyFrameBufPtr - reply location
|
||||||
|
* dataInBufPtr - destination for read
|
||||||
|
* dataOutBufPtr - data source for write
|
||||||
|
* senseDataPtr - sense data location
|
||||||
|
* maxReplyBytes - maximum number of reply bytes to be sent to app.
|
||||||
|
* dataInSize - num bytes for data transfer in (read)
|
||||||
|
* dataOutSize - num bytes for data transfer out (write)
|
||||||
|
* dataSgeOffset - offset in words from the start of the request message
|
||||||
|
* to the first SGL
|
||||||
|
* MF[1];
|
||||||
|
*
|
||||||
|
* Remark: Some config pages have bi-directional transfer,
|
||||||
|
* both a read and a write. The basic structure allows for
|
||||||
|
* a bidirectional set up. Normal messages will have one or
|
||||||
|
* both of these buffers NULL.
|
||||||
|
*/
|
||||||
|
struct mpt_ioctl_command {
|
||||||
|
mpt_ioctl_header hdr;
|
||||||
|
int timeout; /* optional (seconds) */
|
||||||
|
char __user *replyFrameBufPtr;
|
||||||
|
char __user *dataInBufPtr;
|
||||||
|
char __user *dataOutBufPtr;
|
||||||
|
char __user *senseDataPtr;
|
||||||
|
int maxReplyBytes;
|
||||||
|
int dataInSize;
|
||||||
|
int dataOutSize;
|
||||||
|
int maxSenseBytes;
|
||||||
|
int dataSgeOffset;
|
||||||
|
char MF[1];
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPARC PLATFORM: See earlier remark.
|
||||||
|
*/
|
||||||
|
#if defined(__KERNEL__) && defined(CONFIG_COMPAT)
|
||||||
|
struct mpt_ioctl_command32 {
|
||||||
|
mpt_ioctl_header hdr;
|
||||||
|
int timeout;
|
||||||
|
u32 replyFrameBufPtr;
|
||||||
|
u32 dataInBufPtr;
|
||||||
|
u32 dataOutBufPtr;
|
||||||
|
u32 senseDataPtr;
|
||||||
|
int maxReplyBytes;
|
||||||
|
int dataInSize;
|
||||||
|
int dataOutSize;
|
||||||
|
int maxSenseBytes;
|
||||||
|
int dataSgeOffset;
|
||||||
|
char MF[1];
|
||||||
|
};
|
||||||
|
#endif /*}*/
|
||||||
|
|
||||||
|
|
||||||
|
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
||||||
|
/*
|
||||||
|
* HP Specific IOCTL Defines and Structures
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define CPQFCTS_IOC_MAGIC 'Z'
|
||||||
|
#define HP_IOC_MAGIC 'Z'
|
||||||
|
#define HP_GETHOSTINFO _IOR(HP_IOC_MAGIC, 20, hp_host_info_t)
|
||||||
|
#define HP_GETHOSTINFO1 _IOR(HP_IOC_MAGIC, 20, hp_host_info_rev0_t)
|
||||||
|
#define HP_GETTARGETINFO _IOR(HP_IOC_MAGIC, 21, hp_target_info_t)
|
||||||
|
|
||||||
|
/* All HP IOCTLs must include this header
|
||||||
|
*/
|
||||||
|
typedef struct _hp_header {
|
||||||
|
unsigned int iocnum;
|
||||||
|
unsigned int host;
|
||||||
|
unsigned int channel;
|
||||||
|
unsigned int id;
|
||||||
|
unsigned int lun;
|
||||||
|
} hp_header_t;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Header:
|
||||||
|
* iocnum required (input)
|
||||||
|
* host ignored
|
||||||
|
* channe ignored
|
||||||
|
* id ignored
|
||||||
|
* lun ignored
|
||||||
|
*/
|
||||||
|
typedef struct _hp_host_info {
|
||||||
|
hp_header_t hdr;
|
||||||
|
u16 vendor;
|
||||||
|
u16 device;
|
||||||
|
u16 subsystem_vendor;
|
||||||
|
u16 subsystem_id;
|
||||||
|
u8 devfn;
|
||||||
|
u8 bus;
|
||||||
|
ushort host_no; /* SCSI Host number, if scsi driver not loaded*/
|
||||||
|
u8 fw_version[16]; /* string */
|
||||||
|
u8 serial_number[24]; /* string */
|
||||||
|
u32 ioc_status;
|
||||||
|
u32 bus_phys_width;
|
||||||
|
u32 base_io_addr;
|
||||||
|
u32 rsvd;
|
||||||
|
unsigned int hard_resets; /* driver initiated resets */
|
||||||
|
unsigned int soft_resets; /* ioc, external resets */
|
||||||
|
unsigned int timeouts; /* num timeouts */
|
||||||
|
} hp_host_info_t;
|
||||||
|
|
||||||
|
/* replace ulongs with uints, need to preserve backwards
|
||||||
|
* compatibility.
|
||||||
|
*/
|
||||||
|
typedef struct _hp_host_info_rev0 {
|
||||||
|
hp_header_t hdr;
|
||||||
|
u16 vendor;
|
||||||
|
u16 device;
|
||||||
|
u16 subsystem_vendor;
|
||||||
|
u16 subsystem_id;
|
||||||
|
u8 devfn;
|
||||||
|
u8 bus;
|
||||||
|
ushort host_no; /* SCSI Host number, if scsi driver not loaded*/
|
||||||
|
u8 fw_version[16]; /* string */
|
||||||
|
u8 serial_number[24]; /* string */
|
||||||
|
u32 ioc_status;
|
||||||
|
u32 bus_phys_width;
|
||||||
|
u32 base_io_addr;
|
||||||
|
u32 rsvd;
|
||||||
|
unsigned long hard_resets; /* driver initiated resets */
|
||||||
|
unsigned long soft_resets; /* ioc, external resets */
|
||||||
|
unsigned long timeouts; /* num timeouts */
|
||||||
|
} hp_host_info_rev0_t;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Header:
|
||||||
|
* iocnum required (input)
|
||||||
|
* host required
|
||||||
|
* channel required (bus number)
|
||||||
|
* id required
|
||||||
|
* lun ignored
|
||||||
|
*
|
||||||
|
* All error values between 0 and 0xFFFF in size.
|
||||||
|
*/
|
||||||
|
typedef struct _hp_target_info {
|
||||||
|
hp_header_t hdr;
|
||||||
|
u32 parity_errors;
|
||||||
|
u32 phase_errors;
|
||||||
|
u32 select_timeouts;
|
||||||
|
u32 message_rejects;
|
||||||
|
u32 negotiated_speed;
|
||||||
|
u8 negotiated_width;
|
||||||
|
u8 rsvd[7]; /* 8 byte alignment */
|
||||||
|
} hp_target_info_t;
|
||||||
|
|
||||||
|
#define HP_STATUS_OTHER 1
|
||||||
|
#define HP_STATUS_OK 2
|
||||||
|
#define HP_STATUS_FAILED 3
|
||||||
|
|
||||||
|
#define HP_BUS_WIDTH_UNK 1
|
||||||
|
#define HP_BUS_WIDTH_8 2
|
||||||
|
#define HP_BUS_WIDTH_16 3
|
||||||
|
#define HP_BUS_WIDTH_32 4
|
||||||
|
|
||||||
|
#define HP_DEV_SPEED_ASYNC 2
|
||||||
|
#define HP_DEV_SPEED_FAST 3
|
||||||
|
#define HP_DEV_SPEED_ULTRA 4
|
||||||
|
#define HP_DEV_SPEED_ULTRA2 5
|
||||||
|
#define HP_DEV_SPEED_ULTRA160 6
|
||||||
|
#define HP_DEV_SPEED_SCSI1 7
|
||||||
|
#define HP_DEV_SPEED_ULTRA320 8
|
||||||
|
|
||||||
|
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
||||||
|
|
||||||
|
|
||||||
|
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
1
packaging/debian/mpt-status/manpages
Normal file
1
packaging/debian/mpt-status/manpages
Normal file
@ -0,0 +1 @@
|
|||||||
|
man/mpt-status.8
|
201
packaging/debian/mpt-status/mpt-status.init
Normal file
201
packaging/debian/mpt-status/mpt-status.init
Normal file
@ -0,0 +1,201 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# Author: Petter Reinholdtsen <pere@hungry.com>
|
||||||
|
# License: GNU General Public License v2 or later
|
||||||
|
#
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: mpt-statusd
|
||||||
|
# Required-Start: $remote_fs $syslog
|
||||||
|
# Required-Stop: $remote_fs $syslog
|
||||||
|
# Default-Start: 2 3 4 5
|
||||||
|
# Default-Stop: 0 1 6
|
||||||
|
# Short-Description: Check mpt-status values in the background.
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
DESC="mpt-status monitor"
|
||||||
|
NAME=mpt-statusd
|
||||||
|
PIDFILE=/var/run/$NAME.pid
|
||||||
|
STATUSFILE=/var/run/$NAME.status
|
||||||
|
SCRIPTNAME=/etc/init.d/$NAME
|
||||||
|
|
||||||
|
|
||||||
|
# Do not touch you can configure this in /etc/default/mpt-statusd
|
||||||
|
MAILTO=root # Where to report problems
|
||||||
|
PERIOD=600 # Seconds between each check (default 10 minutes)
|
||||||
|
REMIND=7200 # Seconds between each reminder (default 2 hours)
|
||||||
|
RUN_DAEMON=yes
|
||||||
|
ID=0
|
||||||
|
|
||||||
|
[ -e /etc/default/mpt-statusd ] && . /etc/default/mpt-statusd
|
||||||
|
|
||||||
|
# Gracefully exit if the package has been removed.
|
||||||
|
test -x /usr/sbin/mpt-status || exit 0
|
||||||
|
|
||||||
|
. /lib/lsb/init-functions
|
||||||
|
. /etc/default/rcS
|
||||||
|
|
||||||
|
if [ $RUN_DAEMON = "no" ] ; then
|
||||||
|
log_begin_msg "mpt-statusd is disabled in /etc/default/mpt-statusd, not starting."
|
||||||
|
log_end_msg 0
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [ -e "/proc/mpt/version" ] ; then
|
||||||
|
log_failure_msg "The mptctl module is missing. Please have a look at the README.Debian.gz."
|
||||||
|
log_end_msg 0
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
check_mpt() {
|
||||||
|
echo $$ > $PIDFILE.new && mv $PIDFILE.new $PIDFILE
|
||||||
|
while true ; do
|
||||||
|
# Check ever $PERIOD seconds, send email on every status
|
||||||
|
# change and repeat ever $REMIND seconds if the raid is still
|
||||||
|
# bad.
|
||||||
|
if (mpt-status -i $ID) |grep -q 'state OPTIMAL' ; then
|
||||||
|
BADRAID=false
|
||||||
|
else
|
||||||
|
BADRAID=true
|
||||||
|
logger -t mpt-statusd "detected non-optimal RAID status"
|
||||||
|
fi
|
||||||
|
STATUSCHANGE=false
|
||||||
|
if [ true = "$BADRAID" ] ; then
|
||||||
|
# RAID not OK
|
||||||
|
(mpt-status -i $ID) > $STATUSFILE.new
|
||||||
|
if [ ! -f $STATUSFILE ] ; then # RAID just became broken
|
||||||
|
STATUSCHANGE=true
|
||||||
|
mv $STATUSFILE.new $STATUSFILE
|
||||||
|
elif cmp -s $STATUSFILE $STATUSFILE.new ; then
|
||||||
|
# No change. Should we send reminder?
|
||||||
|
LASTTIME="`stat -c '%Z' $STATUSFILE`"
|
||||||
|
NOW="`date +%s`"
|
||||||
|
SINCELAST="`expr $NOW - $LASTTIME`"
|
||||||
|
if [ $REMIND -le "$SINCELAST" ]; then
|
||||||
|
# Time to send reminder
|
||||||
|
STATUSCHANGE=true
|
||||||
|
mv $STATUSFILE.new $STATUSFILE
|
||||||
|
else
|
||||||
|
rm $STATUSFILE.new
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
STATUSCHANGE=true
|
||||||
|
mv $STATUSFILE.new $STATUSFILE
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# RAID OK
|
||||||
|
if [ -f $STATUSFILE ] ; then
|
||||||
|
rm $STATUSFILE
|
||||||
|
STATUSCHANGE=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ true = "$STATUSCHANGE" ]; then
|
||||||
|
hostname="`uname -n`"
|
||||||
|
(
|
||||||
|
cat <<EOF
|
||||||
|
This is a RAID status update from mpt-statusd. The mpt-status
|
||||||
|
program reports that one of the RAIDs changed state:
|
||||||
|
|
||||||
|
EOF
|
||||||
|
if [ -f $STATUSFILE ] ; then
|
||||||
|
cat $STATUSFILE
|
||||||
|
else
|
||||||
|
(mpt-status -i $ID)
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
echo "Report from $0 on $hostname"
|
||||||
|
) | mail -s "info: mpt raid status change on $hostname" $MAILTO
|
||||||
|
fi
|
||||||
|
sleep $PERIOD
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
check_daemon() {
|
||||||
|
# Let's check if there is a daemon which is really running and not timing out
|
||||||
|
DAEMON_RUN=`ps aux | grep "/etc/init.d/mpt-statusd check_mpt" | grep -v grep | grep -v daemon`
|
||||||
|
if [ -n "$DAEMON_RUN" ] ; then
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Function that starts the daemon/service.
|
||||||
|
#
|
||||||
|
d_start() {
|
||||||
|
[ -f $PIDFILE ] && PID="`cat $PIDFILE`"
|
||||||
|
if [ "$PID" ] ; then
|
||||||
|
log_progress_msg "Daemon already running. Refusing to start another"
|
||||||
|
return 0
|
||||||
|
elif check_daemon ; then
|
||||||
|
# Use the daemon package to turn this script into a daemon
|
||||||
|
start-stop-daemon --start --quiet --pidfile $PIDFILE \
|
||||||
|
--oknodo --exec /usr/bin/daemon $SCRIPTNAME check_mpt
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
log_progress_msg "Daemon is already running. Refusing to start another"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Function that stops the daemon/service.
|
||||||
|
#
|
||||||
|
d_stop() {
|
||||||
|
if [ -f $PIDFILE ] ; then
|
||||||
|
start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE
|
||||||
|
rm -f $PIDFILE
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
log_progress_msg "Daemon is already stopped."
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# This is a workaround function which does not directly exit and
|
||||||
|
# therefore can be used by a restart
|
||||||
|
d_stop_by_restart() {
|
||||||
|
if [ -f $PIDFILE ] ; then
|
||||||
|
start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE
|
||||||
|
rm -f $PIDFILE
|
||||||
|
log_end_msg 0
|
||||||
|
else
|
||||||
|
log_progress_msg "Daemon is already stopped."
|
||||||
|
log_end_msg 0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
echo -n ""
|
||||||
|
log_begin_msg "Starting $DESC: $NAME"
|
||||||
|
d_start ; CODE=$?
|
||||||
|
log_end_msg $CODE
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
log_begin_msg "Stopping $DESC: $NAME"
|
||||||
|
d_stop ; CODE=$?
|
||||||
|
log_end_msg $CODE
|
||||||
|
;;
|
||||||
|
check_mpt)
|
||||||
|
check_mpt
|
||||||
|
;;
|
||||||
|
restart|force-reload)
|
||||||
|
log_begin_msg "Restarting $DESC: $NAME"
|
||||||
|
d_stop_by_restart
|
||||||
|
sleep 1
|
||||||
|
d_start || CODE=$?
|
||||||
|
log_end_msg $CODE
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
|
||||||
|
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
23
packaging/debian/mpt-status/patches/10-include.patch
Normal file
23
packaging/debian/mpt-status/patches/10-include.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
--- mpt-status.h.orig 2007-01-16 15:07:36.000000000 +0100
|
||||||
|
+++ mpt-status.h 2007-01-16 22:43:15.000000000 +0100
|
||||||
|
@@ -15,13 +15,13 @@
|
||||||
|
#ifndef __kernel
|
||||||
|
#define __kernel
|
||||||
|
#endif
|
||||||
|
-#include "pci.h" // config.h and header.h from pciutils package
|
||||||
|
-#include "lsi/mpi_type.h"
|
||||||
|
-#include "lsi/mpi.h"
|
||||||
|
-#include "lsi/mpi_ioc.h"
|
||||||
|
-#include "lsi/mpi_cnfg.h"
|
||||||
|
-#include "lsi/mpi_raid.h"
|
||||||
|
-#include "mptctl.h"
|
||||||
|
+#include <pci/pci.h> // config.h and header.h from pciutils package
|
||||||
|
+#include "debian/includes/mpi_type.h"
|
||||||
|
+#include "debian/includes/mpi.h"
|
||||||
|
+#include "debian/includes/mpi_ioc.h"
|
||||||
|
+#include "debian/includes/mpi_cnfg.h"
|
||||||
|
+#include "debian/includes/mpi_raid.h"
|
||||||
|
+#include "debian/includes/mptctl.h"
|
||||||
|
//#include "mptbase.h"
|
||||||
|
#endif // SANITIZED_KERNEL_HEADERS
|
||||||
|
|
13
packaging/debian/mpt-status/patches/20-compiler.patch
Normal file
13
packaging/debian/mpt-status/patches/20-compiler.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
--- mpt-status-1.2.0.orig/mpt-status.h
|
||||||
|
+++ mpt-status-1.2.0/mpt-status.h
|
||||||
|
@@ -2,9 +2,6 @@
|
||||||
|
#define _MPT_STATUS_H
|
||||||
|
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
-#ifdef __linux__
|
||||||
|
-#include <linux/compiler.h>
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
#ifdef SANITIZED_KERNEL_HEADERS
|
||||||
|
#include "mpt-sanitized.h"
|
||||||
|
|
14
packaging/debian/mpt-status/rules
Executable file
14
packaging/debian/mpt-status/rules
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
include /usr/share/cdbs/1/class/makefile.mk
|
||||||
|
include /usr/share/cdbs/1/rules/debhelper.mk
|
||||||
|
include /usr/share/cdbs/1/rules/simple-patchsys.mk
|
||||||
|
DESTDIR = $(CURDIR)/debian/mpt-status
|
||||||
|
DEB_MAKE_BUILD_TARGET := REDHAT=true
|
||||||
|
DEB_DH_INSTALLINIT_ARGS = --init-script=mpt-statusd
|
||||||
|
|
||||||
|
common-install-arch::
|
||||||
|
install -D -m 755 mpt-status $(DESTDIR)/usr/sbin/mpt-status
|
||||||
|
|
||||||
|
common-binary-post-install-arch::
|
||||||
|
cd $(DESTDIR)/usr/share/doc/mpt-status && mv Changelog changelog
|
Loading…
x
Reference in New Issue
Block a user