Date: Sun, 21 Dec 1997 18:54:43 +0100 (MET)
From: Wout Klaren <W.Klaren@inter.NL.net>
To: linux-m68k@lists.linux-m68k.org
Subject: Re: L68K: 2.1.72
In-Reply-To: <19971219201917.37558@medu>
Sender: owner-linux-m68k@phil.uni-sb.de



On Fri, 19 Dec 1997, Hartmut Koptein wrote:

> > ST_MFP TT_MFP TT_SCSI_DMA STND_DMA EXTD_DMA TT_SCSI YM2149 CODEC VME SCU IDE TT_CLK ACSI
>                 ^^^^^^^^^^^                   ^^^^^^^                      ^^^
>  > 
>  > Ok, TT_SCSI is present, so I see no reason that atari_scsi_detect()
>  > should return 0 ... What's happening there?!?
> > 
> > Aeeh.. Roman?
> > 
> > I _think_ the second line is the resulting bootstrap he observed.
> > No TT_SCSI there...
> 
> Yes, the detected Hardware is without TT_SCSI_DMA, TT_SCSI and IDE!
> 
> > So the '0' is to be expected.. Question is of course: why is
> > TT_SCSI not there.. What can cause this..
> 
> It lies not on acsi or the new stram stuff. And it seems that 2.1.72 on
> Falcon works ... who has this reported?? Was that a plain falcon (68030)?
> Is this error 68040 and atari specified?

There is a bug in head.S related to testing the machine type. On the
Medusa and the Hades the mappings to the I/O ports are not setup properly..
The patches at the end of this mail fix this problem. These patches also
fix some Hades related problems.


Wout Klaren


diff -ru linux-2.1.72.orig/arch/m68k/kernel/bios32.c linux-2.1.72/arch/m68k/kernel/bios32.c
--- linux-2.1.72.orig/arch/m68k/kernel/bios32.c	Wed Dec 17 22:28:19 1997
+++ linux-2.1.72/arch/m68k/kernel/bios32.c	Thu Dec 18 22:07:04 1997
@@ -501,7 +501,7 @@
 
 int pcibios_present(void)
 {
-	if (is_hades)
+	if (MACH_IS_HADES)
 		return 1;
 	else
 		return 0;
diff -ru linux-2.1.72.orig/arch/m68k/kernel/head.S linux-2.1.72/arch/m68k/kernel/head.S
--- linux-2.1.72.orig/arch/m68k/kernel/head.S	Thu Dec 18 20:47:09 1997
+++ linux-2.1.72/arch/m68k/kernel/head.S	Sun Dec 21 16:47:39 1997
@@ -257,7 +257,7 @@
 	movew	#BI_ATARI_MCH_TYPE,%d0
 	jbsr	Lget_bi_record
 	tstl	%d0
-	jbne	1f
+	jbmi	1f
 	movel	%a0@,%d3
 1:	
 	/* %d3 is not clobbered until Atari page tables are set up,
diff -ru linux-2.1.72.orig/drivers/scsi/atari_dma_emul.c linux-2.1.72/drivers/scsi/atari_dma_emul.c
--- linux-2.1.72.orig/drivers/scsi/atari_dma_emul.c	Wed Dec 17 22:28:53 1997
+++ linux-2.1.72/drivers/scsi/atari_dma_emul.c	Thu Dec 18 21:18:29 1997
@@ -47,7 +47,7 @@
 static void writeback (unsigned short wbs, unsigned long wba,
 		       unsigned long wbd, void *old_buserr)
 {
-	unsigned long fs = get_fs();
+	mm_segment_t fs = get_fs();
 	static void *save_buserr;
 
 	__asm__ __volatile__ ("movec.l	%%vbr,%%a0\n\t"
@@ -58,7 +58,7 @@
 
 	save_buserr = old_buserr;
 
-	set_fs (wbs & WBTM_040);
+	set_fs (MAKE_MM_SEG(wbs & WBTM_040));
 
 	switch (wbs & WBSIZ_040) {
 	    case BA_SIZE_BYTE:
diff -ru linux-2.1.72.orig/drivers/scsi/atari_scsi.c linux-2.1.72/drivers/scsi/atari_scsi.c
--- linux-2.1.72.orig/drivers/scsi/atari_scsi.c	Thu Dec 18 20:47:13 1997
+++ linux-2.1.72/drivers/scsi/atari_scsi.c	Thu Dec 18 21:11:03 1997
@@ -692,7 +692,7 @@
 #endif /* REAL_DMA */
 #ifdef REAL_DMA
 #ifdef CONFIG_TT_DMA_EMUL
-		if (is_hades) {
+		if (MACH_IS_HADES) {
 			request_irq(IRQ_AUTO_2, hades_dma_emulator,
 				    IRQ_TYPE_PRIO, "Hades DMA emulator",
 				    hades_dma_emulator);



