o Improve 224494:

- Ignore some more internal SAS device status change events.
  - Correct inverted Bus and TargetID arguments in a warning.
o Add a warning for MPI_EVENT_SAS_DISCOVERY_ERROR events, which can help
  identifying broken disks.

Submitted by:	Andrew Boyer
Approved by:	re (kib)
Committed from: Chaos Communication Camp 2011
This commit is contained in:
Marius Strobl 2011-08-10 19:05:22 +00:00
parent 2bf43f7d0f
commit 1bf5a6cf3c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=224761
2 changed files with 34 additions and 3 deletions

View File

@ -33,7 +33,7 @@
* Title: MPI IOC, Port, Event, FW Download, and FW Upload messages
* Creation Date: August 11, 2000
*
* mpi_ioc.h Version: 01.05.14
* mpi_ioc.h Version: 01.05.16
*
* Version History
* ---------------
@ -140,6 +140,16 @@
* added _MULTI_PORT_DOMAIN.
* 05-24-07 01.05.14 Added Common Boot Block type to FWDownload Request.
* Added Common Boot Block type to FWUpload Request.
* 08-07-07 01.05.15 Added MPI_EVENT_SAS_INIT_RC_REMOVED define.
* Added MPI_EVENT_IR2_RC_DUAL_PORT_ADDED and
* MPI_EVENT_IR2_RC_DUAL_PORT_REMOVED for IR2 event data.
* Added SASAddress field to SAS Initiator Device Table
* Overflow event data structure.
* 03-28-08 01.05.16 Added two new ReasonCode values to SAS Device Status
* Change Event data to indicate completion of internally
* generated task management.
* Added MPI_EVENT_DSCVRY_ERR_DS_SATA_INIT_FAILURE define.
* Added MPI_EVENT_SAS_INIT_RC_INACCESSIBLE define.
* --------------------------------------------------------------------------
*/
@ -639,6 +649,8 @@ typedef struct _EVENT_DATA_SAS_DEVICE_STATUS_CHANGE
#define MPI_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL (0x0B)
#define MPI_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL (0x0C)
#define MPI_EVENT_SAS_DEV_STAT_RC_ASYNC_NOTIFICATION (0x0D)
#define MPI_EVENT_SAS_DEV_STAT_RC_CMPL_INTERNAL_DEV_RESET (0x0E)
#define MPI_EVENT_SAS_DEV_STAT_RC_CMPL_TASK_ABORT_INTERNAL (0x0F)
/* SCSI Event data for Queue Full event */
@ -735,6 +747,8 @@ typedef struct _MPI_EVENT_DATA_IR2
#define MPI_EVENT_IR2_RC_PD_REMOVED (0x05)
#define MPI_EVENT_IR2_RC_FOREIGN_CFG_DETECTED (0x06)
#define MPI_EVENT_IR2_RC_REBUILD_MEDIUM_ERROR (0x07)
#define MPI_EVENT_IR2_RC_DUAL_PORT_ADDED (0x08)
#define MPI_EVENT_IR2_RC_DUAL_PORT_REMOVED (0x09)
/* defines for logical disk states */
#define MPI_LD_STATE_OPTIMAL (0x00)
@ -894,6 +908,7 @@ typedef struct _EVENT_DATA_DISCOVERY_ERROR
#define MPI_EVENT_DSCVRY_ERR_DS_UNSUPPORTED_DEVICE (0x00000800)
#define MPI_EVENT_DSCVRY_ERR_DS_MAX_SATA_TARGETS (0x00001000)
#define MPI_EVENT_DSCVRY_ERR_DS_MULTI_PORT_DOMAIN (0x00002000)
#define MPI_EVENT_DSCVRY_ERR_DS_SATA_INIT_FAILURE (0x00004000)
/* SAS SMP Error Event data */
@ -929,6 +944,8 @@ typedef struct _EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE
/* defines for the ReasonCode field of the SAS Initiator Device Status Change event */
#define MPI_EVENT_SAS_INIT_RC_ADDED (0x01)
#define MPI_EVENT_SAS_INIT_RC_REMOVED (0x02)
#define MPI_EVENT_SAS_INIT_RC_INACCESSIBLE (0x03)
/* SAS Initiator Device Table Overflow Event data */
@ -937,6 +954,7 @@ typedef struct _EVENT_DATA_SAS_INIT_TABLE_OVERFLOW
U8 MaxInit; /* 00h */
U8 CurrentInit; /* 01h */
U16 Reserved1; /* 02h */
U64 SASAddress; /* 04h */
} EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
MPI_POINTER PTR_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
MpiEventDataSasInitTableOverflow_t,

View File

@ -2620,17 +2620,30 @@ mpt_cam_event(struct mpt_softc *mpt, request_t *req,
xpt_free_path(tmppath);
CAMLOCK_2_MPTLOCK(mpt);
break;
case MPI_EVENT_SAS_DEV_STAT_RC_CMPL_INTERNAL_DEV_RESET:
case MPI_EVENT_SAS_DEV_STAT_RC_CMPL_TASK_ABORT_INTERNAL:
case MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET:
break;
default:
mpt_lprt(mpt, MPT_PRT_WARN,
"SAS device status change: Bus: 0x%02x TargetID: "
"0x%02x ReasonCode: 0x%02x\n", psdsc->TargetID,
psdsc->Bus, psdsc->ReasonCode);
"0x%02x ReasonCode: 0x%02x\n", psdsc->Bus,
psdsc->TargetID, psdsc->ReasonCode);
break;
}
break;
}
case MPI_EVENT_SAS_DISCOVERY_ERROR:
{
PTR_EVENT_DATA_DISCOVERY_ERROR pde;
pde = (PTR_EVENT_DATA_DISCOVERY_ERROR)msg->Data;
pde->DiscoveryStatus = le32toh(pde->DiscoveryStatus);
mpt_lprt(mpt, MPT_PRT_WARN,
"SAS discovery error: Port: 0x%02x Status: 0x%08x\n",
pde->Port, pde->DiscoveryStatus);
break;
}
case MPI_EVENT_EVENT_CHANGE:
case MPI_EVENT_INTEGRATED_RAID:
case MPI_EVENT_IR2: