Skip to contentSkip to conversation

PREP sym53c8xx sym53c8xx brokeness due to 2.6.9-rc1-bk1 introduced residual data patch ...

PATCH In review Sven Luther 5 participants 17 messages Mar 28, 2005 – Apr 13, 2005

lore
Share & tools
lore
#0 lore raw

Hello,

I have been investigating the prep breakage of the sym53c8xx driver on my powerstack II in recent kernels, and traced it to the residual data patch, or more exactly to the whole prep_pci.c/prep_setup.c patches that where introduced between 2.6.9-rc1 and 2.6.9-rc1-bk1. I didn't have time to find more details as the patch is not so small, and seems to do many things, and linux.bkbits.net seems done right now.

Mmm, after a bit more of investigation, the changeset breaking it is :

# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/08/16 10:35:18-07:00 [email protected]
# ppc32: On PReP, use residual data for PCI dev -> IRQ, and use it.
#
# Signed-off-by: Leigh Brown <[email protected]>
# Signed-off-by: Tom Rini <[email protected]>
#

# include/asm-ppc/residual.h
#   2004/08/16 10:35:09-07:00 [email protected] +7 -0
#   This adds a function to use the residual data to determine the IRQ
#   for a given PCI device, and changes prep_pcibios_fixup() to use it.
#
# arch/ppc/platforms/residual.c
#   2004/08/16 10:35:09-07:00 [email protected] +60 -0
#   This adds a function to use the residual data to determine the IRQ
#   for a given PCI device, and changes prep_pcibios_fixup() to use it.
#
# arch/ppc/platforms/prep_pci.c
#   2004/08/16 10:35:09-07:00 [email protected] +37 -23
#   This adds a function to use the residual data to determine the IRQ
#   for a given PCI device, and changes prep_pcibios_fixup() to use it.

Mmm, i guess this makes sense, since it seems the sym53c8xx doesn'y find its irq anymore or something. Tom Rini, or Leigh Brown, do you have any comments on this one ?

Friendly,

Sven Luther

#1 lore raw
Quoted 35 lines · Sven Luther

Hello,

I have been investigating the prep breakage of the sym53c8xx driver on my powerstack II in recent kernels, and traced it to the residual data patch, or more exactly to the whole prep_pci.c/prep_setup.c patches that where introduced between 2.6.9-rc1 and 2.6.9-rc1-bk1. I didn't have time to find more details as the patch is not so small, and seems to do many things, and linux.bkbits.net seems done right now.

Mmm, after a bit more of investigation, the changeset breaking it is :

# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/08/16 10:35:18-07:00 [email protected]
# ppc32: On PReP, use residual data for PCI dev -> IRQ, and use it.
#
# Signed-off-by: Leigh Brown <[email protected]>
# Signed-off-by: Tom Rini <[email protected]>
#

# include/asm-ppc/residual.h
#   2004/08/16 10:35:09-07:00 [email protected] +7 -0
#   This adds a function to use the residual data to determine the IRQ
#   for a given PCI device, and changes prep_pcibios_fixup() to use it.
#
# arch/ppc/platforms/residual.c
#   2004/08/16 10:35:09-07:00 [email protected] +60 -0
#   This adds a function to use the residual data to determine the IRQ
#   for a given PCI device, and changes prep_pcibios_fixup() to use it.
#
# arch/ppc/platforms/prep_pci.c
#   2004/08/16 10:35:09-07:00 [email protected] +37 -23
#   This adds a function to use the residual data to determine the IRQ
#   for a given PCI device, and changes prep_pcibios_fixup() to use it.
Quoted 3 lines

Mmm, i guess this makes sense, since it seems the sym53c8xx doesn'y find its irq anymore or something. Tom Rini, or Leigh Brown, do you have any comments on this one ?

Well, we'd need to be certain it's this patch. If it's this patch, I think Leigh was suggesting at the time that the fix would be to fixup the residual data with the correct information.

But what also went in were changes to specific irq maps, based on what fixed a given machine for someone else, so one of those changes could also be it.

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#2 lore raw
Quoted 36 lines · Tom Rini
Quoted 35 lines · Sven Luther

Hello,

I have been investigating the prep breakage of the sym53c8xx driver on my powerstack II in recent kernels, and traced it to the residual data patch, or more exactly to the whole prep_pci.c/prep_setup.c patches that where introduced between 2.6.9-rc1 and 2.6.9-rc1-bk1. I didn't have time to find more details as the patch is not so small, and seems to do many things, and linux.bkbits.net seems done right now.

Mmm, after a bit more of investigation, the changeset breaking it is :

# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/08/16 10:35:18-07:00 [email protected]
# ppc32: On PReP, use residual data for PCI dev -> IRQ, and use it.
#
# Signed-off-by: Leigh Brown <[email protected]>
# Signed-off-by: Tom Rini <[email protected]>
#

# include/asm-ppc/residual.h
#   2004/08/16 10:35:09-07:00 [email protected] +7 -0
#   This adds a function to use the residual data to determine the IRQ
#   for a given PCI device, and changes prep_pcibios_fixup() to use it.
#
# arch/ppc/platforms/residual.c
#   2004/08/16 10:35:09-07:00 [email protected] +60 -0
#   This adds a function to use the residual data to determine the IRQ
#   for a given PCI device, and changes prep_pcibios_fixup() to use it.
#
# arch/ppc/platforms/prep_pci.c
#   2004/08/16 10:35:09-07:00 [email protected] +37 -23
#   This adds a function to use the residual data to determine the IRQ
#   for a given PCI device, and changes prep_pcibios_fixup() to use it.
Quoted 7 lines
Quoted 3 lines

Mmm, i guess this makes sense, since it seems the sym53c8xx doesn'y find its irq anymore or something. Tom Rini, or Leigh Brown, do you have any comments on this one ?

Well, we'd need to be certain it's this patch. If it's this patch, I think Leigh was suggesting at the time that the fix would be to fixup the residual data with the correct information.

I got through all the changesets one by one, and it is most definitively this one. i unapply it and it works, i apply it and it breaks.

/me went through a couple hours of binary diff in this way monday evening :/

Quoted 3 lines

But what also went in were changes to specific irq maps, based on what fixed a given machine for someone else, so one of those changes could also be it.

Nope, it is most definitively the patch above which causes the problem.

I believe the new irq setting method is borked somehow.

Friendly,

Sven Luther

#3 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 8 lines · Sven Luther
Quoted 5 lines
Quoted 5 lines

# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/08/16 10:35:18-07:00 [email protected]
# ppc32: On PReP, use residual data for PCI dev -> IRQ, and use it.

I got through all the changesets one by one, and it is most definitively this one. i unapply it and it works, i apply it and it breaks.

i can confirm this one.

the changesets are listed here:
http://linux.bkbits.net:8080/linux-2.6/[email protected]

...and because i had some troubles getting a GNU diff-style patch with /usr/bin/bk, i made one against 2.6.11.6:

http://nerdbynature.de/bits/hal/2.6.11.6/1.1803.125.6.diff

more info and dmesg under:

http://nerdbynature.de/bits/hal/2.6.11.6/

to summarize: i don't know exactly which changes, but *some* changes had to be made to arch/ppc/platforms/prep_pci.c to get the network card working [1] again (network code kept locking up the machine). after this issue was resolved, i too noticed the scsi errors [2] others were complaing about.

thanks to all involved,
Christian.

[1] http://ozlabs.org/pipermail/linuxppc-dev/2004-December/017954.html
[2] http://nerdbynature.de/bits/hal/2.6.11-rc5/dmesg
- --
BOFH excuse #307:

emissions from GSM-phones
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCUdW5C/PVm5+NVoYRAnBFAKDWoLrgNglNCIuVNLMZcJXccp7K6QCfSyIp i4H8VpqUw3e7WiyqpsqYs54=
=WD3X
-----END PGP SIGNATURE-----

#4 lore raw
Quoted 25 lines · Christian

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 8 lines · Sven Luther
Quoted 5 lines
Quoted 5 lines

# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/08/16 10:35:18-07:00 [email protected]
# ppc32: On PReP, use residual data for PCI dev -> IRQ, and use it.

I got through all the changesets one by one, and it is most definitively this one. i unapply it and it works, i apply it and it breaks.

i can confirm this one.

the changesets are listed here:
http://linux.bkbits.net:8080/linux-2.6/[email protected]

...and because i had some troubles getting a GNU diff-style patch with /usr/bin/bk, i made one against 2.6.11.6:

http://nerdbynature.de/bits/hal/2.6.11.6/1.1803.125.6.diff

more info and dmesg under:

Quoted 7 lines

http://nerdbynature.de/bits/hal/2.6.11.6/

to summarize: i don't know exactly which changes, but *some* changes had to be made to arch/ppc/platforms/prep_pci.c to get the network card working [1] again (network code kept locking up the machine). after this issue was resolved, i too noticed the scsi errors [2] others were complaing about.

The issue seems obvious, the patch adds some different way of setting the irqs, based on the residual data, which fails to do what it should on the powerstack, and thus the irqs are fully left uninitialized.

Friendly,

Sven Luther

#5 lore raw
Quoted 34 lines · Sven Luther
Quoted 25 lines · Christian

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 8 lines · Sven Luther
Quoted 5 lines
Quoted 5 lines

# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/08/16 10:35:18-07:00 [email protected]
# ppc32: On PReP, use residual data for PCI dev -> IRQ, and use it.

I got through all the changesets one by one, and it is most definitively this one. i unapply it and it works, i apply it and it breaks.

i can confirm this one.

the changesets are listed here:
http://linux.bkbits.net:8080/linux-2.6/[email protected]

...and because i had some troubles getting a GNU diff-style patch with /usr/bin/bk, i made one against 2.6.11.6:

http://nerdbynature.de/bits/hal/2.6.11.6/1.1803.125.6.diff

more info and dmesg under:

Quoted 7 lines

http://nerdbynature.de/bits/hal/2.6.11.6/

to summarize: i don't know exactly which changes, but *some* changes had to be made to arch/ppc/platforms/prep_pci.c to get the network card working [1] again (network code kept locking up the machine). after this issue was resolved, i too noticed the scsi errors [2] others were complaing about.

Quoted 3 lines

The issue seems obvious, the patch adds some different way of setting the irqs, based on the residual data, which fails to do what it should on the powerstack, and thus the irqs are fully left uninitialized.

Can either of you verify that say 2.6.11.6 w/ "noresidual" on the command-line works? Thanks.

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#6 lore raw
Quoted 35 lines · Tom Rini
Quoted 34 lines · Sven Luther
Quoted 32 lines · Christian

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 8 lines · Sven Luther
Quoted 5 lines
Quoted 5 lines

# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/08/16 10:35:18-07:00 [email protected]
# ppc32: On PReP, use residual data for PCI dev -> IRQ, and use it.

I got through all the changesets one by one, and it is most definitively this one. i unapply it and it works, i apply it and it breaks.

i can confirm this one.

the changesets are listed here:
http://linux.bkbits.net:8080/linux-2.6/[email protected]

...and because i had some troubles getting a GNU diff-style patch with /usr/bin/bk, i made one against 2.6.11.6:

http://nerdbynature.de/bits/hal/2.6.11.6/1.1803.125.6.diff

more info and dmesg under:

http://nerdbynature.de/bits/hal/2.6.11.6/

to summarize: i don't know exactly which changes, but *some* changes had to be made to arch/ppc/platforms/prep_pci.c to get the network card working [1] again (network code kept locking up the machine). after this issue was resolved, i too noticed the scsi errors [2] others were complaing about.

Quoted 6 lines
Quoted 3 lines

The issue seems obvious, the patch adds some different way of setting the irqs, based on the residual data, which fails to do what it should on the powerstack, and thus the irqs are fully left uninitialized.

Can either of you verify that say 2.6.11.6 w/ "noresidual" on the command-line works? Thanks.

Notice that last i checked, there was a typo which forced you to say "nopresidual", and i think i did add this when i was testing, and it didn't help.

Will try booting the debian 2.6.11-1 powerpc kernels which should include all 2.6.11.6 patches.

Friendly,

Sven Luther

#7 lore raw
Quoted 40 lines · Sven Luther
Quoted 39 lines · Tom Rini
Quoted 37 lines · Sven Luther
Quoted 25 lines · Christian

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 8 lines · Sven Luther
Quoted 5 lines
Quoted 5 lines

# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/08/16 10:35:18-07:00 [email protected]
# ppc32: On PReP, use residual data for PCI dev -> IRQ, and use it.

I got through all the changesets one by one, and it is most definitively this one. i unapply it and it works, i apply it and it breaks.

i can confirm this one.

the changesets are listed here:
http://linux.bkbits.net:8080/linux-2.6/[email protected]

...and because i had some troubles getting a GNU diff-style patch with /usr/bin/bk, i made one against 2.6.11.6:

http://nerdbynature.de/bits/hal/2.6.11.6/1.1803.125.6.diff

more info and dmesg under:

Quoted 7 lines

http://nerdbynature.de/bits/hal/2.6.11.6/

to summarize: i don't know exactly which changes, but *some* changes had to be made to arch/ppc/platforms/prep_pci.c to get the network card working [1] again (network code kept locking up the machine). after this issue was resolved, i too noticed the scsi errors [2] others were complaing about.

The issue seems obvious, the patch adds some different way of setting the irqs, based on the residual data, which fails to do what it should on the powerstack, and thus the irqs are fully left uninitialized.

Quoted 6 lines
Quoted 2 lines

Can either of you verify that say 2.6.11.6 w/ "noresidual" on the command-line works? Thanks.

Notice that last i checked, there was a typo which forced you to say "nopresidual", and i think i did add this when i was testing, and it didn't help.

That's a problem, as 'noresidual' was supposed to disable the new stuff introduced here, for boxes that it may have broken.

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#8 lore raw
In reply to Tom Rini

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 2 lines · Tom Rini

Can either of you verify that say 2.6.11.6 w/ "noresidual" on the command-line works? Thanks.

i booted vanilla 2.6.11.6 with noresidual (and "nopresidual" too, as Sven sugggested), but the scsi errors did not went away :(

on a side note, and perhaps totally unrelated: i always have PROC_PREPRESIDUAL=y in my .config, but i never had /proc/residual as promised from the help text.

thanks,
Christian.
- --
BOFH excuse #48:

bad ether in the cables
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCUz+hC/PVm5+NVoYRApdaAJ90DeNHRdmHHnQBflMrWyFt1/vO6gCfQixe jLOm8vmTPNR+xKR9K6Yk9Fs=
=GnEk
-----END PGP SIGNATURE-----

#9 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 2 lines · Christian

i booted vanilla 2.6.11.6 with noresidual (and "nopresidual" too, as Sven sugggested), but the scsi errors did not went away :(

um, no, worse that that: the scsi error kicks in for sym0:0:0:

sym0:0:0: DEVICE RESET operation started. (...then it would continue until sym0:15:0, see [1])

then the machine locked up completely, not even SYSRQ works any more. that happened when booting with "noresidual" and even with PREP_RESIDUAL=n (in the .config).

thanks,
Christian.

[1] http://nerdbynature.de/bits/hal/2.6.11-rc5/dmesg
- --
BOFH excuse #48:

bad ether in the cables
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCU0ItC/PVm5+NVoYRAnVMAJ9L1eQLopn6ckMUkC+lNVnwsoKUCACfa2Tj zqXc3jjKeiXpdYuih+wlZqs=
=GRwp
-----END PGP SIGNATURE-----

#10 lore raw
In reply to Christian
Quoted 10 lines · Christian
Quoted 2 lines · Tom Rini

Can either of you verify that say 2.6.11.6 w/ "noresidual" on the command-line works? Thanks.

i booted vanilla 2.6.11.6 with noresidual (and "nopresidual" too, as Sven sugggested), but the scsi errors did not went away :(

on a side note, and perhaps totally unrelated: i always have PROC_PREPRESIDUAL=y in my .config, but i never had /proc/residual as promised from the help text.

Odd. I thought that only happened if you had no residual data at all (which can happen on Powerstacks, esp if netbooting the kernel). But in that case the new code shouldn't be hit at all. Leigh?

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#11 lore raw
Quoted 9 lines · Tom Rini
Quoted 8 lines · Christian
Quoted 2 lines · Tom Rini

Can either of you verify that say 2.6.11.6 w/ "noresidual" on the command-line works? Thanks.

i booted vanilla 2.6.11.6 with noresidual (and "nopresidual" too, as Sven
sugggested), but the scsi errors did not went away :(

Quoted 7 lines
Quoted 3 lines

on a side note, and perhaps totally unrelated: i always have PROC_PREPRESIDUAL=y in my .config, but i never had /proc/residual as promised from the help text.

Odd. I thought that only happened if you had no residual data at all (which can happen on Powerstacks, esp if netbooting the kernel). But in that case the new code shouldn't be hit at all. Leigh?

Hi, I'm back from my holidays, and have had a look at this. As I spent lots of time understanding the horrendous mess that was prep_pcibios_fixup(), I'd be loath to back out the changes I made (especially as they work so well for me ;-) ).

It turns out that prep_pib_init() is the culprit. Although it would appear to be coded for the non-openpic case, it obviously doesn't work. The old version of prep_pcibios_fixup() only called it if there is an openpic on the machine. We can restore that behaviour with the following patch:

prep_pci.c renamed from prep_pci.c.orig +7 -2
@@ -1245,8 +1245,13 @@
 		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
 	}
 
-	/* Setup the Winbond or Via PIB */
-	prep_pib_init();
+	/* Setup the Winbond or Via PIB - prep_pib_init() is coded for
+	 * the non-openpic case, but it breaks (at least) the Utah
+	 * (Powerstack II Pro4000), so only call it if we have an
+	 * openpic.
+	 */
+	if (have_openpic)
+		prep_pib_init();
 }
 
 static void __init

I've no idea even what machines would be affected by this, but it fixes Sven's problem and restores the old behaviour, so that can't be bad.

I guess fixing prep_pib_init() would be the better solution but I wouldn't know where to start. If this band-aid is good enough I can submit a proper patch, if you like.

Cheers,

Leigh.

Acked-by
#12 lore raw
Quoted 48 lines · Leigh Brown
Quoted 9 lines · Tom Rini
Quoted 8 lines · Christian
Quoted 2 lines · Tom Rini

Can either of you verify that say 2.6.11.6 w/ "noresidual" on the command-line works? Thanks.

i booted vanilla 2.6.11.6 with noresidual (and "nopresidual" too, as Sven
sugggested), but the scsi errors did not went away :(

Quoted 7 lines
Quoted 3 lines

on a side note, and perhaps totally unrelated: i always have PROC_PREPRESIDUAL=y in my .config, but i never had /proc/residual as promised from the help text.

Odd. I thought that only happened if you had no residual data at all (which can happen on Powerstacks, esp if netbooting the kernel). But in that case the new code shouldn't be hit at all. Leigh?

Hi, I'm back from my holidays, and have had a look at this. As I spent lots of time understanding the horrendous mess that was prep_pcibios_fixup(), I'd be loath to back out the changes I made (especially as they work so well for me ;-) ).

It turns out that prep_pib_init() is the culprit. Although it would appear to be coded for the non-openpic case, it obviously doesn't work. The old version of prep_pcibios_fixup() only called it if there is an openpic on the machine. We can restore that behaviour with the following patch:

prep_pci.c renamed from prep_pci.c.orig +7 -2
@@ -1245,8 +1245,13 @@
 		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
 	}
 
-	/* Setup the Winbond or Via PIB */
-	prep_pib_init();
+	/* Setup the Winbond or Via PIB - prep_pib_init() is coded for
+	 * the non-openpic case, but it breaks (at least) the Utah
+	 * (Powerstack II Pro4000), so only call it if we have an
+	 * openpic.
+	 */
+	if (have_openpic)
+		prep_pib_init();
 }
 
 static void __init
Quoted 7 lines

I've no idea even what machines would be affected by this, but it fixes Sven's problem and restores the old behaviour, so that can't be bad.

I guess fixing prep_pib_init() would be the better solution but I wouldn't know where to start. If this band-aid is good enough I can submit a proper patch, if you like.

If this works, I'd like to see this get into 2.6.12. Please re-send to akpm / this list. Assuming it's just the above:

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#13 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 4 lines · Tom Rini

If this works, I'd like to see this get into 2.6.12. Please re-send to akpm / this list. Assuming it's just the above:

yes! i just applied Leigh's patch (thanks!) to a pristine 2.6.11.6 and my PReP here booted fine:
http://www.nerdbynature.de/bits/hal/2.6.11.6/leigh/

thank you,
Christian.
- --
BOFH excuse #284:

Electrons on a bender
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCVqiLC/PVm5+NVoYRAmsZAJ9PlBmKEi/lASAtY4xx+74FzBxxkQCggjoy IBqhEVSNEgm7BhOVEJfBWY0=
=XgaG
-----END PGP SIGNATURE-----

#14 lore raw
Quoted 9 lines · Christian
Quoted 4 lines · Tom Rini

If this works, I'd like to see this get into 2.6.12. Please re-send to akpm / this list. Assuming it's just the above:

yes! i just applied Leigh's patch (thanks!) to a pristine 2.6.11.6 and my PReP here booted fine:
http://www.nerdbynature.de/bits/hal/2.6.11.6/leigh/

Great. Leigh, can you also submit to gregkh for 2.6.11.7? Thanks.

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#15 lore raw

PATCH 1/1 ppc32: Make the Powerstack II Pro4000 boot again

In reply to Tom Rini
Quoted 59 lines · On Fri, 8 Apr 2005 07:54:31 -0700 Tom Rini wrote:
Quoted 47 lines · Leigh Brown
Quoted 8 lines · Tom Rini
Quoted 7 lines · Christian
Quoted 2 lines · Tom Rini

Can either of you verify that say 2.6.11.6 w/ "noresidual" on the command-line works? Thanks.

i booted vanilla 2.6.11.6 with noresidual (and "nopresidual" too, as Sven sugggested), but the scsi errors did not went away :(

Quoted 7 lines
Quoted 3 lines

on a side note, and perhaps totally unrelated: i always have PROC_PREPRESIDUAL=y in my .config, but i never had /proc/residual as promised from the help text.

Odd. I thought that only happened if you had no residual data at all (which can happen on Powerstacks, esp if netbooting the kernel). But in that case the new code shouldn't be hit at all. Leigh?

Hi, I'm back from my holidays, and have had a look at this. As I spent lots of time understanding the horrendous mess that was prep_pcibios_fixup(), I'd be loath to back out the changes I made (especially as they work so well for me ;-) ).

It turns out that prep_pib_init() is the culprit. Although it would appear to be coded for the non-openpic case, it obviously doesn't work. The old version of prep_pcibios_fixup() only called it if there is an openpic on the machine. We can restore that behaviour with the following patch:

prep_pci.c renamed from prep_pci.c.orig +7 -2
@@ -1245,8 +1245,13 @@
 		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
 	}
 
-	/* Setup the Winbond or Via PIB */
-	prep_pib_init();
+	/* Setup the Winbond or Via PIB - prep_pib_init() is coded for
+	 * the non-openpic case, but it breaks (at least) the Utah
+	 * (Powerstack II Pro4000), so only call it if we have an
+	 * openpic.
+	 */
+	if (have_openpic)
+		prep_pib_init();
 }
 
 static void __init
Quoted 7 lines

I've no idea even what machines would be affected by this, but it fixes Sven's problem and restores the old behaviour, so that can't be bad.

I guess fixing prep_pib_init() would be the better solution but I wouldn't know where to start. If this band-aid is good enough I can submit a proper patch, if you like.

If this works, I'd like to see this get into 2.6.12. Please re-send to akpm / this list. Assuming it's just the above:

Quoted 7 lines · Tom Rini
Quoted 6 lines · Christian
Quoted 4 lines · Tom Rini

If this works, I'd like to see this get into 2.6.12. Please re-send to akpm / this list. Assuming it's just the above:

Quoted 5 lines
Quoted 3 lines

yes! i just applied Leigh's patch (thanks!) to a pristine 2.6.11.6 and my PReP here booted fine:
http://www.nerdbynature.de/bits/hal/2.6.11.6/leigh/

Great. Leigh, can you also submit to gregkh for 2.6.11.7? Thanks.

This patch restores the original behaviour of prep_pcibios_fixup() to only call prep_pib_init() on machines with an openpic. This allows the Powerstack II Pro4000 to boot again.

arch/ppc/platforms/prep_pci.c renamed from arch/ppc/platforms/prep_pci.c.orig +7 -2
@@ -1245,8 +1245,13 @@
 		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
 	}
 
-	/* Setup the Winbond or Via PIB */
-	prep_pib_init();
+	/* Setup the Winbond or Via PIB - prep_pib_init() is coded for
+	 * the non-openpic case, but it breaks (at least) the Utah
+	 * (Powerstack II Pro4000), so only call it if we have an
+	 * openpic.
+	 */
+	if (have_openpic)
+		prep_pib_init();
 }
 
 static void __init
#16 lore raw

Re: [PATCH 2.6.11+] ppc32: Make the Powerstack II Pro4000 boot again

Quoted 73 lines · Leigh Brown
Quoted 59 lines · On Fri, 8 Apr 2005 07:54:31 -0700 Tom Rini wrote:
Quoted 47 lines · Leigh Brown
Quoted 8 lines · Tom Rini
Quoted 7 lines · Christian
Quoted 2 lines · Tom Rini

Can either of you verify that say 2.6.11.6 w/ "noresidual" on the command-line works? Thanks.

i booted vanilla 2.6.11.6 with noresidual (and "nopresidual" too, as Sven sugggested), but the scsi errors did not went away :(

Quoted 7 lines
Quoted 3 lines

on a side note, and perhaps totally unrelated: i always have PROC_PREPRESIDUAL=y in my .config, but i never had /proc/residual as promised from the help text.

Odd. I thought that only happened if you had no residual data at all (which can happen on Powerstacks, esp if netbooting the kernel). But in that case the new code shouldn't be hit at all. Leigh?

Hi, I'm back from my holidays, and have had a look at this. As I spent lots of time understanding the horrendous mess that was prep_pcibios_fixup(), I'd be loath to back out the changes I made (especially as they work so well for me ;-) ).

It turns out that prep_pib_init() is the culprit. Although it would appear to be coded for the non-openpic case, it obviously doesn't work. The old version of prep_pcibios_fixup() only called it if there is an openpic on the machine. We can restore that behaviour with the following patch:

prep_pci.c renamed from prep_pci.c.orig +7 -2
@@ -1245,8 +1245,13 @@
 		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
 	}
 
-	/* Setup the Winbond or Via PIB */
-	prep_pib_init();
+	/* Setup the Winbond or Via PIB - prep_pib_init() is coded for
+	 * the non-openpic case, but it breaks (at least) the Utah
+	 * (Powerstack II Pro4000), so only call it if we have an
+	 * openpic.
+	 */
+	if (have_openpic)
+		prep_pib_init();
 }
 
 static void __init
Quoted 7 lines

I've no idea even what machines would be affected by this, but it fixes Sven's problem and restores the old behaviour, so that can't be bad.

I guess fixing prep_pib_init() would be the better solution but I wouldn't know where to start. If this band-aid is good enough I can submit a proper patch, if you like.

If this works, I'd like to see this get into 2.6.12. Please re-send to akpm / this list. Assuming it's just the above:

Quoted 11 lines · Tom Rini
Quoted 9 lines · Christian
Quoted 4 lines · Tom Rini

If this works, I'd like to see this get into 2.6.12. Please re-send to akpm / this list. Assuming it's just the above:

yes! i just applied Leigh's patch (thanks!) to a pristine 2.6.11.6 and my PReP here booted fine:
http://www.nerdbynature.de/bits/hal/2.6.11.6/leigh/

Quoted 7 lines
Quoted 1 line

Great. Leigh, can you also submit to gregkh for 2.6.11.7? Thanks.

This patch restores the original behaviour of prep_pcibios_fixup() to only call prep_pib_init() on machines with an openpic. This allows the Powerstack II Pro4000 to boot again.

The proper place for -stable patches, is to have them sent to [email protected] with a valid changelog comment (not a ton of context...)

Please do that, and it will be reviewed.

Also, is this patch already in mainline?

thanks,

greg k-h