qlcnic: Fix invalid register offset calculation
authorShahed Shaikh <shahed.shaikh@qlogic.com>
Fri, 19 Jul 2013 20:56:26 +0000 (16:56 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 20 Jul 2013 00:08:15 +0000 (17:08 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c

index 700a46324d09230b8d8ba6e6fc820bc0e56b9526..05a847e599c673fdc16d7492de6c50738596f5f9 100644 (file)
@@ -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;