From patchwork Mon Dec 18 15:25:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Bounine, Alexandre" X-Patchwork-Id: 10120213 X-Patchwork-Delegate: bhelgaas@google.com 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 E446160327 for ; Mon, 18 Dec 2017 15:49:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D64CA28CF5 for ; Mon, 18 Dec 2017 15:49:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CAF7128DA5; Mon, 18 Dec 2017 15:49:56 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D10728CF5 for ; Mon, 18 Dec 2017 15:49:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933002AbdLRPtw (ORCPT ); Mon, 18 Dec 2017 10:49:52 -0500 Received: from mxout2.idt.com ([157.165.5.26]:45825 "EHLO mxout2.idt.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932901AbdLRPts (ORCPT ); Mon, 18 Dec 2017 10:49:48 -0500 X-Greylist: delayed 902 seconds by postgrey-1.27 at vger.kernel.org; Mon, 18 Dec 2017 10:49:48 EST Received: from mail6.idt.com (localhost [127.0.0.1]) by mxout2.idt.com (8.14.4/8.14.4) with ESMTP id vBIFWpCH027562; Mon, 18 Dec 2017 07:33:11 -0800 Received: from corpml1.corp.idt.com (corpml1.corp.idt.com [157.165.140.20]) by mail6.idt.com (8.14.4/8.14.4) with ESMTP id vBIFWoRQ020267; Mon, 18 Dec 2017 07:32:50 -0800 Received: from corpmail2.na.ads.idt.com (corpimss2.corp.idt.com [157.165.141.30]) by corpml1.corp.idt.com (8.11.7p1+Sun/8.11.7) with ESMTP id vBIFPKc12676; Mon, 18 Dec 2017 07:25:20 -0800 (PST) Received: from CORPMAIL1.na.ads.idt.com ([157.165.140.197]) by corpmail2 ([157.165.140.198]) with mapi id 14.03.0361.001; Mon, 18 Dec 2017 07:25:20 -0800 From: "Bounine, Alexandre" To: Bjorn Helgaas , Matt Porter CC: "linux-pci@vger.kernel.org" , Andrew Morton Subject: RE: [PATCH] rapidio/tsi721: use PCI_EXP_DEVCTL2_COMP_TIMEOUT macro Thread-Topic: [PATCH] rapidio/tsi721: use PCI_EXP_DEVCTL2_COMP_TIMEOUT macro Thread-Index: AQHTdfhtE/0wof1DMkaN1O8gNCGRHaNJPDvQ Date: Mon, 18 Dec 2017 15:25:19 +0000 Message-ID: <8D983423E7EDF846BB3056827B8CC5D161B3B7F7@corpmail1> References: <20171215225952.177299.86044.stgit@bhelgaas-glaptop.roam.corp.google.com> In-Reply-To: <20171215225952.177299.86044.stgit@bhelgaas-glaptop.roam.corp.google.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [157.165.140.29] x-tm-as-matchedid: 150567-701625-704425-700685-106230-700274-139006-703523-7 11995-700648-106660-702358-701236-704156-188019-706290-702737-703454-148004 -148133-10010-42000-42003-63 MIME-Version: 1.0 X-TM-AS-MML: disable Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Acked-by: Alexandre Bounine Hi Andrew, Please apply the patch below. Thank you, Alex. -----Original Message----- From: Bjorn Helgaas [mailto:helgaas@kernel.org] Sent: Friday, December 15, 2017 6:00 PM To: Bounine, Alexandre ; Matt Porter Cc: linux-pci@vger.kernel.org Subject: [PATCH] rapidio/tsi721: use PCI_EXP_DEVCTL2_COMP_TIMEOUT macro From: Bjorn Helgaas Use the existing PCI_EXP_DEVCTL2_COMP_TIMEOUT macro instead of hard-coding the PCIe Completion Timeout Value mask. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/rapidio/devices/tsi721.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/rapidio/devices/tsi721.c b/drivers/rapidio/devices/tsi721.c index 9a68914100ad..bb655854713d 100644 --- a/drivers/rapidio/devices/tsi721.c +++ b/drivers/rapidio/devices/tsi721.c @@ -2880,8 +2880,9 @@ static int tsi721_probe(struct pci_dev *pdev, "Invalid MRRS override value %d", pcie_mrrs); } - /* Adjust PCIe completion timeout. */ - pcie_capability_clear_and_set_word(pdev, PCI_EXP_DEVCTL2, 0xf, 0x2); + /* Set PCIe completion timeout to 1-10ms */ + pcie_capability_clear_and_set_word(pdev, PCI_EXP_DEVCTL2, + PCI_EXP_DEVCTL2_COMP_TIMEOUT, 0x2); /* * FIXUP: correct offsets of MSI-X tables in the MSI-X Capability Block