Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215220
b: refs/heads/master
c: dce87b9
h: refs/heads/master
v: v3
  • Loading branch information
amit salecha authored and David S. Miller committed Oct 18, 2010
1 parent 23ac473 commit 707f62a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7a9905e64272c8021a8cfaf6015dd0fb8eeeb378
refs/heads/master: dce87b960cf4794141f067d8c8180ccc6716513f
4 changes: 2 additions & 2 deletions trunk/drivers/net/netxen/netxen_nic_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1822,14 +1822,14 @@ int netxen_nic_get_board_info(struct netxen_adapter *adapter)
if (netxen_rom_fast_read(adapter, offset, &board_type))
return -EIO;

adapter->ahw.board_type = board_type;

if (board_type == NETXEN_BRDTYPE_P3_4_GB_MM) {
u32 gpio = NXRD32(adapter, NETXEN_ROMUSB_GLB_PAD_GPIO_I);
if ((gpio & 0x8000) == 0)
board_type = NETXEN_BRDTYPE_P3_10G_TP;
}

adapter->ahw.board_type = board_type;

switch (board_type) {
case NETXEN_BRDTYPE_P2_SB35_4G:
adapter->ahw.port_type = NETXEN_NIC_GBE;
Expand Down
26 changes: 26 additions & 0 deletions trunk/drivers/net/netxen/netxen_nic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,28 @@ netxen_setup_netdev(struct netxen_adapter *adapter,
return 0;
}

#ifdef CONFIG_PCIEAER
static void netxen_mask_aer_correctable(struct netxen_adapter *adapter)
{
struct pci_dev *pdev = adapter->pdev;
struct pci_dev *root = pdev->bus->self;
u32 aer_pos;

if (adapter->ahw.board_type != NETXEN_BRDTYPE_P3_4_GB_MM &&
adapter->ahw.board_type != NETXEN_BRDTYPE_P3_10G_TP)
return;

if (root->pcie_type != PCI_EXP_TYPE_ROOT_PORT)
return;

aer_pos = pci_find_ext_capability(root, PCI_EXT_CAP_ID_ERR);
if (!aer_pos)
return;

pci_write_config_dword(root, aer_pos + PCI_ERR_COR_MASK, 0xffff);
}
#endif

static int __devinit
netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
Expand Down Expand Up @@ -1317,6 +1339,10 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto err_out_iounmap;
}

#ifdef CONFIG_PCIEAER
netxen_mask_aer_correctable(adapter);
#endif

/* Mezz cards have PCI function 0,2,3 enabled */
switch (adapter->ahw.board_type) {
case NETXEN_BRDTYPE_P2_SB31_10G_IMEZ:
Expand Down

0 comments on commit 707f62a

Please sign in to comment.