From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757746Ab3ILKHk (ORCPT ); Thu, 12 Sep 2013 06:07:40 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:33047 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751594Ab3ILKHi (ORCPT ); Thu, 12 Sep 2013 06:07:38 -0400 Message-ID: <5231925B.3030104@ti.com> Date: Thu, 12 Sep 2013 15:37:23 +0530 From: Kishon Vijay Abraham I User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 MIME-Version: 1.0 To: Pratyush Anand CC: Jingoo Han , "'Bjorn Helgaas'" , "linux-pci@vger.kernel.org" , "linux-samsung-soc@vger.kernel.org" , "'Kukjin Kim'" , Mohit KUMAR DCG , "'Arnd Bergmann'" , "'Sean Cross'" , "'Thierry Reding'" , "'SRIKANTH TUMKUR SHIVANAND'" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" Subject: Re: [PATCH V3] pci: exynos: split into two parts such as Synopsys part and Exynos part References: <002801ce8376$a807dbf0$f81793d0$@samsung.com> <51ED49D6.9050209@ti.com> <000701ce8741$fe47deb0$fad79c10$@samsung.com> <51EE22DF.6090902@ti.com> <001301ce8772$522dfc50$f689f4f0$@samsung.com> <5231607C.10702@ti.com> <003501ceaf87$cda45db0$68ed1910$%han@samsung.com> <20130912093018.GA2124@pratyush-vbox> <52318CCC.4040604@ti.com> <20130912095213.GA5995@pratyush-vbox> In-Reply-To: <20130912095213.GA5995@pratyush-vbox> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thursday 12 September 2013 03:22 PM, Pratyush Anand wrote: > Hi Kishon, > > On Thu, Sep 12, 2013 at 05:43:40PM +0800, Kishon Vijay Abraham I wrote: >> Hi, >> >> On Thursday 12 September 2013 03:00 PM, Pratyush Anand wrote: >>> Hi Jingoo, >>> >>> >>> On Thu, Sep 12, 2013 at 03:15:04PM +0800, Jingoo Han wrote: >>>> On Tuesday 23 July 2013 12:30 PM, Kishon Vijay Abraham I wrote: >>>>>>> . >>>>>>> . >>>>>>>>>> + of_pci_range_to_resource(&range, np, &pp->cfg); >>>>>>>>>> + pp->config.cfg0_size = resource_size(&pp->cfg)/2; >>>>>>>>>> + pp->config.cfg1_size = resource_size(&pp->cfg)/2; >>>>>>>>>> + } >>>>>>>>>> + } >>>>>>>>>> + >>>>>>>>>> + pp->dbi_base = devm_ioremap(pp->dev, pp->cfg.start, >>>>>>>>>> + resource_size(&pp->cfg)); >>>>>>>>> >>>>>>>>> Why is configuraion space divided into two? >>>>>>>> >>>>>>>> Sorry, I don't know the exact reason. :( >>>>>>>> Pratyush Anand may know about this. >>>>>>>> Pratyush Anand, could you answer the question? >>>>>>>> >>>>>>>> Also, if you find some problems, please let me know. >>>>> >>>>> One more query.. >>>>> >>>>> Where is inbound translation configuration done in your driver? how should it >>>>> be done? >>>> >>> >>> Yes, Kishon is right. Inbound translation configuration is missing in >>> your code and I think it should be implemented. >>> >>>> Hi Kishon, >>>> >>>> Sorry, I cannot understand your question exactly. >>>> However, the following thread would be helpful. >>>> >>>> http://www.spinics.net/lists/arm-kernel/msg252078.html >>>> https://lkml.org/lkml/2013/6/17/890 >>> >>> From this conversation, It seems that you >>> have tested this driver and it works fine without inbound translation >>> function. I am sure that you would have tested a PCIe card with DMA >>> capability such as PCIe2USB or PCIe2Ethernet. Since it worked, it >>> means that by default your controller is supporting one to one mapping >>> in case of inbound transaction even when address translation is enabled. >> >> btw, I'm testing Ethernet controller: Realtek Semiconductor Co., Ltd. >> RTL8111/8168B PCI Express Gigabit Ethernet controller. >> >> when I do ifconfig eth0 up, I get *r8169 0000:01:00.0 eth0: link up.* >> But I dont receive any packets and ping also fails and the tx and rx packet >> count is also 0. Could it be related to inbound translation? > > A PCIe analyser log would tell a definite cause. Most likely either > inbound translation is not working or INTx/MSI is not working. I have enabled only legacy interrupts. Whenever I connect or disconnect ethernet cable I get link up/link down message and also the interrupt count for eth0 increases. So I'm not doubting INTx interrupts as such. btw configuring inbound translation once in dw_pcie_host_init enough is it? I mean we use the same registers for configuring outbound translation also no? So doesn't the inbound configuration gets lost? Thanks Kishon From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kishon Vijay Abraham I Subject: Re: [PATCH V3] pci: exynos: split into two parts such as Synopsys part and Exynos part Date: Thu, 12 Sep 2013 15:37:23 +0530 Message-ID: <5231925B.3030104@ti.com> References: <002801ce8376$a807dbf0$f81793d0$@samsung.com> <51ED49D6.9050209@ti.com> <000701ce8741$fe47deb0$fad79c10$@samsung.com> <51EE22DF.6090902@ti.com> <001301ce8772$522dfc50$f689f4f0$@samsung.com> <5231607C.10702@ti.com> <003501ceaf87$cda45db0$68ed1910$%han@samsung.com> <20130912093018.GA2124@pratyush-vbox> <52318CCC.4040604@ti.com> <20130912095213.GA5995@pratyush-vbox> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130912095213.GA5995@pratyush-vbox> Sender: linux-samsung-soc-owner@vger.kernel.org To: Pratyush Anand Cc: Jingoo Han , 'Bjorn Helgaas' , "linux-pci@vger.kernel.org" , "linux-samsung-soc@vger.kernel.org" , 'Kukjin Kim' , Mohit KUMAR DCG , 'Arnd Bergmann' , 'Sean Cross' , 'Thierry Reding' , 'SRIKANTH TUMKUR SHIVANAND' , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" List-Id: devicetree@vger.kernel.org Hi, On Thursday 12 September 2013 03:22 PM, Pratyush Anand wrote: > Hi Kishon, > > On Thu, Sep 12, 2013 at 05:43:40PM +0800, Kishon Vijay Abraham I wrote: >> Hi, >> >> On Thursday 12 September 2013 03:00 PM, Pratyush Anand wrote: >>> Hi Jingoo, >>> >>> >>> On Thu, Sep 12, 2013 at 03:15:04PM +0800, Jingoo Han wrote: >>>> On Tuesday 23 July 2013 12:30 PM, Kishon Vijay Abraham I wrote: >>>>>>> . >>>>>>> . >>>>>>>>>> + of_pci_range_to_resource(&range, np, &pp->cfg); >>>>>>>>>> + pp->config.cfg0_size = resource_size(&pp->cfg)/2; >>>>>>>>>> + pp->config.cfg1_size = resource_size(&pp->cfg)/2; >>>>>>>>>> + } >>>>>>>>>> + } >>>>>>>>>> + >>>>>>>>>> + pp->dbi_base = devm_ioremap(pp->dev, pp->cfg.start, >>>>>>>>>> + resource_size(&pp->cfg)); >>>>>>>>> >>>>>>>>> Why is configuraion space divided into two? >>>>>>>> >>>>>>>> Sorry, I don't know the exact reason. :( >>>>>>>> Pratyush Anand may know about this. >>>>>>>> Pratyush Anand, could you answer the question? >>>>>>>> >>>>>>>> Also, if you find some problems, please let me know. >>>>> >>>>> One more query.. >>>>> >>>>> Where is inbound translation configuration done in your driver? how should it >>>>> be done? >>>> >>> >>> Yes, Kishon is right. Inbound translation configuration is missing in >>> your code and I think it should be implemented. >>> >>>> Hi Kishon, >>>> >>>> Sorry, I cannot understand your question exactly. >>>> However, the following thread would be helpful. >>>> >>>> http://www.spinics.net/lists/arm-kernel/msg252078.html >>>> https://lkml.org/lkml/2013/6/17/890 >>> >>> From this conversation, It seems that you >>> have tested this driver and it works fine without inbound translation >>> function. I am sure that you would have tested a PCIe card with DMA >>> capability such as PCIe2USB or PCIe2Ethernet. Since it worked, it >>> means that by default your controller is supporting one to one mapping >>> in case of inbound transaction even when address translation is enabled. >> >> btw, I'm testing Ethernet controller: Realtek Semiconductor Co., Ltd. >> RTL8111/8168B PCI Express Gigabit Ethernet controller. >> >> when I do ifconfig eth0 up, I get *r8169 0000:01:00.0 eth0: link up.* >> But I dont receive any packets and ping also fails and the tx and rx packet >> count is also 0. Could it be related to inbound translation? > > A PCIe analyser log would tell a definite cause. Most likely either > inbound translation is not working or INTx/MSI is not working. I have enabled only legacy interrupts. Whenever I connect or disconnect ethernet cable I get link up/link down message and also the interrupt count for eth0 increases. So I'm not doubting INTx interrupts as such. btw configuring inbound translation once in dw_pcie_host_init enough is it? I mean we use the same registers for configuring outbound translation also no? So doesn't the inbound configuration gets lost? Thanks Kishon