cxgb3: fix mac index mapping
authorDivy Le Ray <divy@chelsio.com>
Tue, 7 Jul 2009 19:49:04 +0000 (19:49 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Jul 2009 17:54:26 +0000 (10:54 -0700)
Override the mac index computation for the gen2 adapter,
as each port is expected to use index 0.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/cxgb3/t3_hw.c

index 870d44992c70819308a85580f0607e30daabea71..e78d341cbd6001998f8a8a9036b31811dbfab252 100644 (file)
@@ -3682,6 +3682,8 @@ static void mc7_prep(struct adapter *adapter, struct mc7 *mc7,
 void mac_prep(struct cmac *mac, struct adapter *adapter, int index)
 {
        mac->adapter = adapter;
+       if (!adapter->params.vpd.xauicfg[1])
+               index = 0;
        mac->offset = (XGMAC0_1_BASE_ADDR - XGMAC0_0_BASE_ADDR) * index;
        mac->nucast = 1;