From patchwork Tue Mar 27 16:31:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murali Karicheri X-Patchwork-Id: 10310691 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 26BC8605B4 for ; Tue, 27 Mar 2018 16:31:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14D5029C37 for ; Tue, 27 Mar 2018 16:31:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDA1D29D34; Tue, 27 Mar 2018 16:31:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DDC1829D9F for ; Tue, 27 Mar 2018 16:30:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=irzfxevmA4Sw4lEGSzyv16S7Jl0KgqXsdyf3zbm8iGM=; b=L3GthynaEQGyRg POnUSNDD6Ja30wWKJVc2gNhjvA7cH1qSDWtVHoduWT15GNGYG0wutJl7EtZdEfffshrBmLAZ4csSC x7OwP0UTeasiIdvU0vETJX7gLgbIHd6JUiH5I60SZkfBmeSguSh74ure00aGkn7ULG06/Q+rhuz2j mOqoEtVpZ+/hReF/VgbS06nPdsw8XDvdkJ357yCwatO9gKBNFCKA57cDIuJEFT1Ki7HijLz+4zUaS vkvGlI424bLPTdKCCt16wRBK7qTCIR5L1mkYknFFgO2m4FOgxs6OR/N5RBtxpW9k6ybRV9mFpYXmd k3OM37x17+1zqnF29INQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f0rUi-0007mP-8C; Tue, 27 Mar 2018 16:30:44 +0000 Received: from lelnx194.ext.ti.com ([198.47.27.80]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f0rTZ-0005ou-I0 for linux-arm-kernel@lists.infradead.org; Tue, 27 Mar 2018 16:29:35 +0000 Received: from dlelxv84.itg.ti.com ([172.17.0.246]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w2RGTGB5012723; Tue, 27 Mar 2018 11:29:16 -0500 Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by dlelxv84.itg.ti.com (8.14.3/8.13.8) with ESMTP id w2RGTGLX020181; Tue, 27 Mar 2018 11:29:16 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Tue, 27 Mar 2018 11:29:16 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Tue, 27 Mar 2018 11:29:16 -0500 Received: from ula0868495.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w2RGTBSd015407; Tue, 27 Mar 2018 11:29:15 -0500 From: Murali Karicheri To: , , , , , , , , , Subject: [net-next PATCH v2 07/10] net: netcp: ethss: re-use stats handling code for 2u hardware Date: Tue, 27 Mar 2018 12:31:46 -0400 Message-ID: <1522168309-12338-8-git-send-email-m-karicheri2@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1522168309-12338-1-git-send-email-m-karicheri2@ti.com> References: <1522168309-12338-1-git-send-email-m-karicheri2@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180327_092933_707944_9D65A7F4 X-CRM114-Status: GOOD ( 15.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The stats block in 2u cpsw hardware is similar to the one on nu and hence handle it in a similar way by using a macro that includes 2u hardware as well. Signed-off-by: Murali Karicheri --- drivers/net/ethernet/ti/netcp_ethss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/netcp_ethss.c b/drivers/net/ethernet/ti/netcp_ethss.c index 828243d..26ccddb 100644 --- a/drivers/net/ethernet/ti/netcp_ethss.c +++ b/drivers/net/ethernet/ti/netcp_ethss.c @@ -3394,7 +3394,7 @@ static int set_gbenu_ethss_priv(struct gbe_priv *gbe_dev, gbe_dev->num_stats_mods = gbe_dev->max_num_ports; gbe_dev->et_stats = gbenu_et_stats; - if (IS_SS_ID_NU(gbe_dev)) + if (IS_SS_ID_MU(gbe_dev)) gbe_dev->num_et_stats = GBENU_ET_STATS_HOST_SIZE + (gbe_dev->max_num_slaves * GBENU_ET_STATS_PORT_SIZE); else