From nobody Sun Nov 24 11:37:07 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=schmorgal.com ARC-Seal: i=1; a=rsa-sha256; t=1723832375; cv=none; d=zohomail.com; s=zohoarc; b=Hxi1qqd+p7LrQ4akn5zIYo221BfhZElmBZwFy8AbYAn8Facpc+iDcyX2QAyK/B1st3tOnp2VMWbgeGzf4T/PICVLxziCvuGQXH1sj+CvyLXM2hoGly5wtwdxh8yQVhfK70sUI1EckEzboWYPTi1BXOxIIf4dg+sKD8la+LHKCJg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723832375; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=dXryEFEA7lHJuOcvJ0eJXPDARQuNMSDNxcV14dvqN78=; b=TaEC/IwSMODNlHVOCoxbr4Z/KNk9u+nnLNt49ztnAxOtSv0OPPfRo2V1gK8OFF/Va7zRXbVUWWBL3ZrzZAy4wffi6Y2KB59P+D/V6FsgLTKohqE3S2U33daUFRyCp27sOLw18bai1Msgj74XDBosG4+bWn241SuPQGGbV4AnPLs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1723832375031940.7050976739063; Fri, 16 Aug 2024 11:19:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sf1X0-0004B8-A9; Fri, 16 Aug 2024 14:18:34 -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 1sezwc-0003D9-JN for qemu-devel@nongnu.org; Fri, 16 Aug 2024 12:36:54 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sezwb-0002KV-2I for qemu-devel@nongnu.org; Fri, 16 Aug 2024 12:36:54 -0400 Received: by mail-pj1-x102d.google.com with SMTP id 98e67ed59e1d1-2d3d486d8bdso251140a91.3 for ; Fri, 16 Aug 2024 09:36:52 -0700 (PDT) Received: from doug-ryzen-5700G.. ([50.37.200.153]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d3e2e6b201sm2134285a91.15.2024.08.16.09.36.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 09:36:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=schmorgal.com; s=google; t=1723826212; x=1724431012; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dXryEFEA7lHJuOcvJ0eJXPDARQuNMSDNxcV14dvqN78=; b=d0GqBKRtoaTCNLivq0lRpT4CCGMYk7DRCsew2uhH2tgS5PLWx6qdZutkEAB7+H5K/b AL/K87ntTi/UWEpBwIJnE4ueA0A2E6jnAuIma2NKn65AamgPn0DJTOkSEuckv7lBJC7q aePjlDQepZVe79g+dM+JtZZTZ4ha9eD7ThNqw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723826212; x=1724431012; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dXryEFEA7lHJuOcvJ0eJXPDARQuNMSDNxcV14dvqN78=; b=uhtVLT0/0JstRtU4wz15bIA6KYPOOcH5WoeAFGuBeC8EEAwOx0/5gFVerxkQFaTvH+ 8HeEnvWFEm+RVURKaiPKC/ZUMovNAWa0At+8xpx7OkdVxrojMN085mg30dWDQySLHMJa sIywBr45b1S+RB1DDdI5DdsOYnDfieRH9hKhlb+zRJXaMuZFMo26R8Ld1flMYPi5yq7t eh8tjGCWdJhs49/PW4w1tVzK6uTi3OYlCxr9E3W4ClbBRweL/7qkomJpYUIdPsfKHhP9 LIB5yLPOiEh03cwF4g/ikAzs2jp+PTCQKrP83+JknE5bdTyA9TlB+B0IOrdPi3UTUypU 4DNw== X-Forwarded-Encrypted: i=1; AJvYcCWbnd7IGyrx5XMgPv711+emrdM+Y7AsIzvRVh7mpevOePBxDYxvDISd38wEx3FuBpLPTsLwzMIGDYx2niP1D1iJh908B6w= X-Gm-Message-State: AOJu0YzixDAt/J+r1GJJ2O3zHn6SgnELFOMyX07QAz18bKBfulmqLhfo ueCaRvZiNr32sI8xdXV0V2uw0pIxc4Yai1wakZxW1WFE4PE0cZT/26LehXmNU+s= X-Google-Smtp-Source: AGHT+IG1xMWqUlrBaBAM2Ig1Zy3oH2zeBxbPZinOUbKwoliYaJUy1oxjBTWzR1J+iAELeEsTT6ugXQ== X-Received: by 2002:a17:90a:9a9:b0:2c4:cd15:3e4b with SMTP id 98e67ed59e1d1-2d3e086417amr2226352a91.4.1723826211670; Fri, 16 Aug 2024 09:36:51 -0700 (PDT) From: Doug Brown To: Vikram Garhwal , Francisco Iglesias , Pavel Pisa Cc: Jason Wang , qemu-devel@nongnu.org, Doug Brown Subject: [PATCH 2/5] hw/net/can/xlnx-versal-canfd: Fix CAN FD flag check Date: Fri, 16 Aug 2024 09:35:02 -0700 Message-Id: <20240816163504.789393-3-doug@schmorgal.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240816163504.789393-1-doug@schmorgal.com> References: <20240816163504.789393-1-doug@schmorgal.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=doug@schmorgal.com; helo=mail-pj1-x102d.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 16 Aug 2024 14:18:29 -0400 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @schmorgal.com) X-ZM-MESSAGEID: 1723832375976116600 Content-Type: text/plain; charset="utf-8" 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: Francisco Iglesias Reviewed-by: Pavel Pisa --- 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 ad0c4da3c8..8968672b84 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, =20 dlc =3D frame->can_dlc; =20 - if (frame->flags =3D=3D QEMU_CAN_FRMF_TYPE_FD) { + if (frame->flags & QEMU_CAN_FRMF_TYPE_FD) { is_canfd_frame =3D true; =20 /* Store dlc value in Xilinx specific format. */ --=20 2.34.1