Hi,
anyone get this issue since igb 5.3.x? I made own kernel module, and in my
kernel module code, I'm reading intel NIC registers with igb APIs.
I'm using E1000_READ_REG, my kernel module can't be loaded when igb upgraded to
5.3.2 because of 'Unknown symbol e1000_read_reg', but it works well in igb
5.0.3. I checked source code, this macro definition is changed. but
e1000_read_reg is implemented in igb_main.c and not exported to kernel symbol
from igb module. So other modules actually can't use this API.
Could you please give comments how to solve this? E1000_READ_REG is provided in
public header file e1000_osdep.h. I think it should work for users. This symbol
e1000_read_reg should be exported.
#define E1000_READ_REG(x, y) e1000_read_reg(x, y)
u32 e1000_read_reg(struct e1000_hw *hw, u32 reg)
{
struct igb_adapter *igb = container_of(hw, struct igb_adapter, hw);
u8 __iomem *hw_addr = ACCESS_ONCE(hw->hw_addr);
u32 value = 0;
if (E1000_REMOVED(hw_addr))
return ~value;
value = readl(&hw_addr[reg]);
/* reads should not return all F's */
if (!(~value) && (!reg || !(~readl(hw_addr)))) {
struct net_device *netdev = igb->netdev;
hw->hw_addr = NULL;
netif_device_detach(netdev);
netdev_err(netdev, "PCIe link lost, device now detached\n");
}
return value;
}
--------^_^--------
Best Regards
Yan Limin
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit
http://communities.intel.com/community/wired