aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ixl/ixl_pf_main.c
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2019-01-30 13:21:26 +0000
committerMarius Strobl <marius@FreeBSD.org>2019-01-30 13:21:26 +0000
commitb97de13ae097269d8eec91ffc7145ddd3ce03660 (patch)
tree6b761f64b44dd6cc03da30af6f288a47eae104a9 /sys/dev/ixl/ixl_pf_main.c
parentf20e36c166ca9710236ed693dd5974fb59771102 (diff)
downloadsrc-b97de13ae097269d8eec91ffc7145ddd3ce03660.tar.gz
src-b97de13ae097269d8eec91ffc7145ddd3ce03660.zip
- Stop iflib(4) from leaking MSI messages on detachment by calling
bus_teardown_intr(9) before pci_release_msi(9). - Ensure that iflib(4) and associated drivers pass correct RIDs to bus_release_resource(9) by obtaining the RIDs via rman_get_rid(9) on the corresponding resources instead of using the RIDs initially passed to bus_alloc_resource_any(9) as the latter function may change those RIDs. Solely em(4) for the ioport resource (but not others) and bnxt(4) were using the correct RIDs by caching the ones returned by bus_alloc_resource_any(9). - Change the logic of iflib_msix_init() around to only map the MSI-X BAR if MSI-X is actually supported, i. e. pci_msix_count(9) returns > 0. Otherwise the "Unable to map MSIX table " message triggers for devices that simply don't support MSI-X and the user may think that something is wrong while in fact everything works as expected. - Put some (mostly redundant) debug messages emitted by iflib(4) and em(4) during attachment under bootverbose. The non-verbose output of em(4) seen during attachment now is close to the one prior to the conversion to iflib(4). - Replace various variants of spelling "MSI-X" (several in messages) with "MSI-X" as used in the PCI specifications. - Remove some trailing whitespace from messages emitted by iflib(4) and change them to consistently start with uppercase. - Remove some obsolete comments about releasing interrupts from drivers and correct a few others. Reviewed by: erj, Jacob Keller, shurd Differential Revision: https://reviews.freebsd.org/D18980
Notes
Notes: svn path=/head/; revision=343578
Diffstat (limited to 'sys/dev/ixl/ixl_pf_main.c')
-rw-r--r--sys/dev/ixl/ixl_pf_main.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/ixl/ixl_pf_main.c b/sys/dev/ixl/ixl_pf_main.c
index 6d393813e831..3a4a0dc31aff 100644
--- a/sys/dev/ixl/ixl_pf_main.c
+++ b/sys/dev/ixl/ixl_pf_main.c
@@ -278,7 +278,8 @@ retry:
}
/* Print a subset of the capability information. */
- device_printf(dev, "PF-ID[%d]: VFs %d, MSIX %d, VF MSIX %d, QPs %d, %s\n",
+ device_printf(dev,
+ "PF-ID[%d]: VFs %d, MSI-X %d, VF MSI-X %d, QPs %d, %s\n",
hw->pf_id, hw->func_caps.num_vfs, hw->func_caps.num_msix_vectors,
hw->func_caps.num_msix_vectors_vf, hw->func_caps.num_tx_qp,
(hw->func_caps.mdio_port_mode == 2) ? "I2C" :
@@ -505,7 +506,7 @@ ixl_intr(void *arg)
/*********************************************************************
*
- * MSIX VSI Interrupt Service routine
+ * MSI-X VSI Interrupt Service routine
*
**********************************************************************/
int
@@ -524,7 +525,7 @@ ixl_msix_que(void *arg)
/*********************************************************************
*
- * MSIX Admin Queue Interrupt Service routine
+ * MSI-X Admin Queue Interrupt Service routine
*
**********************************************************************/
int
@@ -791,7 +792,7 @@ ixl_configure_intr0_msix(struct ixl_pf *pf)
/*
* 0x7FF is the end of the queue list.
* This means we won't use MSI-X vector 0 for a queue interrupt
- * in MSIX mode.
+ * in MSI-X mode.
*/
wr32(hw, I40E_PFINT_LNKLST0, 0x7FF);
/* Value is in 2 usec units, so 0x3E is 62*2 = 124 usecs. */
@@ -909,12 +910,12 @@ ixl_free_pci_resources(struct ixl_pf *pf)
device_t dev = iflib_get_dev(vsi->ctx);
struct ixl_rx_queue *rx_que = vsi->rx_queues;
- /* We may get here before stations are setup */
+ /* We may get here before stations are set up */
if (rx_que == NULL)
goto early;
/*
- ** Release all msix VSI resources:
+ ** Release all MSI-X VSI resources:
*/
iflib_irq_free(vsi->ctx, &vsi->irq);
@@ -923,7 +924,7 @@ ixl_free_pci_resources(struct ixl_pf *pf)
early:
if (pf->pci_mem != NULL)
bus_release_resource(dev, SYS_RES_MEMORY,
- PCIR_BAR(0), pf->pci_mem);
+ rman_get_rid(pf->pci_mem), pf->pci_mem);
}
void