Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1984272rbb; Tue, 27 Feb 2024 07:16:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUapU1WH0i0WPFgM3u7DMIB5aa4b5rdxYFaOiYuNNtrSzwnLJ1CiROjx46kYeOnf18OIHff2cG8zkHKTR3Cn7mbB0j/QY8GsPu2f6fruQ== X-Google-Smtp-Source: AGHT+IHNQ5z+hkOF0mvAE/4mhMhLpip6hOostuHxBnMXohQA4T7LPisrrGbZCiGiOa5pRHcudgdp X-Received: by 2002:a05:6512:1589:b0:512:e061:e35d with SMTP id bp9-20020a056512158900b00512e061e35dmr8199773lfb.53.1709047007588; Tue, 27 Feb 2024 07:16:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709047007; cv=pass; d=google.com; s=arc-20160816; b=fd6csPCMsNnqzIa0FWGC0PYvY0PdBPSkEHeEZPVTE5EnJUWHYMB6R8uHqfw4I/hQUJ LZcSDVmZdIlqnRKUcVPvAYWxnATTrDGkv+BjnkuD1jqTJzCOudWGDSuPkjuwvFxabvzZ ZgHL6eBmxpLreLivs65B9h+uTbDnnRs57rSzuUEssM6U7dCDYsZ6aW/8In2brJWtIM9H tHJe18bcolbO6wFT9vCOKKPoaXknyqSOY/1uuunb+r8+n0GlQ71xFytcnGpoXLeNVRED Fbda8MdjJeafDrjuc247glGJOsuBI/KjsPaPvfbZjeOZbeMPpXyxzVGVGEO8ZiTGgO46 ba4w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DKJUCR6/peokmm2PkUIeXbzoDKYqMqCwg9yb/3qKCyo=; fh=ySC+V9JpwA6+rf+LDhTlZMOqdniCJ8wf6poEfnmYRvM=; b=qnJ1EcgDt1QrGTsi++Tb2NsJgzCFHJthzp3RdchWXV3PaS++O94i7FOb+zFpWhh+f6 S+NhlMQTL1Vs7DVR6LrK/w4i2ZciyhHOuqjeR7LnEiuaODs3tY4B26LVGAHZyZ4VslmC Nd+cdCpwHnFONukaoHp9NXqVKR1OZL6OnMuy6y3qQZ/B+ZyQAj/QOYbzcFbUAIbTkC/I pznPdNTXIvfvDLSMhw4aSq/D3QJCA+0PSZfuVhQyd4pwbWABEtMPhAgujHLIKlSvvpfr NfoXAQaPAmf9KBVPH3Iu0CK3Ztf5KGsPyiIfa/d/Nx5i9duFboyZbu0ZPp6wys0kG/pS nB5A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="dK/OsA/a"; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-82571-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82571-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t28-20020a50d71c000000b005645ee8e9f5si810040edi.639.2024.02.27.07.16.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 07:16:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82571-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="dK/OsA/a"; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-82571-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82571-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 4BA201F2582C for ; Tue, 27 Feb 2024 01:58:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F624F4EB; Tue, 27 Feb 2024 01:58:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="dK/OsA/a" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 23EB94C61; Tue, 27 Feb 2024 01:57:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708999079; cv=none; b=KiREwwrh2/tP+9WJKYC+K0DeEuN9clCb0coGlUvkWbk6/7w4iU8kQWN0e/dJNWfPV+FdOUvSeSnkd/wMi8DWzGWMeN++wP/PvRyEfuAuzVJ0VsjlpUOsR5XuI1Mmsgat2PWay6tBCsXTHl+LPfYkC3BWbG/tjdAQi6DkKt4AtR4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708999079; c=relaxed/simple; bh=bmfovlKODQ8A2dBbQS7bpa+U3b0djNDXFKPKK1VxlFI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MwZaAiJ2shHUcrOjAhi75kpeMri575LPBmk6mGX9UUJ8/74dQICRJ8zhiLsbQBhfbHKaf6fWBC4jkeQLk9HVspA3h/Sf0Fsv+rx4GESkCkmHLpKbrtiqeh1OiY6DLQX5gxAY3eOSRXj9FF5jXHYzHCeprhEfWq5UvZ6VHaekMog= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=dK/OsA/a; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition: In-Reply-To:References; bh=DKJUCR6/peokmm2PkUIeXbzoDKYqMqCwg9yb/3qKCyo=; b=dK /OsA/avAGpJ0Li4TOEk4P6whUnCPRKvTPFlaj7wA8IVtfZdoc+EVvtT0uQeckiu3u9kWurf/YYgvD cFM3B3ZtTNFL7A/MXz0NPcjDh1TfcMJwDoiB1pgYvEpAH8fCW0aRfHNBpcekseYIcgLjREHmu1kKr 1BWolNGW0/lwkic=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1remjS-008n4m-ND; Tue, 27 Feb 2024 02:58:10 +0100 Date: Tue, 27 Feb 2024 02:58:10 +0100 From: Andrew Lunn To: Raju Lakkaraju Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org, linux-kernel@vger.kernel.org, bryan.whitehead@microchip.com, richardcochran@gmail.com, UNGLinuxDriver@microchip.com Subject: Re: [PATCH net 3/3] net: lan743x: Address problems with wake option flags configuration sequences Message-ID: References: <20240226080934.46003-1-Raju.Lakkaraju@microchip.com> <20240226080934.46003-4-Raju.Lakkaraju@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240226080934.46003-4-Raju.Lakkaraju@microchip.com> On Mon, Feb 26, 2024 at 01:39:34PM +0530, Raju Lakkaraju wrote: > Wake options handling has been reworked as follows: > a. We only enable secure on magic packet when both secure and magic wol > options are requested together. > b. If secure-on magic packet had been previously enabled, and a subsequent > command does not include it, we add it. This was done to workaround a > problem with the 'pm-suspend' application which is unaware of secure-on > magic packet being enabled and can unintentionally disable it prior to > putting the system into suspend. This seems to be in a bit of a grey area. But ethtool says: wol p|u|m|b|a|g|s|f|d... Sets Wake-on-LAN options. Not all devices support this. The argument to this option is a string of characters speci‐ fying which options to enable. p Wake on PHY activity u Wake on unicast messages m Wake on multicast messages b Wake on broadcast messages a Wake on ARP g Wake on MagicPacket™ s Enable SecureOn™ password for MagicPacket™ f Wake on filter(s) d Disable (wake on nothing). This option clears all previous options. d clears everything. All other things enable one option. There does not appear to be a way to disable a single option, and i would say, adding options is incremental. So: > a. We only enable secure on magic packet when both secure and magic wol > options are requested together. I don't think they need to be requested together. I think you can first enable Wake on MagicPacket and then in a second call to ethtool Enable SecureOn password for MagicPacket. I also don't think it would unreasonable to accept Enable SecureOn password for MagicPacket and have that imply Wake on MagicPacket. And: > b. If secure-on magic packet had been previously enabled, and a subsequent > command does not include it, we add it. If there has not been a d, secure-on magic packet should remain enabled until there is a d. Andrew