Patchwork [net,1/9] qlcnic: Fix invalid register offset calculation

login
register
mail settings
Submitter Sucheta Chakraborty
Date July 19, 2013, 8:56 p.m.
Message ID <1374267394-27697-2-git-send-email-sucheta.chakraborty@qlogic.com>
Download mbox | patch
Permalink /patch/260349/
State Accepted
Delegated to: David Miller
Headers show

Comments

Sucheta Chakraborty - July 19, 2013, 8:56 p.m.
From: Shahed Shaikh <shahed.shaikh@qlogic.com>

83xx adapter specific code was accessing 82xx register which
resulted in invalid register offset. This patch uses proper
register access method.

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
---
 .../net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c    |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
index 700a463..05a847e 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
@@ -1540,7 +1540,7 @@  qlcnic_set_dump(struct net_device *netdev, struct ethtool_dump *val)
 		return 0;
 	case QLCNIC_SET_QUIESCENT:
 	case QLCNIC_RESET_QUIESCENT:
-		state = QLCRD32(adapter, QLCNIC_CRB_DEV_STATE);
+		state = QLC_SHARED_REG_RD32(adapter, QLCNIC_CRB_DEV_STATE);
 		if (state == QLCNIC_DEV_FAILED || (state == QLCNIC_DEV_BADBAD))
 			netdev_info(netdev, "Device in FAILED state\n");
 		return 0;