lkml.org 
[lkml]   [2008]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: irq 19: nobody cared
On Fri, Sep 19, 2008 at 3:32 PM, Chris Li <lkml@chrisli.org> wrote:
> On Fri, Sep 19, 2008 at 2:57 PM, Yinghai Lu <yhlu.kernel@gmail.com> wrote:
>>
>> 0x1a.2
>> 0x1d.1
>> 0x1f.2
>> 0x1f.5
>>
>> are sharing pin 0x19...
>>
>> but early dump can not find 0x1a.2, 0x1f.2, 0x1f.5
>
> But later kernel does able to find those devices. Do you mean
> there is a bug in the early PCI scanning?
>

please apply attached patch and boot with pci=dump

YH
From 14f8de9b3985f1b58f99dee3e32b4969af8c6693 Mon Sep 17 00:00:00 2001
From: Yinghai Lu <yhlu.kernel@gmail.com>
Date: Sat, 20 Sep 2008 13:51:01 -0700
Subject: [PATCH 06/25] pci: dump pci config space before loading driver

try to figure out why get extra irq that confusing the drivers.

and sometime pci=earlydump doesn't dump some device, because late quirks
unhide some pci devices...

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
---
drivers/pci/pci.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 44 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index a9301a2..9ed0187 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -27,6 +27,8 @@ unsigned int pci_pm_d3_delay = 10;
int pci_domains_supported = 1;
#endif

+static int pci_dump_regs = 0;
+
#define DEFAULT_CARDBUS_IO_SIZE (256)
#define DEFAULT_CARDBUS_MEM_SIZE (64*1024*1024)
/* pci=cbmemsize=nnM,cbiosize=nn can override this */
@@ -1871,6 +1873,43 @@ static void __devinit pci_no_domains(void)
#endif
}

+static void __devinit pci_dump(void)
+{
+ pci_dump_regs = 1;
+}
+
+static void dump_pci_device_range(struct pci_dev *dev, unsigned start_reg, unsigned size)
+{
+ int i;
+ int j;
+ u32 val;
+ int end = start_reg + size;
+
+ printk("PCI: %s", pci_name(dev));
+
+ for (i = start_reg; i < end; i += 4) {
+ if (!(i & 0x0f))
+ printk("\n%04x:",i);
+
+ pci_read_config_dword(dev, i, &val);
+ for (j = 0; j < 4; j++) {
+ printk(" %02x", val & 0xff);
+ val >>= 8;
+ }
+ }
+ printk("\n");
+}
+
+static int dump_pci_devices(void)
+{
+ struct pci_dev *dev = NULL;
+
+ while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
+ dump_pci_device_range(dev, 0, dev->cfg_size);
+ }
+ return 0;
+}
+
static int __devinit pci_init(void)
{
struct pci_dev *dev = NULL;
@@ -1878,6 +1917,9 @@ static int __devinit pci_init(void)
while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
pci_fixup_device(pci_fixup_final, dev);
}
+
+ if (pci_dump_regs)
+ dump_pci_devices();
return 0;
}

@@ -1894,6 +1936,8 @@ static int __devinit pci_setup(char *str)
pci_no_aer();
} else if (!strcmp(str, "nodomains")) {
pci_no_domains();
+ } else if (!strcmp(str, "dump")) {
+ pci_dump();
} else if (!strncmp(str, "cbiosize=", 9)) {
pci_cardbus_io_size = memparse(str + 9, &str);
} else if (!strncmp(str, "cbmemsize=", 10)) {
--
1.5.6
\
 
 \ /
  Last update: 2008-09-20 23:39    [W:0.615 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site