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

Function ngbe_dev_phy_intr_setup

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

Source from the content-addressed store, hash-verified

930}
931
932static void
933ngbe_dev_phy_intr_setup(struct rte_eth_dev *dev)
934{
935 struct ngbe_hw *hw = ngbe_dev_hw(dev);
936 struct ngbe_interrupt *intr = ngbe_dev_intr(dev);
937
938 wr32(hw, NGBE_GPIODIR, NGBE_GPIODIR_DDR(1));
939 wr32(hw, NGBE_GPIOINTEN, NGBE_GPIOINTEN_INT(3));
940 wr32(hw, NGBE_GPIOINTTYPE, NGBE_GPIOINTTYPE_LEVEL(0));
941 if (hw->phy.type == ngbe_phy_yt8521s_sfi)
942 wr32(hw, NGBE_GPIOINTPOL, NGBE_GPIOINTPOL_ACT(0));
943 else
944 wr32(hw, NGBE_GPIOINTPOL, NGBE_GPIOINTPOL_ACT(3));
945
946 intr->mask_misc |= NGBE_ICRMISC_GPIO | NGBE_ICRMISC_HEAT;
947}
948
949/*
950 * Configure device link speed and setup link.

Callers 1

ngbe_dev_startFunction · 0.85

Calls 3

ngbe_dev_hwFunction · 0.85
ngbe_dev_intrFunction · 0.85
wr32Function · 0.50

Tested by

no test coverage detected