Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5519701pxj; Wed, 23 Jun 2021 03:07:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjDjK9spVCcaXuA7Ym+E6RxmdgSv7cS1lRDwolTGjt4ksUjPO0QbwoQO4lI5KixvJdl+Ey X-Received: by 2002:a17:906:498b:: with SMTP id p11mr9294597eju.295.1624442879519; Wed, 23 Jun 2021 03:07:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1624442879; cv=pass; d=google.com; s=arc-20160816; b=QnsDjzAmhNszLQnvfW7sm1heU8lWyhiBUWvggDjvGQ2jkJ30aXL5Gp+wmcdWI8Mw8U opKvs2ENPzTWbBzTSHpFootduqltZVYg52Ivuq2TfyMVl7HFhaqNf6pSiIqWCrozWq9q MsSNNrY5YpSCeAOmVdKHGd91c0njhEvZd4MijSaKxDo0sY9oDKm7uGzZkQlv34awS58w IRI8Ct8QXE+ckVpH3hvQyRq46CsuK2XoDm7yjmwclx/fz5ZtMAvYdVXQoovSJUlP/yaU MknpVPskm7vlp9LYrds/Rmfl/oWWpxu9BrgJ0fR44aAoDbpiT6wAH1YWABORGaZA5w5P 0oXA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=COCptJj5XK5qLyk1wEBeGvHE+YTBvOaipsAk9IrfFpE=; b=jJ0x/VvQZytFeADZ78dec9cNNv5tv/anbuiZ/8azHM9Otk9hm6QY702U97oDLKOpDR huYntub42gTOxo+xYXmor+tBeEYnPxNwUs7N1UihWk76XvTelXW84TeQzPsnIW+EgXT6 CrvC0zLSOs3f6mcuIimZadulVepatq9G7m3sudzcw9INO3tcC6wiSXAV9MuL2LHS4oJb C38FaHgNZjAQhrm/WtSJPpbQSGFnwmSEh1RXXFmFRlWBc5PizkvJXYEeADSXwpR5sRwo wi8HbQoOffn2bswQtNLAnzHSBAj7O6rgBWMRgGt0Q72NUAY1PKbLisJfKe/8DYvhHOI1 5KHA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=YQgd3RSW; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s27si21127568edy.94.2021.06.23.03.07.35; Wed, 23 Jun 2021 03:07:59 -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; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=YQgd3RSW; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230302AbhFWKIL (ORCPT + 99 others); Wed, 23 Jun 2021 06:08:11 -0400 Received: from mail-bn7nam10on2071.outbound.protection.outlook.com ([40.107.92.71]:62336 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230481AbhFWKII (ORCPT ); Wed, 23 Jun 2021 06:08:08 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZZLeu7biowDCd2YO3I8du3wKoH9cmFN1vw2x+WeWdxD7MindzZNzfbnTrzqHBPbQv6RlHjIsLEbKxCB7k2nXt4jJ7g+M9AuWiNHjSLO3IaTGLuKvtxRf5L7pfoMVoP4nh/ARFLG8z9UU76z+TZQrfTwp7uczYkpefXTLsP4lZpeBGzMivypsabBUn8SfsKclkqL8CuoTl1Yz1fIEEXDlscxpOFH8O9NF+Ae4aCuk4/y/V8+L3/iVvekFYoxqLUSWqv26Twwl5QIlANYdjfqhImnLc0f66bw6nPOmkxzGOt6hCZJzsXiBbpn6BIASTXCR0j/Qn3P6+1pkylsXreEuTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=COCptJj5XK5qLyk1wEBeGvHE+YTBvOaipsAk9IrfFpE=; b=lZKPyT9immc8ci+/m3IAlUpZC5q6ZtSXousd+YgGuWdy6h5i1Tg/V4DJKglYYGwQy9jyToJPoRTLqfJVHe3NFli0m8eN5PJGwGZTZzKIDXeCSascbohtfw5KH0XuBeQzN2/tSUPYAxQx7GJNktIzN+0e37s37Ff2zMiwARkdFISNdDTkOW/rZKRAlL+erc/wTLIAYMVLThl8XFo/ft+d08KslwB8PzdMKfxyt+NM7r51kyUUrxsIVweE6qnh6G3+tScALANGoiflP5bsRwyfzNY8wjCuzPu7OhWlf2g8LvjPHJpwk4PW4vN0hI64PyOOLDrOcoCxC7EbudgE0bFIzA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.35) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=COCptJj5XK5qLyk1wEBeGvHE+YTBvOaipsAk9IrfFpE=; b=YQgd3RSWhAbp3uTfOla6rTgGvfjT+KNMXqVy5ADc3RCCuoJKen9bpNEX1K6GN5xhxwm0F5JS1Y7+4QgtFDL4BW3tpRu4YQpumzBcOnX+GLyJ35h2aw45rTjiJ9ofOwEZ5xvZw7Qd2wUlhgcg6NdSOlRGcPvrp1JRCuKe3/FBDeU+6lPXVK6sh9Wjw+EDPY7qHRqLEOqPdAO3OOqfUI8+jIgfPd/BC97WrDdIL2lYzYO8stSX4WS2tNUbTMcfBToy9ml5wNo+qTyW/pti0/5VmmqypSxDTesS9Ik79QEA0qjpJITH4nqfUF8B5JEf1fQnSsjm8pZkbg/vnmM5uYB+jQ== Received: from MW4PR03CA0009.namprd03.prod.outlook.com (2603:10b6:303:8f::14) by CH0PR12MB5220.namprd12.prod.outlook.com (2603:10b6:610:d3::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.18; Wed, 23 Jun 2021 10:05:49 +0000 Received: from CO1NAM11FT003.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8f:cafe::5f) by MW4PR03CA0009.outlook.office365.com (2603:10b6:303:8f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.18 via Frontend Transport; Wed, 23 Jun 2021 10:05:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.35) smtp.mailfrom=nvidia.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.35 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.35; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.35) by CO1NAM11FT003.mail.protection.outlook.com (10.13.175.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4264.18 via Frontend Transport; Wed, 23 Jun 2021 10:05:49 +0000 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 23 Jun 2021 10:05:48 +0000 Received: from buildserver-hdc-comms.nvidia.com (172.20.187.5) by mail.nvidia.com (172.20.187.12) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 23 Jun 2021 10:05:44 +0000 From: Om Prakash Singh To: , , , , , , CC: , , , , , Om Prakash Singh Subject: [PATCH V3 4/5] PCI: tegra194: Don't allow suspend when Tegra PCIe is in EP mode Date: Wed, 23 Jun 2021 15:35:24 +0530 Message-ID: <20210623100525.19944-5-omp@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210623100525.19944-1-omp@nvidia.com> References: <20210623100525.19944-1-omp@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 533313ef-4666-4a73-7190-08d9362e79f0 X-MS-TrafficTypeDiagnostic: CH0PR12MB5220: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4502; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5YbmqWPc4xfmnoQ7AET8Nj0tEz2k7XcllX1833r/s+Dh94m7ABVKmEvwTwcBmpHIQXsLfaLUXMxmNbgXILV7C9d888lTYy3IUYEuEN7hGwggbXicTzgb2vn9Aa+vncq48MsO5HiB7tmqZnlBXNfyM7C9bJsTTs3f5Vw5fIkRl3fWgQN+uKl3WTyAvHmFYvxk4EVdRJXHHPo/r1xXVWcYqWmh6m8tfDy0ogA5yWWY2kppQjbvVEZauyH+ROXZSZtkH0m8NfyQ6AVfPVH+rDLlZslkLg+IGMvSSBgX2oVXtOju/r17S42mH1H3KfoShpgmblb/Y2GpsPRr82cxBG5TxodOJRNm8KB4rAwuDJNUXzabm8eWDebMlJx8bOVbG5pCpQPXrHXmYEfoAMKpBQhI68GHgxliwa5QxEPqRCJOoGShlqjngDczIBdr/MZDa3758XxmCSJ0gI1gFo7MY2uQMJLi4BY0nQq+6fNg68THQ3NnSfe8561exIkZo+YJGdrCCCAHzvZ9d8eLOCUtrdUhgyBXUjBL7LHgGVcDLvv9dRrF4vqNbCvcZWXpzC8xh/ngpETDK/+EbrcWOdQ6Evwh6KTJC0nQvOlX8X2v4tVC7iE2t93A5IUrmOxnNpTiw1P3Rv0WhEL+4byOYazq9uHDhw== X-Forefront-Antispam-Report: CIP:216.228.112.35;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:schybrid02.nvidia.com;CAT:NONE;SFS:(4636009)(39860400002)(376002)(136003)(396003)(346002)(36840700001)(46966006)(2616005)(426003)(2906002)(82310400003)(478600001)(15650500001)(36756003)(47076005)(336012)(5660300002)(4326008)(1076003)(107886003)(36860700001)(6636002)(83380400001)(36906005)(6666004)(356005)(70206006)(186003)(70586007)(82740400003)(8676002)(8936002)(7636003)(26005)(7696005)(86362001)(110136005)(4744005)(54906003)(316002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2021 10:05:49.1072 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 533313ef-4666-4a73-7190-08d9362e79f0 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.112.35];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT003.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5220 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When Tegra PCIe is in endpoint mode it should be available for root port. PCIe link up by root port fails if it is in suspend state. So, don't allow Tegra to suspend when endpoint mode is enabled. Signed-off-by: Om Prakash Singh Reviewed-by: Bjorn Helgaas Acked-by: Vidya Sagar --- drivers/pci/controller/dwc/pcie-tegra194.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c index 64ec0da31b5b..ae4c0a29818d 100644 --- a/drivers/pci/controller/dwc/pcie-tegra194.c +++ b/drivers/pci/controller/dwc/pcie-tegra194.c @@ -2276,6 +2276,11 @@ static int tegra_pcie_dw_suspend_late(struct device *dev) struct tegra_pcie_dw *pcie = dev_get_drvdata(dev); u32 val; + if (pcie->mode == DW_PCIE_EP_TYPE) { + dev_err(dev, "Suspend is not supported in EP mode"); + return -ENOTSUPP; + } + if (!pcie->link_state) return 0; -- 2.17.1