aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb3
diff options
context:
space:
mode:
authorDivy Le Ray <divy@chelsio.com>2009-08-05 23:28:27 -0400
committerDavid S. Miller <davem@davemloft.net>2009-08-05 23:28:27 -0400
commit9073e3a32bb249293edc01ecff575bb87380c068 (patch)
tree56ccb72087bcec9190e3eff39ac56d9de7106022 /drivers/net/cxgb3
parentcc104e52b4f61dbfe1a815f775ffb2fbbb4b785d (diff)
cxgb3: fix 2 ports 1G regression
commit 88045b3cf0f8981129cb489c7b6bc36c21dd33a7 cxgb3: fix mac index mapping Override the mac index computation for the gen2 adapter, as each port is expected to use index 0. introduces a regression on 2 port 1G adapter as its xauicfg vpd value is null. Add a check on the device id. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb3')
-rw-r--r--drivers/net/cxgb3/t3_hw.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c
index 526e144b8b74..032cfe065570 100644
--- a/drivers/net/cxgb3/t3_hw.c
+++ b/drivers/net/cxgb3/t3_hw.c
@@ -3692,8 +3692,12 @@ static void mc7_prep(struct adapter *adapter, struct mc7 *mc7,
3692 3692
3693void mac_prep(struct cmac *mac, struct adapter *adapter, int index) 3693void mac_prep(struct cmac *mac, struct adapter *adapter, int index)
3694{ 3694{
3695 u16 devid;
3696
3695 mac->adapter = adapter; 3697 mac->adapter = adapter;
3696 if (!adapter->params.vpd.xauicfg[1]) 3698 pci_read_config_word(adapter->pdev, 0x2, &devid);
3699
3700 if (devid == 0x37 && !adapter->params.vpd.xauicfg[1])
3697 index = 0; 3701 index = 0;
3698 mac->offset = (XGMAC0_1_BASE_ADDR - XGMAC0_0_BASE_ADDR) * index; 3702 mac->offset = (XGMAC0_1_BASE_ADDR - XGMAC0_0_BASE_ADDR) * index;
3699 mac->nucast = 1; 3703 mac->nucast = 1;