Skip to contentSkip to conversation

pq2_find_bridges hangs system

DISCUSSION Alex BASTOS 3 participants 8 messages Dec 2, 2005 – Dec 13, 2005 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

I am working on a board with a MPC8248 based on ADS8272. Until now I was working with ppc kernel 2.6.11. Now, it's time to go up, so I am trying 2.6.15-rc2.

Unfortunately, kernel hangs at boot-up, and with a BDI2000 I have reached the pq2_find_bridges() call, more precisely, in indirect_read_config(). Now I am a bit lost, as I have almos any knowledge about PCI.

The board doesn't need PCI support at all, but I need it active on kernel as it is required by USB HCD stack.

I have tested this on the ADS8272 and i doesn't happends, so, any clue.

And, has the indirect_read_config any to do with the PCI9 workaround, which is supposed to be corrected on HIP7 devices?

Thanks in advance.

Alex BASTOS

#1 lore raw
Quoted 14 lines · Alex BASTOS

Hi,

I am working on a board with a MPC8248 based on ADS8272. Until now I was working with ppc kernel 2.6.11. Now, it's time to go up, so I am trying 2.6.15-rc2.

Unfortunately, kernel hangs at boot-up, and with a BDI2000 I have reached the pq2_find_bridges() call, more precisely, in indirect_read_config(). Now I am a bit lost, as I have almos any knowledge about PCI.

The board doesn't need PCI support at all, but I need it active on kernel as it is required by USB HCD stack.

Quoted 7 lines

I have tested this on the ADS8272 and i doesn't happends, so, any clue.

And, has the indirect_read_config any to do with the PCI9 workaround, which is supposed to be corrected on HIP7 devices?

There are 2 indirect_read_config(), one for PCI9 case, and one for not. I guess you should have CONFIG_8260_PCI9 disabled.

If config seems OK, pleas submit backtrace. As long as I can see, "proper" setup_indirect_pci has been moved over to arch/powerpc/sysdev/indirect_pci.c. Check it it is compiled/used.

Quoted 9 lines

Thanks in advance.

Alex BASTOS
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

Signature · 1 line
Sincerely, Vitaly
#2 lore raw

Vitaly,

Quoted 8 lines
Quoted 1 line

There are 2 indirect_read_config(), one for PCI9 case, and one for not. I guess you should have CONFIG_8260_PCI9 disabled.

If config seems OK, pleas submit backtrace. As long as I can see, "proper" setup_indirect_pci has been moved over to arch/powerpc/sysdev/indirect_pci.c. Check it it is compiled/used.

Config file seems OK to me:

# CONFIG_CPCI690 is not set
CONFIG_PPC_INDIRECT_PCI=y
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCI_8260=y
# CONFIG_PCI_LEGACY_PROC is not set
# CONFIG_PCI_DEBUG is not set
# CONFIG_NET_PCI is not set

and indirect_pci from arch/powerpc is compiled and used ...

I have tested a bit more. The call trace would be:

[c01db170] m8260_setup_arch
[c01db87c] pq2_find_bridges
[c01dbfa0] pciauto_bus_scan
[c000a754] early_read_config_byte
[c00c8f54] pci_bus_read_config_byte
[c0011424] indirect_read_config

I have done manually, since GDB only reports last two, and I couldn't get it from log_buf.

(gdb) bt
#0 indirect_read_config (bus=0x0, devfn=3223241436,

                          offset=8, len=14, val=0x1032)
    at arch/powerpc/sysdev/indirect_pci.c:32

#1 0xc00c8fb4 in pci_bus_read_config_byte (bus=0xc01ec2dc,

                       devfn=8, pos=14, value=0xc01d1f3a "")
    at drivers/pci/access.c:52

Now I have check indirect_read_config, and I have seen the call ends itself, but after that it returns to

pci_bus_read_config_dword

executes some asm and then hangs.

Any idea?

Thanks,

Alex BASTOS

#3 lore raw

Vitally,

Finally, more clever informacion from log_buf. (...and sorry about previos uncomplete information)

<5>Linux version 2.6.15-rc2 (alebas@xxxx) (gcc version 3.3.2) #1 PREEMPT Fri Dec 2 12:22:09 CET 2005
<6>Televes xxxxxx
<4>arch/ppc/syslib/m82xx_pci.c: The PCI bus is 66666666 Mhz. <4>Waiting 1 second after deasserting RST...
<4>Machine check in kernel mode.
<4>Caused by (from SRR1=41030): Transfer error ack signal
<4>Oops: machine check, sig: 7 [#1]
<4>PREEMPT
<4>NIP: C001150C LR: C0011530 SP: C01D1EA0 REGS: c01d1df0 TRAP: 0200 Not
tainted
<4>MSR: 00041030 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 11
<4>TASK = c01a2ff8[0] 'swapper' THREAD: c01d0000
<4>Last syscall: 0
<6>GPR00: 000000FF C01D1EA0 C01A2FF8 00000000 00000008 F0010906 00000001 C01D1ED8
<6>GPR08: 00000001 00000002 00000800 F0010904 24008028 FFFFFFFF 03FFE000 00000000
<6>GPR16: 00000001 00000001 FFFFFFFF 007FFF00 03FF8CE8 00000000 00000003 03BCB578
<6>GPR24: 00000000 00000000 00000001 0000000E 00000008 C01D1ED8 C01EC2DC C01FC000
<4>NIP [c001150c] indirect_read_config+0xe8/0x11c
<4>LR [c0011530] indirect_read_config+0x10c/0x11c
<4>Call trace:
<4> [c00c8fb4] pci_bus_read_config_byte+0x60/0xa8
<4> [c000a784] early_read_config_byte+0x30/0x44
<4> [c01dc04c] pciauto_bus_scan+0xac/0x298
<4> [c01dba00] pq2_find_bridges+0x184/0x1b0
<4> [c01db1a0] m8260_setup_arch+0x30/0x80
<4> [c01d8c2c] setup_arch+0x110/0x18c
<4> [c01d2544] start_kernel+0x34/0x1bc
<4> [000032bc] 0x32bc
<4>Oops: kernel access of bad area, sig: 11 [#2]
<4>PREEMPT
<4>NIP: C001196C LR: C0012940 SP: C01D1C70 REGS: c01d1bc0 TRAP: 0300 Not
tainted
<4>MSR: 00001032 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 11
<4>DAR: 00000000, DSISR: 20000000
<4>TASK = c01a2ff8[0] 'swapper' THREAD: c01d0000
<4>Last syscall: 0
<6>GPR00: 00010005 C01D1C70 C01A2FF8 C01A2FF8 00000000 00000001 C01ED8E0 00000000
<6>GPR08: 00000000 00000001 00000078 C01D0000 00000000 FFFFFFFF 03FFE000 00000000
<6>GPR16: 00000001 00000001 FFFFFFFF 007FFF00 03FF8CE8 00000000 00000003 C01F0000
<6>GPR24: C01F0000 00000000 00000001 0000000E C01EB09C 00000000 C01EDD20 C01A2FF8
<4>NIP [c001196c] dequeue_task+0x0/0x78
<4>LR [c0012940] scheduler_tick+0x244/0x3b0
<4>Call trace:
<4> [c002284c] update_process_times+0xa4/0x168
<4> [c0005bb4] timer_interrupt+0x90/0x25c
<4> [c0004a7c] ret_from_except+0x0/0x14
<4> [c0004d9c] die+0xa0/0xc4
<4> [c0004a30] ret_from_except_full+0x0/0x4c
<4> [c001150c] indirect_read_config+0xe8/0x11c
<4> [c00c8fb4] pci_bus_read_config_byte+0x60/0xa8
<4> [c000a784] early_read_config_byte+0x30/0x44
<4> [c01dc04c] pciauto_bus_scan+0xac/0x298
<4> [c01dba00] pq2_find_bridges+0x184/0x1b0
<4> [c01db1a0] m8260_setup_arch+0x30/0x80
<4> [c01d8c2c] setup_arch+0x110/0x18c
<4> [c01d2544] start_kernel+0x34/0x1bc
<4> [000032bc] 0x32bc
<0>Kernel panic - not syncing: Aiee, killing interrupt handler!
<4> <0>Rebooting in 180 seconds..

The Tranfer Error makes not many sense for me, as _TEA is pulled-up. Maybe the oops after that is caused by the bad call return point?

Thanks,

Alex BASTOS

#8 lore raw
In reply to a message not in the archive
Quoted 4 lines · Alex BASTOS

The Tranfer Error makes not many sense for me, as _TEA is pulled-up. Maybe the oops after that is caused by the bad call return point?

I remember using this to prevent machine check exceptions during the PCI scan. This is in the beginning of the pciauto_bus_scan() function.

linux/arch/ppc/syslib/pci_auto.c +0 -0
@@ -382,6 +382,10 @@
	unsigned short vid;
	unsigned char header_type;

+
+ /* must ignore machine checks during scan */
+ *(volatile unsigned short *) 0xf0010888 &= ~0x0800;
+
/*
* Fetch our I/O and memory space upper boundaries used
* to allocated base addresses on this hose.

#4 lore raw
In reply to Alex BASTOS

Alex, please probe this. If it will not help, pq2ads_setup_pci should be digged for some board specifics.

Also, check if hose->set_cfg_type is 1 as done for ads8272.

-------- Original Message --------
Subject: [patch 01/34] ppc32: Fix incorrect PCI frequency value
Date: Thu, 01 Dec 2005 00:51:15 -0800
From: [email protected]
To: [email protected]
CC: [email protected], [email protected], [email protected]

From: Vitaly Bordug <[email protected]>

The time to wait after deasserting PCI_RST has been counted with incorrect value - this patch fixes the issue.

---

arch/ppc/syslib/m82xx_pci.c | 3 ++-

1 files changed, 2 insertions(+), 1 deletion(-)
arch/ppc/syslib/m82xx_pci.c renamed from arch/ppc/syslib/m82xx_pci.c~ppc32-fix-incorrect-pci-frequency-value +0 -0
diff -puN arch/ppc/syslib/m82xx_pci.c~ppc32-fix-incorrect-pci-frequency-value arch/ppc/syslib/m82xx_pci.c
@@ -248,7 +248,8 @@ pq2ads_setup_pci(struct pci_controller *
	pci_div = ( (sccr & SCCR_PCI_MODCK) ? 2 : 1) *
			( ( (sccr & SCCR_PCIDF_MSK) >> SCCR_PCIDF_SHIFT) + 1);
	freq = (uint)((2*binfo->bi_cpmfreq)/(pci_div));

- time = (int)666666/freq;
+ time = (int)66666666/freq;
+
/* due to PCI Local Bus spec, some devices needs to wait such a long
time after RST deassertion. More specifically, 0.508s for 66MHz & twice more for 33 */
printk("%s: The PCI bus is %d Mhz.\nWaiting %s after deasserting RST...\n",__FILE__,freq,
_

Signature · 1 line
Sincerely, Vitaly
#5 lore raw

Vitaly,

Quoted 4 lines

Alex,
please probe this. If it will not help, pq2ads_setup_pci should be digged for some board specifics.

I'll give it a try. Unfortunately (or fortunately), i won't be in the lab for a week (i am on holidays). I will comment you then.

Quoted 2 lines

Also, check if hose->set_cfg_type is 1 as done for ads8272.

Yes, it is.

Best regards,

Alex

Quoted 16 lines

-------- Original Message --------
Subject: [patch 01/34] ppc32: Fix incorrect PCI frequency value
Date: Thu, 01 Dec 2005 00:51:15 -0800
From: [email protected]
To: [email protected]
CC: [email protected], [email protected], [email protected]

From: Vitaly Bordug <[email protected]>

The time to wait after deasserting PCI_RST has been counted with incorrect value - this patch fixes the issue.

Quoted 9 lines

---

 arch/ppc/syslib/m82xx_pci.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN arch/ppc/syslib/m82xx_pci.c~ppc32-fix-incorrect-pci-frequency-value arch/ppc/syslib/m82xx_pci.c
---

devel/arch/ppc/syslib/m82xx_pci.c~ppc32-fix-incorrect-pci-frequency-value 2005-11-30

Quoted 23 lines

23:58:00.000000000 -0800
+++ devel-akpm/arch/ppc/syslib/m82xx_pci.c 2005-11-30 23:58:00.000000000
-0800

(quoted diff) +2 -1
@@ -248,7 +248,8 @@ pq2ads_setup_pci(struct pci_controller *
 	pci_div = ( (sccr & SCCR_PCI_MODCK) ? 2 : 1) *
 			( ( (sccr & SCCR_PCIDF_MSK) >> SCCR_PCIDF_SHIFT) + 1);
 	freq = (uint)((2*binfo->bi_cpmfreq)/(pci_div));
-	time = (int)666666/freq;
+	time = (int)66666666/freq;
+
 	/* due to PCI Local Bus spec, some devices needs to wait such a long
 	time after RST 	deassertion. More specifically, 0.508s for 66MHz & twice

more for 33 */
printk("%s: The PCI bus is %d Mhz.\nWaiting %s after deasserting
RST...\n",__FILE__,freq,
_

--
Sincerely,
Vitaly

#6 lore raw
In reply to Vitaly Bordug

Vitaly,

It didn't work. So I will check pq2ads_setup_pci to check if some board specific issue is affected.

I will say you if I find anything

Thanks

Alex.

Citando Vitaly Bordug <[email protected]>:

Quoted 22 lines

Alex,
please probe this. If it will not help, pq2ads_setup_pci should be digged for some board specifics.

Also, check if hose->set_cfg_type is 1 as done for ads8272.

-------- Original Message --------
Subject: [patch 01/34] ppc32: Fix incorrect PCI frequency value
Date: Thu, 01 Dec 2005 00:51:15 -0800
From: [email protected]
To: [email protected]
CC: [email protected], [email protected], [email protected]

From: Vitaly Bordug <[email protected]>

The time to wait after deasserting PCI_RST has been counted with incorrect value - this patch fixes the issue.

Quoted 9 lines

---

 arch/ppc/syslib/m82xx_pci.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN arch/ppc/syslib/m82xx_pci.c~ppc32-fix-incorrect-pci-frequency-value arch/ppc/syslib/m82xx_pci.c
---

devel/arch/ppc/syslib/m82xx_pci.c~ppc32-fix-incorrect-pci-frequency-value 2005-11-30

Quoted 23 lines

23:58:00.000000000 -0800
+++ devel-akpm/arch/ppc/syslib/m82xx_pci.c 2005-11-30 23:58:00.000000000
-0800

(quoted diff) +2 -1
@@ -248,7 +248,8 @@ pq2ads_setup_pci(struct pci_controller *
 	pci_div = ( (sccr & SCCR_PCI_MODCK) ? 2 : 1) *
 			( ( (sccr & SCCR_PCIDF_MSK) >> SCCR_PCIDF_SHIFT) + 1);
 	freq = (uint)((2*binfo->bi_cpmfreq)/(pci_div));
-	time = (int)666666/freq;
+	time = (int)66666666/freq;
+
 	/* due to PCI Local Bus spec, some devices needs to wait such a long
 	time after RST 	deassertion. More specifically, 0.508s for 66MHz & twice

more for 33 */
printk("%s: The PCI bus is %d Mhz.\nWaiting %s after deasserting
RST...\n",__FILE__,freq,
_

--
Sincerely,
Vitaly