From patchwork Wed Oct 3 15:07:36 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: 10625005 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 D19A315E8 for ; Wed, 3 Oct 2018 15:10:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA1BA28E3F for ; Wed, 3 Oct 2018 15:10:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADEF328E69; Wed, 3 Oct 2018 15:10:54 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,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 510DF28E57 for ; Wed, 3 Oct 2018 15:10:54 +0000 (UTC) Received: from localhost ([::1]:49228 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g7ind-0006iZ-BC for patchwork-qemu-devel@patchwork.kernel.org; Wed, 03 Oct 2018 11:10:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g7imL-0004ZU-Mq for qemu-devel@nongnu.org; Wed, 03 Oct 2018 11:09:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g7imI-0004Ql-K5 for qemu-devel@nongnu.org; Wed, 03 Oct 2018 11:09:33 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:40039) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g7imI-0004QJ-CK; Wed, 03 Oct 2018 11:09:30 -0400 Received: by mail-pg1-x544.google.com with SMTP id n31-v6so1705400pgm.7; Wed, 03 Oct 2018 08:09:30 -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=/QSgLiZ6Mt5wNumXwgkvPtIKbRFYHokm59Wo18j6NoI=; b=HK8kfcACtI+MUBGCb95vlfazjnMmXHuzR0lW6Z9GTitwbo5EBRuBR7sX5om2aKnn84 SgMdgjPl/SjBZRiwFzK9wdYhxHQUNNYNqyaRhGLaFinWU7pRM55B7YK0SVdbwrNDRGyy 16XjbBRpEvYPJH+SPRrepzo2lleXCpufMDkljO3GOUhSoudD7/jozbJSh+J17UINbJeJ 8TXfQopE59AY0BEUlG3h11rKl3AvqzCRQaANXbqaRSLhsSCAzkUTvuPFqCjUPzzQthNU i5NtT9PRci50i/sEFp881A1st/4+xVeYjJiYWPUiGGBHTTXrS+2njqYVP07s8thoypWk 9p5Q== 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=/QSgLiZ6Mt5wNumXwgkvPtIKbRFYHokm59Wo18j6NoI=; b=eqQ7XW0tysp/2d7tD97CeCquAIoRBcb2QqarfTgtVJpHsdejZWWdzCI8JjkE2k9AtP zMY9n39VdUJKBqeCMB73btQ1BL3qmlEg4NA3Vw1JzoS70Ac3o8dHyR8imVZEKV6lcDS6 2RGY23c+2kg4NJ8eczva/V9LxdyJi8/iEHXTHZJuLFvIYeJFqON/p/2Azs/gIVLjPeXA N1HWqZFxpMHQiYAMMY4VQxblRiJJuGHALVlznAf9gATdOcww2lvuj3KJPI8aSNzZ/gS0 O9dfDjLaFVP+3E+DQos+ihq36ZhfsBaNPPU67EYso2f7eSoQcHTbhZm8BzJGSY0bvRUi es9g== X-Gm-Message-State: ABuFfojY92Qf3eVKyODt+Nz5KB4K7DGWTD1GwQsdxY+JG+ze78TRVth9 LUYya+ZCoR3W+nNglWMy2r9KbdvnWL4= X-Google-Smtp-Source: ACcGV61HENa34BLjaqbc1itviK1urK+fYaabECdIdfK1xId45YdIzrr1SZ6YP2wCJ5xQGp2D1xbXqw== X-Received: by 2002:a63:4658:: with SMTP id v24-v6mr1774331pgk.425.1538579368687; Wed, 03 Oct 2018 08:09:28 -0700 (PDT) Received: from localhost ([149.199.62.254]) by smtp.gmail.com with ESMTPSA id v189-v6sm3868926pfb.54.2018.10.03.08.09.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Oct 2018 08:09:27 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org, qemu-arm@nongnu.org Date: Wed, 3 Oct 2018 22:07:36 +0700 Message-Id: <1538579266-8389-3-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538579266-8389-1-git-send-email-edgar.iglesias@gmail.com> References: <1538579266-8389-1-git-send-email-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::544 Subject: [Qemu-devel] [PATCH v1 02/12] 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 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 Reviewed-by: Alistair Francis --- hw/net/cadence_gem.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index e560b7a..901c173 100644 --- a/hw/net/cadence_gem.c +++ b/hw/net/cadence_gem.c @@ -1213,6 +1213,7 @@ static void gem_reset(DeviceState *d) int i; CadenceGEMState *s = CADENCE_GEM(d); const uint8_t *a; + uint32_t queues_mask; DB_PRINT("\n"); @@ -1229,7 +1230,10 @@ 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; + + 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];