From nobody Sun Apr 30 06:57:52 2023 X-Original-To: dev-commits-src-all@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 4Q8HGm4sfdz48s73; Sun, 30 Apr 2023 06:57:52 +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 4Q8HGm2yYgz3Mml; Sun, 30 Apr 2023 06:57:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837872; 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=4FdCwYxypsW3WmSJkTe5eLLSJhdQFmYzHU7K0ajnHQA=; b=PUUaxVhuUzvuTVQPIio2sRLBH8IWrFl7fGlrAMhWDd+bV6A/PYgC/1CjAB/kp1xA4sl7Cw e1fVSMe7nyaXhJuL9SJDT+AAwV7p/KbQ83F2r5WUimu+ObdbMMzYH2zA8/I7nV0PX1MfUY wEPctK+3Xw5X5YVouzjWMUGUmqB4reQ6Ud5NMA4usSNQclnSuPUdTy+T+8IFGHaOy8+TD8 9aySeA/bBwGpxZFSxSfQrwAOM56uEvJFdB1g3h/Ah5uQnpO6ZSqDxJkLLVxXP51ODE4NWZ OHu9wjR3eJ52sW1xVHqY9KFroeaLbjy+2tNv5g20FlZdslCybnNZYs6r12dGIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837872; 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=4FdCwYxypsW3WmSJkTe5eLLSJhdQFmYzHU7K0ajnHQA=; b=YRMAFQgzEIwHlWlaC3wCLeJwklCfSGVMSC7sMg0IpV0lJwd40jwM7yodEyykRKae9kEh/n wahhLTTH4JY/jsW3+O41ZAmL5difuGhjZvVqZX5JPonRqqa6D+cGYJu86h4L2wg9RUVGVM 8xUYyOmERSWS1+SKMJzTq8IfGhx3dixGz+quUAuxShSkcePwrxzqROsxVU7GU947y60fzG oO30dIsp88U5gpQZZnpf/3Qg/hgzlEsEyueD01zRgp13+uuL15rIFZ2zr1FUjKPO5MPjnV XZFThvGO+J34KTME9YSZRuUedkjAR6Th2NR9Z7K2xcQ4953sedm1KYDo8xtaVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837872; a=rsa-sha256; cv=none; b=SEs+2Bf4gpQ/TKYkFIe9JZntSsctmpNCPQYTnsnuRBWXjijEe0cef4MpeLnZ7qkJcONn7a 2V01fADEbRx+qChY+HrA15iX2ZXxH/67+75KI2XyFI3pAlQCVWu1vjogeib04DlL8AGJIV 0O+Ff+6VGf1oPNPQBwAqTB4ZSlpT4FatbxLhCPkmwTiw5k025fFYr3dUvnZ+bG9u8ysyrW 3ode48SMDV0SnEdKFEVKFEf0VjbwUlKwh5TC9sYChIgmGfYpkc2hPD2DLfXnT9XQHSfJLe ioiKjm8mGN082Jv2xNC9hfZW+D82+H+qQmvjTqxloeDLfhAd05i9oxRSACixmA== 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 4Q8HGm24dRzDsr; Sun, 30 Apr 2023 06:57:52 +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 33U6vqiP071518; Sun, 30 Apr 2023 06:57:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6vqd3071517; Sun, 30 Apr 2023 06:57:52 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:57:52 GMT Message-Id: <202304300657.33U6vqd3071517@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: d4a8b3f7cf10 - stable/13 - usb: purge EOL release compatibility List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d4a8b3f7cf101fa54385e0d3613a2fcd1be47090 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=d4a8b3f7cf101fa54385e0d3613a2fcd1be47090 commit d4a8b3f7cf101fa54385e0d3613a2fcd1be47090 Author: Elliott Mitchell AuthorDate: 2022-06-23 00:53:47 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:16 +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 (cherry picked from commit 336fbb23def7a6b3dc44ce5c76bbc07a701c0a69) --- 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 9018b2e4db40..98e2172e5e95 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 8c3ee521b5b1..5a84f9bb529c 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 07bc25b644e3..7cfd2c18d0d6 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 #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;