patch-pre2.0.10 linux/include/asm-sparc/floppy.h

Next file: linux/include/linux/if_arp.h
Previous file: linux/include/asm-alpha/statfs.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file pre2.0.9/linux/include/asm-sparc/floppy.h linux/include/asm-sparc/floppy.h
@@ -66,8 +66,10 @@
 #define fd_cacheflush(addr, size) /* nothing... */
 #define fd_request_irq()          sun_fd_request_irq()
 #define fd_free_irq()             /* nothing... */
+#if 0  /* P3: added by Alain, these cause a MMU corruption. 19960524 XXX */
 #define fd_dma_mem_alloc(size)    ((unsigned long) vmalloc(size))
 #define fd_dma_mem_free(addr,size) (vfree((void *)(addr)))
+#endif
 
 #define FLOPPY_MOTOR_MASK         0x10
 
@@ -110,10 +112,7 @@
 	case 5: /* FD_DATA */
 		return sun_fdc->data_82072;
 	case 7: /* FD_DIR */
-		/* Always return 0, the disk never changes
-		 * without the kernel explicitly doing so.
-		 */
-		return 0;
+		return (*AUXREG & AUXIO_FLPY_DCHG)? 0x80: 0;
 	};
 	panic("sun_82072_fd_inb: How did I get here?");
 }
@@ -164,10 +163,8 @@
 	case 5: /* FD_DATA */
 		return sun_fdc->data_82077;
 	case 7: /* FD_DIR */
-		/* Always return 0, the disk never changes
-		 * without the kernel explicitly ejecting it.
-		 */
-		return 0;
+		/* XXX: Is DCL on 0x80 in sun4m? */
+		return sun_fdc->dir_82077;
 	};
 	panic("sun_82072_fd_inb: How did I get here?");
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this