Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1037605pxj; Thu, 27 May 2021 18:39:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaRgJ31OsSk9Ldfe/vAAaOcebh8sL3+LYalKWo5gyGSxvJTvHtQunfZKx8kFQ7sUjqgKHl X-Received: by 2002:aa7:d70e:: with SMTP id t14mr7206498edq.377.1622165996641; Thu, 27 May 2021 18:39:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622165996; cv=none; d=google.com; s=arc-20160816; b=FAkrM6P7iZndku6hkvclbzrN9kQua/mJ9rok+3s3UQOEsWzJP1oWzImG6F23nJ0oEH i1+gXMK0KcBpsAUXcjSEtHDT8fSptKfPEm9g4FZaum0gM89JdmkGD+jCWifRJ39MV274 6hVzI01YEW9cM4dh6in9E9D6pB5WLsYhyOTmsS0U8xTPuWi6io4gH/8tysBiPRm8Isty uI8Oktm3pMXubqigfCiy59JHngGdabjOBx6z6LqWfGvZFFRP3LoUfhPLaKlSNvyCOued mkFUhK0FnHfCGwRrruhVDbje5eMvFymDBAr01Zr6TmbJUMP4bSzKO+DBxk103xkNV/wu AnxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=znfxTyjOyh61A5NCvUIulFxXnSNwjudLfChZnJBw++I=; b=I7KnZh0IOUxBfZ8P8s9zSH7IYYhAm+IdByKM3OfehiFZr6X8Oj8pTIRLtjf3+Nzus9 KJ4H8a6DyGeIxcN5n6KNf2bn3+IJ3Qoi0VfgjCYYB8smSttmveJA7Vlu7OrsSc7ENZuD eJIuD9hD+lLVfzhZQW8sR9Mxdim0kZkXpS6umX53IXZiT3YGS/+ih8eVxmSqSDNYqC7Z Fua+dXTcER5At6Rp5Bb3vDob94JSFXzJ3ZKPYh9UIBdTWhSAdlJROuuqJqoahhmEs7Jw wq1Bpq32VFA3c8uWX+pH417ADL/peBfOjx2QKzt5Zb7tr4ItB1nwjDeP8y70ni9mX5AA X9Lg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bg10si3467216ejb.233.2021.05.27.18.39.34; Thu, 27 May 2021 18:39:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233841AbhE0VB6 (ORCPT + 99 others); Thu, 27 May 2021 17:01:58 -0400 Received: from mail-ej1-f42.google.com ([209.85.218.42]:43656 "EHLO mail-ej1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229835AbhE0VB5 (ORCPT ); Thu, 27 May 2021 17:01:57 -0400 Received: by mail-ej1-f42.google.com with SMTP id f18so2144601ejq.10; Thu, 27 May 2021 14:00:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=znfxTyjOyh61A5NCvUIulFxXnSNwjudLfChZnJBw++I=; b=X/xZzML60xBvg7/QLc7/RhQPB100R7gi6HyUBbo/OXgMQayYQsHW6W+tYrEP6GNXyH QmPeF1apOjKookFYA7oz1boFLaqkaONPmKikZjACU4P0qYxMm+GSLuT4QFsTsRHx/5JD H3WVx53xJIOUsFeGj0BFADJnCwhfoYLcxuq5XYFWFNq3zy9CvJNnZB1PHH1+q8qjP1Ry boOp0hn9FCg0Mz2pu8a5iDtuu+pFG54sq6jc/CRFa5W/0xPvAwReVTRW9gUg6cZ3uL+s VEZTafjD/fYPmmcol3RsYBnaDACahhkfDZpotF+SSCJbzw2ZYWNWqS8KaMveRo4IlR4A WMnw== X-Gm-Message-State: AOAM5327WQ+xAUl4DJw43xnFNqTVMGIe18e4fnSKsadFFdokK44rzQc/ cPBqWEQKbOWSaGysNMbm1Z0= X-Received: by 2002:a17:906:694b:: with SMTP id c11mr5715720ejs.420.1622149222782; Thu, 27 May 2021 14:00:22 -0700 (PDT) Received: from rocinante.localdomain ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id qo19sm1506336ejb.7.2021.05.27.14.00.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 May 2021 14:00:22 -0700 (PDT) Date: Thu, 27 May 2021 23:00:21 +0200 From: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= To: Om Prakash Singh Cc: vidyas@nvidia.com, lorenzo.pieralisi@arm.com, bhelgaas@google.com, thierry.reding@gmail.com, jonathanh@nvidia.com, linux-tegra@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, kthota@nvidia.com, mmaddireddy@nvidia.com Subject: Re: [RESEND PATCH V1 4/5] PCI: tegra: Don't allow suspend when Tegra PCIe is in EP mode Message-ID: <20210527210021.GA32109@rocinante.localdomain> References: <20210527115246.20509-1-omp@nvidia.com> <20210527115246.20509-5-omp@nvidia.com> <20210527120531.GB213718@rocinante.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210527120531.GB213718@rocinante.localdomain> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > > + if (pcie->mode == DW_PCIE_EP_TYPE) { > > + dev_err(dev, "Tegra PCIe is in EP mode, suspend not allowed"); > > + return -EPERM; > > + } > > Would the -EINVAL be more appropriate here? It seem more appropriate > when something is an invalid operation, rather than access to the > resource being denied (or something along these lines), what do you > think? After looking at this again, perhaps -ENOTSUPP would be a better fit, and then the message could say that the suspend is not supported. Krzysztof