Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1351203lql; Tue, 12 Mar 2024 14:41:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUs67w+WM8Xcr65hhdjFRXJFQby+i49xYiQfOYyIE3xr3z3GOgBOWuMHdsmk4MTirpEmhTTQWbCOUGeKpgdmFLD4HM0LeULv33WleuvPA== X-Google-Smtp-Source: AGHT+IHHHBgFbnx4PRM3UKvTbBTO3oV+NsjFRsrf2Q4eBuloQFnV2FmlZF/ZBRwZrTn1LhYcJBaC X-Received: by 2002:a05:6a20:1454:b0:1a1:776d:15c with SMTP id a20-20020a056a20145400b001a1776d015cmr8127748pzi.21.1710279668158; Tue, 12 Mar 2024 14:41:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710279668; cv=pass; d=google.com; s=arc-20160816; b=eCnIAqOXpIpZRhDvLUhUSlpt73+WzzqTF3jGaDJwdQQUcP5M6ssNA58jHG+6bbBcl7 wdGufT8aMe62652pj5jHQ2svFr9pSOQwW/FEURPuPH3g1GeVnzTZTZvbsHJzB9XB749V 9Q3ZBY2rEzcS2Hj+tFff2x2eTvGLE5OPs/zcZWqhPY8Y9DyE8D2XXq3xuMLeA7Iwmq2w GX7NzaffmjM0Q4DIsakYmJuPRBi8GhGouxpEKbEnwpMSNU8qUdEn2UD5kxCWBisQpDpr 9ptANWjCWC0LLfFIYMDyckvIwPlnghH4Q5SvjX801eesePLBxIXEp0IZL+rI8ON+m9lX ri1w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pB0npZBb02/Y7AXQyoSQVHyq17wriRhZ0GXXdXTPYXU=; fh=DU7WB+Pwfk7rLPcIcmZDV5OarErbjbXlPZDjwQkHxdQ=; b=EHkXJazXcuk+XE4EzO898xhlQJxP8LzXLTrEQRGkMcVcE/Y4SP5r6jNOjbuDEBWlSg VLHI5G++cuCy6krZ8MfhYN6AEz6lL77EfeETFVdmnDZBkB5cxQ7kKgebB3phZe5swulP XuL19qLZjx58sQ+y5BJSCdz5NAtqKPzj6maG5qZrO4NP/LvJnLgjkp5yQxxGuKpy2YTq fGZ5RbiEaeX7pRGOjbm1VSCVM0nd1dz2KOsA9B9X8ZUmu5/osX2MvnM8SBGSSLuhNKpD ph/aZ20l3vH0PBVTVHhZrLPuALXcG/kyn5fg373c2lCkrBV1jyFDAN1CuA27QvIy7cdE gGsg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="Tr2/bmlG"; 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-100814-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100814-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id l3-20020a17090a850300b0029bf7a1eb63si91216pjn.89.2024.03.12.14.41.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 14:41:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100814-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=@lunn.ch header.s=20171124 header.b="Tr2/bmlG"; 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-100814-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100814-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 4F319B20E39 for ; Tue, 12 Mar 2024 21:40:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D3267143753; Tue, 12 Mar 2024 21:40:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="Tr2/bmlG" 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 3A3AB13B2BF; Tue, 12 Mar 2024 21:40:09 +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=1710279612; cv=none; b=skk0tSoUnwwbXQt3FQhJIej53kRBs/XCqd6qXtZ/F76s0IGvRJ1bfkIL6ohBkToHaw6xoBCpYmIiJADa+1FMTGPjTCg+zkVJCLMehfmNGf3qHazE+4qHlzWXjyUGY+wfm1PGHOITmcyvPFw8LLdrvFc4APb7nh2prpK0ikcrVtg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710279612; c=relaxed/simple; bh=+80JYJzoe18PwUCOYAW7gnfaLZghFUWOhMTo6ihGcoI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hpjP0x49XVSMcYTlnw48EjGcrNyr7S1yZVqwCjcBlxDuBHgT6xOuqcATsADzEulBTA7kA2jRxxyDZYorTD7BfsuAa73UtKjiT0FqpuTGROridplL5HErGeCTSqEvtn2b0tuzrf2JTF2FD4ZDLSacwxRHZyvRug6FD7veQEOEJyM= 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=Tr2/bmlG; 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-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=pB0npZBb02/Y7AXQyoSQVHyq17wriRhZ0GXXdXTPYXU=; b=Tr2/bmlGtLutH42IYRuYmfOZZy +nc0B3WD8q8J/rMNBisjeLQBjUFU3EHvIDDJwrYYMqCXgvMJqQ4gZr6ElT321sVZyoq4gZBBEqW4i RQa97YJ1CdlThAjWpELSF7yt9vE6NtS1pxwKZ2YAnXXVRIXeDGMhc1GjJk+WtjqBLoIk=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rk9rT-00A570-D4; Tue, 12 Mar 2024 22:40:39 +0100 Date: Tue, 12 Mar 2024 22:40:39 +0100 From: Andrew Lunn To: Ronnie.Kunin@microchip.com Cc: Raju.Lakkaraju@microchip.com, 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> <78d7e538-9fa0-490e-bcfb-0a5943ad80c9@lunn.ch> 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=us-ascii Content-Disposition: inline In-Reply-To: > I understand that the TI devices give the *impression* of supporting > both, but based on what I explained above, even if you accept > WAKE_MAGIC and WAKE_MAGICSEGURE on a set and report them both back > as enabled on a get; whatever behavior your hardware does will not > be fully compliant to both specs simultaneously anyway. I discussed > this with Raju and what we decided to do for our driver/device is > that if you pass both WAKE_MAGIC and WAKE_MAGICSEGURE flags to us we > will report them back as both being enabled in a subsequent get as > you suggested, but the behavior of our driver/hardware will be as if > you had only enabled WAKE_MAGIC. So i agree having WAKE_MAGIC and WAKE_MAGICSECURE at the same time seems very odd. So i see no real problem limiting the driver to only one or the other. However, if the user does ask for both, i would say silently ignoring one is incorrect. You should return -EOPNOTUPP to make it clear you don't support both at the same time. I would also say that silently ignore the Secure version is probably the worst choice. Things should be secure by default... Andrew