From patchwork Mon Oct 22 17:35:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 10652299 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 03870109C for ; Mon, 22 Oct 2018 17:37:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0727C2913E for ; Mon, 22 Oct 2018 17:37:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EEC5E29140; Mon, 22 Oct 2018 17:37:35 +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=-5.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,FSL_HELO_FAKE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 415522913E for ; Mon, 22 Oct 2018 17:37:33 +0000 (UTC) Received: from localhost ([::1]:36414 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEe8y-0006lI-10 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 22 Oct 2018 13:37:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEe7b-0005sv-KM for qemu-devel@nongnu.org; Mon, 22 Oct 2018 13:36:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEe7Z-0002Uw-KX for qemu-devel@nongnu.org; Mon, 22 Oct 2018 13:36:07 -0400 Received: from mail-lf1-x141.google.com ([2a00:1450:4864:20::141]:39091) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gEe7Z-0002Tq-CC; Mon, 22 Oct 2018 13:36:05 -0400 Received: by mail-lf1-x141.google.com with SMTP id p11-v6so4640022lfc.6; Mon, 22 Oct 2018 10:36:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=79QZA3/OtgWAsXd13kSpsXnd0tZupP5LpmVb185dkXc=; b=HWhULy2PratHC5JPDBsZugtjc4w21cuktGA1+LeMTojLqTjGqyk9a5QUhY7Mo+1ynh Gqz4f2r+ZNSxBUZka+0yhAthvPpjoOeCYJgkI2YRJdhk6yFIIlFbGF3HHEO+8xzJIiLA GhncqrsudI9VVFBIHFdC4IU8RJech+ys3CH3IM29KEeHis2MpZr7Ln0dEQLTWrp+IumQ iUFh74vm45O+Snb6y98i/K6wuKrd8BBZOZdPZY1xHsRFrAgWU0TeInahEHCa5CrPvHA9 HKc4pLIq6TGZBtjYalfMkvF46EHln3SDujyNmbMKA/aJj3lTRmGEyCfeZQLMtuZjKcHn Gsgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=79QZA3/OtgWAsXd13kSpsXnd0tZupP5LpmVb185dkXc=; b=CcJXos48gTTmc8pemQxvDr5OmfreKqwv3+dCyzqQ8fMGkRZUFfCa2TceIeDf92nelV MpsmUP1ICMIw9MFgGKBOf7SwDKrXJuT9yLjHaAhkaYYgWKtnnq3IPBRHBbTBDLPD5ZU7 fwTLPp6gis8fiQVTGroLkwz2LJBf6cORqvR1B7+mGtKGYKXAf4UqkZPE0inmB1nl5TY9 A8LCwZupqHyJQCM3H04vvoiAsgv4DmlVboysSSajIG+HpVxa2sd0pU0yCgjBRuW2fB9Z 1UduN1js8aL+8Fb9VI1mBOiDCVrhNKIBxSUWV6M7A01zDTo92f7bZACvoZJdVcOyvBcT fOkg== X-Gm-Message-State: ABuFfojSpqe+Ufu7gP2PaFcTGPnUaH01kQx8g8SFrypZdQrmkk0wtixC 90WcA17zL9EjoCJ2bfg7NHPwSVLV X-Google-Smtp-Source: ACcGV63bZPwi78e9Ih289OeQ2mgsHaS3O7Eh5OS102xf4iLD1qfiWAnGPs1BMxf3vEuQ92F41u8IWA== X-Received: by 2002:a19:c650:: with SMTP id w77mr4947811lff.56.1540229763836; Mon, 22 Oct 2018 10:36:03 -0700 (PDT) Received: from gmail.com (81-231-232-130-no39.tbcn.telia.com. [81.231.232.130]) by smtp.gmail.com with ESMTPSA id x25-v6sm7051195ljb.78.2018.10.22.10.36.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Oct 2018 10:36:02 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org, qemu-arm@nongnu.org Date: Mon, 22 Oct 2018 19:35:56 +0200 Message-Id: <20181022173559.17111-2-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181022173559.17111-1-edgar.iglesias@gmail.com> References: <20181022173559.17111-1-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::141 Subject: [Qemu-devel] [PATCH v4 1/4] net: cadence_gem: Announce availability of priority queues X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: figlesia@xilinx.com, peter.maydell@linaro.org, sstabellini@kernel.org, edgar.iglesias@xilinx.com, sai.pavan.boddu@xilinx.com, frasse.iglesias@gmail.com, alistair@alistair23.me, richard.henderson@linaro.org, frederic.konrad@adacore.com, philmd@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: "Edgar E. Iglesias" Announce the availability of the various priority queues. This fixes an issue where guest kernels would miss to configure secondary queues due to inproper feature bits. Signed-off-by: Edgar E. Iglesias --- hw/net/cadence_gem.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index 1795998928..16a8455128 100644 --- a/hw/net/cadence_gem.c +++ b/hw/net/cadence_gem.c @@ -1283,6 +1283,7 @@ static void gem_reset(DeviceState *d) int i; CadenceGEMState *s = CADENCE_GEM(d); const uint8_t *a; + uint32_t queues_mask = 0; DB_PRINT("\n"); @@ -1299,7 +1300,12 @@ static void gem_reset(DeviceState *d) s->regs[GEM_DESCONF] = 0x02500111; s->regs[GEM_DESCONF2] = 0x2ab13fff; s->regs[GEM_DESCONF5] = 0x002f2045; - s->regs[GEM_DESCONF6] = 0x00000200; + s->regs[GEM_DESCONF6] = 0x0; + + if (s->num_priority_queues > 1) { + queues_mask = MAKE_64BIT_MASK(1, s->num_priority_queues - 1); + s->regs[GEM_DESCONF6] |= queues_mask; + } /* Set MAC address */ a = &s->conf.macaddr.a[0];