On Mon, May 22, 2017 at 11:49 AM, Mark Kettenis <[email protected]> wrote: > > > Date: Mon, 22 May 2017 11:10:43 +0200 > > From: =?UTF-8?Q?Sol=C3=A8ne_Rapenne?= <[email protected]> > > > > Je 2017-05-17 21:12, Stuart Henderson skribis: > > > On 2017/05/17 21:04, Solene Rapenne wrote: > > >> Once bsd.rd boot, the keyboard isn't usable. I can't type on it, > > >> nothing happens. I can use an usb keyboard. No network interface > > >> is found within the installer nor ifconfig outputs finds a network > > >> interface, so the wifi isn't even found. The computer is a laptop Asus > > >> L200HA-FD0093T. > > > > > > This is your wireless adapter: > > > > > >> vendor "Atheros", unknown product 0x0042 (class network subclass > > >> miscellaneous, rev 0x31) at pci1 dev 0 function 0 not configured > > > > > > Looks like it is an ath10k device (probably QCA9337), unsupported. > > > > I understand that the wireless isn't supported, I can still use an usb > > wifi. > > > > Any idea for the not working keyboard ? > > Judging from the dmesg, this machine has an i2c keyboard: > > dwiic1 at acpi0: I2C1 addr 0x91632000/0x1000 irq 32 > iic1 at dwiic1 > ihidev0 at iic1 addr 0x68 irq 0, vendor 0xb05 product 0x8585, PDEC3393 > ihidev0: 9 report ids > ikbd0 at ihidev0 reportid 1: 8 variable keys, 6 key codes > wskbd0 at ikbd0 mux 1 > hid at ihidev0 reportid 3 not configured > hid at ihidev0 reportid 6 not configured > hid at ihidev0 reportid 9 not configured > > The "irq 0" is supicious here. That probably means the keyboard > interrupt doesn't work properly. If you boot with the -a option (type > boot -a at the bootloader prompt), does the keyboard work when the > kernel asks for the root disk? > > Looking at the ACPI DSDT, it seems that the interrupt should be > provided by a gpio: > > GpioInt (Level, ActiveLow, Shared, PullNone, 0x0000, > "\\_SB.GPO0", 0x00, ResourceConsumer, , > ) > { // Pin list > 0x005D > } > > The problem here is probably that the dwiic1 anc chvgpio0 devices > appear out of order. I think I had a raw diff for that at some point. > Let's see if I can dust that one off... >
Hi, I made E200HA keyboard and touchpad work configuring node->parent deps. As Mark says, it's a order problem, we should attach all deps drivers before attaching the device driver itself. Attached diff and a (old) dmesg. - C.
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..dbd7620a943
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+obj/
+~*
+*.o
+*.d
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index 09495657aad..092693e192c 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -2819,7 +2819,7 @@ acpi_attach_deps(struct acpi_softc *sc, struct aml_node
*node)
if (dep == NULL || dep->attached)
continue;
dep = aml_searchname(dep, "_HID");
- if (dep)
+ if (dep && dep->parent->attached != 2)
acpi_foundhid(dep, sc);
}
diff --git a/sys/dev/acpi/dwiic.c b/sys/dev/acpi/dwiic.c
index 60bf8d17a22..302b0051229 100644
--- a/sys/dev/acpi/dwiic.c
+++ b/sys/dev/acpi/dwiic.c
@@ -196,6 +196,8 @@ int dwiic_i2c_exec(void *, i2c_op_t, i2c_addr_t,
const void *,
size_t, void *, size_t, int);
void dwiic_xfer_msg(struct dwiic_softc *);
+extern void acpi_attach_deps(struct acpi_softc *, struct aml_node *);
+
struct cfattach dwiic_ca = {
sizeof(struct dwiic_softc),
dwiic_match,
@@ -567,11 +569,15 @@ dwiic_acpi_found_hid(struct aml_node *node, void *arg)
aml_freevalue(&res);
return (0);
}
+
memset(&crs, 0, sizeof(crs));
crs.devnode = sc->sc_devnode;
aml_parse_resource(&res, dwiic_acpi_parse_crs, &crs);
aml_freevalue(&res);
+ node->parent->attached = 2;
+ acpi_attach_deps(acpi_softc, node->parent);
+
if (dwiic_matchhids(cdev, ihidev_hids))
return dwiic_acpi_found_ihidev(sc, node, dev, crs);
else if (dwiic_matchhids(dev, iatp_hids))
E200HA.dmesg
Description: Binary data
