All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhou Wang <wangzhou1@hisilicon.com>
To: Gabriele Paoloni <gabriele.paoloni@huawei.com>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	zhangjukuo <zhangjukuo@huawei.com>,
	"Liguozhu (Kenneth)" <liguozhu@hisilicon.com>
Subject: Re: [Query] PORT_LOGIC_SPEED_CHANGE set in PCIe designware driver
Date: Fri, 17 Apr 2015 14:45:35 +0800	[thread overview]
Message-ID: <5530AC0F.3090301@hisilicon.com> (raw)
In-Reply-To: <EE11001F9E5DDD47B7634E2F8A612F2E01385C3E@lhreml505-mbx.china.huawei.com>

On 2015/4/14 17:48, Gabriele Paoloni wrote:
> Hi All
> 
> Looking at par 3.13 of "Synopsis DesignWare Cores PCI Express Controller Databook" v4.20a (pag 159) I've found:
> 
> <<Speed Changing
> 
> When you set the default of the Directed Speed Change field of the Link Width and Speed Change Control
> register (GEN2_CTRL_OFF . DIRECT_SPEED_CHANGE) using the DEFAULT_GEN2_SPEED_CHANGE
> configuration parameter to "1", then the speed change is initiated automatically after link up, and the core
> clears the contents of GEN2_CTRL_OFF . DIRECT_SPEED_CHANGE. If you want to prevent this automatic
> speed change, then write a lower speed value to the Target Link Speed field of the Link Control 2 register
> (LINK_CONTROL2_LINK_STATUS2_REG . PCIE_CAP_TARGET_LINK_SPEED) through the DBI before
> link up.>>
> 
> 
> So my interpretation would be that at init phase it would be correct to trigger the DIRECT_SPPED_CHANGE before the link is up; that is it seems correct to me to move that part of the code before link up.
> 
> Does anybody have any idea about this?
> 
> Many Thanks
> 
> Gab
> 

Hi Gab,

Thanks for your reply. I will send a formal patch based on v4.1-rc1.

Regards,
Zhou

> 
>> -----Original Message-----
>> From: Wangzhou (B)
>> Sent: Tuesday, April 14, 2015 8:21 AM
>> To: linux-pci@vger.kernel.org
>> Cc: zhangjukuo; Gabriele Paoloni; Liguozhu (Kenneth)
>> Subject: [Query] PORT_LOGIC_SPEED_CHANGE set in PCIe designware driver
>>
>> Hi All,
>>
>> In pcie-designware.c, it sets the PORT_LOGIC_SPEED_CHANGE bit after
>> linkup
>> finished:
>>
>> dw_pcie_rd_own_conf(pp, PCIE_LINK_WIDTH_SPEED_CONTROL, 4, &val); val |=
>> PORT_LOGIC_SPEED_CHANGE; dw_pcie_wr_own_conf(pp,
>> PCIE_LINK_WIDTH_SPEED_CONTROL, 4, val);
>>
>> As far as I know, it will try to use 5G/8G to communicate after setting
>> this bit. When I used LSI SAS2208 PCIe-RAID card to test PCIe host
>> driver, PCIe3.0 link was unstable and can not read/write PCIe-RAID BAR.
>> When I moved above code before linkup, the process of enumeration was
>> successful.
>>
>> I wonder if anyone who also use the pcie-designware had met the same
>> problem.
>> Could we move the PORT_LOGIC_SPEED_CHANGE before linkup?
>>
>> It will be very appreciate if anyone can offer some information.
>>
>> Thanks,
>> Zhou
> 
> 
> .
> 



      reply	other threads:[~2015-04-17  6:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-14  7:21 [Query] PORT_LOGIC_SPEED_CHANGE set in PCIe designware driver Zhou Wang
2015-04-14  9:48 ` Gabriele Paoloni
2015-04-17  6:45   ` Zhou Wang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5530AC0F.3090301@hisilicon.com \
    --to=wangzhou1@hisilicon.com \
    --cc=gabriele.paoloni@huawei.com \
    --cc=liguozhu@hisilicon.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=zhangjukuo@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.