All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rajat Jain <rajatxjain@gmail.com>
To: Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Alex Williamson <alex.williamson@redhat.com>
Cc: Rajat Jain <rajatjain@juniper.net>, Guenter Roeck <groeck@juniper.net>
Subject: [PATCH] pciehp: Acknowledge the spurious "cmd completed" event.
Date: Thu, 20 Feb 2014 17:42:31 -0800	[thread overview]
Message-ID: <5306AF07.6000601@gmail.com> (raw)

In case of a spurious "cmd completed", pcie_write_cmd() does not
clear it, but yet expects more "cmd completed" events to be generated.
This does not happen because the previous (spurious) event has not
been acknowledged. Fix that.

Signed-off-by: Rajat Jain <rajatxjain@gmail.com>
Signed-off-by: Rajat Jain <rajatjain@juniper.net>
Signed-off-by: Guenter Roeck <groeck@juniper.net>
---
 drivers/pci/hotplug/pciehp_hpc.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index d7d058f..1463412 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -159,6 +159,8 @@ static void pcie_write_cmd(struct controller *ctrl, u16 cmd, u16 mask)
 
 	pcie_capability_read_word(pdev, PCI_EXP_SLTSTA, &slot_status);
 	if (slot_status & PCI_EXP_SLTSTA_CC) {
+		pcie_capability_write_word(pdev, PCI_EXP_SLTSTA,
+					   PCI_EXP_SLTSTA_CC);
 		if (!ctrl->no_cmd_complete) {
 			/*
 			 * After 1 sec and CMD_COMPLETED still not set, just
-- 
1.7.9.5


             reply	other threads:[~2014-02-21  1:42 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-21  1:42 Rajat Jain [this message]
2014-04-24 22:48 ` [PATCH] pciehp: Acknowledge the spurious "cmd completed" event Bjorn Helgaas
  -- strict thread matches above, loose matches on Subject: below --
2013-11-05 22:33 Rajat Jain
2013-11-05 22:33 ` Rajat Jain
2013-11-06  0:25 ` Bjorn Helgaas
2013-11-06  0:25   ` Bjorn Helgaas
2013-11-06  2:38   ` Rajat Jain
2013-11-06  2:38     ` Rajat Jain
2013-11-07 21:53     ` Rajat Jain
2013-11-07 21:53       ` Rajat Jain
2013-11-08  1:23       ` Bjorn Helgaas
2013-11-08  1:23         ` Bjorn Helgaas
2013-11-08 17:30         ` Rajat Jain
2013-11-08 17:30           ` Rajat Jain
2013-11-08 23:15           ` Bjorn Helgaas
2013-11-08 23:15             ` Bjorn Helgaas
2013-11-11 21:26             ` Rajat Jain
2013-11-11 21:26               ` Rajat Jain
2013-11-23  0:51               ` Bjorn Helgaas
2013-11-23  0:51                 ` Bjorn Helgaas
2013-11-23  1:59                 ` Guenter Roeck
2013-11-23  1:59                   ` Guenter Roeck
2013-11-23 14:56                 ` Rajat Jain
2013-11-23 14:56                   ` Rajat Jain
2013-11-23 19:32                   ` Bjorn Helgaas
2013-11-23 19:32                     ` Bjorn Helgaas
2013-11-25 19:03                     ` Rajat Jain
2014-02-12  0:34                       ` Bjorn Helgaas
2014-02-12  0:34                         ` Bjorn Helgaas
2014-02-12  1:08                         ` Rajat Jain
2014-02-12  1:08                           ` Rajat Jain
2014-02-20  7:42                           ` Rajat Jain
2014-02-20  7:42                             ` Rajat Jain
2014-02-20 22:20                             ` Bjorn Helgaas
2014-02-20 22:20                               ` Bjorn Helgaas
2014-02-21  1:43                               ` Rajat Jain
2014-02-21  1:43                                 ` Rajat Jain

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=5306AF07.6000601@gmail.com \
    --to=rajatxjain@gmail.com \
    --cc=alex.williamson@redhat.com \
    --cc=bhelgaas@google.com \
    --cc=groeck@juniper.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rajatjain@juniper.net \
    /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.