NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: kern/50142: Cannot install NetBSD on machine with USB keyboard
The following reply was made to PR kern/50142; it has been noted by GNATS.
From: matthew green <mrg%eterna.com.au@localhost>
To: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost, gnats-bugs%NetBSD.org@localhost, edwin%etorok.net@localhost
Cc:
Subject: re: kern/50142: Cannot install NetBSD on machine with USB keyboard
Date: Tue, 11 Aug 2015 16:52:01 +1000
please try this image:
http://ftp.netbsd.org/pub/NetBSD/misc/mrg/NetBSD-7.0_RC2-amd64.iso
which has the patch below applied.
.mrg.
Index: sys/dev/usb/ukbd.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/ukbd.c,v
retrieving revision 1.129.4.1
diff -p -u -r1.129.4.1 ukbd.c
--- sys/dev/usb/ukbd.c 21 Mar 2015 17:30:43 -0000 1.129.4.1
+++ sys/dev/usb/ukbd.c 11 Aug 2015 06:45:55 -0000
@@ -410,15 +410,14 @@ ukbd_attach(device_t parent, device_t se
sc->sc_flags = 0;
aprint_naive("\n");
+ aprint_normal("\n");
if (!pmf_device_register(self, NULL, NULL)) {
- aprint_normal("\n");
aprint_error_dev(self, "couldn't establish power handler\n");
}
parseerr = ukbd_parse_desc(sc);
if (parseerr != NULL) {
- aprint_normal("\n");
aprint_error_dev(self, "attach failed, %s\n", parseerr);
return;
}
@@ -437,7 +436,7 @@ ukbd_attach(device_t parent, device_t se
#endif
#ifdef DIAGNOSTIC
- aprint_normal(": %d modifier keys, %d key codes", sc->sc_nmod,
+ aprint_normal_dev(self, "%d modifier keys, %d key codes\n", sc->sc_nmod,
sc->sc_nkeycode);
if (sc->sc_flags & FLAG_APPLE_FN)
aprint_normal(", apple fn key");
@@ -446,7 +445,6 @@ ukbd_attach(device_t parent, device_t se
if (sc->sc_flags & FLAG_GDIUM_FN)
aprint_normal(", Gdium fn key");
#endif
- aprint_normal("\n");
/*
* Remember if we're the console keyboard.
@@ -1048,10 +1046,10 @@ ukbd_parse_desc(struct ukbd_softc *sc)
struct hid_item h;
int size;
void *desc;
- int imod;
+ int imod, imodfull;
uhidev_get_report_desc(sc->sc_hdev.sc_parent, &desc, &size);
- imod = 0;
+ imod = imodfull = 0;
sc->sc_nkeycode = 0;
d = hid_start_parse(desc, size, hid_input);
while (hid_get_item(d, &h)) {
@@ -1082,8 +1080,8 @@ ukbd_parse_desc(struct ukbd_softc *sc)
sc->sc_mods[imod].mask = 1 << imod;
sc->sc_mods[imod].key = HID_GET_USAGE(h.usage);
imod++;
- } else
- return ("too many modifier keys");
+ }
+ imodfull++;
} else {
/* Array */
if (h.loc.size != 8)
@@ -1099,6 +1097,9 @@ ukbd_parse_desc(struct ukbd_softc *sc)
}
}
sc->sc_nmod = imod;
+ if (imod != imodfull)
+ aprint_error_dev(sc->sc_hdev.sc_dev, "too many modifier keys, "
+ "found %d, only support %d\n", imodfull, imod);
hid_end_parse(d);
hid_locate(desc, size, HID_USAGE2(HUP_LEDS, HUD_LED_NUM_LOCK),
Home |
Main Index |
Thread Index |
Old Index