linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Prarit Bhargava <prarit@redhat.com>
To: linux-pci@vger.kernel.org
Cc: Prarit Bhargava <prarit@redhat.com>,
	Yinghai Lu <yinghai@kernel.org>,
	Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH part1 1/4] PCI, pciehp: Turn on link again after power off the slot
Date: Thu,  6 Sep 2012 10:34:31 -0400	[thread overview]
Message-ID: <1346942071-15188-1-git-send-email-prarit@redhat.com> (raw)
In-Reply-To: <1346622458-30595-2-git-send-email-yinghai@kernel.org>

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Cc: stable@vger.kernel.org

>diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
>index 13b2eaf..7cee8db 100644
>--- a/drivers/pci/hotplug/pciehp_hpc.c
>+++ b/drivers/pci/hotplug/pciehp_hpc.c
>@@ -631,6 +631,8 @@ int pciehp_power_off_slot(struct slot * slot)
> 	slot_cmd = POWER_OFF;
> 	cmd_mask = PCI_EXP_SLTCTL_PCC;
> 	retval = pcie_write_cmd(ctrl, slot_cmd, cmd_mask);
>+	/* need to enable link again for present bit report */
>+	pciehp_link_enable(ctrl);

You're not checking the return value of pciehp_link_enable().  I wonder if
enabling the link is the only way to get the present bit to report correctly...

Also, should the pciehp_link_enable() be called in pciehp_power_on_slot() if
we already reenable it on the power off?

P.

  reply	other threads:[~2012-09-06 14:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-02 21:47 [PATCH part1 0/4] PCI: pci root bus hotplug support - part1 Yinghai Lu
2012-09-02 21:47 ` [PATCH part1 1/4] PCI, pciehp: Turn on link again after power off the slot Yinghai Lu
2012-09-06 14:34   ` Prarit Bhargava [this message]
2012-09-06 17:30     ` Yinghai Lu
2012-09-17 23:06       ` Bjorn Helgaas
2012-09-17 23:25         ` Yinghai Lu
2012-09-17 23:52           ` Bjorn Helgaas
2012-09-17 23:56             ` Yinghai Lu
2012-09-02 21:47 ` [PATCH part1 2/4] PCI, acpiphp: Add is_hotplug_bridge detection Yinghai Lu
2012-09-02 21:47 ` [PATCH part1 3/4] PCI: Add root bus children dev's res to fail list Yinghai Lu
2012-09-02 21:47 ` [PATCH part1 4/4] PCI: Split out stop_bus_device and remove_bus_dev again Yinghai Lu

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=1346942071-15188-1-git-send-email-prarit@redhat.com \
    --to=prarit@redhat.com \
    --cc=kaneshige.kenji@jp.fujitsu.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=yinghai@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).