Deleted Added
sdiff udiff text old ( 331722 ) new ( 343158 )
full compact
1/*-
2 * Copyright (c) 1996-1999
3 * Kazutaka YOKOTA (yokota@zodiac.mech.utsunomiya-u.ac.jp)
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 *
30 * from kbdio.c,v 1.13 1998/09/25 11:55:46 yokota Exp
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: stable/11/sys/dev/atkbdc/atkbdc.c 331722 2018-03-29 02:50:57Z eadler $");
35
36#include "opt_kbd.h"
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/bus.h>
41#include <sys/malloc.h>
42#include <sys/syslog.h>

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

289#endif
290
291 if (sc->ioh0 == 0) { /* XXX */
292 sc->command_byte = -1;
293 sc->command_mask = 0;
294 sc->lock = FALSE;
295 sc->kbd.head = sc->kbd.tail = 0;
296 sc->aux.head = sc->aux.tail = 0;
297#if KBDIO_DEBUG >= 2
298 sc->kbd.call_count = 0;
299 sc->kbd.qcount = sc->kbd.max_qcount = 0;
300 sc->aux.call_count = 0;
301 sc->aux.qcount = sc->aux.max_qcount = 0;
302#endif
303 }
304 sc->iot = tag;

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

632 write_data(kbdcp(p), c);
633 return TRUE;
634}
635
636/* write a one byte auxiliary device command */
637int
638write_aux_command(KBDC p, int c)
639{
640 if (!write_controller_command(p, KBDC_WRITE_TO_AUX))
641 return FALSE;
642 return write_controller_data(p, c);
643}
644
645/* send a command to the keyboard and wait for ACK */
646int
647send_kbd_command(KBDC p, int c)
648{

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

1194 kbdcp(p)->command_byte = command;
1195
1196 if (verbose)
1197 log(LOG_DEBUG, "kbdc: new command byte:%04x (set_controller...)\n",
1198 command);
1199
1200 return TRUE;
1201}