[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pckbd patch (please test)



Here is the patch for the alpha pckbd driver.  Please test this, and let me
know if there are any problems.  It is modeled after the pcvt/pccons patches.

--Toby.

Index: pckbd.c
===================================================================
RCS file: /cvs/src/sys/arch/alpha/isa/pckbd.c,v
retrieving revision 1.14
diff -u -r1.14 pckbd.c
--- pckbd.c	1998/02/05 22:57:51	1.14
+++ pckbd.c	1998/07/12 19:00:02
@@ -185,12 +185,14 @@
 {
 	u_int i;
 
-	for (i = 100000; i; i--)
+	for (i = 100000; i; i--) {
+		KBD_DELAY;
 		if ((bus_space_read_1(pckbd_iot, pckbd_ioh, KBSTATP) & KBS_IBF)
 		    == 0) {
 			KBD_DELAY;
 			return 1;
 		}
+	}
 	return 0;
 }
 
@@ -199,12 +201,14 @@
 {
 	u_int i;
 
-	for (i = 100000; i; i--)
+	for (i = 100000; i; i--) {
+		KBD_DELAY;
 		if ((bus_space_read_1(pckbd_iot, pckbd_ioh, KBSTATP) & KBS_DIB)
 		    != 0) {
 			KBD_DELAY;
 			return 1;
 		}
+	}
 	return 0;
 }
 
@@ -274,6 +278,7 @@
 		bus_space_write_1(pckbd_iot, pckbd_ioh, KBOUTP, val);
 		if (polling)
 			for (i = 100000; i; i--) {
+				KBD_DELAY;
 				if (bus_space_read_1(pckbd_iot,
 				    pckbd_ioh, KBSTATP) & KBS_DIB) {
 					register u_char c;
@@ -297,6 +302,7 @@
 			}
 		else
 			for (i = 100000; i; i--) {
+				KBD_DELAY;
 				(void) bus_space_read_1(pckbd_iot,
 				    pckbd_ioh, KBSTATP);
 				if (ack)


Visit your host, monkey.org