Patchwork [2/6] pcie/slot: fix hotplug_event_notify().

login
register
mail settings
Submitter Isaku Yamahata
Date Oct. 27, 2010, 10:21 a.m.
Message ID <c863cb15395208c7ffdcdd44d421eae618788b26.1288174753.git.yamahata@valinux.co.jp>
Download mbox | patch
Permalink /patch/69337/
State New
Headers show

Comments

Isaku Yamahata - Oct. 27, 2010, 10:21 a.m.
This patch fixes the miscondition to trigger slot event
which is introduced by cd870502e228f8f028f93fb585ae3b208fcb46c7.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
---
 hw/pcie.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/hw/pcie.c b/hw/pcie.c
index 64cc003..3c52849 100644
--- a/hw/pcie.c
+++ b/hw/pcie.c
@@ -148,7 +148,7 @@  static void hotplug_event_notify(PCIDevice *dev)
     uint16_t sltsta = pci_get_word(exp_cap + PCI_EXP_SLTSTA);
 
     dev->exp.hpev_notified = (sltctl & PCI_EXP_SLTCTL_HPIE) &&
-        (sltsta & PCI_EXP_HP_EV_SUPPORTED);
+        (sltsta & sltctl & PCI_EXP_HP_EV_SUPPORTED);
 
     if (prev == dev->exp.hpev_notified) {
         return;