psm.c (130585) | psm.c (132270) |
---|---|
1/*- 2 * Copyright (c) 1992, 1993 Erik Forsberg. 3 * Copyright (c) 1996, 1997 Kazutaka YOKOTA. 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: --- 45 unchanged lines hidden (view full) --- 54 * HiNote UltraII/Latitude/Armada laptops. 55 * - 30 July 1997. Added APM support. 56 * - 5 March 1997. Defined driver configuration flags (PSM_CONFIG_XXX). 57 * Improved sync check logic. 58 * Vendor specific support routines. 59 */ 60 61#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1992, 1993 Erik Forsberg. 3 * Copyright (c) 1996, 1997 Kazutaka YOKOTA. 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: --- 45 unchanged lines hidden (view full) --- 54 * HiNote UltraII/Latitude/Armada laptops. 55 * - 30 July 1997. Added APM support. 56 * - 5 March 1997. Defined driver configuration flags (PSM_CONFIG_XXX). 57 * Improved sync check logic. 58 * Vendor specific support routines. 59 */ 60 61#include <sys/cdefs.h> |
62__FBSDID("$FreeBSD: head/sys/dev/atkbdc/psm.c 130585 2004-06-16 09:47:26Z phk $"); | 62__FBSDID("$FreeBSD: head/sys/dev/atkbdc/psm.c 132270 2004-07-16 22:04:29Z mux $"); |
63 64#include "opt_psm.h" 65 66#include <sys/param.h> 67#include <sys/systm.h> 68#include <sys/kernel.h> 69#include <sys/module.h> 70#include <sys/bus.h> --- 572 unchanged lines hidden (view full) --- 643static int 644doinitialize(struct psm_softc *sc, mousemode_t *mode) 645{ 646 KBDC kbdc = sc->kbdc; 647 int stat[3]; 648 int i; 649 650 switch((i = test_aux_port(kbdc))) { | 63 64#include "opt_psm.h" 65 66#include <sys/param.h> 67#include <sys/systm.h> 68#include <sys/kernel.h> 69#include <sys/module.h> 70#include <sys/bus.h> --- 572 unchanged lines hidden (view full) --- 643static int 644doinitialize(struct psm_softc *sc, mousemode_t *mode) 645{ 646 KBDC kbdc = sc->kbdc; 647 int stat[3]; 648 int i; 649 650 switch((i = test_aux_port(kbdc))) { |
651 case 1: /* ignore this error */ | 651 case 1: /* ignore these errors */ 652 case 2: 653 case 3: |
652 case PSM_ACK: 653 if (verbose) 654 log(LOG_DEBUG, "psm%d: strange result for test aux port (%d).\n", 655 sc->unit, i); 656 /* FALLTHROUGH */ 657 case 0: /* no error */ 658 break; 659 case -1: /* time out */ --- 362 unchanged lines hidden (view full) --- 1022 * to respond with zero even when the aux port doesn't exist. (It may 1023 * be that this is only the case when the controller DOES have the aux 1024 * port but the port is not wired on the motherboard.) The keyboard 1025 * controllers without the port, such as the original AT, are 1026 * supporsed to return with an error code or simply time out. In any 1027 * case, we have to continue probing the port even when the controller 1028 * passes this test. 1029 * | 654 case PSM_ACK: 655 if (verbose) 656 log(LOG_DEBUG, "psm%d: strange result for test aux port (%d).\n", 657 sc->unit, i); 658 /* FALLTHROUGH */ 659 case 0: /* no error */ 660 break; 661 case -1: /* time out */ --- 362 unchanged lines hidden (view full) --- 1024 * to respond with zero even when the aux port doesn't exist. (It may 1025 * be that this is only the case when the controller DOES have the aux 1026 * port but the port is not wired on the motherboard.) The keyboard 1027 * controllers without the port, such as the original AT, are 1028 * supporsed to return with an error code or simply time out. In any 1029 * case, we have to continue probing the port even when the controller 1030 * passes this test. 1031 * |
1030 * XXX: some controllers erroneously return the error code 1 when 1031 * it has the perfectly functional aux port. We have to ignore this 1032 * error code. Even if the controller HAS error with the aux port, 1033 * it will be detected later... | 1032 * XXX: some controllers erroneously return the error code 1, 2 or 3 1033 * when it has the perfectly functional aux port. We have to ignore 1034 * this error code. Even if the controller HAS error with the aux 1035 * port, it will be detected later... |
1034 * XXX: another incompatible controller returns PSM_ACK (0xfa)... 1035 */ 1036 switch ((i = test_aux_port(sc->kbdc))) { | 1036 * XXX: another incompatible controller returns PSM_ACK (0xfa)... 1037 */ 1038 switch ((i = test_aux_port(sc->kbdc))) { |
1037 case 1: /* ignore this error */ | 1039 case 1: /* ignore these errors */ 1040 case 2: 1041 case 3: |
1038 case PSM_ACK: 1039 if (verbose) 1040 printf("psm%d: strange result for test aux port (%d).\n", 1041 unit, i); 1042 /* FALLTHROUGH */ 1043 case 0: /* no error */ 1044 break; 1045 case -1: /* time out */ --- 2086 unchanged lines hidden --- | 1042 case PSM_ACK: 1043 if (verbose) 1044 printf("psm%d: strange result for test aux port (%d).\n", 1045 unit, i); 1046 /* FALLTHROUGH */ 1047 case 0: /* no error */ 1048 break; 1049 case -1: /* time out */ --- 2086 unchanged lines hidden --- |