Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131324
b: refs/heads/master
c: acdb602
h: refs/heads/master
v: v3
  • Loading branch information
Dhananjay Phadke authored and David S. Miller committed Feb 13, 2009
1 parent ccc7c9f commit f07cbef
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 65 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: cff71e89a8bd1175962b603f88f333883726b851
refs/heads/master: acdb602fb3b7e13f3ffd2098549fab1bbfccba2f
64 changes: 0 additions & 64 deletions trunk/drivers/net/netxen/netxen_nic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,67 +372,6 @@ static void netxen_set_port_mode(struct netxen_adapter *adapter)
}
}

#define PCI_CAP_ID_GEN 0x10

static void netxen_pcie_strap_init(struct netxen_adapter *adapter)
{
u32 pdevfuncsave;
u32 c8c9value = 0;
u32 chicken = 0;
u32 control = 0;
int i, pos;
struct pci_dev *pdev;

pdev = adapter->pdev;

adapter->hw_read_wx(adapter,
NETXEN_PCIE_REG(PCIE_CHICKEN3), &chicken, 4);
/* clear chicken3.25:24 */
chicken &= 0xFCFFFFFF;
/*
* if gen1 and B0, set F1020 - if gen 2, do nothing
* if gen2 set to F1000
*/
pos = pci_find_capability(pdev, PCI_CAP_ID_GEN);
if (pos == 0xC0) {
pci_read_config_dword(pdev, pos + 0x10, &control);
if ((control & 0x000F0000) != 0x00020000) {
/* set chicken3.24 if gen1 */
chicken |= 0x01000000;
}
printk(KERN_INFO "%s Gen2 strapping detected\n",
netxen_nic_driver_name);
c8c9value = 0xF1000;
} else {
/* set chicken3.24 if gen1 */
chicken |= 0x01000000;
printk(KERN_INFO "%s Gen1 strapping detected\n",
netxen_nic_driver_name);
if (adapter->ahw.revision_id == NX_P3_B0)
c8c9value = 0xF1020;
else
c8c9value = 0;

}
adapter->hw_write_wx(adapter,
NETXEN_PCIE_REG(PCIE_CHICKEN3), &chicken, 4);

if (!c8c9value)
return;

pdevfuncsave = pdev->devfn;
if (pdevfuncsave & 0x07)
return;

for (i = 0; i < 8; i++) {
pci_read_config_dword(pdev, pos + 8, &control);
pci_read_config_dword(pdev, pos + 8, &control);
pci_write_config_dword(pdev, pos + 8, c8c9value);
pdev->devfn++;
}
pdev->devfn = pdevfuncsave;
}

static void netxen_set_msix_bit(struct pci_dev *pdev, int enable)
{
u32 control;
Expand Down Expand Up @@ -812,9 +751,6 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
}
netxen_load_firmware(adapter);

if (NX_IS_REVISION_P3(revision_id))
netxen_pcie_strap_init(adapter);

if (NX_IS_REVISION_P2(revision_id)) {

/* Initialize multicast addr pool owners */
Expand Down

0 comments on commit f07cbef

Please sign in to comment.