Skip to contentSkip to conversation

Trouble with Vger 2.2.5 kernel on PREP hardware

PATCH Alois Fertl 1 participant 1 message Apr 18, 1999

lore
Share & tools
lore
#0 lore raw

Cort,

yesterday I updated my vger sources from cvs.samba.org to the latest of linux-2.2.5. With this source I have the following problems on Motorola PReP hardware (tested on RiscPC Blackhawk but I strongly assume that VME boards are also affected):

Error in "arch/ppc/kernel/indirect_pci.c":
The Kernel fails in ncr53c8xx driver during boot. The reason is that
the relocation of PCI addresses no longer works because "indirect_pcibios_write_config_dword" defines the parameter asshort instead of int. The attached first patch fixes this problem.

Interrupts lost from second 8259 and wrong IDE byte swapping on Motorola hardware:
The code for "prep_do_IRQ" in prep_setup.c seems to miss interrupts from the cascaded interrupt chip.
Also the handling of IDE does not work for Motorola PReP hardware. On a Blackhawk the default IRQ for the nonPCI chip is 14. In addition to this the hardware does no byte swapping so the software has to set up the swapped versions for insw and outsw and has to engage fix_driveid. The second patch attached provides the necessary changes.

Kernels without IDE configured hang very early during boot. The reason is asm-ppc/ide.h which redefines the inb and outb macros to use the ISA-I/O base from ppc_ide_md.io_base. If CONFIG_BLK_DEV_IDE is not set, the value for this variable is not initialized to the correct value. For the kernel this means that after including asm-ppc/ide.h all following inb/outb operations access wrong locations which results in the kernel not booting at all.
Question is if these undefs and redefs for inb/outb inb_p/outb_p in ide.h are really required or if they can go away.
I dropped this lines and than tested recompiled IDE and non-IDE kernels which both woirked fine for me.
I did not do a patch for this because I think ide.h also breaks insw and outsw if it is included without CONFIG_BLK_DEV_IDE defined.

Alois

arch/ppc/kernel/indirect_pci.c renamed from arch/ppc/kernel/indirect_pci.c.org +1 -1
@@ -103,7 +103,7 @@
 }
 
 int indirect_pcibios_write_config_dword(unsigned char bus, unsigned char dev_fn,
-			     unsigned char offset, unsigned short val)
+			     unsigned char offset, unsigned int val)
 {
 	unsigned flags;
 
arch/ppc/kernel/prep_setup.c renamed from arch/ppc/kernel/prep_setup.c.org +39 -5

77 lines not on this page · raw message