From 5e8427e5e25e3f844113cf67d07e7806bbe8c0e2 Mon Sep 17 00:00:00 2001 From: Alexander Duyck Date: Wed, 10 Dec 2008 01:09:53 -0800 Subject: igb: Correctly determine pci-e function number in virtual environment When running in a virtual environment the ports of an 82575/6 can appear to be single function devices which is not correct. To resolve this we rely on the function number stored in the status register. Signed-off-by: Alexander Duyck Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller --- drivers/net/igb/e1000_regs.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/net/igb/e1000_regs.h') diff --git a/drivers/net/igb/e1000_regs.h b/drivers/net/igb/e1000_regs.h index 95523af26056..bdf5d839c4bf 100644 --- a/drivers/net/igb/e1000_regs.h +++ b/drivers/net/igb/e1000_regs.h @@ -221,6 +221,10 @@ #define E1000_MTA 0x05200 /* Multicast Table Array - RW Array */ #define E1000_RA 0x05400 /* Receive Address - RW Array */ #define E1000_RA2 0x054E0 /* 2nd half of receive address array - RW Array */ +#define E1000_RAL(_i) (((_i) <= 15) ? (0x05400 + ((_i) * 8)) : \ + (0x054E0 + ((_i - 16) * 8))) +#define E1000_RAH(_i) (((_i) <= 15) ? (0x05404 + ((_i) * 8)) : \ + (0x054E4 + ((_i - 16) * 8))) #define E1000_VFTA 0x05600 /* VLAN Filter Table Array - RW Array */ #define E1000_VMD_CTL 0x0581C /* VMDq Control - RW */ #define E1000_WUC 0x05800 /* Wakeup Control - RW */ -- cgit v1.2.3