* Re: [SOLVED] Re: 2.6.13-rc2 hangs at boot
@ 2005-07-08 13:54 Mikael Pettersson
2005-07-12 13:41 ` Ivan Kokshaysky
0 siblings, 1 reply; 9+ messages in thread
From: Mikael Pettersson @ 2005-07-08 13:54 UTC (permalink / raw)
To: ink, teanropo; +Cc: gregkh, jonsmirl, linux-kernel
On Fri, 8 Jul 2005 12:38:28 +0300 (EEST), Tero Roponen wrote:
>On Fri, 8 Jul 2005, Ivan Kokshaysky wrote:
>
>> On Fri, Jul 08, 2005 at 10:57:56AM +0300, Tero Roponen wrote:
>> > Thanks! Vanilla 2.6.13-rc2 with below patch applied
>> > works perfectly!
>>
>> Thanks for testing. Though, bad news are that it's still unclear
>> why your machine doesn't like large cardbus windows and therefore
>> how to fix that correctly.
>>
>
>> May I ask you to do couple of another tests with following variations
>> of the latest patch (this will help to determine whether it's IO or
>> MEM ranges to blame)?
>> 1.
>> #define CARDBUS_IO_SIZE (256)
>> #define CARDBUS_MEM_SIZE (32*1024*1024)
>
>This works correctly.
>
>
>
>>
>> 2.
>> #define CARDBUS_IO_SIZE (4096)
>> #define CARDBUS_MEM_SIZE (4*1024*1024)
>
>This hangs at boot.
Same here: 2.6.13-rc2 vanilla and 2.6.13-rc2 + patch #2 above both hang,
but 2.6.13-rc2 + patch #1 boots fine.
/Mikael
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [SOLVED] Re: 2.6.13-rc2 hangs at boot
2005-07-08 13:54 [SOLVED] Re: 2.6.13-rc2 hangs at boot Mikael Pettersson
@ 2005-07-12 13:41 ` Ivan Kokshaysky
2005-07-12 16:00 ` Tero Roponen
0 siblings, 1 reply; 9+ messages in thread
From: Ivan Kokshaysky @ 2005-07-12 13:41 UTC (permalink / raw)
To: Mikael Pettersson; +Cc: teanropo, gregkh, jonsmirl, linux-kernel
On Fri, Jul 08, 2005 at 03:54:00PM +0200, Mikael Pettersson wrote:
> Same here: 2.6.13-rc2 vanilla and 2.6.13-rc2 + patch #2 above both hang,
> but 2.6.13-rc2 + patch #1 boots fine.
I suspect that those larger (4K) cardbus IO windows are clashing with
some legacy IO ports. If so, this could be avoided by setting ISAEN
bridge control bit.
It would be interesting to see whether the patch below works or not...
Ivan.
--- 2.6.13-rc2-git4/drivers/pci/setup-bus.c Tue Jul 12 16:11:19 2005
+++ linux/drivers/pci/setup-bus.c Tue Jul 12 16:43:33 2005
@@ -88,6 +88,7 @@ pci_setup_cardbus(struct pci_bus *bus)
{
struct pci_dev *bridge = bus->self;
struct pci_bus_region region;
+ u16 ctrl;
printk("PCI: Bus %d, cardbus bridge: %s\n",
bus->number, pci_name(bridge));
@@ -135,6 +136,12 @@ pci_setup_cardbus(struct pci_bus *bus)
pci_write_config_dword(bridge, PCI_CB_MEMORY_LIMIT_1,
region.end);
}
+
+ /* Disable legacy ISA IO port forwarding, as we do
+ for PCI-to-PCI bridges. */
+ pci_read_config_word(bridge, PCI_CB_BRIDGE_CONTROL, &ctrl);
+ ctrl |= PCI_CB_BRIDGE_CTL_ISA;
+ pci_write_config_word(bridge, PCI_CB_BRIDGE_CONTROL, ctrl);
}
/* Initialize bridges with base/limit values we have collected.
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [SOLVED] Re: 2.6.13-rc2 hangs at boot
2005-07-12 13:41 ` Ivan Kokshaysky
@ 2005-07-12 16:00 ` Tero Roponen
2005-07-12 16:07 ` Ivan Kokshaysky
0 siblings, 1 reply; 9+ messages in thread
From: Tero Roponen @ 2005-07-12 16:00 UTC (permalink / raw)
To: Ivan Kokshaysky; +Cc: Mikael Pettersson, gregkh, jonsmirl, linux-kernel
On Tue, 12 Jul 2005, Ivan Kokshaysky wrote:
> On Fri, Jul 08, 2005 at 03:54:00PM +0200, Mikael Pettersson wrote:
> > Same here: 2.6.13-rc2 vanilla and 2.6.13-rc2 + patch #2 above both hang,
> > but 2.6.13-rc2 + patch #1 boots fine.
>
> I suspect that those larger (4K) cardbus IO windows are clashing with
> some legacy IO ports. If so, this could be avoided by setting ISAEN
> bridge control bit.
> It would be interesting to see whether the patch below works or not...
>
> Ivan.
Hi,
I tried 2.6.13-rc2-git5 with your patch.
First I forgot to install modules and it booted fine.
Then I did a 'sudo make modules_install' and rebooted. It hang.
It seems that everything is fine until some module
loads and does something.
-
Tero Roponen
ps.
In 2.6.12 lsmod gives me this:
Module Size Used by
xirc2ps_cs 15728 1
pcmcia 21416 5 xirc2ps_cs
sunrpc 128132 1
binfmt_misc 9352 1
yenta_socket 20360 3
rsrc_nonstatic 11488 1 yenta_socket
pcmcia_core 44280 4
xirc2ps_cs,pcmcia,yenta_socket,rsrc_nonstatic
snd_cs4236 13700 0
snd_opl3_lib 9152 1 snd_cs4236
snd_hwdep 7104 1 snd_opl3_lib
snd_cs4236_lib 15008 1 snd_cs4236
snd_mpu401_uart 6048 1 snd_cs4236
snd_rawmidi 20832 1 snd_mpu401_uart
snd_cs4231_lib 23808 2 snd_cs4236,snd_cs4236_lib
snd_seq_oss 33088 0
snd_seq_midi_event 6496 1 snd_seq_oss
snd_seq 50416 4 snd_seq_oss,snd_seq_midi_event
snd_seq_device 6892 4
snd_opl3_lib,snd_rawmidi,snd_seq_oss,snd_seq
snd_pcm_oss 50400 0
snd_mixer_oss 17696 1 snd_pcm_oss
snd_pcm 85096 3 snd_cs4236_lib,snd_cs4231_lib,snd_pcm_oss
snd_timer 21924 4
snd_opl3_lib,snd_cs4231_lib,snd_seq,snd_pcm
snd 48388 14
snd_cs4236,snd_opl3_lib,snd_hwdep,snd_cs4236_lib,snd_mpu401_uart,snd_rawmidi,snd_cs4231_lib,snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
soundcore 7456 1 snd
snd_page_alloc 7556 2 snd_cs4231_lib,snd_pcm
floppy 54772 0
ide_cd 38436 0
cdrom 38272 1 ide_cd
evdev 7456 0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [SOLVED] Re: 2.6.13-rc2 hangs at boot
2005-07-12 16:00 ` Tero Roponen
@ 2005-07-12 16:07 ` Ivan Kokshaysky
2005-07-12 16:21 ` Tero Roponen
0 siblings, 1 reply; 9+ messages in thread
From: Ivan Kokshaysky @ 2005-07-12 16:07 UTC (permalink / raw)
To: Tero Roponen; +Cc: Mikael Pettersson, gregkh, jonsmirl, linux-kernel
On Tue, Jul 12, 2005 at 07:00:37PM +0300, Tero Roponen wrote:
> It seems that everything is fine until some module
> loads and does something.
What does your /proc/ioports say under 2.6.12 with all modules
loaded?
Ivan.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [SOLVED] Re: 2.6.13-rc2 hangs at boot
2005-07-12 16:07 ` Ivan Kokshaysky
@ 2005-07-12 16:21 ` Tero Roponen
0 siblings, 0 replies; 9+ messages in thread
From: Tero Roponen @ 2005-07-12 16:21 UTC (permalink / raw)
To: Ivan Kokshaysky; +Cc: Mikael Pettersson, gregkh, jonsmirl, linux-kernel
On Tue, 12 Jul 2005, Ivan Kokshaysky wrote:
> On Tue, Jul 12, 2005 at 07:00:37PM +0300, Tero Roponen wrote:
> > It seems that everything is fine until some module
> > loads and does something.
>
> What does your /proc/ioports say under 2.6.12 with all modules
> loaded?
>
> Ivan.
cat /proc/ioports under 2.6.12 gives this:
0000-001f : dma1
0020-0021 : pic1
0040-0043 : timer0
0050-0053 : timer1
0060-006f : keyboard
0070-0077 : rtc
0080-008f : dma page reg
00a0-00a1 : pic2
00c0-00df : dma2
00f0-00ff : fpu
01f0-01f7 : ide0
02f8-02ff : serial
0300-030f : pcmcia_socket1
0330-0331 : MPU401 UART
0388-0389 : OPL2/3 (left)
038a-038b : OPL2/3 (right)
03c0-03df : vga+
03f6-03f6 : ide0
04d0-04d1 : pnp 00:0a
0530-0533 : CS4231
0538-053f : CS4232 Control
0cf8-0cff : PCI conf1
15e0-15ef : pnp 00:0a
4000-40ff : PCI CardBus #01
4400-44ff : PCI CardBus #01
4800-48ff : PCI CardBus #05
4c00-4cff : PCI CardBus #05
9000-901f : 0000:00:06.2
ef00-ef3f : 0000:00:06.3
efa0-efbf : 0000:00:06.3
fcf0-fcff : 0000:00:06.1
fcf0-fcf7 : ide0
-
Tero Roponen
^ permalink raw reply [flat|nested] 9+ messages in thread
* 2.6.13-rc2 hangs at boot
@ 2005-07-06 13:47 Tero Roponen
2005-07-07 1:27 ` Jon Smirl
0 siblings, 1 reply; 9+ messages in thread
From: Tero Roponen @ 2005-07-06 13:47 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel
Hi,
my computer (a ThinkPad 380XD laptop) hangs at boot in 2.6.13-rc2.
When I revert the patch below everything seems to be fine.
thanks,
Tero Roponen
Patch to revert:
Author: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Date: Wed, 15 Jun 2005 14:59:27 +0000 (+0400)
Source: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=299de0343c7d18448a69c635378342e9214b14af
[PATCH] PCI: pci_assign_unassigned_resources() on x86
- Add sanity check for io[port,mem]_resource in setup-bus.c. These
resources look like "free" as they have no parents, but obviously
we must not touch them.
- In i386.c:pci_allocate_bus_resources(), if a bridge resource cannot be
allocated for some reason, then clear its flags. This prevents any child
allocations in this range, so the setup-bus code will work with a clean
resource sub-tree.
- i386.c:pcibios_enable_resources() doesn't enable bridges, as it checks
only resources 0-5, which looks like a clear bug to me. I suspect it
might break hotplug as well in some cases.
From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/arch/i386/pci/common.c
+++ b/arch/i386/pci/common.c
@@ -165,6 +165,7 @@ static int __init pcibios_init(void)
if ((pci_probe & PCI_BIOS_SORT) && !(pci_probe & PCI_NO_SORT))
pcibios_sort();
#endif
+ pci_assign_unassigned_resources();
return 0;
}
--- a/arch/i386/pci/i386.c
+++ b/arch/i386/pci/i386.c
@@ -106,11 +106,16 @@ static void __init pcibios_allocate_bus_
if ((dev = bus->self)) {
for (idx = PCI_BRIDGE_RESOURCES; idx < PCI_NUM_RESOURCES; idx++) {
r = &dev->resource[idx];
- if (!r->start)
+ if (!r->flags)
continue;
pr = pci_find_parent_resource(dev, r);
- if (!pr || request_resource(pr, r) < 0)
+ if (!r->start || !pr || request_resource(pr, r) < 0) {
printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, pci_name(dev));
+ /* Something is wrong with the region.
+ Invalidate the resource to prevent child
+ resource allocations in this range. */
+ r->flags = 0;
+ }
}
}
pcibios_allocate_bus_resources(&bus->children);
@@ -227,7 +232,7 @@ int pcibios_enable_resources(struct pci_
pci_read_config_word(dev, PCI_COMMAND, &cmd);
old_cmd = cmd;
- for(idx=0; idx<6; idx++) {
+ for(idx = 0; idx < PCI_NUM_RESOURCES; idx++) {
/* Only set up the requested stuff */
if (!(mask & (1<<idx)))
continue;
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -273,6 +273,8 @@ find_free_bus_resource(struct pci_bus *b
for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) {
r = bus->resource[i];
+ if (r == &ioport_resource || r == &iomem_resource)
+ continue;
if (r && (r->flags & type_mask) == type && !r->parent)
return r;
}
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: 2.6.13-rc2 hangs at boot
2005-07-06 13:47 Tero Roponen
@ 2005-07-07 1:27 ` Jon Smirl
2005-07-07 9:59 ` Ivan Kokshaysky
0 siblings, 1 reply; 9+ messages in thread
From: Jon Smirl @ 2005-07-07 1:27 UTC (permalink / raw)
To: Tero Roponen, ink; +Cc: gregkh, linux-kernel
I'm dead on a Dell PE400SC without reverting this.
On 7/6/05, Tero Roponen <teanropo@cc.jyu.fi> wrote:
> Hi,
>
> my computer (a ThinkPad 380XD laptop) hangs at boot in 2.6.13-rc2.
> When I revert the patch below everything seems to be fine.
>
> thanks,
> Tero Roponen
>
>
> Patch to revert:
>
> Author: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
> Date: Wed, 15 Jun 2005 14:59:27 +0000 (+0400)
> Source: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=299de0343c7d18448a69c635378342e9214b14af
>
> [PATCH] PCI: pci_assign_unassigned_resources() on x86
>
> - Add sanity check for io[port,mem]_resource in setup-bus.c. These
> resources look like "free" as they have no parents, but obviously
> we must not touch them.
> - In i386.c:pci_allocate_bus_resources(), if a bridge resource cannot be
> allocated for some reason, then clear its flags. This prevents any child
> allocations in this range, so the setup-bus code will work with a clean
> resource sub-tree.
> - i386.c:pcibios_enable_resources() doesn't enable bridges, as it checks
> only resources 0-5, which looks like a clear bug to me. I suspect it
> might break hotplug as well in some cases.
>
> From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
>
> --- a/arch/i386/pci/common.c
> +++ b/arch/i386/pci/common.c
> @@ -165,6 +165,7 @@ static int __init pcibios_init(void)
> if ((pci_probe & PCI_BIOS_SORT) && !(pci_probe & PCI_NO_SORT))
> pcibios_sort();
> #endif
> + pci_assign_unassigned_resources();
> return 0;
> }
>
> --- a/arch/i386/pci/i386.c
> +++ b/arch/i386/pci/i386.c
> @@ -106,11 +106,16 @@ static void __init pcibios_allocate_bus_
> if ((dev = bus->self)) {
> for (idx = PCI_BRIDGE_RESOURCES; idx < PCI_NUM_RESOURCES; idx++) {
> r = &dev->resource[idx];
> - if (!r->start)
> + if (!r->flags)
> continue;
> pr = pci_find_parent_resource(dev, r);
> - if (!pr || request_resource(pr, r) < 0)
> + if (!r->start || !pr || request_resource(pr, r) < 0) {
> printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, pci_name(dev));
> + /* Something is wrong with the region.
> + Invalidate the resource to prevent child
> + resource allocations in this range. */
> + r->flags = 0;
> + }
> }
> }
> pcibios_allocate_bus_resources(&bus->children);
> @@ -227,7 +232,7 @@ int pcibios_enable_resources(struct pci_
>
> pci_read_config_word(dev, PCI_COMMAND, &cmd);
> old_cmd = cmd;
> - for(idx=0; idx<6; idx++) {
> + for(idx = 0; idx < PCI_NUM_RESOURCES; idx++) {
> /* Only set up the requested stuff */
> if (!(mask & (1<<idx)))
> continue;
> --- a/drivers/pci/setup-bus.c
> +++ b/drivers/pci/setup-bus.c
> @@ -273,6 +273,8 @@ find_free_bus_resource(struct pci_bus *b
>
> for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) {
> r = bus->resource[i];
> + if (r == &ioport_resource || r == &iomem_resource)
> + continue;
> if (r && (r->flags & type_mask) == type && !r->parent)
> return r;
> }
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: 2.6.13-rc2 hangs at boot
2005-07-07 1:27 ` Jon Smirl
@ 2005-07-07 9:59 ` Ivan Kokshaysky
2005-07-07 10:33 ` Tero Roponen
0 siblings, 1 reply; 9+ messages in thread
From: Ivan Kokshaysky @ 2005-07-07 9:59 UTC (permalink / raw)
To: Jon Smirl; +Cc: Tero Roponen, gregkh, linux-kernel
On Wed, Jul 06, 2005 at 09:27:11PM -0400, Jon Smirl wrote:
> I'm dead on a Dell PE400SC without reverting this.
Jon, can you try this one instead:
http://lkml.org/lkml/2005/7/6/273
If it doesn't help, I'd like to see 'lspci -vv' from your machine.
Ivan.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: 2.6.13-rc2 hangs at boot
2005-07-07 9:59 ` Ivan Kokshaysky
@ 2005-07-07 10:33 ` Tero Roponen
2005-07-07 12:31 ` Ivan Kokshaysky
0 siblings, 1 reply; 9+ messages in thread
From: Tero Roponen @ 2005-07-07 10:33 UTC (permalink / raw)
To: Ivan Kokshaysky; +Cc: Jon Smirl, gregkh, linux-kernel
On Thu, 7 Jul 2005, Ivan Kokshaysky wrote:
> On Wed, Jul 06, 2005 at 09:27:11PM -0400, Jon Smirl wrote:
> > I'm dead on a Dell PE400SC without reverting this.
>
> Jon, can you try this one instead:
> http://lkml.org/lkml/2005/7/6/273
>
> If it doesn't help, I'd like to see 'lspci -vv' from your machine.
>
> Ivan.
>
Hi,
I tested that patch, but it didn't work.
When I boot 2.6.12 or 2.6.13-rc1 everything is fine.
Working 2.6.12 prints this while booting:
...
hda: IBM-DPLA-25120, ATA DISK drive
hdb: SANYO CRD-S372B, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
Probing IDE interface ide2...
Probing IDE interface ide3...
Probing IDE interface ide4...
Probing IDE interface ide5...
hda: max request size: 128KiB
hda: 10009440 sectors (5124 MB) w/468KiB Cache, CHS=10592/15/63, UDMA(33)
hda: cache flushes not supported
hda: hda1 hda2 hda3 < hda5 hda6 hda7 hda8 hda9 hda10 > hda4
...
2.6.13-rc2 with and without tested patch display this:
...
hda: cache flushes not supported
hda: hda1 hda2 hda3 <
Then it hangs for a while and shows something like this:
dma_timer_expiry: dma status == 0x61
thanks,
Tero Roponen
lspci -vv output:
00:00.0 Host bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled) (rev 02)
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ >SERR- <PERR+
Latency: 64
Region 0: Memory at <unassigned> (32-bit, prefetchable)
00:02.0 CardBus bridge: Texas Instruments PCI1250 (rev 02)
Subsystem: IBM ThinkPad 600
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 168, Cache Line Size 08
Interrupt: pin A routed to IRQ 11
Region 0: Memory at 50000000 (32-bit, non-prefetchable) [size=4K]
Bus: primary=00, secondary=01, subordinate=04, sec-latency=176
Memory window 0: 04000000-043ff000 (prefetchable)
Memory window 1: 04400000-047ff000
I/O window 0: 00004000-000040ff
I/O window 1: 00004400-000044ff
BridgeCtl: Parity- SERR- ISA- VGA- MAbort- >Reset+ 16bInt+ PostWrite+
16-bit legacy interface ports at 0001
00:02.1 CardBus bridge: Texas Instruments PCI1250 (rev 02)
Subsystem: IBM ThinkPad 600
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 168, Cache Line Size 08
Interrupt: pin B routed to IRQ 11
Region 0: Memory at 51000000 (32-bit, non-prefetchable) [size=4K]
Bus: primary=00, secondary=05, subordinate=08, sec-latency=176
Memory window 0: 04800000-04bff000 (prefetchable)
Memory window 1: 04c00000-04fff000
I/O window 0: 00004800-000048ff
I/O window 1: 00004c00-00004cff
BridgeCtl: Parity- SERR- ISA- VGA- MAbort- >Reset+ 16bInt+ PostWrite+
16-bit legacy interface ports at 0001
00:03.0 VGA compatible controller: Neomagic Corporation NM2160 [MagicGraph 128XD] (rev 01) (prog-if 00 [VGA])
Subsystem: IBM MagicGraph 128XD
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin A routed to IRQ 11
Region 0: Memory at 48000000 (32-bit, prefetchable) [size=16M]
Region 1: Memory at 49000000 (32-bit, non-prefetchable) [size=2M]
Region 2: Memory at 49400000 (32-bit, non-prefetchable) [size=1M]
00:06.0 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ISA (rev 01)
Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0
00:06.1 IDE interface: Intel Corp. 82371AB/EB/MB PIIX4 IDE (rev 01) (prog-if 80 [Master])
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32
Region 4: I/O ports at fcf0 [size=16]
00:06.2 USB Controller: Intel Corp. 82371AB/EB/MB PIIX4 USB (rev 01) (prog-if 00 [UHCI])
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 48
Interrupt: pin D routed to IRQ 11
Region 4: I/O ports at 9000 [size=32]
00:06.3 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ACPI (rev 01)
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin ? routed to IRQ 9
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: 2.6.13-rc2 hangs at boot
2005-07-07 10:33 ` Tero Roponen
@ 2005-07-07 12:31 ` Ivan Kokshaysky
2005-07-07 12:47 ` Tero Roponen
0 siblings, 1 reply; 9+ messages in thread
From: Ivan Kokshaysky @ 2005-07-07 12:31 UTC (permalink / raw)
To: Tero Roponen; +Cc: Jon Smirl, gregkh, linux-kernel
On Thu, Jul 07, 2005 at 01:33:46PM +0300, Tero Roponen wrote:
> 00:00.0 Host bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled) (rev 02)
> Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
> Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ >SERR- <PERR+
> Latency: 64
> Region 0: Memory at <unassigned> (32-bit, prefetchable)
^^^^^^^^^^^^
I'd bet this is the cause of your problem.
The pci_assign_unassigned_resources() is not aware of potential
problems with i386 host bridges and just reassigns this region.
Which effectively turns the DMA off on your machine, I guess.
The patch here (against clean 2.6.13-rc2) should fix that.
Ivan.
--- 2.6.13-rc2/arch/i386/pci/i386.c Thu Jul 7 15:38:54 2005
+++ linux/arch/i386/pci/i386.c Thu Jul 7 15:40:26 2005
@@ -176,10 +176,6 @@ static int __init pcibios_assign_resourc
for_each_pci_dev(dev) {
int class = dev->class >> 8;
- /* Don't touch classless devices and host bridges */
- if (!class || class == PCI_CLASS_BRIDGE_HOST)
- continue;
-
for(idx=0; idx<6; idx++) {
r = &dev->resource[idx];
@@ -195,8 +191,15 @@ static int __init pcibios_assign_resourc
* the BIOS forgot to do so or because we have decided the old
* address was unusable for some reason.
*/
- if (!r->start && r->end)
- pci_assign_resource(dev, idx);
+ if (!r->start && r->end) {
+ /* Don't touch classless devices and host
+ bridges and also hide their unassigned
+ resources from the rest of PCI subsystem. */
+ if (!class || class == PCI_CLASS_BRIDGE_HOST)
+ r->flags = 0;
+ else
+ pci_assign_resource(dev, idx);
+ }
}
if (pci_probe & PCI_ASSIGN_ROMS) {
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: 2.6.13-rc2 hangs at boot
2005-07-07 12:31 ` Ivan Kokshaysky
@ 2005-07-07 12:47 ` Tero Roponen
2005-07-07 13:41 ` Ivan Kokshaysky
0 siblings, 1 reply; 9+ messages in thread
From: Tero Roponen @ 2005-07-07 12:47 UTC (permalink / raw)
To: Ivan Kokshaysky; +Cc: Jon Smirl, gregkh, linux-kernel
On Thu, 7 Jul 2005, Ivan Kokshaysky wrote:
> On Thu, Jul 07, 2005 at 01:33:46PM +0300, Tero Roponen wrote:
> > 00:00.0 Host bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled) (rev 02)
> > Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
> > Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ >SERR- <PERR+
> > Latency: 64
> > Region 0: Memory at <unassigned> (32-bit, prefetchable)
> ^^^^^^^^^^^^
> I'd bet this is the cause of your problem.
> The pci_assign_unassigned_resources() is not aware of potential
> problems with i386 host bridges and just reassigns this region.
> Which effectively turns the DMA off on your machine, I guess.
>
> The patch here (against clean 2.6.13-rc2) should fix that.
>
> Ivan.
Hi,
I just tested the patch, but it didn't help. It still hangs.
-
Tero Roponen
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: 2.6.13-rc2 hangs at boot
2005-07-07 12:47 ` Tero Roponen
@ 2005-07-07 13:41 ` Ivan Kokshaysky
2005-07-07 14:13 ` Tero Roponen
0 siblings, 1 reply; 9+ messages in thread
From: Ivan Kokshaysky @ 2005-07-07 13:41 UTC (permalink / raw)
To: Tero Roponen; +Cc: Jon Smirl, gregkh, linux-kernel
On Thu, Jul 07, 2005 at 03:47:58PM +0300, Tero Roponen wrote:
> I just tested the patch, but it didn't help. It still hangs.
Well, the code in setup-bus.c does actually know about host
bridges, so the patch was just no-op...
Tero (and others), can you post dmesg from working kernel and,
if possible, from 2.6.13-rc2 captured from serial console?
Ivan.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: 2.6.13-rc2 hangs at boot
2005-07-07 13:41 ` Ivan Kokshaysky
@ 2005-07-07 14:13 ` Tero Roponen
2005-07-08 6:28 ` Ivan Kokshaysky
0 siblings, 1 reply; 9+ messages in thread
From: Tero Roponen @ 2005-07-07 14:13 UTC (permalink / raw)
To: Ivan Kokshaysky; +Cc: Jon Smirl, gregkh, linux-kernel
[-- Attachment #1: Type: TEXT/PLAIN, Size: 631 bytes --]
On Thu, 7 Jul 2005, Ivan Kokshaysky wrote:
> On Thu, Jul 07, 2005 at 03:47:58PM +0300, Tero Roponen wrote:
> > I just tested the patch, but it didn't help. It still hangs.
>
> Well, the code in setup-bus.c does actually know about host
> bridges, so the patch was just no-op...
>
> Tero (and others), can you post dmesg from working kernel and,
> if possible, from 2.6.13-rc2 captured from serial console?
>
> Ivan.
>
I applied your original patch (the no-op one) and the
end=0 patch. With those applied I could boot into login
prompt.
Attached are lspci -vv and dmesg outputs from
2.6.12 and 2.6.13-rc2 kernels.
-
Tero Roponen
[-- Attachment #2: Type: APPLICATION/octet-stream, Size: 920 bytes --]
[-- Attachment #3: Type: APPLICATION/octet-stream, Size: 918 bytes --]
[-- Attachment #4: Type: APPLICATION/octet-stream, Size: 3310 bytes --]
[-- Attachment #5: Type: APPLICATION/octet-stream, Size: 3200 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: 2.6.13-rc2 hangs at boot
2005-07-07 14:13 ` Tero Roponen
@ 2005-07-08 6:28 ` Ivan Kokshaysky
2005-07-08 7:57 ` [SOLVED] " Tero Roponen
0 siblings, 1 reply; 9+ messages in thread
From: Ivan Kokshaysky @ 2005-07-08 6:28 UTC (permalink / raw)
To: Tero Roponen; +Cc: Jon Smirl, gregkh, linux-kernel
On Thu, Jul 07, 2005 at 05:13:49PM +0300, Tero Roponen wrote:
> I applied your original patch (the no-op one) and the
> end=0 patch. With those applied I could boot into login
> prompt.
Puzzling. None of these patches should affect your setup.
And you still have DMA timeouts...
> Attached are lspci -vv and dmesg outputs from
> 2.6.12 and 2.6.13-rc2 kernels.
The only difference is that under 2.6.13-rc2 the cardbus ranges
are a lot bigger. With the patch here your PCI setup should be
identical to 2.6.12. I don't think this fixes DMA problem,
but just to be sure...
Ivan.
--- 2.6.13-rc2/drivers/pci/setup-bus.c Thu Jul 7 01:32:43 2005
+++ linux/drivers/pci/setup-bus.c Fri Jul 8 10:25:20 2005
@@ -40,8 +40,8 @@
* FIXME: IO should be max 256 bytes. However, since we may
* have a P2P bridge below a cardbus bridge, we need 4K.
*/
-#define CARDBUS_IO_SIZE (4096)
-#define CARDBUS_MEM_SIZE (32*1024*1024)
+#define CARDBUS_IO_SIZE (256)
+#define CARDBUS_MEM_SIZE (4*1024*1024)
static void __devinit
pbus_assign_resources_sorted(struct pci_bus *bus)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [SOLVED] Re: 2.6.13-rc2 hangs at boot
2005-07-08 6:28 ` Ivan Kokshaysky
@ 2005-07-08 7:57 ` Tero Roponen
2005-07-08 9:19 ` Ivan Kokshaysky
0 siblings, 1 reply; 9+ messages in thread
From: Tero Roponen @ 2005-07-08 7:57 UTC (permalink / raw)
To: Ivan Kokshaysky; +Cc: Jon Smirl, gregkh, linux-kernel
On Fri, 8 Jul 2005, Ivan Kokshaysky wrote:
Thanks! Vanilla 2.6.13-rc2 with below patch applied
works perfectly!
-
Tero Roponen
> On Thu, Jul 07, 2005 at 05:13:49PM +0300, Tero Roponen wrote:
> > I applied your original patch (the no-op one) and the
> > end=0 patch. With those applied I could boot into login
> > prompt.
>
> Puzzling. None of these patches should affect your setup.
> And you still have DMA timeouts...
>
> > Attached are lspci -vv and dmesg outputs from
> > 2.6.12 and 2.6.13-rc2 kernels.
>
> The only difference is that under 2.6.13-rc2 the cardbus ranges
> are a lot bigger. With the patch here your PCI setup should be
> identical to 2.6.12. I don't think this fixes DMA problem,
> but just to be sure...
>
> Ivan.
>
> --- 2.6.13-rc2/drivers/pci/setup-bus.c Thu Jul 7 01:32:43 2005
> +++ linux/drivers/pci/setup-bus.c Fri Jul 8 10:25:20 2005
> @@ -40,8 +40,8 @@
> * FIXME: IO should be max 256 bytes. However, since we may
> * have a P2P bridge below a cardbus bridge, we need 4K.
> */
> -#define CARDBUS_IO_SIZE (4096)
> -#define CARDBUS_MEM_SIZE (32*1024*1024)
> +#define CARDBUS_IO_SIZE (256)
> +#define CARDBUS_MEM_SIZE (4*1024*1024)
>
> static void __devinit
> pbus_assign_resources_sorted(struct pci_bus *bus)
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [SOLVED] Re: 2.6.13-rc2 hangs at boot
2005-07-08 7:57 ` [SOLVED] " Tero Roponen
@ 2005-07-08 9:19 ` Ivan Kokshaysky
2005-07-08 9:38 ` Tero Roponen
0 siblings, 1 reply; 9+ messages in thread
From: Ivan Kokshaysky @ 2005-07-08 9:19 UTC (permalink / raw)
To: Tero Roponen; +Cc: Jon Smirl, gregkh, linux-kernel
On Fri, Jul 08, 2005 at 10:57:56AM +0300, Tero Roponen wrote:
> Thanks! Vanilla 2.6.13-rc2 with below patch applied
> works perfectly!
Thanks for testing. Though, bad news are that it's still unclear
why your machine doesn't like large cardbus windows and therefore
how to fix that correctly.
May I ask you to do couple of another tests with following variations
of the latest patch (this will help to determine whether it's IO or
MEM ranges to blame)?
1.
#define CARDBUS_IO_SIZE (256)
#define CARDBUS_MEM_SIZE (32*1024*1024)
2.
#define CARDBUS_IO_SIZE (4096)
#define CARDBUS_MEM_SIZE (4*1024*1024)
Ivan.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [SOLVED] Re: 2.6.13-rc2 hangs at boot
2005-07-08 9:19 ` Ivan Kokshaysky
@ 2005-07-08 9:38 ` Tero Roponen
2005-07-08 9:45 ` Ivan Kokshaysky
0 siblings, 1 reply; 9+ messages in thread
From: Tero Roponen @ 2005-07-08 9:38 UTC (permalink / raw)
To: Ivan Kokshaysky; +Cc: Jon Smirl, gregkh, linux-kernel
On Fri, 8 Jul 2005, Ivan Kokshaysky wrote:
> On Fri, Jul 08, 2005 at 10:57:56AM +0300, Tero Roponen wrote:
> > Thanks! Vanilla 2.6.13-rc2 with below patch applied
> > works perfectly!
>
> Thanks for testing. Though, bad news are that it's still unclear
> why your machine doesn't like large cardbus windows and therefore
> how to fix that correctly.
>
> May I ask you to do couple of another tests with following variations
> of the latest patch (this will help to determine whether it's IO or
> MEM ranges to blame)?
> 1.
> #define CARDBUS_IO_SIZE (256)
> #define CARDBUS_MEM_SIZE (32*1024*1024)
This works correctly.
>
> 2.
> #define CARDBUS_IO_SIZE (4096)
> #define CARDBUS_MEM_SIZE (4*1024*1024)
This hangs at boot.
>
> Ivan.
>
-
Tero Roponen
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-07-12 16:23 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-08 13:54 [SOLVED] Re: 2.6.13-rc2 hangs at boot Mikael Pettersson
2005-07-12 13:41 ` Ivan Kokshaysky
2005-07-12 16:00 ` Tero Roponen
2005-07-12 16:07 ` Ivan Kokshaysky
2005-07-12 16:21 ` Tero Roponen
-- strict thread matches above, loose matches on Subject: below --
2005-07-06 13:47 Tero Roponen
2005-07-07 1:27 ` Jon Smirl
2005-07-07 9:59 ` Ivan Kokshaysky
2005-07-07 10:33 ` Tero Roponen
2005-07-07 12:31 ` Ivan Kokshaysky
2005-07-07 12:47 ` Tero Roponen
2005-07-07 13:41 ` Ivan Kokshaysky
2005-07-07 14:13 ` Tero Roponen
2005-07-08 6:28 ` Ivan Kokshaysky
2005-07-08 7:57 ` [SOLVED] " Tero Roponen
2005-07-08 9:19 ` Ivan Kokshaysky
2005-07-08 9:38 ` Tero Roponen
2005-07-08 9:45 ` Ivan Kokshaysky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®