From nobody Mon Jan 06 23:54:35 2025 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YRrd80RmBz5kRKK for ; Mon, 06 Jan 2025 23:54:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YRrd75svbz45Yr for ; Mon, 6 Jan 2025 23:54:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736207675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=76Mb+psBG0bJ9MeWAY+iQykB6TfPeTdreVQR727xLUQ=; b=ob+twgYLj+EP8gbVS9QtH3FubBg0og9D/b0Rb/+w+YB+Zo8B3JEOazPpelOeU36fU8D+dJ DKG3MgeJLh8FuGldD/0UR4zcWLwk13/Am6PbggY+WDZDrDK2YlAvX5FAD1NURT2/CxvFQ7 48l8qGZGXy40Q+1m9i1tcpGiHTNAC9KSA/0nA3KwkAWX36dAC3l2SMenZM4qiBj/dEwoH5 DfBWKQpAc8ygywmh4OBRASbFoGcsxPktXKMdMJHuT0xMPDyfoslwzXtcjE06itjaoY7Lat bEDw6k1XioZdLwv2KiWwh/hGxp0GSNjJC6NXWfOCLjksA583S0dsicXTsB+Ezw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736207675; a=rsa-sha256; cv=none; b=voJUq7uIPiEYReDfqVj4DjK/Fxe4bcJXm6/PoMEZN+n8n/MqsyXqdqKrXpaSY93boStkOB KW/0rnTBvXVyGETuEIYYv3bu01au2emdYDlOtbO+8HxTW78oz5Swqvi+Z9vWmzbkTFRZOs x31dBFueL78MHvNyEitT/UMkmB1j/GyqaLAhGXk7M5Gk/8XIACa/tYPWIBpxnA27sXPmc+ SE/wk8lUbb1ce9E9//wd+eHkOZ/wJanZwgHRK4FJRk/GjaJmB0COvVN61bbe+QxWjKBQd5 Akft92oibjHW14x0MZ+qErLLzLf18M1qbFjiiH0xEzRjJxH89QMsMbO+rtcvHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YRrd7545MzmZs for ; Mon, 06 Jan 2025 23:54:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 506NsZRf026013 for ; Mon, 6 Jan 2025 23:54:35 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 506NsZ5P026012 for bugs@FreeBSD.org; Mon, 6 Jan 2025 23:54:35 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 283896] iwmbtfw(8): [PATCH] Check firmware exists before trying to upload it Date: Mon, 06 Jan 2025 23:54:35 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 15.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: gavin@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: mfc-stable14+ X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name attachments.created Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D283896 Bug ID: 283896 Summary: iwmbtfw(8): [PATCH] Check firmware exists before trying to upload it Product: Base System Version: 15.0-CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: gavin@FreeBSD.org Flags: mfc-stable14+ Created attachment 256486 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D256486&action= =3Dedit Patch against head TLDR: Device disconnects and reconnects to the USB bus twice a second. iwmbtfw is the tool used to upload Bluetooth firmware to iwm(4) Intel WiFi cards. It is called from devd(4) via the rules in /etc/devd/iwmbtfw.conf w= hen the device appears. In the case of an Intel 7260 device, the device needs to be put into someth= ing called "manufacturer mode" before the firmware is uploaded. The firmware is then upladed, and the card is taken out of this mode, at which point it disconnects and reconnects to the USB bus, and is at that point usable. However, iwmbtfw(8) puts the device into manufacturer mode before verifying that there exists a copy of the firmware to upload. As a result, in the ca= se where there is no firmware, the device is put into manufacturer mode, the firmware can't be found so isn't uplaoded, and the card is brought out of manufacturer mode, so it disconnects and reconnects to the USB bus. Enter devd(8). There are rules in /etc/devd/iwmbtfw.conf to call iwmbtfw(8) when the device appears. When there's no firmware on disk, devd will call iwmbtfw, iwmbtfw will do its thing and fail, the device will dis/reconnect,= and devd will notice and start the whole loop again. Result of this is: Jan 6 18:47:32 omega kernel: ugen0.4: at us= bus0 Jan 6 18:47:32 omega kernel: ugen0.4: at us= bus0 (disconnected) Jan 6 18:47:32 omega kernel: ugen0.4: at us= bus0 Jan 6 18:47:32 omega kernel: ugen0.4: at us= bus0 (disconnected) Jan 6 18:47:33 omega kernel: ugen0.4: at us= bus0 Jan 6 18:47:33 omega kernel: ugen0.4: at us= bus0 (disconnected) Jan 6 18:47:33 omega kernel: ugen0.4: at us= bus0 Jan 6 18:47:33 omega kernel: ugen0.4: at us= bus0 (disconnected) Jan 6 18:47:34 omega kernel: ugen0.4: at us= bus0 Jan 6 18:47:34 omega kernel: ugen0.4: at us= bus0 (disconnected) Jan 6 18:47:34 omega kernel: ugen0.4: at us= bus0 Jan 6 18:47:34 omega kernel: ugen0.4: at us= bus0 (disconnected) Jan 6 18:47:35 omega kernel: ugen0.4: at us= bus0 Jan 6 18:47:35 omega kernel: ugen0.4: at us= bus0 (disconnected) Jan 6 18:47:35 omega kernel: ugen0.4: at us= bus0 Jan 6 18:47:35 omega kernel: ugen0.4: at us= bus0 (disconnected) Fix (attached) is to verify that the firmware exists before putting the dev= ice into its special mode. The fix only changes things for the 7260 and not the other chips supported, I can't easily test those so don't know if the probl= em exists there or not but I suspect not as those do not need to be switched i= nto manufacturer mode before uplading. This needs backporting to stable/14 (confirmed, I see the same behaviour) a= nd stable/13 (suspected, not confirmed). --=20 You are receiving this mail because: You are the assignee for the bug.=