diff options
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 3b17a7936147..e02fe5ad2154 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -372,67 +372,6 @@ static void netxen_set_port_mode(struct netxen_adapter *adapter) | |||
372 | } | 372 | } |
373 | } | 373 | } |
374 | 374 | ||
375 | #define PCI_CAP_ID_GEN 0x10 | ||
376 | |||
377 | static void netxen_pcie_strap_init(struct netxen_adapter *adapter) | ||
378 | { | ||
379 | u32 pdevfuncsave; | ||
380 | u32 c8c9value = 0; | ||
381 | u32 chicken = 0; | ||
382 | u32 control = 0; | ||
383 | int i, pos; | ||
384 | struct pci_dev *pdev; | ||
385 | |||
386 | pdev = adapter->pdev; | ||
387 | |||
388 | adapter->hw_read_wx(adapter, | ||
389 | NETXEN_PCIE_REG(PCIE_CHICKEN3), &chicken, 4); | ||
390 | /* clear chicken3.25:24 */ | ||
391 | chicken &= 0xFCFFFFFF; | ||
392 | /* | ||
393 | * if gen1 and B0, set F1020 - if gen 2, do nothing | ||
394 | * if gen2 set to F1000 | ||
395 | */ | ||
396 | pos = pci_find_capability(pdev, PCI_CAP_ID_GEN); | ||
397 | if (pos == 0xC0) { | ||
398 | pci_read_config_dword(pdev, pos + 0x10, &control); | ||
399 | if ((control & 0x000F0000) != 0x00020000) { | ||
400 | /* set chicken3.24 if gen1 */ | ||
401 | chicken |= 0x01000000; | ||
402 | } | ||
403 | printk(KERN_INFO "%s Gen2 strapping detected\n", | ||
404 | netxen_nic_driver_name); | ||
405 | c8c9value = 0xF1000; | ||
406 | } else { | ||
407 | /* set chicken3.24 if gen1 */ | ||
408 | chicken |= 0x01000000; | ||
409 | printk(KERN_INFO "%s Gen1 strapping detected\n", | ||
410 | netxen_nic_driver_name); | ||
411 | if (adapter->ahw.revision_id == NX_P3_B0) | ||
412 | c8c9value = 0xF1020; | ||
413 | else | ||
414 | c8c9value = 0; | ||
415 | |||
416 | } | ||
417 | adapter->hw_write_wx(adapter, | ||
418 | NETXEN_PCIE_REG(PCIE_CHICKEN3), &chicken, 4); | ||
419 | |||
420 | if (!c8c9value) | ||
421 | return; | ||
422 | |||
423 | pdevfuncsave = pdev->devfn; | ||
424 | if (pdevfuncsave & 0x07) | ||
425 | return; | ||
426 | |||
427 | for (i = 0; i < 8; i++) { | ||
428 | pci_read_config_dword(pdev, pos + 8, &control); | ||
429 | pci_read_config_dword(pdev, pos + 8, &control); | ||
430 | pci_write_config_dword(pdev, pos + 8, c8c9value); | ||
431 | pdev->devfn++; | ||
432 | } | ||
433 | pdev->devfn = pdevfuncsave; | ||
434 | } | ||
435 | |||
436 | static void netxen_set_msix_bit(struct pci_dev *pdev, int enable) | 375 | static void netxen_set_msix_bit(struct pci_dev *pdev, int enable) |
437 | { | 376 | { |
438 | u32 control; | 377 | u32 control; |
@@ -812,9 +751,6 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
812 | } | 751 | } |
813 | netxen_load_firmware(adapter); | 752 | netxen_load_firmware(adapter); |
814 | 753 | ||
815 | if (NX_IS_REVISION_P3(revision_id)) | ||
816 | netxen_pcie_strap_init(adapter); | ||
817 | |||
818 | if (NX_IS_REVISION_P2(revision_id)) { | 754 | if (NX_IS_REVISION_P2(revision_id)) { |
819 | 755 | ||
820 | /* Initialize multicast addr pool owners */ | 756 | /* Initialize multicast addr pool owners */ |