patch-1.3.22 linux/drivers/char/psaux.c
Next file: linux/drivers/char/scc.c
Previous file: linux/drivers/char/mem.c
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Tue Aug 29 10:15:51 1995
- Orig file:
v1.3.21/linux/drivers/char/psaux.c
- Orig date:
Wed Aug 2 13:21:00 1995
diff -u --recursive --new-file v1.3.21/linux/drivers/char/psaux.c linux/drivers/char/psaux.c
@@ -72,7 +72,11 @@
#define AUX_RESET 0xff /* reset aux device */
#define MAX_RETRIES 60 /* some aux operations take long time*/
-#define AUX_IRQ 12
+#if defined(__alpha__) && !defined(CONFIG_PCI)
+# define AUX_IRQ 9 /* Jensen is odd indeed */
+#else
+# define AUX_IRQ 12
+#endif
#define AUX_BUF_SIZE 2048
/* 82C710 definitions */
@@ -200,6 +204,9 @@
int head = queue->head;
int maxhead = (queue->tail-1) & (AUX_BUF_SIZE-1);
+ if ((inb(AUX_STATUS) & AUX_OBUF_FULL) != AUX_OBUF_FULL)
+ return;
+
queue->buf[head] = inb(AUX_INPUT_PORT);
if (head != maxhead) {
head++;
@@ -502,6 +509,7 @@
}
queue = (struct aux_queue *) kmem_start;
kmem_start += sizeof (struct aux_queue);
+ memset(queue, 0, sizeof(*queue));
queue->head = queue->tail = 0;
queue->proc_list = NULL;
if (!qp_found) {
FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected]
with Sam's (original) version of this