src/dpdk/drivers/net/txgbe/base/txgbe_hw.c
void txgbe_set_lan_id_multi_port(struct txgbe_hw *hw)
{
	struct txgbe_bus_info *bus = &hw->bus;
	u32 reg;

	DEBUGFUNC("txgbe_set_lan_id_multi_port_pcie");

	reg = rd32(hw, TXGBE_PORTSTAT);
	bus->lan_id = TXGBE_PORTSTAT_ID(reg);

	/* check for single port */
	reg = rd32(hw, TXGBE_PWR);
	if (TXGBE_PWR_LANID(reg) == TXGBE_PWR_LANID_SWAP)
		bus->func = 0;
	else
		bus->func = bus->lan_id;
}
/**
 *  txgbe_set_lan_id_multi_port - Set LAN id for PCIe multiple port devices
 *  @hw: pointer to the HW structure
 *
 *  Determines the LAN function id by reading memory-mapped registers and swaps
 *  the port value if requested, and set MAC instance for devices.
 **/
Set LAN id for PCIe multiple port devices
@hw: pointer to the HW structure

Determines the LAN function id by reading memory-mapped registers and swaps
the port value if requested, and set MAC instance for devices.
Set LAN id for PCIe multiple port devices @hw : pointer to the HW structure Determines the LAN function id by reading memory - mapped registers and swaps the port value if requested and set MAC instance for devices .
void txgbe_set_lan_id_multi_port(struct txgbe_hw *hw)
{
	struct txgbe_bus_info *bus = &hw->bus;
	u32 reg;
	DEBUGFUNC("txgbe_set_lan_id_multi_port_pcie");
	reg = rd32(hw, TXGBE_PORTSTAT);
	bus->lan_id = TXGBE_PORTSTAT_ID(reg);
	reg = rd32(hw, TXGBE_PWR);
	if (TXGBE_PWR_LANID(reg) == TXGBE_PWR_LANID_SWAP)
		bus->func = 0;
	else
		bus->func = bus->lan_id;
}
void txgbe_set_lan_id_multi_port ( struct txgbe_hw * hw ) { struct txgbe_bus_info * bus = & hw -> bus ; u32 reg ; DEBUGFUNC ( " " ) ; reg = rd32 ( hw , TXGBE_PORTSTAT ) ; bus -> lan_id = TXGBE_PORTSTAT_ID ( reg ) ; reg = rd32 ( hw , TXGBE_PWR ) ; if ( TXGBE_PWR_LANID ( reg ) == TXGBE_PWR_LANID_SWAP ) bus -> func = 0 ; else bus -> func = bus -> lan_id ; }
txgbe_set_lan_id_multi_port - Set LAN id for PCIe multiple port devices
  @hw: pointer to the HW structure
txgbe_set_lan_id_multi_port - Set LAN id for PCIe multiple port devices @hw : pointer to the HW structure
/* check for single port */