Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753081AbdGNB2m (ORCPT ); Thu, 13 Jul 2017 21:28:42 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:8925 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752599AbdGNB2k (ORCPT ); Thu, 13 Jul 2017 21:28:40 -0400 Subject: Re: [PATCH v7 2/3] PCI: Enable PCIe Relaxed Ordering if supported To: Sinan Kaya , , , , , , , , , , , , , , , , , , , , , , , , , , References: <1499955692-26556-1-git-send-email-dingtianhong@huawei.com> <1499955692-26556-3-git-send-email-dingtianhong@huawei.com> From: Ding Tianhong Message-ID: <0260e398-bd8e-6615-6d5c-1f7c07b6fc09@huawei.com> Date: Fri, 14 Jul 2017 09:26:15 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.23.32] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090206.59681DD7.0052,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: e234330d39519fbb015a7988158fed41 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1045 Lines: 31 On 2017/7/14 5:09, Sinan Kaya wrote: > On 7/13/2017 10:21 AM, Ding Tianhong wrote: >> static void pci_configure_relaxed_ordering(struct pci_dev *dev) >> +{ >> + /* We should not alter the relaxed ordering bit for the VF */ >> + if (dev->is_virtfn) >> + return; >> + >> + /* If the releaxed ordering enable bit is not set, do nothing. */ >> + if (!pcie_relaxed_ordering_supported(dev)) >> + return; >> + >> + if (pci_dev_should_disable_relaxed_ordering(dev)) { >> + pcie_clear_relaxed_ordering(dev); >> + dev_info(&dev->dev, "Disable Relaxed Ordering\n"); >> + } >> +} > > I couldn't find anywhere where you actually enable the relaxed ordering > like the subject suggests. > There is no code to enable the PCIe Relaxed Ordering bit in the configuration space, it is only be enable by default according to the PCIe Standard Specification, what we do is to distinguish the RC problematic platform and clear the Relaxed Ordering bit to tell the PCIe EP don't send any TLPs with Relaxed Ordering Attributes to the Root Complex. Thanks Ding