Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified)) by mollari.NetBSD.org (Postfix) with ESMTPS id 40D241A923A for ; Thu, 27 Aug 2020 14:13:20 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id D52FF84DEE; Thu, 27 Aug 2020 14:13:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 5B05C84DE9 for ; Thu, 27 Aug 2020 14:13:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id kFiUsjfS4Hal for ; Thu, 27 Aug 2020 14:13:18 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id AB1F584D3C for ; Thu, 27 Aug 2020 14:13:18 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id A6D31FB26; Thu, 27 Aug 2020 14:13:18 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Thu, 27 Aug 2020 14:13:18 +0000 From: "Martin Husemann" Subject: CVS commit: [netbsd-9] src/sys/dev/usb To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20200827141318.A6D31FB26@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Martin Husemann" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: martin Date: Thu Aug 27 14:13:18 UTC 2020 Modified Files: src/sys/dev/usb [netbsd-9]: ugen.c usbdevices.config Log Message: Pull up following revision(s) (requested by riastradh in ticket #1065): sys/dev/usb/usbdevices.config: revision 1.41 (patch) sys/dev/usb/ugen.c: revision 1.152 sys/dev/usb/ugen.c: revision 1.153 sys/dev/usb/ugen.c: revision 1.154 sys/dev/usb/ugen.c: revision 1.155 (patch) sys/dev/usb/ugen.c: revision 1.156 sys/dev/usb/ugen.c: revision 1.157 Remove UGEN_ASLP microoptimization. cv_signal already has this microoptimization. While here, make the lock cover the relevant things we're issuing cv_signal about -- progress toward real MP-safety. Hold the lock over access to the data structures it covers. Still not MPSAFE, but progress. Convert DIAGNOSTIC prints to KASSERTs. Share unit numbering for ugen and ugenif. This way putting ugenif in kernel config actually works to wire it to the /dev/ugenN.MM device nodes in userland. Not a fully fleshed out solution to the ugen problem -- there's no way for a userland driver to kick out a kernel driver and take over, but this will let us, e.g., use uhidev(4) for Yubikey OTP/U2F/FIDO2 but ugen(4), with pcscd(8), for Yubikey CCID. Fix various MP-safety issues while here (still not MPSAFE, but more progress). Expose Yubikey CCID interface to userland via ugenif. Fix sloppy mistakes in previous. 1. Give the offset of the rbnode, not some other random members to overwrite with garbage. 2. Don't try to unlock a mutex at NULL. 3. Make sure all paths out after ugenif_acquire go via ugenif_release. Fix ugen detach after partial attach. While here, register null pmf handler even for partially attached devices so they don't needlessly interfere with suspend. To generate a diff of this commit: cvs rdiff -u -r1.146.2.1 -r1.146.2.2 src/sys/dev/usb/ugen.c cvs rdiff -u -r1.35.4.1 -r1.35.4.2 src/sys/dev/usb/usbdevices.config Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.