aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2009-02-24 06:42:59 -0500
committerDavid S. Miller <davem@davemloft.net>2009-02-24 06:42:59 -0500
commit044fad0dbb4e814c061916fe5a36851af2fd1135 (patch)
treea4ec3925747382755740df54e34a036a2fd9abb8 /drivers/net
parent50fee1dec5d71b8a14c1b82f2f42e16adc227f8b (diff)
netxen: fix physical port mapping
The PCI function to physical port mapping is valid only for old firmware. New firmware (4.0.0+) abstracts this. So driver should never try to access phy using invalid mapping. The behavior is unpredictable when PCI functions 4-7 are enabled on the same NIC. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/netxen/netxen_nic_main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 9f33e442f403..f42581157f4e 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -795,9 +795,12 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
795 * See if the firmware gave us a virtual-physical port mapping. 795 * See if the firmware gave us a virtual-physical port mapping.
796 */ 796 */
797 adapter->physical_port = adapter->portnum; 797 adapter->physical_port = adapter->portnum;
798 i = adapter->pci_read_normalize(adapter, CRB_V2P(adapter->portnum)); 798 if (adapter->fw_major < 4) {
799 if (i != 0x55555555) 799 i = adapter->pci_read_normalize(adapter,
800 adapter->physical_port = i; 800 CRB_V2P(adapter->portnum));
801 if (i != 0x55555555)
802 adapter->physical_port = i;
803 }
801 804
802 adapter->flags &= ~(NETXEN_NIC_MSI_ENABLED | NETXEN_NIC_MSIX_ENABLED); 805 adapter->flags &= ~(NETXEN_NIC_MSI_ENABLED | NETXEN_NIC_MSIX_ENABLED);
803 806