Received: by 2002:a05:7412:a9a3:b0:f9:327e:43ab with SMTP id o35csp54404rdh; Mon, 18 Dec 2023 04:19:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHaQE4Kc/rJN6Xk0dftZRY21NYMsXWfGqSjazrzUMuav6yN9LubAvYo9A717rNp+nU4PyQ4 X-Received: by 2002:a05:6214:226d:b0:67f:f0d:1bda with SMTP id gs13-20020a056214226d00b0067f0f0d1bdamr9928631qvb.110.1702901980744; Mon, 18 Dec 2023 04:19:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702901980; cv=none; d=google.com; s=arc-20160816; b=HrEzUf67eW+gyLXWQ5YVq74Tkzmn2vQGQ66M+n5YxjZEGPxucoDNZaEOWXu+ckcTmR xKCbm0At9EcY5FyeW5pCVb28f7ugA5FZJoOroMJ6DsZiKg1F02wSaoYvdONLhCHRZiv6 E8m8hhozsnDdkSspWeYQKnIoAL07AgIAwjjoPj6Sn3vbfUWbSPIIDueddSwkyJnMDnY3 11lPg/2DgL5Ut2TC3A265+gHKZEKwKMErt3YdROZp4jMDcNa2leWffsPMxQ/x9jClosj BJWejOKLZ94xfz2Zx2dEY10DLn+KFiIKYdXWMWpXQ/Hs2reo/eM2QjuQ+dZPa4xnxtUt 9XRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=UiEY1i9smy4B6PTxaNChazMQdojWBvHradNKGRULQg8=; fh=Zs9heDXFvZV9HI2BdVOdlA7f+iIYUd31UrmGbPpJMGY=; b=hyeQjceZf7avEW9toHMaQllgfM55hQ58+9DVjdFK7l6LEe86F623bgxcKpZtEdgH0e 5FMaExsaeR+rcLvLPlJ4Qwkkh6f8N04lG7LBhuLjcBrBw8gnh80wFccurIde9GCRM+LI DRMnqIVNXHzu+o2oqRn0eZlLlMvXSVaRFKK6y2SVarZpzLwEPpIBNpeOioESe66LMBe0 eTtmoOkglOtOw2Aeut7hJvz8Ui7W+TlMBlqFhVX/GFhJzB2Y71yGlX7upMivIKcUTgnG 9K6XXAwM2FYg03R+r0Pwf4YQRSLbnIusMe8GnipYxjdcFeEKfunO02wagGDlP6lXZZBU dRqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=ncwth7ij; spf=pass (google.com: domain of linux-kernel+bounces-2621-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2621-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s5-20020a0ce305000000b0067abb9c1cefsi2471539qvl.540.2023.12.18.04.19.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 04:19:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2621-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=ncwth7ij; spf=pass (google.com: domain of linux-kernel+bounces-2621-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2621-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 405B11C21D0F for ; Sun, 17 Dec 2023 14:02:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2099F446D3; Sun, 17 Dec 2023 14:02:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="ncwth7ij" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA87044369 for ; Sun, 17 Dec 2023 14:02:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-3365d38dce2so1089556f8f.1 for ; Sun, 17 Dec 2023 06:02:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1702821733; x=1703426533; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=UiEY1i9smy4B6PTxaNChazMQdojWBvHradNKGRULQg8=; b=ncwth7ij+8niY5Q3LCdP/Gc4swNcM2Dflq3GHAi/NhpsI60tCZfj0AT1cAPwGFvlJn JDtNNoywGMKk+WGc3eKm059lZxrzHmWPBLiIyVs+nREPBA4t0j5tWVxYTyNdUvLwxFCh D/SaxNu9j8i4M4ZKKoTOntwbfZXQI4+V8ZnKGC89d92UY8KkT3m4PvQJJAZmd216G+/R s3GNJc7TRhKJgE5VgfCqZdwMxOOMN2GUiSCinEgk7gbYZCeIab2l1BhKubBJZmRVDR7s 6wkMD1SvX7ehgwK8DnTXcTEqswPb0iB0gjpCiDTMgADnuiCUa8FpwUOrCewGEiG4oLKG WWFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702821733; x=1703426533; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UiEY1i9smy4B6PTxaNChazMQdojWBvHradNKGRULQg8=; b=lN0BG2qxvsJeMaTfrE2D2ni2CLeny0+hjI5rQJIlid94VpUaJK1KGi1SPn6Hnk81QW LlYrlYRgMrdM/Q6ADWYsd8TaSVjyY9lsyChrXsWLlNw78hArS3f7PU0V/pjXbmdkNoqh jMSxO8x2RPkawlZg2viCQV7bCpx0dsj9mWwN/BgTAAfWkQPVDJ6MiwzqpKHfsFG1paGW f7ZOnmDF53BzRjB0nPiB5+YVV6Mxi2NPpsfwnnU3quCgU6lxGcye9YMI1OL/IPu7jgmu 6O6F6PYoQF4ap7Kns3ciDPHcwRO2s6Bg2O7nj99MvEX6ugAELPXSrd3GTF+e8rJaEDNv xTOw== X-Gm-Message-State: AOJu0Yy6o8TCEQFkvIOuJ65PjvEegjnrfLa0wd+BbtG5u9R7VBlEx2xM bD1Aty9J405eCYzPy/9+3nf7yw== X-Received: by 2002:a5d:6acd:0:b0:336:41aa:7d8b with SMTP id u13-20020a5d6acd000000b0033641aa7d8bmr2618377wrw.109.1702821733063; Sun, 17 Dec 2023 06:02:13 -0800 (PST) Received: from [192.168.50.4] ([82.78.167.103]) by smtp.gmail.com with ESMTPSA id u10-20020a5d434a000000b0033342338a24sm24323215wrr.6.2023.12.17.06.02.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 17 Dec 2023 06:02:12 -0800 (PST) Message-ID: Date: Sun, 17 Dec 2023 16:02:10 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v2 19/21] net: ravb: Do not set promiscuous mode if the interface is down Content-Language: en-US To: Sergey Shtylyov , davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, richardcochran@gmail.com, p.zabel@pengutronix.de, yoshihiro.shimoda.uh@renesas.com, wsa+renesas@sang-engineering.com, geert+renesas@glider.be Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Claudiu Beznea References: <20231214114600.2451162-1-claudiu.beznea.uj@bp.renesas.com> <20231214114600.2451162-20-claudiu.beznea.uj@bp.renesas.com> <69a80458-b607-2cee-e8b1-38eb8d56eca3@omp.ru> From: claudiu beznea In-Reply-To: <69a80458-b607-2cee-e8b1-38eb8d56eca3@omp.ru> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 16.12.2023 22:16, Sergey Shtylyov wrote: > On 12/14/23 2:45 PM, Claudiu wrote: > >> From: Claudiu Beznea >> >> Do not allow setting promiscuous mode if the interface is down. In case >> runtime PM is enabled, and while interface is down, the IP will be in reset >> mode (as for some platforms disabling/enabling the clocks will switch the >> IP to standby mode which will lead to losing registers' content). > > Register. > Have this issue actually occurred for you? > >> Commit prepares for the addition of runtime PM. >> >> Signed-off-by: Claudiu Beznea > [...] > >> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c >> index 1995cf7ff084..633346b6cd7c 100644 >> --- a/drivers/net/ethernet/renesas/ravb_main.c >> +++ b/drivers/net/ethernet/renesas/ravb_main.c >> @@ -2164,6 +2164,9 @@ static void ravb_set_rx_mode(struct net_device *ndev) >> struct ravb_private *priv = netdev_priv(ndev); >> unsigned long flags; >> >> + if (!netif_running(ndev)) > > Seems racy as well... It is also called with rtnl_mutex locked at least though __dev_change_flags(). > >> + return; > > Hm, sh_eth.c doesn't have such check -- perhaps should be fixed > as well... > > [...] > > MBR, Sergey