Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2961580ybi; Thu, 4 Jul 2019 23:14:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqxKPvcH0F1aMRREQ/Yw2xgmvm7MLV0ir20D0BJkbvt9t83+DsjalYXB8ujPL1dp4YaZNRy3 X-Received: by 2002:a63:2326:: with SMTP id j38mr3056390pgj.134.1562307260309; Thu, 04 Jul 2019 23:14:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562307260; cv=none; d=google.com; s=arc-20160816; b=Q/zZ/6w8+15/1IT3zX9MIB37xCy4uxkSOym50Oaj8e96nmZw3wJnR5DhK5xRczqtMc 866El8UeM+xxr9ORCD3qoqR5U0rI+TZSdhdabMUGet/66uYs8ql3ady8Nqmb+GODqco3 FT8xYhhgAL1ELWTxfOnZyXP96pxdUU3+FfNHctcaA6hDCBkZ5ov/xqdx8X1MEuPrxDlX QcToQSrZ6tpE8YIUlrAPrFuYwhA0OImIoqMLExz8rubg+8EpmnNobSukOQF6yPYCJhlY XiWgYUUPGeW7M1vk1XEajWdEPzWAd9JCCo5jR90+oO0dIPgh2oB59W8pNnwskBbM5k8w wKPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=xLVPuwDQ72GmgX2iafQ7x1Sq6GnbWzXHUK93/TU08/k=; b=OqysejzhaD01e7isADOy3g7BZqV3v+d8dkbzc2pPAqtzoxZtjCip8v5U+vP4j9o4TV +6SuvKVpeBNznuLghKQE+ZZ0zWBOS9AxFOJa+5c4f2DEk/zpo5E8PlPfhG54D5+WtlDb HCqnEoB2JxlaEMygY0uUmW/DzHtz3NMch44pemApDB2Wr4riIV9KC6QYDFDBNC1LnmTF nwuiQyePcF5pUXtv+XwWJ2yndXo36MSC4vU5U2jeetoLSD6hZQWzdm4Rd7ymuqCpRAl2 xTSneAqBlHUPH2uphag/4JQdsWV6Tt3RHST4x8RTovHyTTk/NYU+eXMW686jQ2ZAsJjd Ji7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2si7207722pjq.89.2019.07.04.23.14.05; Thu, 04 Jul 2019 23:14:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727940AbfGEGMr (ORCPT + 99 others); Fri, 5 Jul 2019 02:12:47 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:8709 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725827AbfGEGMq (ORCPT ); Fri, 5 Jul 2019 02:12:46 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 978DE2030F86A25F97CB; Fri, 5 Jul 2019 14:12:41 +0800 (CST) Received: from huawei.com (10.67.189.167) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Fri, 5 Jul 2019 14:12:35 +0800 From: Jiangfeng Xiao To: , , , CC: , , , , , , , , , Subject: [PATCH 09/10] net: hisilicon: Add an rx_desc to adapt HI13X1_GMAC Date: Fri, 5 Jul 2019 14:12:29 +0800 Message-ID: <1562307149-103877-1-git-send-email-xiaojiangfeng@huawei.com> X-Mailer: git-send-email 1.8.5.6 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.189.167] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org HI13X1 changed the offsets and bitmaps for rx_desc registers in the same peripheral device on different models of the hip04_eth. Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c index c578934..780fc46 100644 --- a/drivers/net/ethernet/hisilicon/hip04_eth.c +++ b/drivers/net/ethernet/hisilicon/hip04_eth.c @@ -171,11 +171,20 @@ struct tx_desc { } __aligned(64); struct rx_desc { +#if defined(CONFIG_HI13X1_GMAC) + u32 reserved1[3]; + u16 pkt_len; + u16 reserved_16; + u32 reserved2[6]; + u32 pkt_err; + u32 reserved3[5]; +#else u16 reserved_16; u16 pkt_len; u32 reserve1[3]; u32 pkt_err; u32 reserve2[4]; +#endif }; struct hip04_priv { -- 1.8.5.6