aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_hw.h
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2007-10-27 13:37:05 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-11 19:22:31 -0500
commit57127f157298ea2dacbbc878a3c5d2a5daca772c (patch)
tree2536d995c36e068576a690b33cd2029f0749ddbe /drivers/scsi/lpfc/lpfc_hw.h
parentd1a357fcc8348d325d151f6fe0ea54e317652457 (diff)
[SCSI] lpfc 8.2.3 : Added support for ASICs that report temperature
Added support for ASICs that report temperature. Temperature notices are reported as events and logged. Temperature can be read via sysfs. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hw.h')
-rw-r--r--drivers/scsi/lpfc/lpfc_hw.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h
index 451accd5564b..098dd022a7eb 100644
--- a/drivers/scsi/lpfc/lpfc_hw.h
+++ b/drivers/scsi/lpfc/lpfc_hw.h
@@ -1228,7 +1228,8 @@ typedef struct { /* FireFly BIU registers */
1228#define HS_FFER3 0x20000000 /* Bit 29 */ 1228#define HS_FFER3 0x20000000 /* Bit 29 */
1229#define HS_FFER2 0x40000000 /* Bit 30 */ 1229#define HS_FFER2 0x40000000 /* Bit 30 */
1230#define HS_FFER1 0x80000000 /* Bit 31 */ 1230#define HS_FFER1 0x80000000 /* Bit 31 */
1231#define HS_FFERM 0xFF000000 /* Mask for error bits 31:24 */ 1231#define HS_CRIT_TEMP 0x00000100 /* Bit 8 */
1232#define HS_FFERM 0xFF000100 /* Mask for error bits 31:24 and 8 */
1232 1233
1233/* Host Control Register */ 1234/* Host Control Register */
1234 1235
@@ -1282,6 +1283,7 @@ typedef struct { /* FireFly BIU registers */
1282#define MBX_KILL_BOARD 0x24 1283#define MBX_KILL_BOARD 0x24
1283#define MBX_CONFIG_FARP 0x25 1284#define MBX_CONFIG_FARP 0x25
1284#define MBX_BEACON 0x2A 1285#define MBX_BEACON 0x2A
1286#define MBX_ASYNCEVT_ENABLE 0x33
1285#define MBX_HEARTBEAT 0x31 1287#define MBX_HEARTBEAT 0x31
1286 1288
1287#define MBX_CONFIG_HBQ 0x7C 1289#define MBX_CONFIG_HBQ 0x7C
@@ -1344,6 +1346,7 @@ typedef struct { /* FireFly BIU registers */
1344 1346
1345/* SLI_2 IOCB Command Set */ 1347/* SLI_2 IOCB Command Set */
1346 1348
1349#define CMD_ASYNC_STATUS 0x7C
1347#define CMD_RCV_SEQUENCE64_CX 0x81 1350#define CMD_RCV_SEQUENCE64_CX 0x81
1348#define CMD_XMIT_SEQUENCE64_CR 0x82 1351#define CMD_XMIT_SEQUENCE64_CR 0x82
1349#define CMD_XMIT_SEQUENCE64_CX 0x83 1352#define CMD_XMIT_SEQUENCE64_CX 0x83
@@ -1406,6 +1409,8 @@ typedef struct { /* FireFly BIU registers */
1406#define MBX_BUSY 0xffffff /* Attempted cmd to busy Mailbox */ 1409#define MBX_BUSY 0xffffff /* Attempted cmd to busy Mailbox */
1407#define MBX_TIMEOUT 0xfffffe /* time-out expired waiting for */ 1410#define MBX_TIMEOUT 0xfffffe /* time-out expired waiting for */
1408 1411
1412#define TEMPERATURE_OFFSET 0xB0 /* Slim offset for critical temperature event */
1413
1409/* 1414/*
1410 * Begin Structure Definitions for Mailbox Commands 1415 * Begin Structure Definitions for Mailbox Commands
1411 */ 1416 */
@@ -2606,6 +2611,18 @@ typedef struct {
2606 uint32_t IPAddress; 2611 uint32_t IPAddress;
2607} CONFIG_FARP_VAR; 2612} CONFIG_FARP_VAR;
2608 2613
2614/* Structure for MB Command MBX_ASYNCEVT_ENABLE (0x33) */
2615
2616typedef struct {
2617#ifdef __BIG_ENDIAN_BITFIELD
2618 uint32_t rsvd:30;
2619 uint32_t ring:2; /* Ring for ASYNC_EVENT iocb Bits 0-1*/
2620#else /* __LITTLE_ENDIAN */
2621 uint32_t ring:2; /* Ring for ASYNC_EVENT iocb Bits 0-1*/
2622 uint32_t rsvd:30;
2623#endif
2624} ASYNCEVT_ENABLE_VAR;
2625
2609/* Union of all Mailbox Command types */ 2626/* Union of all Mailbox Command types */
2610#define MAILBOX_CMD_WSIZE 32 2627#define MAILBOX_CMD_WSIZE 32
2611#define MAILBOX_CMD_SIZE (MAILBOX_CMD_WSIZE * sizeof(uint32_t)) 2628#define MAILBOX_CMD_SIZE (MAILBOX_CMD_WSIZE * sizeof(uint32_t))
@@ -2645,6 +2662,7 @@ typedef union {
2645 CONFIG_PORT_VAR varCfgPort; /* cmd = 0x88 (CONFIG_PORT) */ 2662 CONFIG_PORT_VAR varCfgPort; /* cmd = 0x88 (CONFIG_PORT) */
2646 REG_VPI_VAR varRegVpi; /* cmd = 0x96 (REG_VPI) */ 2663 REG_VPI_VAR varRegVpi; /* cmd = 0x96 (REG_VPI) */
2647 UNREG_VPI_VAR varUnregVpi; /* cmd = 0x97 (UNREG_VPI) */ 2664 UNREG_VPI_VAR varUnregVpi; /* cmd = 0x97 (UNREG_VPI) */
2665 ASYNCEVT_ENABLE_VAR varCfgAsyncEvent; /*cmd = x33 (CONFIG_ASYNC) */
2648} MAILVARIANTS; 2666} MAILVARIANTS;
2649 2667
2650/* 2668/*
@@ -2987,6 +3005,21 @@ typedef struct {
2987 uint32_t fcpt_Length; /* transfer ready for IWRITE */ 3005 uint32_t fcpt_Length; /* transfer ready for IWRITE */
2988} FCPT_FIELDS64; 3006} FCPT_FIELDS64;
2989 3007
3008/* IOCB Command template for Async Status iocb commands */
3009typedef struct {
3010 uint32_t rsvd[4];
3011 uint32_t param;
3012#ifdef __BIG_ENDIAN_BITFIELD
3013 uint16_t evt_code; /* High order bits word 5 */
3014 uint16_t sub_ctxt_tag; /* Low order bits word 5 */
3015#else /* __LITTLE_ENDIAN_BITFIELD */
3016 uint16_t sub_ctxt_tag; /* High order bits word 5 */
3017 uint16_t evt_code; /* Low order bits word 5 */
3018#endif
3019} ASYNCSTAT_FIELDS;
3020#define ASYNC_TEMP_WARN 0x100
3021#define ASYNC_TEMP_SAFE 0x101
3022
2990/* IOCB Command template for CMD_IOCB_RCV_ELS64_CX (0xB7) 3023/* IOCB Command template for CMD_IOCB_RCV_ELS64_CX (0xB7)
2991 or CMD_IOCB_RCV_SEQ64_CX (0xB5) */ 3024 or CMD_IOCB_RCV_SEQ64_CX (0xB5) */
2992 3025
@@ -3028,6 +3061,7 @@ typedef struct _IOCB { /* IOCB structure */
3028 XMT_SEQ_FIELDS64 xseq64; /* XMIT / BCAST cmd */ 3061 XMT_SEQ_FIELDS64 xseq64; /* XMIT / BCAST cmd */
3029 FCPI_FIELDS64 fcpi64; /* FCP 64 bit Initiator template */ 3062 FCPI_FIELDS64 fcpi64; /* FCP 64 bit Initiator template */
3030 FCPT_FIELDS64 fcpt64; /* FCP 64 bit target template */ 3063 FCPT_FIELDS64 fcpt64; /* FCP 64 bit target template */
3064 ASYNCSTAT_FIELDS asyncstat; /* async_status iocb */
3031 3065
3032 uint32_t ulpWord[IOCB_WORD_SZ - 2]; /* generic 6 'words' */ 3066 uint32_t ulpWord[IOCB_WORD_SZ - 2]; /* generic 6 'words' */
3033 } un; 3067 } un;