Netdev List
 help / color / mirror / Atom feed
From: Amit Kumar Salecha <amit.salecha@qlogic.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, ameen.rahman@qlogic.com
Subject: [PATCHv2 2/4] netxen: fix warning in ioaddr for NX3031 chip
Date: Fri, 26 Mar 2010 03:30:08 -0700	[thread overview]
Message-ID: <1269599410-17809-3-git-send-email-amit.salecha@qlogic.com> (raw)
In-Reply-To: <1269599410-17809-1-git-send-email-amit.salecha@qlogic.com>

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>

crb_intr_mask/crb_sts_consumer is predefined for NX2031 not for
NX3031. For NX3031, these values get defined in rx context creation.
---
 drivers/net/netxen/netxen_nic_ctx.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/net/netxen/netxen_nic_ctx.c b/drivers/net/netxen/netxen_nic_ctx.c
index 2a8ef5f..f26e547 100644
--- a/drivers/net/netxen/netxen_nic_ctx.c
+++ b/drivers/net/netxen/netxen_nic_ctx.c
@@ -669,13 +669,15 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
 		}
 		sds_ring->desc_head = (struct status_desc *)addr;
 
-		sds_ring->crb_sts_consumer =
-			netxen_get_ioaddr(adapter,
-			recv_crb_registers[port].crb_sts_consumer[ring]);
+		if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) {
+			sds_ring->crb_sts_consumer =
+				netxen_get_ioaddr(adapter,
+				recv_crb_registers[port].crb_sts_consumer[ring]);
 
-		sds_ring->crb_intr_mask =
-			netxen_get_ioaddr(adapter,
-			recv_crb_registers[port].sw_int_mask[ring]);
+			sds_ring->crb_intr_mask =
+				netxen_get_ioaddr(adapter,
+				recv_crb_registers[port].sw_int_mask[ring]);
+		}
 	}
 
 
-- 
1.6.0.2


  parent reply	other threads:[~2010-03-26 10:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-26 10:30 [PATCHv2 0/4]netxen: bug fixes Amit Kumar Salecha
2010-03-26 10:30 ` [PATCHv2 1/4] netxen: fix bios version calculation Amit Kumar Salecha
2010-03-26 10:30 ` Amit Kumar Salecha [this message]
2010-03-26 10:30 ` [PATCHv2 3/4] netxen: added sanity check for pci map Amit Kumar Salecha
2010-03-26 10:30 ` [PATCHv2 4/4] netxen: update version to 4.0.73 Amit Kumar Salecha
2010-03-26 18:51 ` [PATCHv2 0/4]netxen: bug fixes David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1269599410-17809-3-git-send-email-amit.salecha@qlogic.com \
    --to=amit.salecha@qlogic.com \
    --cc=ameen.rahman@qlogic.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox