* 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. */
| 2057 | * - On failure, a negative value. |
| 2058 | */ |
| 2059 | static int |
| 2060 | ngbe_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. |
no test coverage detected