From nobody Sat Feb 04 16:20:12 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 4P8Hmr6fNpz3nYyY; Sat, 4 Feb 2023 16:20:12 +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 4P8Hmr60mZz43Ll; Sat, 4 Feb 2023 16:20:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675527612; 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=fiDj68+m9NqsD6ZNeEuTwO28PqavqUSgxYubogZ/Rks=; b=owevVz2zbTj7fII1IUxNIArwZ1MVvSNj26wnCngPCpuy+oIgzFVP9kx5l2b3PLzoMEp/H/ F2uRIDHhW1FU0+LlUrY2lVKVwAzW3VszJ/TNcSxo6f70qhLXetVliaiRJHhKn7o+U0RRL1 cO+4rgUCo12vtulGWThFtQ5sOrsE8KEAxn60trQO4Dwk/+1/oTr21692n56nmvRcZiXdAr /2/DXZFAEHOeIa3NztmQjsFrUwaUbRNKgTi0nF5IhEiWdIPd7hak9btLuQ9LQtVu13i1Cg /EzqbINmtYeBndF7glK+s4VZph24oFMeVKrRLtMsDqW6HsXfxAPAcIuWG9XSsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675527612; 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=fiDj68+m9NqsD6ZNeEuTwO28PqavqUSgxYubogZ/Rks=; b=GuZFQ9shZYWEkCXdkOEC31ORMC55cD0DyP/KzhMEuo4ATmgkwSIMrcy33o5ckTuf6fo7kI i+2oqeDe8Ws2lI8HYT2RDBoVxt2UasOvKMVXq8gghdrfUYjtEl3YxRV846nA7tjdygWnFj IU0tn0engC8frfsJDzenU8+cdyEMAm4kFXL/0/vTDGuR6zLiB9I2IM4PTWizx5QnER9fWi Tz11IwFnpoeFtSIFbhXIR52iy0i4yBzl8ra0wJ/p5CMv250+9N6Eqe+Ar3gINhDSOQph8w 9k4qUikJkbgahZV++V15U5nGOp/TVs8idHLhe9tpSv7VlNeRzX1w2eRcuJbGpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675527612; a=rsa-sha256; cv=none; b=UKJ8JC3fIBbL6JIztNu6xkiDnrNDv31lwZhobXwTB81Qn4G7n/6yWVYMYV4PRH+07AYpPX jTBohJdoL6XzT+w1GFiQmUe/cEODky7YuV2IfhuQ27kVsb7it5wTcXy48AcGMV4WK3SIMZ Aka4sNQZr9gFlgXKibHkYSrzbmRZvzgiHhrq6REDE5poC8YIzG11uxUhJuAhU5dyBPn/jq x9txBxKSQyDLv7+khUk+f4IzxPH9kjy6vjmEQ965mfXNEHYWFQmtgeJKs4xXeJ81TCZjXi w3Z14a3Yp6vk6KnRQIdcnzfAf3CeXlG3DUr3cFz/7srJVpXSpSKvYnf8AZ6FpQ== 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 4P8Hmr4vG1zLfK; Sat, 4 Feb 2023 16:20:12 +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 314GKCfR010556; Sat, 4 Feb 2023 16:20:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 314GKC4Q010545; Sat, 4 Feb 2023 16:20:12 GMT (envelope-from git) Date: Sat, 4 Feb 2023 16:20:12 GMT Message-Id: <202302041620.314GKC4Q010545@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 721d3e7e9a7d - main - mrsas: 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 721d3e7e9a7d6a099361d88e8d47697f07c4c2b6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=721d3e7e9a7d6a099361d88e8d47697f07c4c2b6 commit 721d3e7e9a7d6a099361d88e8d47697f07c4c2b6 Author: Elliott Mitchell AuthorDate: 2022-06-23 00:53:47 +0000 Commit: Warner Losh CommitDate: 2023-02-04 16:10:36 +0000 mrsas: purge EOL release compatibility Remove FreeBSD 7, 8, 9 and 10 compatibility code. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/603 Differential Revision: https://reviews.freebsd.org/D35560 --- sys/dev/mrsas/mrsas.h | 12 ------------ sys/dev/mrsas/mrsas_cam.c | 48 +-------------------------------------------- sys/dev/mrsas/mrsas_ioctl.h | 3 --- sys/dev/mrsas/mrsas_linux.c | 14 ------------- 4 files changed, 1 insertion(+), 76 deletions(-) diff --git a/sys/dev/mrsas/mrsas.h b/sys/dev/mrsas/mrsas.h index 069db02fadff..408018f2f5ce 100644 --- a/sys/dev/mrsas/mrsas.h +++ b/sys/dev/mrsas/mrsas.h @@ -138,12 +138,6 @@ __FBSDID("$FreeBSD$"); /* * Boolean types */ -#if (__FreeBSD_version < 901000) -typedef enum _boolean { - false, true -} boolean; - -#endif enum err { SUCCESS, FAIL }; @@ -3632,15 +3626,9 @@ struct mrsas_softc { }; /* Compatibility shims for different OS versions */ -#if __FreeBSD_version >= 800001 #define mrsas_kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) #define mrsas_kproc_exit(arg) kproc_exit(arg) -#else -#define mrsas_kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ - kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) -#define mrsas_kproc_exit(arg) kthread_exit(arg) -#endif static __inline void mrsas_clear_bit(int b, volatile void *p) diff --git a/sys/dev/mrsas/mrsas_cam.c b/sys/dev/mrsas/mrsas_cam.c index 3ac37bc13a3c..9ad97d2ce3e2 100644 --- a/sys/dev/mrsas/mrsas_cam.c +++ b/sys/dev/mrsas/mrsas_cam.c @@ -222,12 +222,6 @@ mrsas_cam_attach(struct mrsas_softc *sc) } mtx_unlock(&sc->sim_lock); -#if (__FreeBSD_version <= 704000) - if (mrsas_bus_scan(sc)) { - device_printf(sc->mrsas_dev, "Error in bus scan.\n"); - return (1); - } -#endif return (0); } @@ -346,11 +340,7 @@ mrsas_action(struct cam_sim *sim, union ccb *ccb) ccb->cpi.version_num = 1; ccb->cpi.hba_inquiry = 0; ccb->cpi.target_sprt = 0; -#if (__FreeBSD_version >= 902001) ccb->cpi.hba_misc = PIM_UNMAPPED; -#else - ccb->cpi.hba_misc = 0; -#endif ccb->cpi.hba_eng_cnt = 0; ccb->cpi.max_lun = MRSAS_SCSI_MAX_LUNS; ccb->cpi.unit_number = cam_sim_unit(sim); @@ -368,9 +358,7 @@ mrsas_action(struct cam_sim *sim, union ccb *ccb) ccb->cpi.max_target = MRSAS_MAX_PD - 1; else ccb->cpi.max_target = MRSAS_MAX_LD_IDS - 1; -#if (__FreeBSD_version > 704000) ccb->cpi.maxio = sc->max_sectors_per_req * 512; -#endif ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; @@ -418,13 +406,8 @@ mrsas_scsiio_timeout(void *data) * on OCR enable/disable property of Controller from ocr_thread * context. */ -#if (__FreeBSD_version >= 1000510) callout_reset_sbt(&cmd->cm_callout, SBT_1S * 180, 0, mrsas_scsiio_timeout, cmd, 0); -#else - callout_reset(&cmd->cm_callout, (180000 * hz) / 1000, - mrsas_scsiio_timeout, cmd); -#endif if (cmd->ccb_ptr->cpi.bus_id == 0) target_id = cmd->ccb_ptr->ccb_h.target_id; @@ -492,8 +475,6 @@ mrsas_startio(struct mrsas_softc *sc, struct cam_sim *sim, } else cmd->flags = MRSAS_DIR_NONE; /* no data */ -/* For FreeBSD 9.2 and higher */ -#if (__FreeBSD_version >= 902001) /* * XXX We don't yet support physical addresses here. */ @@ -526,24 +507,7 @@ mrsas_startio(struct mrsas_softc *sc, struct cam_sim *sim, ccb->ccb_h.status = CAM_REQ_INVALID; goto done; } -#else - if (!(ccb_h->flags & CAM_DATA_PHYS)) { /* Virtual data address */ - if (!(ccb_h->flags & CAM_SCATTER_VALID)) { - cmd->length = csio->dxfer_len; - if (cmd->length) - cmd->data = csio->data_ptr; - } else { - mrsas_release_mpt_cmd(cmd); - ccb_h->status = CAM_REQ_INVALID; - goto done; - } - } else { /* Data addresses are physical. */ - mrsas_release_mpt_cmd(cmd); - ccb_h->status = CAM_REQ_INVALID; - ccb_h->status &= ~CAM_SIM_QUEUED; - goto done; - } -#endif + /* save ccb ptr */ cmd->ccb_ptr = ccb; @@ -624,13 +588,8 @@ mrsas_startio(struct mrsas_softc *sc, struct cam_sim *sim, * Start timer for IO timeout. Default timeout value is 90 second. */ cmd->callout_owner = true; -#if (__FreeBSD_version >= 1000510) callout_reset_sbt(&cmd->cm_callout, SBT_1S * 180, 0, mrsas_scsiio_timeout, cmd, 0); -#else - callout_reset(&cmd->cm_callout, (180000 * hz) / 1000, - mrsas_scsiio_timeout, cmd); -#endif if (mrsas_atomic_read(&sc->fw_outstanding) > sc->io_cmds_highwater) sc->io_cmds_highwater++; @@ -1435,13 +1394,8 @@ mrsas_map_request(struct mrsas_softc *sc, if (cmd->data != NULL) { /* Map data buffer into bus space */ mtx_lock(&sc->io_lock); -#if (__FreeBSD_version >= 902001) retcode = bus_dmamap_load_ccb(sc->data_tag, cmd->data_dmamap, ccb, mrsas_data_load_cb, cmd, 0); -#else - retcode = bus_dmamap_load(sc->data_tag, cmd->data_dmamap, cmd->data, - cmd->length, mrsas_data_load_cb, cmd, BUS_DMA_NOWAIT); -#endif mtx_unlock(&sc->io_lock); if (retcode) device_printf(sc->mrsas_dev, "bus_dmamap_load(): retcode = %d\n", retcode); diff --git a/sys/dev/mrsas/mrsas_ioctl.h b/sys/dev/mrsas/mrsas_ioctl.h index adba0d52951a..07ee211714cc 100644 --- a/sys/dev/mrsas/mrsas_ioctl.h +++ b/sys/dev/mrsas/mrsas_ioctl.h @@ -49,9 +49,6 @@ __FBSDID("$FreeBSD$"); #ifdef COMPAT_FREEBSD32 /* Compilation error FIX */ -#if (__FreeBSD_version <= 900000) -#include -#endif #include #include #endif diff --git a/sys/dev/mrsas/mrsas_linux.c b/sys/dev/mrsas/mrsas_linux.c index 11ce3c3f8d54..1b5739652d5d 100644 --- a/sys/dev/mrsas/mrsas_linux.c +++ b/sys/dev/mrsas/mrsas_linux.c @@ -43,11 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include -#if (__FreeBSD_version >= 1001511) #include -#elif (__FreeBSD_version > 900000) -#include -#endif #include #include @@ -108,10 +104,7 @@ mrsas_linux_modevent(module_t mod __unused, int cmd __unused, void *data __unuse static int mrsas_linux_ioctl(struct thread *p, struct linux_ioctl_args *args) { -#if (__FreeBSD_version >= 1000000) cap_rights_t rights; - -#endif struct file *fp; int error; u_long cmd = args->cmd; @@ -120,14 +113,7 @@ mrsas_linux_ioctl(struct thread *p, struct linux_ioctl_args *args) error = ENOTSUP; goto END; } -#if (__FreeBSD_version >= 1000000) error = fget(p, args->fd, cap_rights_init_one(&rights, CAP_IOCTL), &fp); -#elif (__FreeBSD_version <= 900000) - error = fget(p, args->fd, &fp); -#else /* For FreeBSD version greater than - * 9.0.0 but less than 10.0.0 */ - error = fget(p, args->fd, CAP_IOCTL, &fp); -#endif if (error != 0) goto END;