Skip to contentSkip to conversation

2.6.13-rc7-git2 crashes on iBook

DISCUSSION Andreas Schwab 7 participants 8 messages Aug 28, 2005 – Sep 1, 2005 PCI

lore
Share & tools
lore
#0 lore raw

The last change to drivers/pci/setup-res.c (Ignore disabled ROM resources at setup) is breaking radeonfb on iBook G3 (with Radeon Mobility M6 LY). It crashes in pci_map_rom when called from radeonfb_map_ROM. This is probably a dormant bug that was just uncovered by the change.

Andreas.

Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
#1 lore raw

Hi Andreas, all,

Quoted 5 lines

The last change to drivers/pci/setup-res.c (Ignore disabled ROM resources at setup) is breaking radeonfb on iBook G3 (with Radeon Mobility M6 LY). It crashes in pci_map_rom when called from radeonfb_map_ROM. This is probably a dormant bug that was just uncovered by the change.

FWIW, it didn't seem to break my Sony Vaio PCG-GR214EP (x86 with Radeon Mobility M6 LY as well.) So it must be machine-specific, not chip-specific.

Signature · 1 line
Jean Delvare
#2 lore raw
In reply to Andreas Schwab
Quoted 4 lines · Andreas Schwab

The last change to drivers/pci/setup-res.c (Ignore disabled ROM resources at setup) is breaking radeonfb on iBook G3 (with Radeon Mobility M6 LY). It crashes in pci_map_rom when called from radeonfb_map_ROM. This is probably a dormant bug that was just uncovered by the change.

Same thing on Mac Mini. 2.6.13 doesn't boot. Revert the
drivers/pci/setup-res.c change from rc7-git2 and it seems ok.

Alex

#3 lore raw
Quoted 8 lines · Alex Williamson
Quoted 4 lines · Andreas Schwab

The last change to drivers/pci/setup-res.c (Ignore disabled ROM resources at setup) is breaking radeonfb on iBook G3 (with Radeon Mobility M6 LY). It crashes in pci_map_rom when called from radeonfb_map_ROM. This is probably a dormant bug that was just uncovered by the change.

Same thing on Mac Mini. 2.6.13 doesn't boot. Revert the
drivers/pci/setup-res.c change from rc7-git2 and it seems ok.

Confirmed on an Apple Powerbook too.

For reference, the (already reverted) patch which needs to be applied is below.

drivers/pci/setup-res.c +1 -3
Index: linux-2.6.git/drivers/pci/setup-res.c
===================================================================
@@ -53,9 +53,7 @@
 	if (resno < 6) {
 		reg = PCI_BASE_ADDRESS_0 + 4 * resno;
 	} else if (resno == PCI_ROM_RESOURCE) {
-		if (!(res->flags & IORESOURCE_ROM_ENABLE))
-			return;
-		new |= PCI_ROM_ADDRESS_ENABLE;
+		new |= res->flags & IORESOURCE_ROM_ENABLE;
 		reg = dev->rom_base_reg;
 	} else {
 		/* Hmm, non-standard resource. */

Stelian.

Signature · 1 line
Stelian Pop <[email protected]>
#6 lore raw

2.6.13 PowerBook boot hang (was Re: 2.6.13-rc7-git2 crashes on iBook)

In reply to Andreas Schwab
Quoted 4 lines · Andreas Schwab

The last change to drivers/pci/setup-res.c (Ignore disabled ROM resources at setup) is breaking radeonfb on iBook G3 (with Radeon Mobility M6 LY). It crashes in pci_map_rom when called from radeonfb_map_ROM. This is probably a dormant bug that was just uncovered by the change.

2.6.13 hangs on boot on my PowerBook 5.4, reverting the disabled ROM patch (appended for confirmation) fixes it. 2.6.13-rc7 was fine.

diff-tree 755528c860b05fcecda1c88a2bdaffcb50760a7f (from 26aad69e3dd854abe9028ca873fb40b410a39dd7)

Author: Linus Torvalds <[email protected]>
Date:   Fri Aug 26 10:49:22 2005 -0700

Ignore disabled ROM resources at setup

Writing even a disabled value seems to mess up some matrox graphics cards. It may be a card-related issue, but we may also be writing reserved low bits in the result.

This was a fall-out of switching x86 over to the generic PCI resource allocation code, and needs more debugging. In particular, the old x86 code defaulted to not doing any resource allocations at all for ROM resources.

In the meantime, this has been reported to make X happier by Helge Hafting <[email protected]>.

drivers/pci/setup-res.c +3 -1
@@ -53,7 +53,9 @@ pci_update_resource(struct pci_dev *dev,
 	if (resno < 6) {
 		reg = PCI_BASE_ADDRESS_0 + 4 * resno;
 	} else if (resno == PCI_ROM_RESOURCE) {
-		new |= res->flags & IORESOURCE_ROM_ENABLE;
+		if (!(res->flags & IORESOURCE_ROM_ENABLE))
+			return;
+		new |= PCI_ROM_ADDRESS_ENABLE;
 		reg = dev->rom_base_reg;
 	} else {
 		/* Hmm, non-standard resource. */
#7 lore raw

Re: 2.6.13 PowerBook boot hang (was Re: 2.6.13-rc7-git2 crashes on iBook)

Quoted 9 lines · Sean Neakums
Quoted 4 lines · Andreas Schwab

The last change to drivers/pci/setup-res.c (Ignore disabled ROM resources at setup) is breaking radeonfb on iBook G3 (with Radeon Mobility M6 LY). It crashes in pci_map_rom when called from radeonfb_map_ROM. This is probably a dormant bug that was just uncovered by the change.

2.6.13 hangs on boot on my PowerBook 5.4, reverting the disabled ROM patch (appended for confirmation) fixes it. 2.6.13-rc7 was fine.

Same here, on an Apple eMac with Radeon graphics. 2.6.13-rc7 worked fine, 2.6.13 vanilla hangs early in the boot when radeonfb is about to take over from OF. Reverting the patch below eliminates the hang.

/Mikael

Quoted 40 lines

diff-tree 755528c860b05fcecda1c88a2bdaffcb50760a7f (from 26aad69e3dd854abe9028ca873fb40b410a39dd7)

Author: Linus Torvalds <[email protected]>
Date:   Fri Aug 26 10:49:22 2005 -0700

Ignore disabled ROM resources at setup

Writing even a disabled value seems to mess up some matrox graphics cards. It may be a card-related issue, but we may also be writing reserved low bits in the result.

This was a fall-out of switching x86 over to the generic PCI resource allocation code, and needs more debugging. In particular, the old x86 code defaulted to not doing any resource allocations at all for ROM resources.

In the meantime, this has been reported to make X happier by Helge Hafting <[email protected]>.

drivers/pci/setup-res.c +3 -2
@@ -53,7 +53,9 @@ pci_update_resource(struct pci_dev *dev,
 	if (resno < 6) {
 		reg = PCI_BASE_ADDRESS_0 + 4 * resno;
 	} else if (resno == PCI_ROM_RESOURCE) {
-		new |= res->flags & IORESOURCE_ROM_ENABLE;
+		if (!(res->flags & IORESOURCE_ROM_ENABLE))
+			return;
+		new |= PCI_ROM_ADDRESS_ENABLE;
 		reg = dev->rom_base_reg;
 	} else {
 		/* Hmm, non-standard resource. */
-

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#4 lore raw
In reply to Stelian Pop

Hi,

Quoted 13 lines · Stelian Pop

Confirmed on an Apple Powerbook too.

For reference, the (already reverted) patch which needs to be applied is below.

Index: linux-2.6.git/drivers/pci/setup-res.c
===================================================================

drivers/pci/setup-res.c line 59

Quoted 10 lines
drivers/pci/setup-res.c +1 -3
@@ -53,9 +53,7 @@
 	if (resno < 6) {
 		reg = PCI_BASE_ADDRESS_0 + 4 * resno;
 	} else if (resno == PCI_ROM_RESOURCE) {
-		if (!(res->flags & IORESOURCE_ROM_ENABLE))
-			return;
-		new |= PCI_ROM_ADDRESS_ENABLE;
+		new |= res->flags & IORESOURCE_ROM_ENABLE;
 		reg = dev->rom_base_reg;
 	} else {
 		/* Hmm, non-standard resource. */

Sorry for my ignorance. Which tree was this reverted in? You are probably aware that this bug made it into 2.6.13 (patch was not reverted there).

Daniel

#5 lore raw
Quoted 11 lines · Daniel Drake

Hi,

Quoted 8 lines · Stelian Pop

Confirmed on an Apple Powerbook too.

For reference, the (already reverted) patch which needs to be applied is below.

Index: linux-2.6.git/drivers/pci/setup-res.c

[...]

Quoted 2 lines

Sorry for my ignorance. Which tree was this reverted in? You are probably aware that this bug made it into 2.6.13 (patch was not reverted there).

It must be my bad english but I wasn't implying that the patch was reverted in 2.6.13 but that one should apply it (just apply, without -R, because I didn't attach the original patch but a reversed version of it) on a clean 2.6.13 tree in order to make it work. :)

However, a different fix (a real fix, not the workaround proposed above) was discussed on lkml this week and BenH proposed a patch I haven't had the chance to test yet (see http://lkml.org/lkml/2005/8/31/1 ).

Stelian.

Signature · 1 line
Stelian Pop <[email protected]>