diff options
author | Robert Mustacchi <rm@joyent.com> | 2019-06-14 22:07:35 +0000 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2019-08-28 21:11:13 +0000 |
commit | 093e84535f35ec94776a855ada3dac96daf5d602 (patch) | |
tree | 2bfd913ab52c13d662910b073e65ef9a43fac0ce | |
parent | e2f631f93662311389118b220daa637b16a612ac (diff) | |
download | illumos-joyent-093e84535f35ec94776a855ada3dac96daf5d602.tar.gz |
11577 blown assert in i40e_intr_io_clear_cause()
Reviewed by: Dan McDonald <danmcd@joyent.com>
Reviewed by: Ryan Zezeski <rpz@joyent.com>
Reviewed by: Randy Fishel <randyf@sibernet.com>
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r-- | usr/src/uts/common/io/i40e/i40e_intr.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/usr/src/uts/common/io/i40e/i40e_intr.c b/usr/src/uts/common/io/i40e/i40e_intr.c index 170bef7ec6..e3a0d69cc6 100644 --- a/usr/src/uts/common/io/i40e/i40e_intr.c +++ b/usr/src/uts/common/io/i40e/i40e_intr.c @@ -10,7 +10,7 @@ */ /* - * Copyright 2018 Joyent, Inc. + * Copyright 2019 Joyent, Inc. * Copyright 2017 Tegile Systems, Inc. All rights reserved. */ @@ -326,7 +326,7 @@ i40e_intr_io_disable_all(i40e_t *i40e) void i40e_intr_io_clear_cause(i40e_t *i40e) { - int i; + uint32_t i; i40e_hw_t *hw = &i40e->i40e_hw_space; if (i40e->i40e_intr_type != DDI_INTR_TYPE_MSIX) { @@ -336,16 +336,9 @@ i40e_intr_io_clear_cause(i40e_t *i40e) return; } - for (i = 0; i < i40e->i40e_num_trqpairs; i++) { + for (i = 0; i < i40e->i40e_intr_count - 1; i++) { uint32_t reg; -#ifdef DEBUG - /* - * Verify that the interrupt in question is disabled. This is a - * prerequisite of modifying the data in question. - */ - reg = I40E_READ_REG(hw, I40E_PFINT_DYN_CTLN(i)); - VERIFY0(reg & I40E_PFINT_DYN_CTLN_INTENA_MASK); -#endif + reg = I40E_QUEUE_TYPE_EOL; I40E_WRITE_REG(hw, I40E_PFINT_LNKLSTN(i), reg); } @@ -370,7 +363,7 @@ i40e_intr_chip_fini(i40e_t *i40e) * and the interrupt linked lists have been zeroed. */ if (i40e->i40e_intr_type == DDI_INTR_TYPE_MSIX) { - for (i = 0; i < i40e->i40e_num_trqpairs; i++) { + for (i = 0; i < i40e->i40e_intr_count - 1; i++) { reg = I40E_READ_REG(hw, I40E_PFINT_DYN_CTLN(i)); VERIFY0(reg & I40E_PFINT_DYN_CTLN_INTENA_MASK); @@ -472,7 +465,7 @@ i40e_intr_init_queue_msix(i40e_t *i40e) boolean_t head = B_TRUE; for (uint_t qidx = vec; qidx < i40e->i40e_num_trqpairs; - qidx += intr_count) { + qidx += intr_count) { uint_t next_qidx = qidx + intr_count; next_qidx = (next_qidx > i40e->i40e_num_trqpairs) ? @@ -764,7 +757,7 @@ i40e_intr_msix(void *arg1, void *arg2) * performed during i40e_map_intrs_to_vectors(). */ for (uint_t i = vector_idx - 1; i < i40e->i40e_num_trqpairs; - i += (i40e->i40e_intr_count - 1)) { + i += (i40e->i40e_intr_count - 1)) { i40e_trqpair_t *itrq = &i40e->i40e_trqpairs[i]; ASSERT3U(i, <, i40e->i40e_num_trqpairs); |