aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2009-07-26 16:07:36 -0400
committerDavid S. Miller <davem@davemloft.net>2009-07-27 13:54:18 -0400
commit68b3cae0824b98d1f469a80cc65dcaab81771f45 (patch)
tree0d9708de0a4e5f2f1d1ac8dd633822e52b836406 /drivers/net/netxen
parent663a31ce5bbef2d14fa325023e48bf02b4249f27 (diff)
netxen: refresh firmware info after reset
o move dma mask update to netxen_start_firmware() so that if firmware changes across suspend (e.g. file -> flash) it reflects right dma mask. o re-read firmware capabilities after firmware reset. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.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.c3
-rw-r--r--drivers/net/netxen/netxen_nic_init.c4
-rw-r--r--drivers/net/netxen/netxen_nic_main.c9
3 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index b9123d445c9..3c614c3cc62 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -2047,6 +2047,9 @@ void netxen_nic_get_firmware_info(struct netxen_adapter *adapter)
2047 dev_info(&pdev->dev, "firmware running in %s mode\n", 2047 dev_info(&pdev->dev, "firmware running in %s mode\n",
2048 adapter->ahw.cut_through ? "cut-through" : "legacy"); 2048 adapter->ahw.cut_through ? "cut-through" : "legacy");
2049 } 2049 }
2050
2051 if (adapter->fw_version >= NETXEN_VERSION_CODE(4, 0, 222))
2052 adapter->capabilities = NXRD32(adapter, CRB_FW_CAPABILITIES_1);
2050} 2053}
2051 2054
2052int 2055int
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index 5d3343ef3d8..847f78b1868 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -1083,10 +1083,6 @@ int netxen_init_firmware(struct netxen_adapter *adapter)
1083 NXWR32(adapter, CRB_MPORT_MODE, MPORT_MULTI_FUNCTION_MODE); 1083 NXWR32(adapter, CRB_MPORT_MODE, MPORT_MULTI_FUNCTION_MODE);
1084 NXWR32(adapter, CRB_CMDPEG_STATE, PHAN_INITIALIZE_ACK); 1084 NXWR32(adapter, CRB_CMDPEG_STATE, PHAN_INITIALIZE_ACK);
1085 1085
1086 if (adapter->fw_version >= NETXEN_VERSION_CODE(4, 0, 222)) {
1087 adapter->capabilities = NXRD32(adapter, CRB_FW_CAPABILITIES_1);
1088 }
1089
1090 return err; 1086 return err;
1091} 1087}
1092 1088
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 637ac8b89ba..4c7e4c28bf6 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -764,6 +764,10 @@ wait_init:
764 return err; 764 return err;
765 } 765 }
766 766
767 nx_update_dma_mask(adapter);
768
769 netxen_nic_get_firmware_info(adapter);
770
767 return 0; 771 return 0;
768} 772}
769 773
@@ -1071,11 +1075,6 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1071 err = netxen_start_firmware(adapter, 1); 1075 err = netxen_start_firmware(adapter, 1);
1072 if (err) 1076 if (err)
1073 goto err_out_iounmap; 1077 goto err_out_iounmap;
1074
1075 nx_update_dma_mask(adapter);
1076
1077 netxen_nic_get_firmware_info(adapter);
1078
1079 /* 1078 /*
1080 * See if the firmware gave us a virtual-physical port mapping. 1079 * See if the firmware gave us a virtual-physical port mapping.
1081 */ 1080 */