On Tue, Dec 30, 2014 at 11:01:34PM +0100, Alexander Bluhm wrote:
> I have placed printf into all functions you mentiond.
> Normal output is now:
>
> func pckbc_attach_slot, line 269: start
> func pckbc_attach_slot, line 272: call config_found_sm
> pckbd0 at pckbc0 (kbd slot)func pckbdattach, line 370: start
>
> func pckbdattach, line 373: call pckbd_is_console
> func pckbdattach, line 380: call pckbd_set_xtscancode
> func pckbd_set_xtscancode, line 192: start
> func pckbd_set_xtscancode, line 283: end
> func pckbdattach, line 389: call pckbc_poll_cmd
> func pckbdattach, line 411: call pckbc_set_inputhandler
> func pckbc_isa_intr_establish, line 186: start
> func isa_intr_establish, line 307: start
> func isa_intr_establish, line 325: call intr_establish
> func intr_establish, line 339: start
> func intr_establish, line 457: end
> pckbc0: using irq 1 for kbd slot
> func pckbc_isa_intr_establish, line 196: end
> func pckbdattach, line 425: call config_found
> wskbd0 at pckbd0: console keyboard, using wsdisplay0
> func pckbdattach, line 427: end
> func pckbc_attach_slot, line 287: end
>
> I am waiting for the next reset...
It happened again.
OpenBSD 5.7-beta (GENERIC.MP) #167: Sun Feb 22 19:40:09 CET 2015
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 16845570048 (16065MB)
avail mem = 16393224192 (15633MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xbae9d000 (68 entries)
bios0: vendor LENOVO version "G7ET94WW (2.54 )" date 04/30/2013
bios0: LENOVO 2355CTO
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP TCPA SSDT SSDT SSDT HPET APIC MCFG ECDT FPDT ASF! UEFI
UEFI MSDM SSDT SSDT UEFI DBG2
acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP3(S4) XHCI(S3) EHC1(S3)
EHC2(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz, 2893.86 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz, 2893.43 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz, 2893.43 MHz
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz, 2893.43 MHz
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf8000000, bus 0-63
acpiec0 at acpi0
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG_)
acpiprt2 at acpi0: bus 2 (EXP1)
acpiprt3 at acpi0: bus 3 (EXP2)
acpiprt4 at acpi0: bus 4 (EXP3)
acpiprt5 at acpi0: bus 12 (EXP5)
acpiprt6 at acpi0: bus -1 (EXP6)
acpiprt7 at acpi0: bus -1 (EXP7)
acpiprt8 at acpi0: bus -1 (EXP8)
acpicpu0 at acpi0: C2, C1, PSS
acpicpu1 at acpi0: C2, C1, PSS
acpicpu2 at acpi0: C2, C1, PSS
acpicpu3 at acpi0: C2, C1, PSS
acpipwrres0 at acpi0: PUBS, resource for XHCI, EHC1, EHC2
acpitz0 at acpi0: critical temperature is 103 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "45N1143" serial 663 type LION oem "Panasonic"
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
func isa_intr_establish, line 308: start
func isa_intr_establish, line 326: call intr_establish
func intr_establish, line 339: start
func intr_establish, line 457: end
cpu0: Enhanced SpeedStep 2893 MHz: speeds: 2901, 2900, 2800, 2700, 2500, 2400,
2300, 2200, 2000, 1900, 1800, 1700, 1600, 1400, 1300, 1200 MHz
pci0 at mainbus0 bus 0
0:28:4: bridge mem address conflict 0xe0000000/0x8000000
0:28:4: bridge mem address conflict 0xe8000000/0x10000000
pchb0 at pci0 dev 0 function 0 "Intel Core 3G Host" rev 0x09
vga1 at pci0 dev 2 function 0 "Intel HD Graphics 4000" rev 0x09
intagp at vga1 not configured
inteldrm0 at vga1
drm0 at inteldrm0
func intr_establish, line 339: start
func intr_establish, line 457: end
inteldrm0: 1600x900
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
xhci0 at pci0 dev 20 function 0 "Intel 7 Series xHCI" rev 0x04func
intr_establish, line 339: start
func intr_establish, line 457: end
: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
"Intel 7 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
em0 at pci0 dev 25 function 0 "Intel 82579LM" rev 0x04func intr_establish, line
339: start
func intr_establish, line 457: end
: msi, address 3c:97:0e:a7:09:b2
ehci0 at pci0 dev 26 function 0 "Intel 7 Series USB" rev 0x04func
intr_establish, line 339: start
func intr_establish, line 457: end
: apic 2 int 16
usb1 at ehci0: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 7 Series HD Audio" rev 0x04func
intr_establish, line 339: start
func intr_establish, line 457: end
: msi
azalia0: codecs: Realtek ALC269, Intel/0x2806, using Realtek ALC269
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 7 Series PCIE" rev 0xc4func
intr_establish, line 339: start
func intr_establish, line 457: end
: msi
pci1 at ppb0 bus 2
ppb1 at pci0 dev 28 function 1 "Intel 7 Series PCIE" rev 0xc4func
intr_establish, line 339: start
func intr_establish, line 457: end
: msi
pci2 at ppb1 bus 3
iwn0 at pci2 dev 0 function 0 "Intel Centrino Ultimate-N 6300" rev 0x3efunc
intr_establish, line 339: start
func intr_establish, line 457: end
: msi, MIMO 3T3R, MoW, address 3c:a9:f4:35:02:ec
ppb2 at pci0 dev 28 function 2 "Intel 7 Series PCIE" rev 0xc4func
intr_establish, line 339: start
func intr_establish, line 457: end
: msi
pci3 at ppb2 bus 4
sdhc0 at pci3 dev 0 function 0 "Ricoh 5U822 SD/MMC" rev 0x07func
intr_establish, line 339: start
func intr_establish, line 457: end
: apic 2 int 18
sdmmc0 at sdhc0
ppb3 at pci0 dev 28 function 4 "Intel 7 Series PCIE" rev 0xc4func
intr_establish, line 339: start
func intr_establish, line 457: end
: msi
pci4 at ppb3 bus 12
ehci1 at pci0 dev 29 function 0 "Intel 7 Series USB" rev 0x04func
intr_establish, line 339: start
func intr_establish, line 457: end
: apic 2 int 23
usb2 at ehci1: USB revision 2.0
uhub2 at usb2 "Intel EHCI root hub" rev 2.00/1.00 addr 1
pcib0 at pci0 dev 31 function 0 "Intel QM77 LPC" rev 0x04
ahci0 at pci0 dev 31 function 2 "Intel 7 Series AHCI" rev 0x04: msi,func
intr_establish, line 339: start
func intr_establish, line 457: end
AHCI 1.3
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, SAMSUNG MZ7TD256, DXT0> SCSI3 0/direct
fixed naa.5002538500000000
sd0: 244198MB, 512 bytes/sector, 500118192 sectors, thin
cd0 at scsibus1 targ 1 lun 0: <MATSHITA, DVD-RAM UJ8C2, SB01> ATAPI 5/cdrom
removable
ichiic0 at pci0 dev 31 function 3 "Intel 7 Series SMBus" rev 0x04func
intr_establish, line 339: start
func intr_establish, line 457: end
: apic 2 int 18
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 8GB DDR3 SDRAM PC3-12800 SO-DIMM
spdmem1 at iic0 addr 0x51: 8GB DDR3 SDRAM PC3-12800 SO-DIMM
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
func pckbc_attach, line 300: start
func pckbc_attach, line 311: call pckbc_poll_data1
func pckbc_attach, line 316: call pckbc_put8042cmd
func pckbc_attach, line 361: call pckbc_attach_slot
func pckbc_attach_slot, line 269: start
func pckbc_attach_slot, line 272: call config_found_sm
pckbd0 at pckbc0 (kbd slot)func pckbdattach, line 370: start
func pckbdattach, line 373: call pckbd_is_console
func pckbdattach, line 380: call pckbd_set_xtscancode
func pckbd_set_xtscancode, line 192: start
OpenBSD 5.7-beta (GENERIC.MP) #167: Sun Feb 22 19:40:09 CET 2015
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
And this is where I have placed my printfs.
Index: arch/amd64/amd64/intr.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/arch/amd64/amd64/intr.c,v
retrieving revision 1.40
diff -u -p -u -p -r1.40 intr.c
--- arch/amd64/amd64/intr.c 6 Jan 2015 12:50:47 -0000 1.40
+++ arch/amd64/amd64/intr.c 6 Jan 2015 14:05:43 -0000
@@ -336,6 +336,7 @@ intr_establish(int legacy_irq, struct pi
struct intrstub *stubp;
int flags;
+printf("func %s, line %d: start\n", __func__, __LINE__);
#ifdef DIAGNOSTIC
if (legacy_irq != -1 && (legacy_irq < 0 || legacy_irq > 15))
panic("intr_establish: bad legacy IRQ value");
@@ -453,6 +454,7 @@ intr_establish(int legacy_irq, struct pi
ci->ci_apicid, slot, idt_vec);
#endif
+printf("func %s, line %d: end\n", __func__, __LINE__);
return (ih);
}
Index: arch/amd64/isa/isa_machdep.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/arch/amd64/isa/isa_machdep.c,v
retrieving revision 1.26
diff -u -p -u -p -r1.26 isa_machdep.c
--- arch/amd64/isa/isa_machdep.c 24 Jan 2015 15:13:55 -0000 1.26
+++ arch/amd64/isa/isa_machdep.c 25 Jan 2015 22:34:35 -0000
@@ -305,6 +305,7 @@ isa_intr_establish(isa_chipset_tag_t ic,
#if NIOAPIC > 0
struct mp_intr_map *mip;
+printf("func %s, line %d: start\n", __func__, __LINE__);
if (mp_busses != NULL) {
if (mp_isa_bus == NULL)
panic("no isa bus");
@@ -322,6 +323,7 @@ isa_intr_establish(isa_chipset_tag_t ic,
KASSERT(pic);
+printf("func %s, line %d: call intr_establish\n", __func__, __LINE__);
return intr_establish(irq, pic, pin, type, level, ih_fun,
ih_arg, ih_what);
}
Index: dev/ic/pckbc.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/dev/ic/pckbc.c,v
retrieving revision 1.43
diff -u -p -u -p -r1.43 pckbc.c
--- dev/ic/pckbc.c 19 Dec 2014 07:23:57 -0000 1.43
+++ dev/ic/pckbc.c 30 Dec 2014 21:38:08 -0000
@@ -266,8 +266,10 @@ pckbc_attach_slot(struct pckbc_softc *sc
struct pckbc_attach_args pa;
int found;
+printf("func %s, line %d: start\n", __func__, __LINE__);
pa.pa_tag = t;
pa.pa_slot = slot;
+printf("func %s, line %d: call config_found_sm\n", __func__, __LINE__);
found = (config_found_sm((struct device *)sc, &pa, pckbcprint,
force ? pckbc_submatch_locators : pckbc_submatch) != NULL);
@@ -275,9 +277,14 @@ pckbc_attach_slot(struct pckbc_softc *sc
t->t_slotdata[slot] = malloc(sizeof(struct pckbc_slotdata),
M_DEVBUF, M_NOWAIT);
if (t->t_slotdata[slot] == NULL)
+{
+printf("func %s, line %d: end\n", __func__, __LINE__);
return 0;
+}
+printf("func %s, line %d: call pckbc_init_slotdata\n", __func__, __LINE__);
pckbc_init_slotdata(t->t_slotdata[slot]);
}
+printf("func %s, line %d: end\n", __func__, __LINE__);
return (found);
}
@@ -290,6 +297,7 @@ pckbc_attach(struct pckbc_softc *sc, int
int haskbd = 0, res;
u_char cmdbits = 0;
+printf("func %s, line %d: start\n", __func__, __LINE__);
t = sc->id;
iot = t->t_iot;
ioh_d = t->t_ioh_d;
@@ -300,18 +308,23 @@ pckbc_attach(struct pckbc_softc *sc, int
timeout_set(&t->t_poll, pckbc_poll, t);
}
+printf("func %s, line %d: call pckbc_poll_data1\n", __func__, __LINE__);
/* flush */
(void) pckbc_poll_data1(iot, ioh_d, ioh_c, PCKBC_KBD_SLOT, 0);
/* set initial cmd byte */
+printf("func %s, line %d: call pckbc_put8042cmd\n", __func__, __LINE__);
if (!pckbc_put8042cmd(t)) {
#if defined(__i386__) || defined(__amd64__)
if (!ISSET(flags, PCKBCF_FORCE_KEYBOARD_PRESENT)) {
+printf("func %s, line %d: call pckbc_release_console\n", __func__, __LINE__);
pckbc_release_console();
+printf("func %s, line %d: end\n", __func__, __LINE__);
return;
}
#endif
printf("kbc: cmd word write error\n");
+printf("func %s, line %d: end\n", __func__, __LINE__);
return;
}
@@ -345,6 +358,7 @@ pckbc_attach(struct pckbc_softc *sc, int
return;
}
#else
+printf("func %s, line %d: call pckbc_attach_slot\n", __func__, __LINE__);
if (pckbc_attach_slot(sc, PCKBC_KBD_SLOT, 0)) {
cmdbits |= KC8_KENABLE;
haskbd = 1;
@@ -356,15 +370,19 @@ pckbc_attach(struct pckbc_softc *sc, int
* Avoid KBC_AUXTEST because it hangs some older controllers
* (eg UMC880?).
*/
+printf("func %s, line %d: call pckbc_send_cmd\n", __func__, __LINE__);
if (!pckbc_send_cmd(iot, ioh_c, KBC_AUXECHO)) {
printf("kbc: aux echo error 1\n");
goto nomouse;
}
+printf("func %s, line %d: call pckbc_wait_output\n", __func__, __LINE__);
if (!pckbc_wait_output(iot, ioh_c)) {
printf("kbc: aux echo error 2\n");
goto nomouse;
}
+printf("func %s, line %d: call bus_space_write_1\n", __func__, __LINE__);
bus_space_write_1(iot, ioh_d, 0, 0x5a); /* a random value */
+printf("func %s, line %d: call pckbc_poll_data1\n", __func__, __LINE__);
res = pckbc_poll_data1(iot, ioh_d, ioh_c, PCKBC_AUX_SLOT, 1);
if (ISSET(t->t_flags, PCKBC_NEED_AUXWRITE)) {
@@ -375,11 +393,15 @@ pckbc_attach(struct pckbc_softc *sc, int
*/
if (res == -1) {
/* Read of aux echo timed out, try again */
+printf("func %s, line %d: call pckbc_send_cmd\n", __func__, __LINE__);
if (!pckbc_send_cmd(iot, ioh_c, KBC_AUXWRITE))
goto nomouse;
+printf("func %s, line %d: call pckbc_wait_output\n", __func__, __LINE__);
if (!pckbc_wait_output(iot, ioh_c))
goto nomouse;
+printf("func %s, line %d: call bus_space_write_1\n", __func__, __LINE__);
bus_space_write_1(iot, ioh_d, 0, 0x5a);
+printf("func %s, line %d: call pckbc_poll_data1\n", __func__, __LINE__);
res = pckbc_poll_data1(iot, ioh_d, ioh_c,
PCKBC_AUX_SLOT, 1);
DPRINTF("kbc: aux echo: %x\n", res);
@@ -396,6 +418,7 @@ pckbc_attach(struct pckbc_softc *sc, int
*/
DPRINTF("kbc: aux echo: %x\n", res);
t->t_haveaux = 1;
+printf("func %s, line %d: call pckbc_attach_slot\n", __func__, __LINE__);
if (pckbc_attach_slot(sc, PCKBC_AUX_SLOT, 0))
cmdbits |= KC8_MENABLE;
}
@@ -407,9 +430,11 @@ pckbc_attach(struct pckbc_softc *sc, int
#if defined(__i386__) || defined(__amd64__)
if (haskbd == 0 && !ISSET(flags, PCKBCF_FORCE_KEYBOARD_PRESENT)) {
if (t->t_haveaux) {
+printf("func %s, line %d: call pckbc_attach_slot\n", __func__, __LINE__);
if (pckbc_attach_slot(sc, PCKBC_KBD_SLOT, 1))
cmdbits |= KC8_KENABLE;
} else {
+printf("func %s, line %d: call pckbc_release_console\n", __func__, __LINE__);
pckbc_release_console();
}
}
@@ -418,8 +443,10 @@ pckbc_attach(struct pckbc_softc *sc, int
nomouse:
/* enable needed interrupts */
t->t_cmdbyte |= cmdbits;
+printf("func %s, line %d: call pckbc_put8042cmd\n", __func__, __LINE__);
if (!pckbc_put8042cmd(t))
printf("kbc: cmd word write error\n");
+printf("func %s, line %d: end\n", __func__, __LINE__);
}
int
@@ -460,6 +487,7 @@ void
pckbc_init_slotdata(struct pckbc_slotdata *q)
{
int i;
+printf("func %s, line %d: start\n", __func__, __LINE__);
TAILQ_INIT(&q->cmdqueue);
TAILQ_INIT(&q->freequeue);
@@ -467,6 +495,7 @@ pckbc_init_slotdata(struct pckbc_slotdat
TAILQ_INSERT_TAIL(&q->freequeue, &(q->cmds[i]), next);
}
q->polling = 0;
+printf("func %s, line %d: end\n", __func__, __LINE__);
}
void
Index: dev/isa/pckbc_isa.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/dev/isa/pckbc_isa.c,v
retrieving revision 1.14
diff -u -p -u -p -r1.14 pckbc_isa.c
--- dev/isa/pckbc_isa.c 6 Dec 2013 21:03:03 -0000 1.14
+++ dev/isa/pckbc_isa.c 30 Dec 2014 21:17:00 -0000
@@ -183,6 +183,7 @@ pckbc_isa_intr_establish(struct pckbc_so
struct pckbc_isa_softc *isc = (void *)sc;
void *rv;
+printf("func %s, line %d: start\n", __func__, __LINE__);
rv = isa_intr_establish(isc->sc_ic, isc->sc_irq[slot], IST_EDGE,
IPL_TTY, pckbcintr, sc, sc->sc_dv.dv_xname);
if (rv == NULL) {
@@ -192,4 +193,5 @@ pckbc_isa_intr_establish(struct pckbc_so
printf("%s: using irq %d for %s slot\n", sc->sc_dv.dv_xname,
isc->sc_irq[slot], pckbc_slot_names[slot]);
}
+printf("func %s, line %d: end\n", __func__, __LINE__);
}
Index: dev/pckbc/pckbd.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/dev/pckbc/pckbd.c,v
retrieving revision 1.38
diff -u -p -u -p -r1.38 pckbd.c
--- dev/pckbc/pckbd.c 24 Jul 2014 22:38:19 -0000 1.38
+++ dev/pckbc/pckbd.c 30 Dec 2014 21:36:41 -0000
@@ -189,6 +189,7 @@ pckbd_set_xtscancode(pckbc_tag_t kbctag,
/* default to have the 8042 translate the keyboard with table 3. */
int table = 3;
+printf("func %s, line %d: start\n", __func__, __LINE__);
if (pckbc_xt_translation(kbctag)) {
#ifdef DEBUG
printf("pckbd: enabling of translation failed\n");
@@ -271,11 +272,15 @@ pckbd_set_xtscancode(pckbc_tag_t kbctag,
}
if (table == 0)
+{
+printf("func %s, line %d: end\n", __func__, __LINE__);
return (1);
+}
if (id != NULL)
id->t_table = table;
+printf("func %s, line %d: end\n", __func__, __LINE__);
return (0);
}
@@ -362,31 +367,40 @@ pckbdattach(struct device *parent, struc
struct wskbddev_attach_args a;
u_char cmd[1];
+printf("func %s, line %d: start\n", __func__, __LINE__);
printf("\n");
+printf("func %s, line %d: call pckbd_is_console\n", __func__, __LINE__);
isconsole = pckbd_is_console(pa->pa_tag, pa->pa_slot);
if (isconsole) {
sc->id = &pckbd_consdata;
if (sc->id->t_table == 0)
+{
+printf("func %s, line %d: call pckbd_set_xtscancode\n", __func__, __LINE__);
pckbd_set_xtscancode(pa->pa_tag, pa->pa_slot, sc->id);
+}
/*
* Some keyboards are not enabled after a reset,
* so make sure it is enabled now.
*/
cmd[0] = KBC_ENABLE;
+printf("func %s, line %d: call pckbc_poll_cmd\n", __func__, __LINE__);
(void) pckbc_poll_cmd(sc->id->t_kbctag, sc->id->t_kbcslot,
cmd, 1, 0, NULL, 0);
sc->sc_enabled = 1;
} else {
sc->id = malloc(sizeof(struct pckbd_internal),
M_DEVBUF, M_WAITOK);
+printf("func %s, line %d: call pckbd_init\n", __func__, __LINE__);
pckbd_init(sc->id, pa->pa_tag, pa->pa_slot, 0);
+printf("func %s, line %d: call pckbd_set_xtscancode\n", __func__, __LINE__);
pckbd_set_xtscancode(pa->pa_tag, pa->pa_slot, sc->id);
/* no interrupts until enabled */
cmd[0] = KBC_DISABLE;
+printf("func %s, line %d: call pckbc_poll_cmd\n", __func__, __LINE__);
(void) pckbc_poll_cmd(sc->id->t_kbctag, sc->id->t_kbcslot,
cmd, 1, 0, NULL, 0);
sc->sc_enabled = 0;
@@ -394,6 +408,7 @@ pckbdattach(struct device *parent, struc
sc->id->t_sc = sc;
+printf("func %s, line %d: call pckbc_set_inputhandler\n", __func__, __LINE__);
pckbc_set_inputhandler(sc->id->t_kbctag, sc->id->t_kbcslot,
pckbd_input, sc, sc->sc_dev.dv_xname);
@@ -407,7 +422,9 @@ pckbdattach(struct device *parent, struc
/*
* Attach the wskbd, saving a handle to it.
*/
+printf("func %s, line %d: call config_found\n", __func__, __LINE__);
sc->sc_wskbddev = config_found(self, &a, wskbddevprint);
+printf("func %s, line %d: end\n", __func__, __LINE__);
}
int