Received: by mail.netbsd.org (Postfix, from userid 605) id 7464F84EFD; Sun, 14 Aug 2022 20:34:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id A38F884EFB for ; Sun, 14 Aug 2022 20:34:26 +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 Gz2wybHZLjT4 for ; Sun, 14 Aug 2022 20:34:26 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 3C1D184CE2 for ; Sun, 14 Aug 2022 20:34:26 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 3992FFB1A; Sun, 14 Aug 2022 20:34:26 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Sun, 14 Aug 2022 20:34:26 +0000 From: "Taylor R Campbell" Subject: CVS commit: src/sys/dev/mii To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20220814203426.3992FFB1A@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Taylor R Campbell" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: riastradh Date: Sun Aug 14 20:34:26 UTC 2022 Modified Files: src/sys/dev/mii: mii.c mii_physubr.c miivar.h Log Message: mii(4): Wait for MIIF_DOINGAUTO to clear with MIIF_AUTOTSLEEP too. Otherwise mii_phy_detach may return while mii_phy_auto_timeout_locked is still in progress in another thread. Reuse the storage for mii_nway_ch, which is unused if MIIF_AUTOTSLEEP is set, for a new condvar in a union. This doesn't change the kernel ABI because sizeof(struct kcondvar) <= sizeof(struct callout) and both have the same alignment, for an array of void *. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/dev/mii/mii.c cvs rdiff -u -r1.98 -r1.99 src/sys/dev/mii/mii_physubr.c cvs rdiff -u -r1.74 -r1.75 src/sys/dev/mii/miivar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.