From patchwork Fri Nov 23 13:54:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 10695789 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 A489F1709 for ; Fri, 23 Nov 2018 13:57:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 92C812C973 for ; Fri, 23 Nov 2018 13:57:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 84DD62C9A9; Fri, 23 Nov 2018 13:57:03 +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=-3.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 1D5DF2C973 for ; Fri, 23 Nov 2018 13:57:03 +0000 (UTC) Received: from localhost ([::1]:52472 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQBx8-0007vE-C5 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 23 Nov 2018 08:57:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQBv9-0006sO-KK for qemu-devel@nongnu.org; Fri, 23 Nov 2018 08:55:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gQBv5-0002PQ-RS for qemu-devel@nongnu.org; Fri, 23 Nov 2018 08:54:59 -0500 Received: from mail-lj1-x244.google.com ([2a00:1450:4864:20::244]:37215) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gQBv5-0002NI-Je; Fri, 23 Nov 2018 08:54:55 -0500 Received: by mail-lj1-x244.google.com with SMTP id e5-v6so10745091lja.4; Fri, 23 Nov 2018 05:54:55 -0800 (PST) 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=fTICeks9SOeth8pci7UiwXWCYMXIXcwIuwXFxU82GuQ=; b=tuLDEj9RqaFEyHCwR1i9eeAl9er2QSATunJGfuzmAyrwh3MTGOoJlBkPwBXjQOUR/f /NXSVq1Uh0yAiv0uaNrTnZPfsRz0Gy+gmtloski8Oex6tNzsmrXnq94an2M6I4DNfY5G Y6dF+BK+tSqE16RsufwjJQqqsxb7SeeyQkpGFAjPTFIAmt1/4eDgbkYqtpruyjQ7bNsa wEfZXPGlg3d9JRt9CVi/37P8fpoVsfeFAoVHJz6xe28w5KMA0FKIt+FIY+Jl0d3/0qFT kg4hnrJh8lu0XlemL6ddZ5tbkXjB9RwGxnw9FZ40b2uCyQspJq47V6ltA+uyadRT69LB BQ/g== 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=fTICeks9SOeth8pci7UiwXWCYMXIXcwIuwXFxU82GuQ=; b=XpVF89ZzWOxofOzN3tKQUkg9pfI9pg2v6edmxnL1TckCkGTnoUeypfZ0XpTDmbvH3W B/Uw9nO7zfhwwBv/nIIvgYUOau8qy3IEzncQp4Tft2FZID8re7SP7HJcFu5azh2ZmisR ZgfRcuJYeUPrBNEbcAV545a0Z2egbZNPwnhbGIdIqwk+8qyVo21sp9WZYEsXhLpYSMIz 3/son1XpcIQlE6xwFD6tmOKBOK/9l/HCQlNaXYa+STWUj6BDboarNTB/cY4dLoTBzx7+ 31tNj5DKLAuvE7WwvGnyvoeMy2z58kDJBXDJG/ZTmo+ejdj6Lh9i8um2EH189+xOdpGG WpOw== X-Gm-Message-State: AGRZ1gLkGhInNvZZfKusibrxQ0v8eeTAAGJJEpLApDgwv/s2BhK1CZ00 d8phSrxGorAH4UHvYxWSy3p+bufq X-Google-Smtp-Source: AJdET5d3LYdKTUvqXcbv9IdIBE8ApSKWsyy1D0/ynhbGpG8gwKU1qYfvG2xAUuboaZJ7FkMUVLRb5A== X-Received: by 2002:a2e:9181:: with SMTP id f1-v6mr9841322ljg.64.1542981293745; Fri, 23 Nov 2018 05:54:53 -0800 (PST) Received: from gmail.com (81-231-232-130-no39.tbcn.telia.com. [81.231.232.130]) by smtp.gmail.com with ESMTPSA id m77sm6207855lfg.3.2018.11.23.05.54.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Nov 2018 05:54:52 -0800 (PST) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org, qemu-arm@nongnu.org Date: Fri, 23 Nov 2018 14:54:50 +0100 Message-Id: <20181123135450.24829-2-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181123135450.24829-1-edgar.iglesias@gmail.com> References: <20181123135450.24829-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::244 Subject: [Qemu-devel] [PATCH v1 1/1] net: cadence_gem: Remove incorrect assert() 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, frederic.konrad@adacore.com, muhammad_bilal@mentor.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" Don't assert on RX descriptor settings when the receiver is disabled. This fixes an issue with incoming packets on an unused GEM. Reported-by: mbilal Signed-off-by: Edgar E. Iglesias Reviewed-by: Philippe Mathieu-Daudé --- hw/net/cadence_gem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index d95cc27f58..7f63411430 100644 --- a/hw/net/cadence_gem.c +++ b/hw/net/cadence_gem.c @@ -979,7 +979,6 @@ static ssize_t gem_receive(NetClientState *nc, const uint8_t *buf, size_t size) /* Do nothing if receive is not enabled. */ if (!gem_can_receive(nc)) { - assert(!first_desc); return -1; }