| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: mpt_debug.c,v 1.10 2014/04/17 16:05:45 christos Exp $ */ | | 1 | /* $NetBSD: mpt_debug.c,v 1.11 2015/11/05 21:08:18 palle Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 2000, 2001 by Greg Ansley | | 4 | * Copyright (c) 2000, 2001 by Greg Ansley |
5 | * | | 5 | * |
6 | * Redistribution and use in source and binary forms, with or without | | 6 | * Redistribution and use in source and binary forms, with or without |
7 | * modification, are permitted provided that the following conditions | | 7 | * modification, are permitted provided that the following conditions |
8 | * are met: | | 8 | * are met: |
9 | * 1. Redistributions of source code must retain the above copyright | | 9 | * 1. Redistributions of source code must retain the above copyright |
10 | * notice immediately at the beginning of the file, without modification, | | 10 | * notice immediately at the beginning of the file, without modification, |
11 | * this list of conditions, and the following disclaimer. | | 11 | * this list of conditions, and the following disclaimer. |
12 | * 2. The name of the author may not be used to endorse or promote products | | 12 | * 2. The name of the author may not be used to endorse or promote products |
13 | * derived from this software without specific prior written permission. | | 13 | * derived from this software without specific prior written permission. |
14 | * | | 14 | * |
| @@ -25,27 +25,27 @@ | | | @@ -25,27 +25,27 @@ |
25 | * SUCH DAMAGE. | | 25 | * SUCH DAMAGE. |
26 | */ | | 26 | */ |
27 | /* | | 27 | /* |
28 | * Additional Copyright (c) 2002 by Matthew Jacob under same license. | | 28 | * Additional Copyright (c) 2002 by Matthew Jacob under same license. |
29 | */ | | 29 | */ |
30 | | | 30 | |
31 | /* | | 31 | /* |
32 | * mpt_debug.c: | | 32 | * mpt_debug.c: |
33 | * | | 33 | * |
34 | * Debug routines for LSI Fusion adapters. | | 34 | * Debug routines for LSI Fusion adapters. |
35 | */ | | 35 | */ |
36 | | | 36 | |
37 | #include <sys/cdefs.h> | | 37 | #include <sys/cdefs.h> |
38 | __KERNEL_RCSID(0, "$NetBSD: mpt_debug.c,v 1.10 2014/04/17 16:05:45 christos Exp $"); | | 38 | __KERNEL_RCSID(0, "$NetBSD: mpt_debug.c,v 1.11 2015/11/05 21:08:18 palle Exp $"); |
39 | | | 39 | |
40 | #include <dev/ic/mpt.h> | | 40 | #include <dev/ic/mpt.h> |
41 | | | 41 | |
42 | struct Error_Map { | | 42 | struct Error_Map { |
43 | int Error_Code; | | 43 | int Error_Code; |
44 | const char *Error_String; | | 44 | const char *Error_String; |
45 | }; | | 45 | }; |
46 | | | 46 | |
47 | static const struct Error_Map IOC_Status[] = { | | 47 | static const struct Error_Map IOC_Status[] = { |
48 | { MPI_IOCSTATUS_SUCCESS, "Success" }, | | 48 | { MPI_IOCSTATUS_SUCCESS, "Success" }, |
49 | { MPI_IOCSTATUS_INVALID_FUNCTION, "IOC: Invalid Function" }, | | 49 | { MPI_IOCSTATUS_INVALID_FUNCTION, "IOC: Invalid Function" }, |
50 | { MPI_IOCSTATUS_BUSY, "IOC: Busy" }, | | 50 | { MPI_IOCSTATUS_BUSY, "IOC: Busy" }, |
51 | { MPI_IOCSTATUS_INVALID_SGL, "IOC: Invalid SGL" }, | | 51 | { MPI_IOCSTATUS_INVALID_SGL, "IOC: Invalid SGL" }, |
| @@ -121,26 +121,38 @@ static const struct Error_Map IOC_Func[] | | | @@ -121,26 +121,38 @@ static const struct Error_Map IOC_Func[] |
121 | | | 121 | |
122 | static const struct Error_Map IOC_Event[] = { | | 122 | static const struct Error_Map IOC_Event[] = { |
123 | { MPI_EVENT_NONE, "None" }, | | 123 | { MPI_EVENT_NONE, "None" }, |
124 | { MPI_EVENT_LOG_DATA, "LogData" }, | | 124 | { MPI_EVENT_LOG_DATA, "LogData" }, |
125 | { MPI_EVENT_STATE_CHANGE, "State Change" }, | | 125 | { MPI_EVENT_STATE_CHANGE, "State Change" }, |
126 | { MPI_EVENT_UNIT_ATTENTION, "Unit Attention" }, | | 126 | { MPI_EVENT_UNIT_ATTENTION, "Unit Attention" }, |
127 | { MPI_EVENT_IOC_BUS_RESET, "IOC Bus Reset" }, | | 127 | { MPI_EVENT_IOC_BUS_RESET, "IOC Bus Reset" }, |
128 | { MPI_EVENT_EXT_BUS_RESET, "External Bus Reset" }, | | 128 | { MPI_EVENT_EXT_BUS_RESET, "External Bus Reset" }, |
129 | { MPI_EVENT_RESCAN, "Rescan" }, | | 129 | { MPI_EVENT_RESCAN, "Rescan" }, |
130 | { MPI_EVENT_LINK_STATUS_CHANGE, "Link Status Change" }, | | 130 | { MPI_EVENT_LINK_STATUS_CHANGE, "Link Status Change" }, |
131 | { MPI_EVENT_LOOP_STATE_CHANGE, "Loop State Change" }, | | 131 | { MPI_EVENT_LOOP_STATE_CHANGE, "Loop State Change" }, |
132 | { MPI_EVENT_LOGOUT, "Logout" }, | | 132 | { MPI_EVENT_LOGOUT, "Logout" }, |
133 | { MPI_EVENT_EVENT_CHANGE, "EventChange" }, | | 133 | { MPI_EVENT_EVENT_CHANGE, "EventChange" }, |
| | | 134 | { MPI_EVENT_INTEGRATED_RAID, "Integrated RAID" }, |
| | | 135 | { MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE, "SCSI Device Status Change" }, |
| | | 136 | { MPI_EVENT_ON_BUS_TIMER_EXPIRED, "On Bus Timer Expired" }, |
| | | 137 | { MPI_EVENT_QUEUE_FULL, "Queue Full" }, |
| | | 138 | { MPI_EVENT_SAS_DEVICE_STATUS_CHANGE, "SAS Device Status Change" }, |
| | | 139 | { MPI_EVENT_SAS_SES, "SAS Ses" }, |
| | | 140 | { MPI_EVENT_PERSISTENT_TABLE_FULL, "Persistent Table Full" }, |
| | | 141 | { MPI_EVENT_SAS_PHY_LINK_STATUS, "SAS Phy Link Status" }, |
| | | 142 | { MPI_EVENT_SAS_DISCOVERY_ERROR, "SAS Discovery Error" }, |
| | | 143 | { MPI_EVENT_IR_RESYNC_UPDATE, "IR Resync Update" }, |
| | | 144 | { MPI_EVENT_IR2, "IR2", }, |
| | | 145 | { MPI_EVENT_SAS_DISCOVERY, "Sas Discovery" }, |
134 | { -1, 0}, | | 146 | { -1, 0}, |
135 | }; | | 147 | }; |
136 | | | 148 | |
137 | static const struct Error_Map IOC_SCSIState[] = { | | 149 | static const struct Error_Map IOC_SCSIState[] = { |
138 | { MPI_SCSI_STATE_AUTOSENSE_VALID, "AutoSense_Valid" }, | | 150 | { MPI_SCSI_STATE_AUTOSENSE_VALID, "AutoSense_Valid" }, |
139 | { MPI_SCSI_STATE_AUTOSENSE_FAILED, "AutoSense_Failed" }, | | 151 | { MPI_SCSI_STATE_AUTOSENSE_FAILED, "AutoSense_Failed" }, |
140 | { MPI_SCSI_STATE_NO_SCSI_STATUS, "No_SCSI_Status" }, | | 152 | { MPI_SCSI_STATE_NO_SCSI_STATUS, "No_SCSI_Status" }, |
141 | { MPI_SCSI_STATE_TERMINATED, "State_Terminated" }, | | 153 | { MPI_SCSI_STATE_TERMINATED, "State_Terminated" }, |
142 | { MPI_SCSI_STATE_RESPONSE_INFO_VALID, "Repsonse_Info_Valid" }, | | 154 | { MPI_SCSI_STATE_RESPONSE_INFO_VALID, "Repsonse_Info_Valid" }, |
143 | { MPI_SCSI_STATE_QUEUE_TAG_REJECTED, "Queue Tag Rejected" }, | | 155 | { MPI_SCSI_STATE_QUEUE_TAG_REJECTED, "Queue Tag Rejected" }, |
144 | { -1, 0}, | | 156 | { -1, 0}, |
145 | }; | | 157 | }; |
146 | | | 158 | |