diff options
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c index 5f90ec5f7519..0899c0983594 100644 --- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | |||
@@ -1064,7 +1064,7 @@ static inline unsigned int mk_adap_vers(const struct adapter *adapter) | |||
1064 | /* | 1064 | /* |
1065 | * Chip version 4, revision 0x3f (cxgb4vf). | 1065 | * Chip version 4, revision 0x3f (cxgb4vf). |
1066 | */ | 1066 | */ |
1067 | return CHELSIO_CHIP_VERSION(adapter->chip) | (0x3f << 10); | 1067 | return CHELSIO_CHIP_VERSION(adapter->params.chip) | (0x3f << 10); |
1068 | } | 1068 | } |
1069 | 1069 | ||
1070 | /* | 1070 | /* |
@@ -1551,9 +1551,13 @@ static void cxgb4vf_get_regs(struct net_device *dev, | |||
1551 | reg_block_dump(adapter, regbuf, | 1551 | reg_block_dump(adapter, regbuf, |
1552 | T4VF_MPS_BASE_ADDR + T4VF_MOD_MAP_MPS_FIRST, | 1552 | T4VF_MPS_BASE_ADDR + T4VF_MOD_MAP_MPS_FIRST, |
1553 | T4VF_MPS_BASE_ADDR + T4VF_MOD_MAP_MPS_LAST); | 1553 | T4VF_MPS_BASE_ADDR + T4VF_MOD_MAP_MPS_LAST); |
1554 | |||
1555 | /* T5 adds new registers in the PL Register map. | ||
1556 | */ | ||
1554 | reg_block_dump(adapter, regbuf, | 1557 | reg_block_dump(adapter, regbuf, |
1555 | T4VF_PL_BASE_ADDR + T4VF_MOD_MAP_PL_FIRST, | 1558 | T4VF_PL_BASE_ADDR + T4VF_MOD_MAP_PL_FIRST, |
1556 | T4VF_PL_BASE_ADDR + T4VF_MOD_MAP_PL_LAST); | 1559 | T4VF_PL_BASE_ADDR + (is_t4(adapter->params.chip) |
1560 | ? A_PL_VF_WHOAMI : A_PL_VF_REVISION)); | ||
1557 | reg_block_dump(adapter, regbuf, | 1561 | reg_block_dump(adapter, regbuf, |
1558 | T4VF_CIM_BASE_ADDR + T4VF_MOD_MAP_CIM_FIRST, | 1562 | T4VF_CIM_BASE_ADDR + T4VF_MOD_MAP_CIM_FIRST, |
1559 | T4VF_CIM_BASE_ADDR + T4VF_MOD_MAP_CIM_LAST); | 1563 | T4VF_CIM_BASE_ADDR + T4VF_MOD_MAP_CIM_LAST); |
@@ -2087,6 +2091,7 @@ static int adap_init0(struct adapter *adapter) | |||
2087 | unsigned int ethqsets; | 2091 | unsigned int ethqsets; |
2088 | int err; | 2092 | int err; |
2089 | u32 param, val = 0; | 2093 | u32 param, val = 0; |
2094 | unsigned int chipid; | ||
2090 | 2095 | ||
2091 | /* | 2096 | /* |
2092 | * Wait for the device to become ready before proceeding ... | 2097 | * Wait for the device to become ready before proceeding ... |
@@ -2114,12 +2119,14 @@ static int adap_init0(struct adapter *adapter) | |||
2114 | return err; | 2119 | return err; |
2115 | } | 2120 | } |
2116 | 2121 | ||
2122 | adapter->params.chip = 0; | ||
2117 | switch (adapter->pdev->device >> 12) { | 2123 | switch (adapter->pdev->device >> 12) { |
2118 | case CHELSIO_T4: | 2124 | case CHELSIO_T4: |
2119 | adapter->chip = CHELSIO_CHIP_CODE(CHELSIO_T4, 0); | 2125 | adapter->params.chip = CHELSIO_CHIP_CODE(CHELSIO_T4, 0); |
2120 | break; | 2126 | break; |
2121 | case CHELSIO_T5: | 2127 | case CHELSIO_T5: |
2122 | adapter->chip = CHELSIO_CHIP_CODE(CHELSIO_T5, 0); | 2128 | chipid = G_REV(t4_read_reg(adapter, A_PL_VF_REV)); |
2129 | adapter->params.chip |= CHELSIO_CHIP_CODE(CHELSIO_T5, chipid); | ||
2123 | break; | 2130 | break; |
2124 | } | 2131 | } |
2125 | 2132 | ||