From owner-freebsd-current@freebsd.org Mon Jan 20 12:12:13 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8915A1F831E for ; Mon, 20 Jan 2020 12:12:13 +0000 (UTC) (envelope-from contact@evilham.com) Received: from yggdrasil.evilham.com (yggdrasil.evilham.com [IPv6:2a02:2770::216:3eff:fee1:cf9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 481VsS3pkgz4RbM for ; Mon, 20 Jan 2020 12:12:12 +0000 (UTC) (envelope-from contact@evilham.com) Received: from yggdrasil.evilham.com (unknown [IPv6:2a0a:e5c1:102:c:9a2c:bcff:fee3:ed60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by yggdrasil.evilham.com (Postfix) with ESMTPSA id 481VsJ1Br4z3wbg for ; Mon, 20 Jan 2020 13:12:04 +0100 (CET) From: Evilham To: "freebsd-current@freebsd.org" Subject: Can't reattach USB devices (Lenovo bug?) Date: Mon, 20 Jan 2020 13:12:00 +0100 Message-ID: <413e73db-3e1d-42b6-b237-30174e1b3f03@yggdrasil.evilham.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Rspamd-Queue-Id: 481VsS3pkgz4RbM X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=evilham.com; spf=pass (mx1.freebsd.org: domain of contact@evilham.com designates 2a02:2770::216:3eff:fee1:cf9 as permitted sender) smtp.mailfrom=contact@evilham.com X-Spamd-Result: default: False [-6.42 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; IP_SCORE(-3.62)[ip: (-9.85), ipnet: 2a02:2770::/32(-4.61), asn: 196752(-3.66), country: NL(0.03)]; DMARC_POLICY_ALLOW(-0.50)[evilham.com,none]; TO_DN_EQ_ADDR_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:196752, ipnet:2a02:2770::/32, country:NL]; RCVD_COUNT_TWO(0.00)[2]; SUBJECT_HAS_QUESTION(0.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2020 12:12:13 -0000 Hello, at first I thought I had found a regression in CURRENT (2020-01-19), and now I'm not so sure since, before reporting I rolled back a recent BIOS upgrade and that got rid of the issue. First of all, the hardware: Lenovo ThinkPad A485 (AMD Ryzen processor). The issue (BIOS v1.28[1]) being that any USB device: would work on first plug, but if unplugged and plugged again, it wouldn't work (see dmesg below). Downgrading to BIOS v1.24 results in the issue disappearing. How should this be dealt with? Could this be something FreeBSD needs better support for? or is it entirely on Lenovo? If the former, how can I help provide more information/testing(*)? If the latter, should I inform Lenovo of the issue? If anyone has experience with that, I'd appreciate pointers as to how to provide them with information in a way that makes it somewhat likely that things get solved. [1]: BIOS Release notes: https://download.lenovo.com/pccbbs/mobiles/r0wuj60w.txt (*): Helping spot bugs and provide information/testing is why I'm running CURRENT after all Just FTR: I also experienced random kernel panics [2] with versions v1.22 and v1.16 of the BIOS, so maybe Lenovo is being unreasonable/unreliable about BIOS upgrades. In any case I am curious as to how other OS deal with this class of issues and how FreeBSD could (if possible at all) work better in these cases. [2]: Kernel panic solved by BIOS upgrade (to v1.24) see: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239351 Also FTR, this was the contents of dmesg with BIOS v1.28 and CURRENT as of 2020-01-19: (notice there are multiple disconnect and reconnect attempts of different devices) ugen1.2: at usbus1 (disconnected) uhub4: at uhub1, port 1, addr 1 (disconnected) ugen1.3: at usbus1 (disconnected) ukbd0: at uhub4, port 2, addr 2 (disconnected) ukbd0: detached uhid0: at uhub4, port 2, addr 2 (disconnected) uhid0: detached ugen1.4: at usbus1 (disconnected) uhub5: at uhub4, port 4, addr 3 (disconnected) ugen1.5: at usbus1 (disconnected) uhid1: at uhub5, port 1, addr 4 (disconnected) uhid1: detached ums0: at uhub5, port 1, addr 4 (disconnected) ums0: detached ukbd1: at uhub5, port 1, addr 4 (disconnected) ukbd1: detached uhub5: detached uhub4: detached ugen1.2: at usbus1 uhub4 on uhub1 uhub4: on usbus1 acpi_ec0: EcCommand: no response to 0x84 uhub4: 4 ports with 4 removable, self powered acpi_ec0: EcCommand: no response to 0x84 acpi_ec0: EcCommand: no response to 0x84 acpi_ec0: GPE query failed: AE_NO_HARDWARE_RESPONSE usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_TIMEOUT usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_TIMEOUT usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_TIMEOUT usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_TIMEOUT usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_TIMEOUT ugen1.3: at usbus1 (disconnected) uhub_reattach_port: could not allocate new device ugen1.2: at usbus1 (disconnected) uhub4: at uhub1, port 1, addr 1 (disconnected) uhub4: detached usbd_setup_device_desc: getting device descriptor at addr 1 failed, USB_ERR_TIMEOUT usbd_setup_device_desc: getting device descriptor at addr 1 failed, USB_ERR_TIMEOUT usbd_setup_device_desc: getting device descriptor at addr 1 failed, USB_ERR_TIMEOUT usbd_setup_device_desc: getting device descriptor at addr 1 failed, USB_ERR_TIMEOUT usbd_setup_device_desc: getting device descriptor at addr 1 failed, USB_ERR_TIMEOUT ugen1.2: at usbus1 (disconnected) uhub_reattach_port: could not allocate new device usbd_setup_device_desc: getting device descriptor at addr 1 failed, USB_ERR_TIMEOUT usbd_setup_device_desc: getting device descriptor at addr 1 failed, USB_ERR_TIMEOUT usbd_setup_device_desc: getting device descriptor at addr 1 failed, USB_ERR_TIMEOUT usbd_setup_device_desc: getting device descriptor at addr 1 failed, USB_ERR_TIMEOUT -- Evilham