lkml.org 
[lkml]   [2014]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: Machine crashes right *after* ~successful resume
From
On Fri, Oct 31, 2014 at 5:00 PM, Wilmer van der Gaast <wilmer@gaast.net> wrote:
> Hello,
>
> Patch #1 worked after a simple s/&&/)/. And patch #2 seems to fix the
> problem as well!

updated first #1.
---
drivers/pci/pci.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

Index: linux-2.6/drivers/pci/pci.c
===================================================================
--- linux-2.6.orig/drivers/pci/pci.c
+++ linux-2.6/drivers/pci/pci.c
@@ -1265,6 +1265,24 @@ static void pci_enable_bridge(struct pci
pci_set_master(dev);
}

+static void pci_enable_ite(struct pci_dev *dev)
+{
+ /*
+ * FW enable the bridge already, so call pci_enable_bridge()
+ * to keep enable_cnt consistent, then later we can go through
+ * pci_pm_resume/pci_pm_reenable_device to enable it again.
+ * --- for pci bridge without driver case.
+ */
+ if (!pci_is_enabled(dev)) {
+ u16 cmd;
+
+ pci_read_config_word(dev, PCI_COMMAND, &cmd);
+ if (cmd & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY))
+ pci_enable_bridge(dev);
+ }
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ITE, 0x8892, pci_enable_ite);
+
static int pci_enable_device_flags(struct pci_dev *dev, unsigned long flags)
{
struct pci_dev *bridge;
\
 
 \ /
  Last update: 2014-11-01 03:41    [W:0.128 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site