diff options
author | amit salecha <amit.salecha@qlogic.com> | 2010-10-17 22:03:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-18 10:22:52 -0400 |
commit | dce87b960cf4794141f067d8c8180ccc6716513f (patch) | |
tree | 34f5cb7127ddcc30be1430b25a7d95a912858e80 /drivers/net/netxen | |
parent | 7a9905e64272c8021a8cfaf6015dd0fb8eeeb378 (diff) |
netxen: mask correctable error
HW workaround:
Disable logging of correctable error for some NX3031 based adapter.
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netxen')
-rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 4 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 26 |
2 files changed, 28 insertions, 2 deletions
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index 10e2f13d8903..4b4ac7106786 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -1822,14 +1822,14 @@ int netxen_nic_get_board_info(struct netxen_adapter *adapter) | |||
1822 | if (netxen_rom_fast_read(adapter, offset, &board_type)) | 1822 | if (netxen_rom_fast_read(adapter, offset, &board_type)) |
1823 | return -EIO; | 1823 | return -EIO; |
1824 | 1824 | ||
1825 | adapter->ahw.board_type = board_type; | ||
1826 | |||
1827 | if (board_type == NETXEN_BRDTYPE_P3_4_GB_MM) { | 1825 | if (board_type == NETXEN_BRDTYPE_P3_4_GB_MM) { |
1828 | u32 gpio = NXRD32(adapter, NETXEN_ROMUSB_GLB_PAD_GPIO_I); | 1826 | u32 gpio = NXRD32(adapter, NETXEN_ROMUSB_GLB_PAD_GPIO_I); |
1829 | if ((gpio & 0x8000) == 0) | 1827 | if ((gpio & 0x8000) == 0) |
1830 | board_type = NETXEN_BRDTYPE_P3_10G_TP; | 1828 | board_type = NETXEN_BRDTYPE_P3_10G_TP; |
1831 | } | 1829 | } |
1832 | 1830 | ||
1831 | adapter->ahw.board_type = board_type; | ||
1832 | |||
1833 | switch (board_type) { | 1833 | switch (board_type) { |
1834 | case NETXEN_BRDTYPE_P2_SB35_4G: | 1834 | case NETXEN_BRDTYPE_P2_SB35_4G: |
1835 | adapter->ahw.port_type = NETXEN_NIC_GBE; | 1835 | adapter->ahw.port_type = NETXEN_NIC_GBE; |
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 83ee5544aced..6f111691aca4 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -1249,6 +1249,28 @@ netxen_setup_netdev(struct netxen_adapter *adapter, | |||
1249 | return 0; | 1249 | return 0; |
1250 | } | 1250 | } |
1251 | 1251 | ||
1252 | #ifdef CONFIG_PCIEAER | ||
1253 | static void netxen_mask_aer_correctable(struct netxen_adapter *adapter) | ||
1254 | { | ||
1255 | struct pci_dev *pdev = adapter->pdev; | ||
1256 | struct pci_dev *root = pdev->bus->self; | ||
1257 | u32 aer_pos; | ||
1258 | |||
1259 | if (adapter->ahw.board_type != NETXEN_BRDTYPE_P3_4_GB_MM && | ||
1260 | adapter->ahw.board_type != NETXEN_BRDTYPE_P3_10G_TP) | ||
1261 | return; | ||
1262 | |||
1263 | if (root->pcie_type != PCI_EXP_TYPE_ROOT_PORT) | ||
1264 | return; | ||
1265 | |||
1266 | aer_pos = pci_find_ext_capability(root, PCI_EXT_CAP_ID_ERR); | ||
1267 | if (!aer_pos) | ||
1268 | return; | ||
1269 | |||
1270 | pci_write_config_dword(root, aer_pos + PCI_ERR_COR_MASK, 0xffff); | ||
1271 | } | ||
1272 | #endif | ||
1273 | |||
1252 | static int __devinit | 1274 | static int __devinit |
1253 | netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 1275 | netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
1254 | { | 1276 | { |
@@ -1317,6 +1339,10 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1317 | goto err_out_iounmap; | 1339 | goto err_out_iounmap; |
1318 | } | 1340 | } |
1319 | 1341 | ||
1342 | #ifdef CONFIG_PCIEAER | ||
1343 | netxen_mask_aer_correctable(adapter); | ||
1344 | #endif | ||
1345 | |||
1320 | /* Mezz cards have PCI function 0,2,3 enabled */ | 1346 | /* Mezz cards have PCI function 0,2,3 enabled */ |
1321 | switch (adapter->ahw.board_type) { | 1347 | switch (adapter->ahw.board_type) { |
1322 | case NETXEN_BRDTYPE_P2_SB31_10G_IMEZ: | 1348 | case NETXEN_BRDTYPE_P2_SB31_10G_IMEZ: |