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

Function txgbe_dev_phy_intr_setup

dpdk/drivers/net/txgbe/txgbe_ethdev.c:1571–1593  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1569}
1570
1571static void
1572txgbe_dev_phy_intr_setup(struct rte_eth_dev *dev)
1573{
1574 struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
1575 struct txgbe_interrupt *intr = TXGBE_DEV_INTR(dev);
1576 u8 device_type = hw->subsystem_device_id & 0xF0;
1577 uint32_t gpie;
1578
1579 if (device_type != TXGBE_DEV_ID_MAC_XAUI &&
1580 device_type != TXGBE_DEV_ID_MAC_SGMII) {
1581 gpie = rd32(hw, TXGBE_GPIOINTEN);
1582 gpie |= TXGBE_GPIOBIT_2 | TXGBE_GPIOBIT_3 | TXGBE_GPIOBIT_6;
1583 wr32(hw, TXGBE_GPIOINTEN, gpie);
1584
1585 gpie = rd32(hw, TXGBE_GPIOINTTYPE);
1586 gpie |= TXGBE_GPIOBIT_2 | TXGBE_GPIOBIT_3 | TXGBE_GPIOBIT_6;
1587 wr32(hw, TXGBE_GPIOINTTYPE, gpie);
1588 }
1589
1590 intr->mask_misc |= TXGBE_ICRMISC_GPIO;
1591 intr->mask_misc |= TXGBE_ICRMISC_ANDONE;
1592 intr->mask_misc |= TXGBE_ICRMISC_HEAT;
1593}
1594
1595int
1596txgbe_set_vf_rate_limit(struct rte_eth_dev *dev, uint16_t vf,

Callers 1

txgbe_dev_startFunction · 0.85

Calls 2

rd32Function · 0.50
wr32Function · 0.50

Tested by

no test coverage detected