From nobody Sat Feb  4 16:20:10 2023
X-Original-To: dev-commits-src-main@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 4P8Hmp5LHkz3nYyV;
	Sat,  4 Feb 2023 16:20:10 +0000 (UTC)
	(envelope-from git@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 "R3" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4P8Hmp4tNCz43Kp;
	Sat,  4 Feb 2023 16:20:10 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1675527610;
	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=FhI8uk5qz9+eElsPmJ+mSAn+/N0mY3u5ckxSbh7qocg=;
	b=S6AttUBFfeIxG+rvqFZx+ZnY5F6I51jaW2GEUP0ps4FgONPal7btxIOZp10p3n7WQV8iB1
	VtFhKmDWdiMxcBbpFT+g84JEtm4ekJas591/q93mZoLSDjuhvIwccVo3mjKv0946nm8I5H
	z/5DEZ3c0h1su8Qib2ZQeXzfApvaUVrt2yNbHeaPJUIOBIY3H7nEpssQRAzKe3IRuD45PI
	PcwmZurGrzD+s36aklawDYItGdPHUYvbG6zQqSwtaX2wzSb2g7QHIZXoQ/bOIHDF3eo8dA
	iI3+jAfZFUMLsROD9bCRaLH7mj3n6K8PQKsy20MUKOVv7Jehi4M1a8zOqTnUqQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1675527610;
	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=FhI8uk5qz9+eElsPmJ+mSAn+/N0mY3u5ckxSbh7qocg=;
	b=oe7DTV78pKF8PXxx0vXE/Mh9VdW7rOhjDLh9DHEEJWNcIQLawtfot4HE4M/PtittRFatWR
	gF/NfB99OmpGyVvxC1yTOTh2vH1diYbzi/x42dAMajPE+Tnwe7uBaB/0unxeFYl1oH8g2s
	Ib0XsPEVWylCIre7CnToESN2LvCEdgFrlBw/hgMZXhSHK6aEq4mQYZg93AyRl1/2/dZZ0U
	4z+ycIkJs4PvS7FxAikWUX5O5UfZGFKA7tiWYRxLjPdRAlJNR/Op6vl+aqm0ww1oXQWUy/
	qe7IWjqQDn+GQ6Cu3TWfcd3xVkrHz7Ki6FjLjTnTS2WT06mRfeWQNbSv7IxTiw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675527610; a=rsa-sha256; cv=none;
	b=KBseEgLLTYw96Qwe8QLMT/k0Grkoq4KlOIZqTG1icIcYAjqXI2xSsN0PL1zWvCnttDEFM+
	xDONPNK1I8lvBXPR994FX8kyb/0pmygV83OyM0HInpHzTjSa9IJF0+mwjZ8yMLrXXQ547o
	4VnAWItD1JfeGnn43Fw3/2jElC/16FLK2Jiqr8GMHliL4QEfmTsj8oGpTxkJjNJZEdu9G2
	IPMvOr0uwJaISfE0aEqAfK+s7VB0oMUt6+u7lq8Cq5E2bSMhh1UohZpy84Fi8dZv+2PSne
	+c3wSAFJld7wVZwa4wvHPoGWYYmgNr5e3v1hfBBlbFDHTjnsd+Ajb1d15nIcXA==
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(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 4P8Hmp3s5SzLBS;
	Sat,  4 Feb 2023 16:20:10 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 314GKA5N009303;
	Sat, 4 Feb 2023 16:20:10 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 314GKAOh009296;
	Sat, 4 Feb 2023 16:20:10 GMT
	(envelope-from git)
Date: Sat, 4 Feb 2023 16:20:10 GMT
Message-Id: <202302041620.314GKAOh009296@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-main@FreeBSD.org
From: Warner Losh <imp@FreeBSD.org>
Subject: git: 336fbb23def7 - main - usb: purge EOL release compatibility
List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main
List-Help: <mailto:dev-commits-src-main+help@freebsd.org>
List-Post: <mailto:dev-commits-src-main@freebsd.org>
List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org>
List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org>
Sender: owner-dev-commits-src-main@freebsd.org
X-BeenThere: dev-commits-src-main@freebsd.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: imp
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 336fbb23def7a6b3dc44ce5c76bbc07a701c0a69
Auto-Submitted: auto-generated
X-ThisMailContainsUnwantedMimeParts: N

The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=336fbb23def7a6b3dc44ce5c76bbc07a701c0a69

commit 336fbb23def7a6b3dc44ce5c76bbc07a701c0a69
Author:     Elliott Mitchell <ehem+freebsd@m5p.com>
AuthorDate: 2022-06-23 00:53:47 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-02-04 16:10:32 +0000

    usb: purge EOL release compatibility
    
    Remove conditionsals for FreeBSD 6, 7, 8 and 9 compatibility.
    
    Reviewed by: imp
    Pull Request: https://github.com/freebsd/freebsd-src/pull/603
    Differential Revision: https://reviews.freebsd.org/D35560
---
 sys/dev/usb/controller/ehci_pci.c |  5 -----
 sys/dev/usb/controller/ohci_pci.c |  5 -----
 sys/dev/usb/controller/uhci_pci.c |  5 -----
 sys/dev/usb/usb_busdma.h          |  4 ----
 sys/dev/usb/usb_dev.c             |  5 -----
 sys/dev/usb/usb_process.c         | 21 ---------------------
 sys/dev/usb/usb_process.h         |  4 ----
 7 files changed, 49 deletions(-)

diff --git a/sys/dev/usb/controller/ehci_pci.c b/sys/dev/usb/controller/ehci_pci.c
index 4ff15a37538c..a4430aa3a05d 100644
--- a/sys/dev/usb/controller/ehci_pci.c
+++ b/sys/dev/usb/controller/ehci_pci.c
@@ -424,13 +424,8 @@ ehci_pci_attach(device_t self)
 		sprintf(sc->sc_vendor, "(0x%04x)", pci_get_vendor(self));
 	}
 
-#if (__FreeBSD_version >= 700031)
 	err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
 	    NULL, (driver_intr_t *)ehci_interrupt, sc, &sc->sc_intr_hdl);
-#else
-	err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
-	    (driver_intr_t *)ehci_interrupt, sc, &sc->sc_intr_hdl);
-#endif
 	if (err) {
 		device_printf(self, "Could not setup irq, %d\n", err);
 		sc->sc_intr_hdl = NULL;
diff --git a/sys/dev/usb/controller/ohci_pci.c b/sys/dev/usb/controller/ohci_pci.c
index b9d90ba5432d..abca9526db52 100644
--- a/sys/dev/usb/controller/ohci_pci.c
+++ b/sys/dev/usb/controller/ohci_pci.c
@@ -296,13 +296,8 @@ ohci_pci_attach(device_t self)
 
 	/* sc->sc_bus.usbrev; set by ohci_init() */
 
-#if (__FreeBSD_version >= 700031)
 	err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
 	    NULL, (driver_intr_t *)ohci_interrupt, sc, &sc->sc_intr_hdl);
-#else
-	err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
-	    (driver_intr_t *)ohci_interrupt, sc, &sc->sc_intr_hdl);
-#endif
 	if (err) {
 		device_printf(self, "Could not setup irq, %d\n", err);
 		sc->sc_intr_hdl = NULL;
diff --git a/sys/dev/usb/controller/uhci_pci.c b/sys/dev/usb/controller/uhci_pci.c
index 2b38e31208f2..19efb0ef6a5a 100644
--- a/sys/dev/usb/controller/uhci_pci.c
+++ b/sys/dev/usb/controller/uhci_pci.c
@@ -363,13 +363,8 @@ uhci_pci_attach(device_t self)
 		break;
 	}
 
-#if (__FreeBSD_version >= 700031)
 	err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
 	    NULL, (driver_intr_t *)uhci_interrupt, sc, &sc->sc_intr_hdl);
-#else
-	err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
-	    (driver_intr_t *)uhci_interrupt, sc, &sc->sc_intr_hdl);
-#endif
 
 	if (err) {
 		device_printf(self, "Could not setup irq, %d\n", err);
diff --git a/sys/dev/usb/usb_busdma.h b/sys/dev/usb/usb_busdma.h
index 2f60b30963d2..254694e1b21f 100644
--- a/sys/dev/usb/usb_busdma.h
+++ b/sys/dev/usb/usb_busdma.h
@@ -40,11 +40,7 @@
 
 #define	USB_PAGE_SIZE PAGE_SIZE		/* use system PAGE_SIZE */
 
-#if (__FreeBSD_version >= 700020)
 #define	USB_GET_DMA_TAG(dev) bus_get_dma_tag(dev)
-#else
-#define	USB_GET_DMA_TAG(dev) NULL	/* XXX */
-#endif
 
 /* structure prototypes */
 
diff --git a/sys/dev/usb/usb_dev.c b/sys/dev/usb/usb_dev.c
index 4811d280562c..84446edc3ecd 100644
--- a/sys/dev/usb/usb_dev.c
+++ b/sys/dev/usb/usb_dev.c
@@ -96,12 +96,7 @@ SYSCTL_INT(_hw_usb_dev, OID_AUTO, debug, CTLFLAG_RWTUN,
     &usb_fifo_debug, 0, "Debug Level");
 #endif
 
-#if ((__FreeBSD_version >= 700001) || (__FreeBSD_version == 0) || \
-     ((__FreeBSD_version >= 600034) && (__FreeBSD_version < 700000)))
 #define	USB_UCRED struct ucred *ucred,
-#else
-#define	USB_UCRED
-#endif
 
 /* prototypes */
 
diff --git a/sys/dev/usb/usb_process.c b/sys/dev/usb/usb_process.c
index 37495608a30d..33dbad1bf998 100644
--- a/sys/dev/usb/usb_process.c
+++ b/sys/dev/usb/usb_process.c
@@ -62,31 +62,14 @@
 #include <sys/sched.h>
 #endif			/* USB_GLOBAL_INCLUDE_FILE */
 
-#if (__FreeBSD_version < 700000)
-#define	thread_lock(td) mtx_lock_spin(&sched_lock)
-#define	thread_unlock(td) mtx_unlock_spin(&sched_lock)
-#endif
-
-#if (__FreeBSD_version >= 800000)
 static struct proc *usbproc;
 static int usb_pcount;
 #define	USB_THREAD_CREATE(f, s, p, ...) \
 		kproc_kthread_add((f), (s), &usbproc, (p), RFHIGHPID, \
 		    0, "usb", __VA_ARGS__)
-#if (__FreeBSD_version >= 900000)
 #define	USB_THREAD_SUSPEND_CHECK() kthread_suspend_check()
-#else
-#define	USB_THREAD_SUSPEND_CHECK() kthread_suspend_check(curthread)
-#endif
 #define	USB_THREAD_SUSPEND(p)   kthread_suspend(p,0)
 #define	USB_THREAD_EXIT(err)	kthread_exit()
-#else
-#define	USB_THREAD_CREATE(f, s, p, ...) \
-		kthread_create((f), (s), (p), RFHIGHPID, 0, __VA_ARGS__)
-#define	USB_THREAD_SUSPEND_CHECK() kthread_suspend_check(curproc)
-#define	USB_THREAD_SUSPEND(p)   kthread_suspend(p,0)
-#define	USB_THREAD_EXIT(err)	kthread_exit(err)
-#endif
 
 #ifdef USB_DEBUG
 static int usb_proc_debug;
@@ -198,11 +181,9 @@ usb_process(void *arg)
 	up->up_ptr = NULL;
 	cv_signal(&up->up_cv);
 	USB_MTX_UNLOCK(up->up_mtx);
-#if (__FreeBSD_version >= 800000)
 	/* Clear the proc pointer if this is the last thread. */
 	if (--usb_pcount == 0)
 		usbproc = NULL;
-#endif
 
 	USB_THREAD_EXIT(0);
 }
@@ -238,9 +219,7 @@ usb_proc_create(struct usb_process *up, struct mtx *p_mtx,
 		up->up_ptr = NULL;
 		goto error;
 	}
-#if (__FreeBSD_version >= 800000)
 	usb_pcount++;
-#endif
 	return (0);
 
 error:
diff --git a/sys/dev/usb/usb_process.h b/sys/dev/usb/usb_process.h
index 7be78917b8f0..8a416a308856 100644
--- a/sys/dev/usb/usb_process.h
+++ b/sys/dev/usb/usb_process.h
@@ -57,11 +57,7 @@ struct usb_process {
 	struct cv up_cv;
 	struct cv up_drain;
 
-#if (__FreeBSD_version >= 800000)
 	struct thread *up_ptr;
-#else
-	struct proc *up_ptr;
-#endif
 	struct thread *up_curtd;
 	struct mtx *up_mtx;