Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7371812ybi; Mon, 8 Jul 2019 20:32:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1Av4nhvEMZO4DsiXVgmBaRgujjdZfHcSCI1fJkMYNsGdMqasiYFoIJkQ9Zc7rqSFKgjQU X-Received: by 2002:a17:902:b48f:: with SMTP id y15mr24213149plr.268.1562643154737; Mon, 08 Jul 2019 20:32:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562643154; cv=none; d=google.com; s=arc-20160816; b=wFAYWLMb5bJl0sTw/iSHgfsBH79fIari6T33BRRCRyYjCPGYwT9IUjivC9kkVQ6L2l dbhhRyt0D7KEDigg1pqFvo45ubQZncnqzEOd9Dh9Hrk2FQPjmm0laUaz9sArmmQqzeWR XR3CFEfM2OMnlT5pLxKlEMIDvQtEMoQKvki3VlLt75LQDxnNTbLDLo5VaSqS5C4Sx0oy MJrHRNzDEy9gsIEHZ9tRdbGZbx8MqGKFVEBp5o9B8CwQlQJM9B/ItWKRGYMfv2ayczCd /tR3hZPJbO6eixUd43jA0Yj5Lz8MgCuTuwR21mXCA+NuIdcDIYsb5Ia+kFhbm4vtThmU ZlcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=xLVPuwDQ72GmgX2iafQ7x1Sq6GnbWzXHUK93/TU08/k=; b=DyJ0DE8n5pmOiXiUmEIyMIl8B7ks/QCAoQxF+qPowyj8/T1s+Hwj3B1bARUcCoZgqR urXSvrPeJTGYJLS9SDPZ99Hp6NVPeYLyPRZQcUNlV/06gs947EuhUGzcek2FvRxrwjzL LxhZPs7QwRcAzvo8JOmTovoff9jw1Qtiw6IXff5SNLQys7vamitOlDySxMagtS6dUOSq 5m1TV4NwUNt1I9brkljEI3QXdNoa40HNVmbAjAHuXkfEqn77ZNFwZivHtv0yA5hjYjJQ 7CMhK2E/DFZQsYq/S1F6A1YtNcBzi9z7AXcDMl5oeOJ7Ca7/+cupyudsbpEwiBnuzKuN IMPg== 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 y12si16659038pfg.260.2019.07.08.20.32.20; Mon, 08 Jul 2019 20:32:34 -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 S1727424AbfGIDbg (ORCPT + 99 others); Mon, 8 Jul 2019 23:31:36 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:51534 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725886AbfGIDbb (ORCPT ); Mon, 8 Jul 2019 23:31:31 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 717AA6D18746615EEB9D; Tue, 9 Jul 2019 11:31:29 +0800 (CST) Received: from huawei.com (10.67.189.167) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.439.0; Tue, 9 Jul 2019 11:31:23 +0800 From: Jiangfeng Xiao To: , , , , , , CC: , , , , , , Subject: [PATCH v2 09/10] net: hisilicon: Add an rx_desc to adapt HI13X1_GMAC Date: Tue, 9 Jul 2019 11:31:10 +0800 Message-ID: <1562643071-46811-10-git-send-email-xiaojiangfeng@huawei.com> X-Mailer: git-send-email 1.8.5.6 In-Reply-To: <1562643071-46811-1-git-send-email-xiaojiangfeng@huawei.com> References: <1562643071-46811-1-git-send-email-xiaojiangfeng@huawei.com> 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