From patchwork Sat Jun 22 08:12:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jitendra Kalsaria X-Patchwork-Id: 253361 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 67A272C0411 for ; Sat, 22 Jun 2013 18:39:10 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935621Ab3FVIim (ORCPT ); Sat, 22 Jun 2013 04:38:42 -0400 Received: from va3ehsobe006.messaging.microsoft.com ([216.32.180.16]:5397 "EHLO va3outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932344Ab3FVIi3 (ORCPT ); Sat, 22 Jun 2013 04:38:29 -0400 Received: from mail149-va3-R.bigfish.com (10.7.14.252) by VA3EHSOBE005.bigfish.com (10.7.40.25) with Microsoft SMTP Server id 14.1.225.23; Sat, 22 Jun 2013 08:38:27 +0000 Received: from mail149-va3 (localhost [127.0.0.1]) by mail149-va3-R.bigfish.com (Postfix) with ESMTP id C8D301C0083; Sat, 22 Jun 2013 08:38:27 +0000 (UTC) X-Forefront-Antispam-Report: CIP:198.70.193.116; KIP:(null); UIP:(null); IPV:NLI; H:avcashub1.qlogic.com; RD:avcashub2.qlogic.com; EFVD:NLI X-SpamScore: 1 X-BigFish: VPS1(zzzz1f42h1ee6h1de0h1fdah1202h1e76h1d1ah1d2ah1fc6hzz8275bhz2ei2a8h668h839hd24he5bhf0ah107ah11b5h121eh1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h14afh1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1b0ah1d0ch1d2eh1d3fh1dfeh1dffh1e1dh1e23h1155h) Received-SPF: neutral (mail149-va3: 198.70.193.116 is neither permitted nor denied by domain of qlogic.com) client-ip=198.70.193.116; envelope-from=jitendra.kalsaria@qlogic.com; helo=avcashub1.qlogic.com ; 1.qlogic.com ; Received: from mail149-va3 (localhost.localdomain [127.0.0.1]) by mail149-va3 (MessageSwitch) id 1371890305510641_25027; Sat, 22 Jun 2013 08:38:25 +0000 (UTC) Received: from VA3EHSMHS015.bigfish.com (unknown [10.7.14.232]) by mail149-va3.bigfish.com (Postfix) with ESMTP id 6EE6E3C0058; Sat, 22 Jun 2013 08:38:25 +0000 (UTC) Received: from avcashub1.qlogic.com (198.70.193.116) by VA3EHSMHS015.bigfish.com (10.7.99.25) with Microsoft SMTP Server (TLS) id 14.1.225.23; Sat, 22 Jun 2013 08:38:25 +0000 Received: from dut6217.mv.qlogic.com (172.29.56.217) by qlc.com (10.1.4.191) with Microsoft SMTP Server id 14.2.318.1; Sat, 22 Jun 2013 01:38:23 -0700 Received: by dut6217.mv.qlogic.com (Postfix, from userid 0) id E5B3F5220C8; Sat, 22 Jun 2013 04:12:17 -0400 (EDT) From: Jitendra Kalsaria To: CC: , , , , Pratik Pujar Subject: [PATCH v2 net-next 5/8] qlcnic: Cleanup of structure qlcnic_hardware_context Date: Sat, 22 Jun 2013 04:12:04 -0400 Message-ID: <1371888727-16422-6-git-send-email-jitendra.kalsaria@qlogic.com> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1371888727-16422-1-git-send-email-jitendra.kalsaria@qlogic.com> References: <1371888727-16422-1-git-send-email-jitendra.kalsaria@qlogic.com> MIME-Version: 1.0 X-OriginatorOrg: qlogic.com Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Pratik Pujar Signed-off-by: Pratik Pujar Signed-off-by: Jitendra Kalsaria --- drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 2 +- drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c | 3 ++- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 4 ++-- drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h index cc2c2c1..5694d59 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h @@ -449,7 +449,7 @@ struct qlcnic_hardware_context { u16 max_pci_func; u32 capabilities; - u32 capabilities2; + u32 extra_capability[3]; u32 temp; u32 int_vec_bit; u32 fw_hal_version; diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c index e7f305d..9fcbfd4 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c @@ -786,7 +786,8 @@ int qlcnic_82xx_config_hw_lro(struct qlcnic_adapter *adapter, int enable) word = 0; if (enable) { word = QLCNIC_ENABLE_IPV4_LRO | QLCNIC_NO_DEST_IPV4_CHECK; - if (adapter->ahw->capabilities2 & QLCNIC_FW_CAP2_HW_LRO_IPV6) + if (adapter->ahw->extra_capability[0] & + QLCNIC_FW_CAP2_HW_LRO_IPV6) word |= QLCNIC_ENABLE_IPV6_LRO | QLCNIC_NO_DEST_IPV6_CHECK; } diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index 8e1453a..3963e78 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c @@ -994,7 +994,7 @@ qlcnic_initialize_nic(struct qlcnic_adapter *adapter) if (adapter->ahw->capabilities & QLCNIC_FW_CAPABILITY_MORE_CAPS) { u32 temp; temp = QLCRD32(adapter, CRB_FW_CAPABILITIES_2); - adapter->ahw->capabilities2 = temp; + adapter->ahw->extra_capability[0] = temp; } adapter->ahw->max_mac_filters = nic_info.max_mac_filters; adapter->ahw->max_mtu = nic_info.max_mtu; @@ -1486,7 +1486,7 @@ static void qlcnic_get_lro_mss_capability(struct qlcnic_adapter *adapter) u32 capab = 0; if (qlcnic_82xx_check(adapter)) { - if (adapter->ahw->capabilities2 & + if (adapter->ahw->extra_capability[0] & QLCNIC_FW_CAPABILITY_2_LRO_MAX_TCP_SEG) adapter->flags |= QLCNIC_FW_LRO_MSS_CAP; } else { diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c index 7ec030a..10ed82b 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c @@ -168,7 +168,7 @@ static int qlcnic_82xx_store_beacon(struct qlcnic_adapter *adapter, if (err) return err; - if ((ahw->capabilities2 & QLCNIC_FW_CAPABILITY_2_BEACON)) { + if (ahw->extra_capability[0] & QLCNIC_FW_CAPABILITY_2_BEACON) { err = qlcnic_get_beacon_state(adapter, &h_beacon_state); if (!err) { dev_info(&adapter->pdev->dev,