Author: mav
Date: Sun Nov 22 11:44:30 2015
New Revision: 291160
URL: https://svnweb.freebsd.org/changeset/base/291160

Log:
  Add some more asynchronous event status codes.

Modified:
  head/sys/dev/isp/isp.c
  head/sys/dev/isp/ispmbox.h

Modified: head/sys/dev/isp/isp.c
==============================================================================
--- head/sys/dev/isp/isp.c      Sun Nov 22 11:13:09 2015        (r291159)
+++ head/sys/dev/isp/isp.c      Sun Nov 22 11:44:30 2015        (r291160)
@@ -5800,7 +5800,10 @@ isp_parse_async_fc(ispsoftc_t *isp, uint
                    ISPASYNC_CHANGE_SNS, portid);
                break;
        }
-
+       case ASYNC_ERR_LOGGING_DISABLED:
+               isp_prt(isp, ISP_LOGWARN, "Error logging disabled (reason 
0x%x)",
+                   ISP_READ(isp, OUTMAILBOX1));
+               break;
        case ASYNC_CONNMODE:
                /*
                 * This only applies to 2100 amd 2200 cards
@@ -5843,7 +5846,10 @@ isp_parse_async_fc(ispsoftc_t *isp, uint
                FCPARAM(isp, chan)->isp_loopstate = LOOP_NIL;
                isp_async(isp, ISPASYNC_CHANGE_NOTIFY, chan, 
ISPASYNC_CHANGE_OTHER);
                break;
-
+       case ASYNC_P2P_INIT_ERR:
+               isp_prt(isp, ISP_LOGWARN, "P2P init error (reason 0x%x)",
+                   ISP_READ(isp, OUTMAILBOX1));
+               break;
        case ASYNC_RCV_ERR:
                if (IS_24XX(isp)) {
                        isp_prt(isp, ISP_LOGWARN, "Receive Error");
@@ -5855,11 +5861,23 @@ isp_parse_async_fc(ispsoftc_t *isp, uint
                if (IS_24XX(isp)) {
                        isp_prt(isp, ISP_LOGTDEBUG0, "LS_RJT sent");
                        break;
-               } else if (IS_2200(isp)) {
+               } else {
                        isp_prt(isp, ISP_LOGTDEBUG0, "QFULL sent");
                        break;
                }
-               /* FALLTHROUGH */
+       case ASYNC_FW_RESTART_COMPLETE:
+               isp_prt(isp, ISP_LOGDEBUG0, "FW restart complete");
+               break;
+       case ASYNC_TEMPERATURE_ALERT:
+               isp_prt(isp, ISP_LOGERR, "Temperature alert (subcode 0x%x)",
+                   ISP_READ(isp, OUTMAILBOX1));
+               break;
+       case ASYNC_AUTOLOAD_FW_COMPLETE:
+               isp_prt(isp, ISP_LOGDEBUG0, "Autoload FW init complete");
+               break;
+       case ASYNC_AUTOLOAD_FW_FAILURE:
+               isp_prt(isp, ISP_LOGERR, "Autoload FW init failure");
+               break;
        default:
                isp_prt(isp, ISP_LOGWARN, "Unknown Async Code 0x%x", mbox);
                break;

Modified: head/sys/dev/isp/ispmbox.h
==============================================================================
--- head/sys/dev/isp/ispmbox.h  Sun Nov 22 11:13:09 2015        (r291159)
+++ head/sys/dev/isp/ispmbox.h  Sun Nov 22 11:44:30 2015        (r291160)
@@ -246,14 +246,15 @@
 #define        ASYNC_HUNG_SCSI                 0x800C
 #define        ASYNC_KILLED_BUS                0x800D
 #define        ASYNC_BUS_TRANSIT               0x800E  /* LVD -> HVD, eg. */
-#define        ASYNC_LIP_OCCURRED              0x8010
+#define        ASYNC_LIP_OCCURRED              0x8010  /* FC only */
 #define        ASYNC_LOOP_UP                   0x8011
 #define        ASYNC_LOOP_DOWN                 0x8012
-#define        ASYNC_LOOP_RESET                0x8013
+#define        ASYNC_LOOP_RESET                0x8013  /* FC only */
 #define        ASYNC_PDB_CHANGED               0x8014
 #define        ASYNC_CHANGE_NOTIFY             0x8015
-#define        ASYNC_LIP_F8                    0x8016
-#define        ASYNC_LIP_ERROR                 0x8017
+#define        ASYNC_LIP_F8                    0x8016  /* FC only */
+#define        ASYNC_LIP_ERROR                 0x8017  /* FC only */
+#define        ASYNC_AUTO_PLOGI_RJT            0x8018
 #define        ASYNC_SECURITY_UPDATE           0x801B
 #define        ASYNC_CMD_CMPLT                 0x8020
 #define        ASYNC_CTIO_DONE                 0x8021
@@ -265,7 +266,8 @@
 #define        ASYNC_IP_RCVQ_LOW               0x8025
 #define        ASYNC_IP_RCVQ_EMPTY             0x8026
 #define        ASYNC_IP_RECV_DONE_ALIGNED      0x8027
-#define        ASYNC_PTPMODE                   0x8030
+#define        ASYNC_ERR_LOGGING_DISABLED      0x8029
+#define        ASYNC_PTPMODE                   0x8030  /* FC only */
 #define        ASYNC_RIO16_1                   0x8031
 #define        ASYNC_RIO16_2                   0x8032
 #define        ASYNC_RIO16_3                   0x8033
@@ -277,9 +279,25 @@
 #define                ISP_CONN_BADLIP         3
 #define                ISP_CONN_FATAL          4
 #define                ISP_CONN_LOOPBACK       5
+#define        ASYNC_P2P_INIT_ERR              0x8037
 #define        ASYNC_RIOZIO_STALL              0x8040  /* there's a RIO/ZIO 
entry that hasn't been serviced */
 #define        ASYNC_RIO32_2_2200              0x8042  /* same as 
ASYNC_RIO32_2, but for 2100/2200 */
 #define        ASYNC_RCV_ERR                   0x8048
+/*
+ * 2.01.31 2200 Only. Need Bit 13 in Mailbox 1 for Set Firmware Options
+ * mailbox command to enable this.
+ */
+#define        ASYNC_QFULL_SENT                0x8049
+#define        ASYNC_RJT_SENT                  0x8049  /* 24XX only */
+#define        ASYNC_SEL_CLASS2_P_RJT_SENT     0x804f
+#define        ASYNC_FW_RESTART_COMPLETE       0x8060
+#define        ASYNC_TEMPERATURE_ALERT         0x8070
+#define        ASYNC_INTER_DRIVER_COMP         0x8100  /* FCoE only */
+#define        ASYNC_INTER_DRIVER_NOTIFY       0x8101  /* FCoE only */
+#define        ASYNC_INTER_DRIVER_TIME_EXT     0x8102  /* FCoE only */
+#define        ASYNC_NIC_FW_STATE_CHANGE       0x8200  /* FCoE only */
+#define        ASYNC_AUTOLOAD_FW_COMPLETE      0x8400
+#define        ASYNC_AUTOLOAD_FW_FAILURE       0x8401
 
 /*
  * Firmware Options. There are a lot of them.
@@ -303,20 +321,6 @@
 
 #define        IFCOPT3_NOPRLI          (1 << 4)        /* disable automatic 
sending of PRLI on local loops */
 #define        IFCOPT3_RNDASYNC        (1 << 1)
-/*
- * 2.01.31 2200 Only. Need Bit 13 in Mailbox 1 for Set Firmware Options
- * mailbox command to enable this.
- */
-#define        ASYNC_QFULL_SENT                0x8049
-
-/*
- * Needs to be enabled
- */
-#define        ASYNC_AUTO_PLOGI_RJT            0x8018
-/*
- * 24XX only
- */
-#define        ASYNC_RJT_SENT                  0x8049
 
 /*
  * All IOCB Queue entries are this size
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to