#11153: KDL in usb module (EHCI) -------------------------+------------------------------ Reporter: jackburton | Owner: mmlr Type: bug | Status: new Priority: normal | Milestone: R1 Component: Drivers/USB | Version: R1/Development Keywords: ehci | Blocked By: Blocking: | Has a Patch: 0 Platform: All | -------------------------+------------------------------ Recently I resumed development on a wireless usb dongle driver. Last time I tried it, a couple of months ago, I was able to load the firmware and reset the dongle. Now, every time I open the dongle, I get a KDL in the usb bus manager. I'm probably doing something wrong, but I wonder if the recent changes in the usb stack broke something. The KDL shows that EHCI::FinishThread() is called with a NULL parameter, which is then dereferenced in EHCI::FinishTransfer(). Any idea ? My driver code is here: https://github.com/jackburton79/haiku_ralink_usb/blob/master/ralink_usb.cpp The usb function which causes the KDL is this one: size_t actualLength; status_t status = gUSBModule->send_request(fDevice, USB_REQTYPE_VENDOR | USB_REQTYPE_DEVICE_OUT, RT2870_RESET, 8, 0, 0, NULL, &actualLength); if (status != B_OK) { TRACE_ALWAYS(DRIVER_NAME": firmware reset failed\n"); free(buffer); return status; } In the syslog I get this: My driver logs: KERN: ralink_usb: open device net/usb_ralink/0 index 0, KERN: RalinkUSB::Open() KERN: ralink_usb: selected firmware /system/non- packaged/data/firmware/ralink/rt2870.bin KERN: ralink_usb: loading firmware... KERN: ralink_usb: firmware reset... this is the USB module: KERN: usb error control pipe 82: timeout waiting for queued request to complete Last message repeated 1 time KERN: vm_page_fault: kernel thread accessing invalid user memory! On boot, the only ehci logs are these: KERN: usb ehci -1: successfully took ownership of the host controller KERN: sitd entry size 64, itd entry size 128 KERN: usb ehci -1: successfully started the controller KERN: add_memory_type_range(563, 0xfc404000, 0x1000, 0) KERN: usb ehci -1: successfully took ownership of the host controller KERN: sitd entry size 64, itd entry size 128 KERN: usb ehci -1: successfully started the controller KERN: usb hub 17: port 1: device removed KERN: usb hub 22: port 0: device removed KERN: usb hub 32: port 3: new device connected KERN: usb ehci -1: fullspeed device connected, giving up port ownership KERN: usb hub 32: port 4: new device connected Is the "-1" index correct ? -- Ticket URL: <https://dev.haiku-os.org/ticket/11153> Haiku <https://dev.haiku-os.org> Haiku - the operating system.