From patchwork Fri Sep 13 15:14:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 828194 Delivered-To: patch@linaro.org Received: by 2002:adf:a2d0:0:b0:367:895a:4699 with SMTP id t16csp301980wra; Fri, 13 Sep 2024 08:20:47 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX2aHLKk+1cgwciUBfgcHZhG0AEVFQUd6uuO2liAJcIwoDPNE1C9WzuXjQn5S8U3Qx0Fv0v3Q==@linaro.org X-Google-Smtp-Source: AGHT+IGIYJ2SF8aG3DGYA731u8CnwQaXgPKvt4SktrFySALRUjPKo5h97feKYazRLbOla2GZPaA/ X-Received: by 2002:a05:6122:1788:b0:4f2:ea44:fd2b with SMTP id 71dfb90a1353d-5032d23de88mr5119068e0c.0.1726240847195; Fri, 13 Sep 2024 08:20:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726240847; cv=none; d=google.com; s=arc-20240605; b=L5P8iT79VcMKa9Ru7NLpSFgHDlPzp1+u91UfyQmENqf14A1jcdz7Z2FvNaanFJaEcm 85bAFYllmQstxk0nUiDCGDBTO8Agv9y8gqqE1zENB1EsyQR4DWTKDhZ/vvBA4Ry3AZej 1hPRr0rzf0nfHxRO9Wsdofx7dsJIgMQoc9bxVhVQ+DHBiJYzsaOc0Jyxzc2GEviXl+I0 UQgU107f58uxKP7U9f9P/pip1pau/TCDinOBtQYQYQmdI2tM5+HkwAAS/MZh3fF8Qx+V Gwk2wh62pWReqqymEZwq/VMg92TWx5/ZwDj8hROTgWJItmsecYa3Sy1bKPj2v1I4pYyX DE5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=1ZFwfAVKTgNipDHShNCsT5K1gdfzcBV1L7/A4/MYLhs=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=PiF5fa43cm/ksGyWf6/Rhf3p09nuBpNJmkJqvn3ZB5qC17cAf65i4iaOuytXaM2A4T RV6H4Klj0sfiMLdnYOEl8QTcyaoitf/ab3WWvSUOMfcGgAKvabSayIqdIviHgYkP7glO 2adQnFythvJYYGYia/t0skyhRyMFBoGgIfxxLyweApFYqykBnhYLLBysF2DoOEVuSeVJ V5rCXXTZ/Wt/GPfjpzUNE5YV/7d0ST3X3BQPQbFjNpbfTsGHmOl/lKRrEOGhzrXYX+4l 5XnhmXYcXKmBguDGR6jXIUvYjPRHCsZvh5endVp3SLLrn4LsxiYA7rdXB8kvRjBZjC1D tb5Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cPzIHRup; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 71dfb90a1353d-502f9a33c08si2487293e0c.62.2024.09.13.08.20.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Sep 2024 08:20:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cPzIHRup; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sp80n-0004Ll-GA; Fri, 13 Sep 2024 11:15:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sp80A-0002Aq-Ca for qemu-devel@nongnu.org; Fri, 13 Sep 2024 11:14:26 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sp808-0007o8-Os for qemu-devel@nongnu.org; Fri, 13 Sep 2024 11:14:26 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-42cd74c0d16so22129265e9.1 for ; Fri, 13 Sep 2024 08:14:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726240463; x=1726845263; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=1ZFwfAVKTgNipDHShNCsT5K1gdfzcBV1L7/A4/MYLhs=; b=cPzIHRupc9mfN1ExCtvRcXcrpF98fx2VdQ+istq/Ows8KUQE5UOwWfHc3+D3Zh8N8u zZ4jpm5Y8sIJSntSQ31kjw9sRFk7/byTZdtEd0tA+FCFwTpAjZUpZQeiusjk4lHCGOXw eyquFRdXShMNGUNsAgR+MuOR6zKOVI3cTPryFgFKVqhgnwsF9xQ1Ojhwk3zLReh7ixVg grg4OtXcdxCpa9eaYS05uFqXUXdPXXTkC7Mio3mkmLsmvzChODaHtA1PkKTcXy3vbZ2z V7AjnaDKFvI//Lt/wUfOW6TXxSaFHJ+1i/sv1kchgY++ZzoRvwBLqkcP3Bkp6TaiMxQ3 dRKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726240463; x=1726845263; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1ZFwfAVKTgNipDHShNCsT5K1gdfzcBV1L7/A4/MYLhs=; b=C2TT4Cpaj1Wwjjikseb8qtmdtLAIba1CRFoXPTz/ER6hPb4guD5zlOxAL9cRSHXzfC PtfKGmQdc2A+GSccN4VRc97/04P7/csHRjFBz66I91fhFwxJhYkil9qfLHwY0xor0L6+ OzJPLHqm33o8mkaS112Jxb9ti5u/+KnCRgh4NQY9WobCDPEnzBo1Ty45N5wovMl8p8Lw cVIRe1F1k+RGOhcsLrxjJuKgZappB73fjawHyUjROb1Zlryc6jTUmR3zHMVzIM7FnHI4 P8kQH1sOKZkN6B3vz9U+nvst6GtXiTwUcXqfjtBmcwz2SmMryMLt/F79ltUgE1l7cdu0 o90A== X-Gm-Message-State: AOJu0YxmiVkk7foWe5LbwAQETuD486LUqT7A40Wb0ATLFi1hm9L7kAka N7ir/Q4wmDjW6VsLe9LrfXfYS5s5Yn1QmLhAj2dBS6WqKSBWyqQzwt3XjaDuk3F0VvQLc2HY3Yj e X-Received: by 2002:a7b:c453:0:b0:42c:de34:34c1 with SMTP id 5b1f17b1804b1-42cde34376bmr49875985e9.2.1726240463099; Fri, 13 Sep 2024 08:14:23 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42d9b16bfbfsm29152325e9.22.2024.09.13.08.14.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Sep 2024 08:14:22 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 18/27] hw/net/can/xlnx-versal-canfd: Fix CAN FD flag check Date: Fri, 13 Sep 2024 16:14:02 +0100 Message-Id: <20240913151411.2167922-19-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240913151411.2167922-1-peter.maydell@linaro.org> References: <20240913151411.2167922-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Doug Brown When checking the QEMU_CAN_FRMF_TYPE_FD flag, we need to ignore other potentially set flags. Before this change, received CAN FD frames from SocketCAN weren't being recognized as CAN FD. Signed-off-by: Doug Brown Reviewed-by: Pavel Pisa Reviewed-by: Francisco Iglesias Message-id: 20240827034927.66659-3-doug@schmorgal.com Signed-off-by: Peter Maydell --- hw/net/can/xlnx-versal-canfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/can/xlnx-versal-canfd.c b/hw/net/can/xlnx-versal-canfd.c index f89dfc565b5..add1e0fbf17 100644 --- a/hw/net/can/xlnx-versal-canfd.c +++ b/hw/net/can/xlnx-versal-canfd.c @@ -1003,7 +1003,7 @@ static void store_rx_sequential(XlnxVersalCANFDState *s, dlc = frame->can_dlc; - if (frame->flags == QEMU_CAN_FRMF_TYPE_FD) { + if (frame->flags & QEMU_CAN_FRMF_TYPE_FD) { is_canfd_frame = true; /* Store dlc value in Xilinx specific format. */