Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp958269rdb; Tue, 30 Jan 2024 04:03:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IETa9nWGFrJP6I7mAF+nojHZ8XEzJ+dysYRtnu1+3B8xFp0M3Ob3h8gfvoeWKHlb60n+XPB X-Received: by 2002:a05:6a20:8424:b0:19c:7ee6:d15 with SMTP id c36-20020a056a20842400b0019c7ee60d15mr8596988pzd.47.1706616207323; Tue, 30 Jan 2024 04:03:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706616207; cv=pass; d=google.com; s=arc-20160816; b=otUuFTxi3S7qP/xBeCq9Is8ZBv5p4wWuZym/kcGtaJR5uwHSCUfdCNiulHigHC2V13 l//8/ep+a0yHV6O65jrygoQT2KbovQBCpTMUtvmDOIi89q/tyR3z9O6U0iY/X3EA3pu0 RxJwe0oAqp4YmaIdAOaDMnj5F17bwBMNJWjyC7ZUTepB64l8MgIqUkLDvzWG3ZTvBGC+ zdpl8yxmHQQFvEabj0/pveGJ04pKXjdxQQPjb1X5663We9kBETHJBUCjo01PByAGaf69 HjuAHNDgHx+QQ7z42WutbhDzcz9OoEbaqTSXcgNQPMPAn1VzpYxLByLcH4DNxZE3xFRj 39jg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:autocrypt:references :in-reply-to:date:cc:to:from:subject:message-id:dkim-signature; bh=qawN/sGbFjDIitx+OorbC+U5Qtbve2fOYXbwnffL1Dc=; fh=OJIJ4eTXU8Q3LIGybEvm553jC6nFqNcjFD7kMjSto3k=; b=MWn4qSldct8Dqs1c+P1pYWTS1FmVWnCKibju1GOxzI8hhVvTybBxsDYmbPGGUpX4+E LgiOdUtpNLXFmKHjW2674JjSzLV+db/8sj/M870JniqWknYYXN52bueBl9MmJ67ZUVQA fpD/5Y2LZP6dHwmchvLavfBQHk007jMU2keSxyK0IiQdHgbW5BjMjjGbpBdfBTFyIw6r ODmY4fkjBuAIswl5BZgoLE3fkJPDtO36IukS5DuDN5tsNKYophZvyue0ZXkhrIoN5C3A 8xwp09O8zh74nQe41NQ7A/oLafAW/69shY1VtBrZQljLjSjikMN69BfTwVI9v/Xu4FiF qprw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="S/G+KgZ0"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-44535-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44535-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q31-20020a17090a752200b00290fdc46084si7293127pjk.105.2024.01.30.04.03.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 04:03:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44535-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="S/G+KgZ0"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-44535-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44535-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 11D4CB21D76 for ; Tue, 30 Jan 2024 11:41:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 77B3D67A19; Tue, 30 Jan 2024 11:41:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="S/G+KgZ0" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA72D67727 for ; Tue, 30 Jan 2024 11:41:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706614867; cv=none; b=bTT1KzUsvjPHwpJJg1viynidC5fErWM/0IiDYmOxhijUTQiLEn388GUiepkZdRNR1tGOXgNj0aXqOjg8Y0U1VoTpCLw/asxMQkBcKzYbWClkoYgbIvb6Tvl28BSQYeu24InefWTP6Ed4ptLxnVh5t5qTRrPxIz6aNYQXBx93iXI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706614867; c=relaxed/simple; bh=M+/cvRTiNQlo7KPfcEVL7C2AvVbn8/Y9+Zbphu4uI/0=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=kRM3L3LiNUvNUEBaWHXXBhjutnymUW4M67Yt2UsgF8nMzWux0SiF1vg42ieTrmcy+6sVvM+opD+uQx+9s6hLQo/BCMlsvu84yUUo1hpqqDdM3Xqt/5khhEZ4gZ/MU0VhXopRHLWdx8MQXkt9AXksRSW7qesAEvETpClSK7xFh34= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=S/G+KgZ0; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706614864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=qawN/sGbFjDIitx+OorbC+U5Qtbve2fOYXbwnffL1Dc=; b=S/G+KgZ0RfwnUf88Kn/DlBbDhou3gwmafdrkY+oNWPwGWhGqzxcC8zm85V79MjpXMm+fFt vvU51CpEgxyQkM5p4zGqO8iYZaf292m9N8+RqYyLqaQ2a+vDRN5iWUJS7N+qY+vay+GQD2 Mhi8Wk1jT7nOTzh73wckIKWgrd9LNTg= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-530-zpM27NtYNJyT0x6-09eQEw-1; Tue, 30 Jan 2024 06:41:03 -0500 X-MC-Unique: zpM27NtYNJyT0x6-09eQEw-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-40ef88ff82aso3780035e9.0 for ; Tue, 30 Jan 2024 03:41:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706614862; x=1707219662; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qawN/sGbFjDIitx+OorbC+U5Qtbve2fOYXbwnffL1Dc=; b=YruqEvJ+tfXDnR7Jq+oBuhjVsmU+s9El4YaFoyBBKEz4ubIXVYDRdAgrJROciVaP+k XXz5SjI1fVUoavGdRb/KufntDQXIw3toqxFnEVrLI52gnT48BDz8X5vj+us4KiaEJGpI 0B4Pn2SmiPtdQmfQCEebLsC+cbcJFW9kX77AsrNrgMftnLbrocqE4P/PoofFSVFmvrXA zdN6Pn3wgnqN8/GqTfV57/BlxUmggAN89l2Whr2ixC8QaQeUp84nB2ARiM1CzarO5NdX ldtfZgL7w/pgK2rRtplEGiB9sP+EvfUhcD9z5xzqs1VhQ/9dSsuJk9EVr5qVr5kM/dwO pwPw== X-Forwarded-Encrypted: i=0; AJvYcCUvI03Is4p71AL6K/wbWxbExTtHjCxt4Z6CkkEyv1dUsG5JUZv4yzzbzIhzAyys1wkmyjVBmEytn6HpGZdT2OwGLFQ9JyqTv0Ccxn3s X-Gm-Message-State: AOJu0Yy4gB8gVFwDGOkv+/pRM6oLdN+pk63igh4XpY7auGHGYE1jiDJq vR/XXqWzKlSA6qMPEnlk5aqS5jKtvqx0Bs/pNjxH+TCM+zMImF5PjVIr2swdtihg7jjI7XEcstD flkHtECSii60rH92ybGXXLJ+vmJOuZNyylZ/dHauolTyUwqWXTVx2h8Z7Ha5MPQ== X-Received: by 2002:adf:ab03:0:b0:33a:e9d3:5112 with SMTP id q3-20020adfab03000000b0033ae9d35112mr5449390wrc.6.1706614862076; Tue, 30 Jan 2024 03:41:02 -0800 (PST) X-Received: by 2002:adf:ab03:0:b0:33a:e9d3:5112 with SMTP id q3-20020adfab03000000b0033ae9d35112mr5449369wrc.6.1706614861759; Tue, 30 Jan 2024 03:41:01 -0800 (PST) Received: from gerbillo.redhat.com (146-241-232-203.dyn.eolo.it. [146.241.232.203]) by smtp.gmail.com with ESMTPSA id r15-20020adfda4f000000b00337d9a717bcsm10503807wrl.52.2024.01.30.03.41.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 03:41:01 -0800 (PST) Message-ID: Subject: Re: [PATCH net v2] net: stmmac: xgmac: fix handling of DPP safety error for DMA channels From: Paolo Abeni To: Furong Xu <0x1207@gmail.com>, "David S. Miller" , Alexandre Torgue , Jose Abreu , Eric Dumazet , Jakub Kicinski , Maxime Coquelin , Joao Pinto , Simon Horman Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, xfr@outlook.com, rock.xu@nio.com Date: Tue, 30 Jan 2024 12:40:59 +0100 In-Reply-To: <20240126073928.1070729-1-0x1207@gmail.com> References: <20240126073928.1070729-1-0x1207@gmail.com> Autocrypt: addr=pabeni@redhat.com; prefer-encrypt=mutual; keydata=mQINBGISiDUBEAC5uMdJicjm3ZlWQJG4u2EU1EhWUSx8IZLUTmEE8zmjPJFSYDcjtfGcbzLPb63BvX7FADmTOkO7gwtDgm501XnQaZgBUnCOUT8qv5MkKsFH20h1XJyqjPeGM55YFAXc+a4WD0YyO5M0+KhDeRLoildeRna1ey944VlZ6Inf67zMYw9vfE5XozBtytFIrRyGEWkQwkjaYhr1cGM8ia24QQVQid3P7SPkR78kJmrT32sGk+TdR4YnZzBvVaojX4AroZrrAQVdOLQWR+w4w1mONfJvahNdjq73tKv51nIpu4SAC1Zmnm3x4u9r22mbMDr0uWqDqwhsvkanYmn4umDKc1ZkBnDIbbumd40x9CKgG6ogVlLYeJa9WyfVMOHDF6f0wRjFjxVoPO6p/ZDkuEa67KCpJnXNYipLJ3MYhdKWBZw0xc3LKiKc+nMfQlo76T/qHMDfRMaMhk+L8gWc3ZlRQFG0/Pd1pdQEiRuvfM5DUXDo/YOZLV0NfRFU9SmtIPhbdm9cV8Hf8mUwubihiJB/9zPvVq8xfiVbdT0sPzBtxW0fXwrbFxYAOFvT0UC2MjlIsukjmXOUJtdZ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AEFjQsPTATACGsWf3JYPnWxL9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.3 (3.50.3-1.fc39) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Fri, 2024-01-26 at 15:39 +0800, Furong Xu wrote: > @@ -914,7 +964,12 @@ static int dwxgmac3_safety_feat_irq_status(struct ne= t_device *ndev, > ret |=3D !corr; > } > =20 > - err =3D dma & (XGMAC_DEUIS | XGMAC_DECIS); > + /* DMA_DPP_Interrupt_Status is indicated by MCSIS bit in > + * DMA_Safety_Interrupt_Status, so we handle DMA Data Path > + * Parity Errors here > + */ > + err =3D (dma & (XGMAC_DEUIS | XGMAC_DECIS)) || > + (dma & XGMAC_MCSIS); The above syntax is IMHO confusing,=20 err =3D (dma & (XGMAC_DEUIS | XGMAC_DECIS | XGMAC_MCSIS)) should be more readable. Cheers, Paolo