Changeset 4874c2d in mainline for kernel/genarch
- Timestamp:
- 2006-10-17T20:32:35Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b14e35f2
- Parents:
- 8513ad7
- Location:
- kernel/genarch/src/kbd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/kbd/ns16550.c
r8513ad7 r4874c2d 62 62 static irq_t ns16550_irq; 63 63 64 static ipc_notif_cfg_t saved_notif_cfg;65 66 64 /* 67 65 * These codes read from ns16550 data register are silently ignored. … … 88 86 (void) ns16550_rbr_read(&ns16550); 89 87 90 if (ns16550_irq.notif_cfg.answerbox) { 91 saved_notif_cfg = ns16550_irq.notif_cfg; 92 ns16550_irq.notif_cfg.answerbox = NULL; 93 ns16550_irq.notif_cfg.code = NULL; 94 ns16550_irq.notif_cfg.method = 0; 95 ns16550_irq.notif_cfg.counter = 0; 96 } 88 ns16550_irq.notif_cfg.notify = false; 97 89 } 98 90 … … 100 92 void ns16550_release(void) 101 93 { 102 if ( saved_notif_cfg.answerbox)103 ns16550_irq.notif_cfg = saved_notif_cfg;94 if (ns16550_irq.notif_cfg.answerbox) 95 ns16550_irq.notif_cfg.notify = true; 104 96 } 105 97 … … 184 176 185 177 if (ns16550_lsr_read(&ns16550) & LSR_DATA_READY) { 186 if (ns16550_irq.notif_cfg. answerbox) {178 if (ns16550_irq.notif_cfg.notify && ns16550_irq.notif_cfg.answerbox) { 187 179 /* 188 180 * Send IPC notification. -
kernel/genarch/src/kbd/z8530.c
r8513ad7 r4874c2d 63 63 static irq_t z8530_irq; /**< z8530's IRQ. */ 64 64 65 static ipc_notif_cfg_t saved_notif_cfg;66 67 65 static void z8530_suspend(chardev_t *); 68 66 static void z8530_resume(chardev_t *); … … 92 90 z8530_write_a(&z8530, WR9, WR9_MIE); /* Master Interrupt Enable. */ 93 91 94 if (z8530_irq.notif_cfg.answerbox) { 95 saved_notif_cfg = z8530_irq.notif_cfg; 96 z8530_irq.notif_cfg.answerbox = NULL; 97 z8530_irq.notif_cfg.code = NULL; 98 z8530_irq.notif_cfg.method = 0; 99 z8530_irq.notif_cfg.counter = 0; 100 } 92 z8530_irq.notif_cfg.notify = false; 101 93 } 102 94 … … 104 96 void z8530_release(void) 105 97 { 106 if ( saved_notif_cfg.answerbox)107 z8530_irq.notif_cfg = saved_notif_cfg;98 if (z8530_irq.notif_cfg.answerbox) 99 z8530_irq.notif_cfg.notify = true; 108 100 } 109 101 … … 205 197 * interrupt traps. Process the interrupt directly. 206 198 */ 207 if (irq->notif_cfg. answerbox)199 if (irq->notif_cfg.notify && irq->notif_cfg.answerbox) 208 200 ipc_irq_send_notif(irq); 209 201 else
Note:
See TracChangeset
for help on using the changeset viewer.