diff options
author | Yuval Mintz <yuvalmin@broadcom.com> | 2012-07-23 03:25:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-23 03:58:21 -0400 |
commit | c3def943c7117d42caaed3478731ea7c3c87190e (patch) | |
tree | e3996b38c1b3627dbaab78542f65b27f11d9feeb /drivers/net | |
parent | 9a0a9502cbf19d31f7387e3066f3d1a491bef616 (diff) |
bnx2x: Add new 57840 device IDs
The 57840 boards come in two flavours: 2 x 20G and 4 x 10G.
To better differentiate between the two flavours, a separate device ID
was assigned to each.
The silicon default value is still the currently supported 57840 device ID
(0x168d), and since a user can damage the nvram (e.g., 'ethtool -E')
the driver will still support this device ID to allow the user to amend the
nvram back into a supported configuration.
Notice this patch contains lines longer than 80 characters (strings).
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 15 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 31 |
3 files changed, 38 insertions, 10 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h index dbe97918a7fd..77bcd4cb4ffb 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | |||
@@ -819,8 +819,11 @@ struct bnx2x_common { | |||
819 | #define CHIP_NUM_57810_MF 0x16ae | 819 | #define CHIP_NUM_57810_MF 0x16ae |
820 | #define CHIP_NUM_57811 0x163d | 820 | #define CHIP_NUM_57811 0x163d |
821 | #define CHIP_NUM_57811_MF 0x163e | 821 | #define CHIP_NUM_57811_MF 0x163e |
822 | #define CHIP_NUM_57840 0x168d | 822 | #define CHIP_NUM_57840_OBSOLETE 0x168d |
823 | #define CHIP_NUM_57840_MF 0x16ab | 823 | #define CHIP_NUM_57840_MF_OBSOLETE 0x16ab |
824 | #define CHIP_NUM_57840_4_10 0x16a1 | ||
825 | #define CHIP_NUM_57840_2_20 0x16a2 | ||
826 | #define CHIP_NUM_57840_MF 0x16a4 | ||
824 | #define CHIP_IS_E1(bp) (CHIP_NUM(bp) == CHIP_NUM_57710) | 827 | #define CHIP_IS_E1(bp) (CHIP_NUM(bp) == CHIP_NUM_57710) |
825 | #define CHIP_IS_57711(bp) (CHIP_NUM(bp) == CHIP_NUM_57711) | 828 | #define CHIP_IS_57711(bp) (CHIP_NUM(bp) == CHIP_NUM_57711) |
826 | #define CHIP_IS_57711E(bp) (CHIP_NUM(bp) == CHIP_NUM_57711E) | 829 | #define CHIP_IS_57711E(bp) (CHIP_NUM(bp) == CHIP_NUM_57711E) |
@@ -832,8 +835,12 @@ struct bnx2x_common { | |||
832 | #define CHIP_IS_57810_MF(bp) (CHIP_NUM(bp) == CHIP_NUM_57810_MF) | 835 | #define CHIP_IS_57810_MF(bp) (CHIP_NUM(bp) == CHIP_NUM_57810_MF) |
833 | #define CHIP_IS_57811(bp) (CHIP_NUM(bp) == CHIP_NUM_57811) | 836 | #define CHIP_IS_57811(bp) (CHIP_NUM(bp) == CHIP_NUM_57811) |
834 | #define CHIP_IS_57811_MF(bp) (CHIP_NUM(bp) == CHIP_NUM_57811_MF) | 837 | #define CHIP_IS_57811_MF(bp) (CHIP_NUM(bp) == CHIP_NUM_57811_MF) |
835 | #define CHIP_IS_57840(bp) (CHIP_NUM(bp) == CHIP_NUM_57840) | 838 | #define CHIP_IS_57840(bp) \ |
836 | #define CHIP_IS_57840_MF(bp) (CHIP_NUM(bp) == CHIP_NUM_57840_MF) | 839 | ((CHIP_NUM(bp) == CHIP_NUM_57840_4_10) || \ |
840 | (CHIP_NUM(bp) == CHIP_NUM_57840_2_20) || \ | ||
841 | (CHIP_NUM(bp) == CHIP_NUM_57840_OBSOLETE)) | ||
842 | #define CHIP_IS_57840_MF(bp) ((CHIP_NUM(bp) == CHIP_NUM_57840_MF) || \ | ||
843 | (CHIP_NUM(bp) == CHIP_NUM_57840_MF_OBSOLETE)) | ||
837 | #define CHIP_IS_E1H(bp) (CHIP_IS_57711(bp) || \ | 844 | #define CHIP_IS_E1H(bp) (CHIP_IS_57711(bp) || \ |
838 | CHIP_IS_57711E(bp)) | 845 | CHIP_IS_57711E(bp)) |
839 | #define CHIP_IS_E2(bp) (CHIP_IS_57712(bp) || \ | 846 | #define CHIP_IS_E2(bp) (CHIP_IS_57712(bp) || \ |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c index e04b282c039d..f4beb46c4709 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | |||
@@ -1718,7 +1718,7 @@ static void bnx2x_xmac_init(struct link_params *params, u32 max_speed) | |||
1718 | * ports of the path | 1718 | * ports of the path |
1719 | */ | 1719 | */ |
1720 | 1720 | ||
1721 | if ((CHIP_NUM(bp) == CHIP_NUM_57840) && | 1721 | if ((CHIP_NUM(bp) == CHIP_NUM_57840_4_10) && |
1722 | (REG_RD(bp, MISC_REG_RESET_REG_2) & | 1722 | (REG_RD(bp, MISC_REG_RESET_REG_2) & |
1723 | MISC_REGISTERS_RESET_REG_2_XMAC)) { | 1723 | MISC_REGISTERS_RESET_REG_2_XMAC)) { |
1724 | DP(NETIF_MSG_LINK, | 1724 | DP(NETIF_MSG_LINK, |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 08eca3ff7db6..9aaf863b4237 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |||
@@ -137,7 +137,10 @@ enum bnx2x_board_type { | |||
137 | BCM57800_MF, | 137 | BCM57800_MF, |
138 | BCM57810, | 138 | BCM57810, |
139 | BCM57810_MF, | 139 | BCM57810_MF, |
140 | BCM57840, | 140 | BCM57840_O, |
141 | BCM57840_4_10, | ||
142 | BCM57840_2_20, | ||
143 | BCM57840_MFO, | ||
141 | BCM57840_MF, | 144 | BCM57840_MF, |
142 | BCM57811, | 145 | BCM57811, |
143 | BCM57811_MF | 146 | BCM57811_MF |
@@ -157,6 +160,9 @@ static struct { | |||
157 | { "Broadcom NetXtreme II BCM57810 10 Gigabit Ethernet" }, | 160 | { "Broadcom NetXtreme II BCM57810 10 Gigabit Ethernet" }, |
158 | { "Broadcom NetXtreme II BCM57810 10 Gigabit Ethernet Multi Function" }, | 161 | { "Broadcom NetXtreme II BCM57810 10 Gigabit Ethernet Multi Function" }, |
159 | { "Broadcom NetXtreme II BCM57840 10/20 Gigabit Ethernet" }, | 162 | { "Broadcom NetXtreme II BCM57840 10/20 Gigabit Ethernet" }, |
163 | { "Broadcom NetXtreme II BCM57840 10 Gigabit Ethernet" }, | ||
164 | { "Broadcom NetXtreme II BCM57840 20 Gigabit Ethernet" }, | ||
165 | { "Broadcom NetXtreme II BCM57840 10/20 Gigabit Ethernet Multi Function"}, | ||
160 | { "Broadcom NetXtreme II BCM57840 10/20 Gigabit Ethernet Multi Function"}, | 166 | { "Broadcom NetXtreme II BCM57840 10/20 Gigabit Ethernet Multi Function"}, |
161 | { "Broadcom NetXtreme II BCM57811 10 Gigabit Ethernet"}, | 167 | { "Broadcom NetXtreme II BCM57811 10 Gigabit Ethernet"}, |
162 | { "Broadcom NetXtreme II BCM57811 10 Gigabit Ethernet Multi Function"}, | 168 | { "Broadcom NetXtreme II BCM57811 10 Gigabit Ethernet Multi Function"}, |
@@ -189,8 +195,17 @@ static struct { | |||
189 | #ifndef PCI_DEVICE_ID_NX2_57810_MF | 195 | #ifndef PCI_DEVICE_ID_NX2_57810_MF |
190 | #define PCI_DEVICE_ID_NX2_57810_MF CHIP_NUM_57810_MF | 196 | #define PCI_DEVICE_ID_NX2_57810_MF CHIP_NUM_57810_MF |
191 | #endif | 197 | #endif |
192 | #ifndef PCI_DEVICE_ID_NX2_57840 | 198 | #ifndef PCI_DEVICE_ID_NX2_57840_O |
193 | #define PCI_DEVICE_ID_NX2_57840 CHIP_NUM_57840 | 199 | #define PCI_DEVICE_ID_NX2_57840_O CHIP_NUM_57840_OBSOLETE |
200 | #endif | ||
201 | #ifndef PCI_DEVICE_ID_NX2_57840_4_10 | ||
202 | #define PCI_DEVICE_ID_NX2_57840_4_10 CHIP_NUM_57840_4_10 | ||
203 | #endif | ||
204 | #ifndef PCI_DEVICE_ID_NX2_57840_2_20 | ||
205 | #define PCI_DEVICE_ID_NX2_57840_2_20 CHIP_NUM_57840_2_20 | ||
206 | #endif | ||
207 | #ifndef PCI_DEVICE_ID_NX2_57840_MFO | ||
208 | #define PCI_DEVICE_ID_NX2_57840_MFO CHIP_NUM_57840_MF_OBSOLETE | ||
194 | #endif | 209 | #endif |
195 | #ifndef PCI_DEVICE_ID_NX2_57840_MF | 210 | #ifndef PCI_DEVICE_ID_NX2_57840_MF |
196 | #define PCI_DEVICE_ID_NX2_57840_MF CHIP_NUM_57840_MF | 211 | #define PCI_DEVICE_ID_NX2_57840_MF CHIP_NUM_57840_MF |
@@ -211,7 +226,10 @@ static DEFINE_PCI_DEVICE_TABLE(bnx2x_pci_tbl) = { | |||
211 | { PCI_VDEVICE(BROADCOM, PCI_DEVICE_ID_NX2_57800_MF), BCM57800_MF }, | 226 | { PCI_VDEVICE(BROADCOM, PCI_DEVICE_ID_NX2_57800_MF), BCM57800_MF }, |
212 | { PCI_VDEVICE(BROADCOM, PCI_DEVICE_ID_NX2_57810), BCM57810 }, | 227 | { PCI_VDEVICE(BROADCOM, PCI_DEVICE_ID_NX2_57810), BCM57810 }, |
213 | { PCI_VDEVICE(BROADCOM, PCI_DEVICE_ID_NX2_57810_MF), BCM57810_MF }, | 228 | { PCI_VDEVICE(BROADCOM, PCI_DEVICE_ID_NX2_57810_MF), BCM57810_MF }, |
214 | { PCI_VDEVICE(BROADCOM, PCI_DEVICE_ID_NX2_57840), BCM57840 }, | 229 | { PCI_VDEVICE(BROADCOM, PCI_DEVICE_ID_NX2_57840_O), BCM57840_O }, |
230 | { PCI_VDEVICE(BROADCOM, PCI_DEVICE_ID_NX2_57840_4_10), BCM57840_4_10 }, | ||
231 | { PCI_VDEVICE(BROADCOM, PCI_DEVICE_ID_NX2_57840_2_20), BCM57840_2_20 }, | ||
232 | { PCI_VDEVICE(BROADCOM, PCI_DEVICE_ID_NX2_57840_MFO), BCM57840_MFO }, | ||
215 | { PCI_VDEVICE(BROADCOM, PCI_DEVICE_ID_NX2_57840_MF), BCM57840_MF }, | 233 | { PCI_VDEVICE(BROADCOM, PCI_DEVICE_ID_NX2_57840_MF), BCM57840_MF }, |
216 | { PCI_VDEVICE(BROADCOM, PCI_DEVICE_ID_NX2_57811), BCM57811 }, | 234 | { PCI_VDEVICE(BROADCOM, PCI_DEVICE_ID_NX2_57811), BCM57811 }, |
217 | { PCI_VDEVICE(BROADCOM, PCI_DEVICE_ID_NX2_57811_MF), BCM57811_MF }, | 235 | { PCI_VDEVICE(BROADCOM, PCI_DEVICE_ID_NX2_57811_MF), BCM57811_MF }, |
@@ -11801,7 +11819,10 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev, | |||
11801 | case BCM57800_MF: | 11819 | case BCM57800_MF: |
11802 | case BCM57810: | 11820 | case BCM57810: |
11803 | case BCM57810_MF: | 11821 | case BCM57810_MF: |
11804 | case BCM57840: | 11822 | case BCM57840_O: |
11823 | case BCM57840_4_10: | ||
11824 | case BCM57840_2_20: | ||
11825 | case BCM57840_MFO: | ||
11805 | case BCM57840_MF: | 11826 | case BCM57840_MF: |
11806 | case BCM57811: | 11827 | case BCM57811: |
11807 | case BCM57811_MF: | 11828 | case BCM57811_MF: |