diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mr.h')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mr.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mr.h b/drivers/scsi/qla2xxx/qla_mr.h index 179f8e42b1c0..982f7d3b14e7 100644 --- a/drivers/scsi/qla2xxx/qla_mr.h +++ b/drivers/scsi/qla2xxx/qla_mr.h | |||
@@ -329,11 +329,13 @@ struct config_info_data { | |||
329 | uint64_t adapter_id; | 329 | uint64_t adapter_id; |
330 | 330 | ||
331 | uint32_t cluster_key_len; | 331 | uint32_t cluster_key_len; |
332 | uint8_t cluster_key[10]; | 332 | uint8_t cluster_key[16]; |
333 | 333 | ||
334 | uint64_t cluster_master_id; | 334 | uint64_t cluster_master_id; |
335 | uint64_t cluster_slave_id; | 335 | uint64_t cluster_slave_id; |
336 | uint8_t cluster_flags; | 336 | uint8_t cluster_flags; |
337 | uint32_t enabled_capabilities; | ||
338 | uint32_t nominal_temp_value; | ||
337 | } __packed; | 339 | } __packed; |
338 | 340 | ||
339 | #define FXDISC_GET_CONFIG_INFO 0x01 | 341 | #define FXDISC_GET_CONFIG_INFO 0x01 |
@@ -346,6 +348,7 @@ struct config_info_data { | |||
346 | #define QLAFX00_ICR_ENB_MASK 0x80000000 | 348 | #define QLAFX00_ICR_ENB_MASK 0x80000000 |
347 | #define QLAFX00_ICR_DIS_MASK 0x7fffffff | 349 | #define QLAFX00_ICR_DIS_MASK 0x7fffffff |
348 | #define QLAFX00_HST_RST_REG 0x18264 | 350 | #define QLAFX00_HST_RST_REG 0x18264 |
351 | #define QLAFX00_SOC_TEMP_REG 0x184C4 | ||
349 | #define QLAFX00_HST_TO_HBA_REG 0x20A04 | 352 | #define QLAFX00_HST_TO_HBA_REG 0x20A04 |
350 | #define QLAFX00_HBA_TO_HOST_REG 0x21B70 | 353 | #define QLAFX00_HBA_TO_HOST_REG 0x21B70 |
351 | #define QLAFX00_HST_INT_STS_BITS 0x7 | 354 | #define QLAFX00_HST_INT_STS_BITS 0x7 |
@@ -361,6 +364,9 @@ struct config_info_data { | |||
361 | #define QLAFX00_INTR_ALL_CMPLT 0x7 | 364 | #define QLAFX00_INTR_ALL_CMPLT 0x7 |
362 | 365 | ||
363 | #define QLAFX00_MBA_SYSTEM_ERR 0x8002 | 366 | #define QLAFX00_MBA_SYSTEM_ERR 0x8002 |
367 | #define QLAFX00_MBA_TEMP_OVER 0x8005 | ||
368 | #define QLAFX00_MBA_TEMP_NORM 0x8006 | ||
369 | #define QLAFX00_MBA_TEMP_CRIT 0x8007 | ||
364 | #define QLAFX00_MBA_LINK_UP 0x8011 | 370 | #define QLAFX00_MBA_LINK_UP 0x8011 |
365 | #define QLAFX00_MBA_LINK_DOWN 0x8012 | 371 | #define QLAFX00_MBA_LINK_DOWN 0x8012 |
366 | #define QLAFX00_MBA_PORT_UPDATE 0x8014 | 372 | #define QLAFX00_MBA_PORT_UPDATE 0x8014 |
@@ -501,12 +507,31 @@ struct mr_data_fx00 { | |||
501 | uint32_t old_fw_hbt_cnt; | 507 | uint32_t old_fw_hbt_cnt; |
502 | uint16_t fw_reset_timer_tick; | 508 | uint16_t fw_reset_timer_tick; |
503 | uint8_t fw_reset_timer_exp; | 509 | uint8_t fw_reset_timer_exp; |
510 | uint16_t fw_critemp_timer_tick; | ||
504 | uint32_t old_aenmbx0_state; | 511 | uint32_t old_aenmbx0_state; |
512 | uint32_t critical_temperature; | ||
505 | }; | 513 | }; |
506 | 514 | ||
515 | /* | ||
516 | * SoC Junction Temperature is stored in | ||
517 | * bits 9:1 of SoC Junction Temperature Register | ||
518 | * in a firmware specific format format. | ||
519 | * To get the temperature in Celsius degrees | ||
520 | * the value from this bitfiled should be converted | ||
521 | * using this formula: | ||
522 | * Temperature (degrees C) = ((3,153,000 - (10,000 * X)) / 13,825) | ||
523 | * where X is the bit field value | ||
524 | * this macro reads the register, extracts the bitfield value, | ||
525 | * performs the calcualtions and returns temperature in Celsius | ||
526 | */ | ||
527 | #define QLAFX00_GET_TEMPERATURE(ha) ((3153000 - (10000 * \ | ||
528 | ((QLAFX00_RD_REG(ha, QLAFX00_SOC_TEMP_REG) & 0x3FE) >> 1))) / 13825) | ||
529 | |||
530 | |||
507 | #define QLAFX00_LOOP_DOWN_TIME 615 /* 600 */ | 531 | #define QLAFX00_LOOP_DOWN_TIME 615 /* 600 */ |
508 | #define QLAFX00_HEARTBEAT_INTERVAL 6 /* number of seconds */ | 532 | #define QLAFX00_HEARTBEAT_INTERVAL 6 /* number of seconds */ |
509 | #define QLAFX00_HEARTBEAT_MISS_CNT 3 /* number of miss */ | 533 | #define QLAFX00_HEARTBEAT_MISS_CNT 3 /* number of miss */ |
510 | #define QLAFX00_RESET_INTERVAL 120 /* number of seconds */ | 534 | #define QLAFX00_RESET_INTERVAL 120 /* number of seconds */ |
511 | #define QLAFX00_MAX_RESET_INTERVAL 600 /* number of seconds */ | 535 | #define QLAFX00_MAX_RESET_INTERVAL 600 /* number of seconds */ |
536 | #define QLAFX00_CRITEMP_INTERVAL 60 /* number of seconds */ | ||
512 | #endif | 537 | #endif |