Patchwork [1/2] netxen: fix detection of cut-thru firmware mode

login
register
mail settings
Submitter Dhananjay Phadke
Date June 18, 2009, 3:46 p.m.
Message ID <7608421F3572AB4292BB2532AE89D5658187610BDB@AVEXMB1.qlogic.org>
Download mbox | patch
Permalink /patch/28878/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Dhananjay Phadke - June 18, 2009, 3:46 p.m.
Dave,

Sorry, these patches were accidentally sent again.
You have already applied both.

-Dhananjay

Patch

diff --git a/drivers/net/netxen/netxen_nic_hdr.h b/drivers/net/netxen/netxen_nic_hdr.h
index 7f0ddbf..3cc0478 100644
--- a/drivers/net/netxen/netxen_nic_hdr.h
+++ b/drivers/net/netxen/netxen_nic_hdr.h
@@ -355,6 +355,7 @@  enum {
 #define NETXEN_HW_CRB_HUB_AGT_ADR_LPC  \
        ((NETXEN_HW_H6_CH_HUB_ADR << 7) | NETXEN_HW_LPC_CRB_AGT_ADR)

+#define NETXEN_SRE_MISC                        (NETXEN_CRB_SRE + 0x0002c)
 #define NETXEN_SRE_INT_STATUS          (NETXEN_CRB_SRE + 0x00034)
 #define NETXEN_SRE_PBI_ACTIVE_STATUS   (NETXEN_CRB_SRE + 0x01014)
 #define NETXEN_SRE_L1RE_CTL            (NETXEN_CRB_SRE + 0x03000)
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index 42ffb82..9702509 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -2041,8 +2041,8 @@  void netxen_nic_get_firmware_info(struct netxen_adapter *adapter)
                        fw_major, fw_minor, fw_build);

        if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) {
-               i = NXRD32(adapter, NETXEN_MIU_MN_CONTROL);
-               adapter->ahw.cut_through = (i & 0x4) ? 1 : 0;
+               i = NXRD32(adapter, NETXEN_SRE_MISC);
+               adapter->ahw.cut_through = (i & 0x8000) ? 1 : 0;
                dev_info(&pdev->dev, "firmware running in %s mode\n",
                adapter->ahw.cut_through ? "cut-through" : "legacy");
        }