diff options
author | Jack Morgenstein <jackm@dev.mellanox.co.il> | 2012-03-06 08:50:49 -0500 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-03-12 19:24:59 -0400 |
commit | 5984be90046fa978d94a5ec08bbf8f760cff2b30 (patch) | |
tree | 428b0735fd2fdd696e7d1601b554179d225fe67c /drivers/net/ethernet/mellanox/mlx4 | |
parent | e10903b087e425298fb86c6ad4b1a88735480db7 (diff) |
mlx4_core: Report thermal error events
Print an error message when a thermal error async event is reported by the HW.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Dotan Barak <dotanb@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/eq.c | 32 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/mlx4.h | 4 |
2 files changed, 35 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c b/drivers/net/ethernet/mellanox/mlx4/eq.c index 8fa41f3082cf..780b5adf8e7d 100644 --- a/drivers/net/ethernet/mellanox/mlx4/eq.c +++ b/drivers/net/ethernet/mellanox/mlx4/eq.c | |||
@@ -79,7 +79,8 @@ enum { | |||
79 | (1ull << MLX4_EVENT_TYPE_SRQ_LIMIT) | \ | 79 | (1ull << MLX4_EVENT_TYPE_SRQ_LIMIT) | \ |
80 | (1ull << MLX4_EVENT_TYPE_CMD) | \ | 80 | (1ull << MLX4_EVENT_TYPE_CMD) | \ |
81 | (1ull << MLX4_EVENT_TYPE_COMM_CHANNEL) | \ | 81 | (1ull << MLX4_EVENT_TYPE_COMM_CHANNEL) | \ |
82 | (1ull << MLX4_EVENT_TYPE_FLR_EVENT)) | 82 | (1ull << MLX4_EVENT_TYPE_FLR_EVENT) | \ |
83 | (1ull << MLX4_EVENT_TYPE_FATAL_WARNING)) | ||
83 | 84 | ||
84 | static void eq_set_ci(struct mlx4_eq *eq, int req_not) | 85 | static void eq_set_ci(struct mlx4_eq *eq, int req_not) |
85 | { | 86 | { |
@@ -443,6 +444,35 @@ static int mlx4_eq_int(struct mlx4_dev *dev, struct mlx4_eq *eq) | |||
443 | queue_work(priv->mfunc.master.comm_wq, | 444 | queue_work(priv->mfunc.master.comm_wq, |
444 | &priv->mfunc.master.slave_flr_event_work); | 445 | &priv->mfunc.master.slave_flr_event_work); |
445 | break; | 446 | break; |
447 | |||
448 | case MLX4_EVENT_TYPE_FATAL_WARNING: | ||
449 | if (eqe->subtype == MLX4_FATAL_WARNING_SUBTYPE_WARMING) { | ||
450 | if (mlx4_is_master(dev)) | ||
451 | for (i = 0; i < dev->num_slaves; i++) { | ||
452 | mlx4_dbg(dev, "%s: Sending " | ||
453 | "MLX4_FATAL_WARNING_SUBTYPE_WARMING" | ||
454 | " to slave: %d\n", __func__, i); | ||
455 | if (i == dev->caps.function) | ||
456 | continue; | ||
457 | mlx4_slave_event(dev, i, eqe); | ||
458 | } | ||
459 | mlx4_err(dev, "Temperature Threshold was reached! " | ||
460 | "Threshold: %d celsius degrees; " | ||
461 | "Current Temperature: %d\n", | ||
462 | be16_to_cpu(eqe->event.warming.warning_threshold), | ||
463 | be16_to_cpu(eqe->event.warming.current_temperature)); | ||
464 | } else | ||
465 | mlx4_warn(dev, "Unhandled event FATAL WARNING (%02x), " | ||
466 | "subtype %02x on EQ %d at index %u. owner=%x, " | ||
467 | "nent=0x%x, slave=%x, ownership=%s\n", | ||
468 | eqe->type, eqe->subtype, eq->eqn, | ||
469 | eq->cons_index, eqe->owner, eq->nent, | ||
470 | eqe->slave_id, | ||
471 | !!(eqe->owner & 0x80) ^ | ||
472 | !!(eq->cons_index & eq->nent) ? "HW" : "SW"); | ||
473 | |||
474 | break; | ||
475 | |||
446 | case MLX4_EVENT_TYPE_EEC_CATAS_ERROR: | 476 | case MLX4_EVENT_TYPE_EEC_CATAS_ERROR: |
447 | case MLX4_EVENT_TYPE_ECC_DETECT: | 477 | case MLX4_EVENT_TYPE_ECC_DETECT: |
448 | default: | 478 | default: |
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4.h b/drivers/net/ethernet/mellanox/mlx4/mlx4.h index c92269f8c057..ac2d6061268d 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mlx4.h +++ b/drivers/net/ethernet/mellanox/mlx4/mlx4.h | |||
@@ -363,6 +363,10 @@ struct mlx4_eqe { | |||
363 | struct { | 363 | struct { |
364 | __be32 slave_id; | 364 | __be32 slave_id; |
365 | } __packed flr_event; | 365 | } __packed flr_event; |
366 | struct { | ||
367 | __be16 current_temperature; | ||
368 | __be16 warning_threshold; | ||
369 | } __packed warming; | ||
366 | } event; | 370 | } event; |
367 | u8 slave_id; | 371 | u8 slave_id; |
368 | u8 reserved3[2]; | 372 | u8 reserved3[2]; |