NetBSD Problem Report #60330

From www@netbsd.org  Sun Jun 14 01:49:39 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.netbsd.org", Issuer "R13" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 6307B1A923A
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 14 Jun 2026 01:49:39 +0000 (UTC)
Message-Id: <20260614014938.2C8861A923B@mollari.NetBSD.org>
Date: Sun, 14 Jun 2026 01:49:38 +0000 (UTC)
From: smokris@softpixel.com
Reply-To: smokris@softpixel.com
To: gnats-bugs@NetBSD.org
Subject: libusb1 v1.0.30 is broken on Illumos/SmartOS
X-Send-Pr-Version: www-1.0
X-From4GNATS: "smokris@softpixel.com via gnats" <gnats-admin@NetBSD.org>

>Number:         60330
>Category:       pkg
>Synopsis:       libusb1 v1.0.30 is broken on Illumos/SmartOS
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 14 01:50:00 +0000 2026
>Originator:     Steve Mokris
>Release:        
>Organization:
>Environment:
SunOS 5.11 joyent_20260528T000227Z i86pc i386 i86pc illumos
>Description:
libusb 1.0.30 introduced an internal API change (https://github.com/libusb/libusb/commit/9ffcb458abb311edec73bab59bda88c1aa4a1ea8): OS-specific backends now need to call `usbi_connect_device()`.

The pkgsrc tree has an Illumos/SmartOS backend, but it doesn't call that function, so, while it can enumerate USB devices, it cannot connect and communicate with USB devices.

The attached patch adds the necessary function call; I've verified that it works on SmartOS 20260528T000227Z.
>How-To-Repeat:
Run `examples/listdevs` and pick a vid:pid.

Run `examples/xusb` followed by the selected vid:pid --- it outputs `Opening device 05AC:0204... Failed.`.

After applying the attached patch, it outputs `Opening device 05AC:0204... Device properties: bus number: [...] Closing device...`.
>Fix:
diff --git a/libusb/os/illumos_usb.c b/libusb/os/illumos_usb.c
index ec4b2721..92dc2e16 100644
--- a/libusb/os/illumos_usb.c
+++ b/libusb/os/illumos_usb.c
@@ -655,6 +655,8 @@ illumos_add_devices(di_devlink_t link, void *arg)
                usbi_dbg(NULL, "sanatize failed: ");
                return (DI_WALK_TERMINATE);
            }
+
+           usbi_connect_device(dev);
        } else {
            devpriv = usbi_get_device_priv(dev);
            usbi_dbg(NULL, "Dev %s exists", devpriv->ugenpath);

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.