From: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Yinghai Lu <yinghai.lu@oracle.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Subject: Re: [PATCH] pciehp: Retrieve link speed after link is trained
Date: Thu, 03 Nov 2011 16:07:40 +0900 [thread overview]
Message-ID: <4EB23DBC.8050805@jp.fujitsu.com> (raw)
In-Reply-To: <20111102140522.411ef343@jbarnes-desktop>
(2011/11/03 6:05), Jesse Barnes wrote:
> On Sun, 09 Oct 2011 00:06:06 -0700
> Yinghai Lu<yinghai.lu@oracle.com> wrote:
>
>>
>> During hot plug, board_added will call pciehp_power_on_slot().
>> But link speed is updated in pciehp_power_on_slot().
>>
>> We should not update link speed there, because that is too early.
>>
>> Move updating to pciehp_check_link_status() after making sure link is trained.
>>
>> Signed-off-by: Yinghai Lu<yinghai.lu@oracle.com>
>>
>> ---
>> drivers/pci/hotplug/pciehp_hpc.c | 10 ++--------
>> 1 file changed, 2 insertions(+), 8 deletions(-)
>>
>> Index: linux-2.6/drivers/pci/hotplug/pciehp_hpc.c
>> ===================================================================
>> --- linux-2.6.orig/drivers/pci/hotplug/pciehp_hpc.c
>> +++ linux-2.6/drivers/pci/hotplug/pciehp_hpc.c
>> @@ -294,6 +294,8 @@ int pciehp_check_link_status(struct cont
>> return retval;
>> }
>>
>> + pcie_update_link_speed(ctrl->pcie->port->subordinate, lnk_status);
>> +
>> return retval;
>> }
>>
>> @@ -516,14 +518,6 @@ int pciehp_power_on_slot(struct slot * s
>> ctrl_dbg(ctrl, "%s: SLOTCTRL %x write cmd %x\n", __func__,
>> pci_pcie_cap(ctrl->pcie->port) + PCI_EXP_SLTCTL, slot_cmd);
>>
>> - retval = pciehp_readw(ctrl, PCI_EXP_LNKSTA,&lnk_status);
>> - if (retval) {
>> - ctrl_err(ctrl, "%s: Cannot read LNKSTA register\n",
>> - __func__);
>> - return retval;
>> - }
>> - pcie_update_link_speed(ctrl->pcie->port->subordinate, lnk_status);
>> -
>> return retval;
>> }
>
> Kenji-san or Hidetoshi-san, would it be possible to get tested-bys and
> reviewed-bys from you on this patch?
>
> Thanks,
Looks good to me.
Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Unfortunately, I don't have test environment right now. Maybe
I will be able to test it early next week.
Regards,
Kenji Kaneshige
next prev parent reply other threads:[~2011-11-03 7:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-09 7:06 [PATCH] pciehp: Retrieve link speed after link is trained Yinghai Lu
2011-11-02 21:05 ` Jesse Barnes
2011-11-03 7:07 ` Kenji Kaneshige [this message]
2011-11-07 11:30 ` Kenji Kaneshige
2011-11-07 15:53 ` [PATCH -v2] " Yinghai Lu
2011-11-07 16:07 ` Jesse Barnes
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=4EB23DBC.8050805@jp.fujitsu.com \
--to=kaneshige.kenji@jp.fujitsu.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=seto.hidetoshi@jp.fujitsu.com \
--cc=yinghai.lu@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox