Deleted Added
full compact
syscons.c (30726) syscons.c (31016)
1/*-
2 * Copyright (c) 1992-1997 S�ren Schmidt
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
1/*-
2 * Copyright (c) 1992-1997 S�ren Schmidt
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $Id: syscons.c,v 1.235 1997/10/23 03:23:49 yokota Exp $
28 * $Id: syscons.c,v 1.236 1997/10/26 07:36:13 yokota Exp $
29 */
30
31#include "sc.h"
32#include "apm.h"
33#include "opt_ddb.h"
34#include "opt_syscons.h"
35
36#if NSC > 0

--- 553 unchanged lines hidden (view full) ---

590 | KBD_ENABLE_KBD_PORT | KBD_ENABLE_KBD_INT)) {
591 /* CONTROLLER ERROR
592 * This is serious; we are left with the disabled keyboard intr.
593 */
594 printf("sc%d: unable to enable the keyboard port and intr.\n", unit);
595 goto fail;
596 }
597
29 */
30
31#include "sc.h"
32#include "apm.h"
33#include "opt_ddb.h"
34#include "opt_syscons.h"
35
36#if NSC > 0

--- 553 unchanged lines hidden (view full) ---

590 | KBD_ENABLE_KBD_PORT | KBD_ENABLE_KBD_INT)) {
591 /* CONTROLLER ERROR
592 * This is serious; we are left with the disabled keyboard intr.
593 */
594 printf("sc%d: unable to enable the keyboard port and intr.\n", unit);
595 goto fail;
596 }
597
598succeed:
599 kbdc_set_device_mask(sc_kbdc, m | KBD_KBD_CONTROL_BITS),
600 kbdc_lock(sc_kbdc, FALSE);
601 return TRUE;
602
603fail:
604 if (c != -1)
605 /* try to restore the command byte as before, if possible */
606 set_controller_command_byte(sc_kbdc, 0xff, c);

--- 2839 unchanged lines hidden (view full) ---

3446
3447 return attr;
3448}
3449
3450static void
3451set_keyboard(int command, int data)
3452{
3453 int s;
598 kbdc_set_device_mask(sc_kbdc, m | KBD_KBD_CONTROL_BITS),
599 kbdc_lock(sc_kbdc, FALSE);
600 return TRUE;
601
602fail:
603 if (c != -1)
604 /* try to restore the command byte as before, if possible */
605 set_controller_command_byte(sc_kbdc, 0xff, c);

--- 2839 unchanged lines hidden (view full) ---

3445
3446 return attr;
3447}
3448
3449static void
3450set_keyboard(int command, int data)
3451{
3452 int s;
3454 int c;
3455
3456 if (sc_kbdc == NULL)
3457 return;
3458
3459 /* prevent the timeout routine from polling the keyboard */
3460 if (!kbdc_lock(sc_kbdc, TRUE))
3461 return;
3462

--- 847 unchanged lines hidden ---
3453
3454 if (sc_kbdc == NULL)
3455 return;
3456
3457 /* prevent the timeout routine from polling the keyboard */
3458 if (!kbdc_lock(sc_kbdc, TRUE))
3459 return;
3460

--- 847 unchanged lines hidden ---