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: 987815 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="HWhULy2P"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42f3c8727Xz9sDb for ; Tue, 23 Oct 2018 04:36:55 +1100 (AEDT) Received: from localhost ([::1]:36405 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEe8K-0005tT-FU for incoming@patchwork.ozlabs.org; Mon, 22 Oct 2018 13:36:52 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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];