MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ngbe_dev_lsc_interrupt_setup

Function ngbe_dev_lsc_interrupt_setup

dpdk/drivers/net/ngbe/ngbe_ethdev.c:2059–2074  ·  view source on GitHub ↗

* It clears the interrupt causes and enables the interrupt. * It will be called once only during NIC initialized. * * @param dev * Pointer to struct rte_eth_dev. * @param on * Enable or Disable. * * @return * - On success, zero. * - On failure, a negative value. */

Source from the content-addressed store, hash-verified

2057 * - On failure, a negative value.
2058 */
2059static int
2060ngbe_dev_lsc_interrupt_setup(struct rte_eth_dev *dev, uint8_t on)
2061{
2062 struct ngbe_interrupt *intr = ngbe_dev_intr(dev);
2063
2064 ngbe_dev_link_status_print(dev);
2065 if (on != 0) {
2066 intr->mask_misc |= NGBE_ICRMISC_PHY;
2067 intr->mask_misc |= NGBE_ICRMISC_GPIO;
2068 } else {
2069 intr->mask_misc &= ~NGBE_ICRMISC_PHY;
2070 intr->mask_misc &= ~NGBE_ICRMISC_GPIO;
2071 }
2072
2073 return 0;
2074}
2075
2076/**
2077 * It clears the interrupt causes and enables the interrupt.

Callers 1

ngbe_dev_startFunction · 0.85

Calls 2

ngbe_dev_intrFunction · 0.85

Tested by

no test coverage detected