From patchwork Mon Jan 22 17:28:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 10178935 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 312DF601D5 for ; Mon, 22 Jan 2018 17:28:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 169212841E for ; Mon, 22 Jan 2018 17:28:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0A1DA28433; Mon, 22 Jan 2018 17:28:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8DB262841E for ; Mon, 22 Jan 2018 17:28:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=kSpNzh70WbQfpJ+vsdUp+EV0Ji8rOaUFieugIh+Wixw=; b=Kdb Ums5Wzkm+YdZSR3PCDMBkfLAb5c+2LPCOIu5tLhZqSXOsHPLoGSTPhy0Tsj4821YvRV0UA9/CH1yN 9RK2t3xeRLTUnMad5/8LWgXGqxs1CJuSS9V8jHpkAedVkjahPEeWHJjwL1VTUY+/4O2iKlrMjaQoi 79wjjk0kLhwtm/LR2VuAj2L0tj3RI84qteUDEnGtxBAb3qM3Wox7Q3064debc2aQX2BhjjZ3WqPvQ oEzBbC0BVdc7oD7NqPQH5TqrKm6bkVj3cK0MmbYlfNH+e9YOOLdiQDfHOAKgE3eO+Yn7ilM4XTr2I 7GsyXOL13tH0sF67ob4fJeebVwGZlrQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1edftf-0008H1-JQ; Mon, 22 Jan 2018 17:28:39 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1edftc-0008FP-OB for linux-arm-kernel@lists.infradead.org; Mon, 22 Jan 2018 17:28:38 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 9372E60A08; Mon, 22 Jan 2018 17:28:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516642105; bh=lglCCGERN4D79sxcDjCH4QAsMsPepBZIO9A8Qzeh65I=; h=From:To:Cc:Subject:Date:From; b=ZxL2u1LiiaDnzJjZQ/Y8NUplRJXlegsbAZSrpjGIB6OFarGtuFrYtzyMIEMO731ZW 8Bo2n1Ez5ClInG75vTidHWQB6h209d2W+AoBBZ438rvK0xETSt0KG0U4dmHImRkmCy IKo+ImrCsRJfoc7azv1kB3FeYm+onnbSZvUOInzw= Received: from drakthul.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id B004F60398; Mon, 22 Jan 2018 17:28:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516642104; bh=lglCCGERN4D79sxcDjCH4QAsMsPepBZIO9A8Qzeh65I=; h=From:To:Cc:Subject:Date:From; b=dMu/Dm40ekdXdlW3PdzU053htbx7FA01CvzBNKvDc9qrD5kEwJOBx/1NN849uBzuK EBs0KfCej/+a6YL9d+br+4ps6scEYPf8vzfgGfO79JEpJMHz9U1KXaIIbvEOa2f7XA 6GiOQ4vFNVq00HmFP9pcYMgdoky465sDMbq2KmcQ= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org B004F60398 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org From: Sinan Kaya To: linux-pci@vger.kernel.org, timur@codeaurora.org Subject: [PATCH] PCI/ASPM: Suppress common clock mode setting failure Date: Mon, 22 Jan 2018 12:28:00 -0500 Message-Id: <1516642093-15633-1-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 1.9.1 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kees Cook , Ard Biesheuvel , linux-arm-msm@vger.kernel.org, open list , Vidya Sagar , Sinan Kaya , Bjorn Helgaas , Thomas Gleixner , Rajat Jain , Yinghai Lu , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Code is emitting warnings when it tries to set the common clock mode for ASPM and ASPM is already configured to common clock mode by the UEFI BIOS. Let's bail out silently in such a case. pci 0004:00:00.0: ASPM: Could not configure common clock Signed-off-by: Sinan Kaya --- drivers/pci/pcie/aspm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index 9783e10..072178a 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c @@ -253,6 +253,11 @@ static void pcie_aspm_configure_common_clock(struct pcie_link_state *link) /* Configure upstream component */ pcie_capability_read_word(parent, PCI_EXP_LNKCTL, ®16); + + /* Port might be already in common clock mode */ + if ((same_clock) && (reg16 & PCI_EXP_LNKCTL_CCC)) + return; + parent_reg = reg16; if (same_clock) reg16 |= PCI_EXP_LNKCTL_CCC;