/* Determines the LAN function id by reading memory-mapped registers and swaps the port value if requested.  */
void ixgbe_set_lan_id_multi_port_pcie(struct ixgbe_hw *hw)
/* Determines the LAN function id by reading memory-mapped registers and swaps the port value if requested.  */
void ixgbe_set_lan_id_multi_port_pcie(struct ixgbe_hw *hw)
{
	struct ixgbe_bus_info *bus = &hw->bus;
	u32 reg;
	reg = IXGBE_READ_REG(hw, IXGBE_STATUS);
	bus->func = (reg & IXGBE_STATUS_LAN_ID) >> IXGBE_STATUS_LAN_ID_SHIFT;
	bus->lan_id = bus->func;
	reg = IXGBE_READ_REG(hw, IXGBE_FACTPS);
	if (reg & IXGBE_FACTPS_LFS)
		bus->func ^= 0x1;
}