From nobody Tue Aug 27 18:07:04 2024 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 4Wtb952MDvz52ZKy; Tue, 27 Aug 2024 18:07:05 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wtb950T0Jz4YkG; Tue, 27 Aug 2024 18:07:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724782025; 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=iuJtdy8hV/V75rh4Lyn7TV7Yh23/kYxIhl1c98hEw+8=; b=GEJOUZKC+QfSYjyfARdpkGGJDUiIXx1SeB59Puqz0aZ8ZSY0+pkdKj4I9fwgcsVA8frzZP UZrAcayq+cFZ3DwQDofke3E4Ui0gFg1tkeiYYQ3QVt3tyeG63JRYluV+c/49etVOHuQvPv 6Ht3M1puTb9yHLrTj3MTERiW7tz+51z5vJ6xoI6T2p4OpgyXVeEXOhvMKR1u3GK9j9s4cO s1XN90OnuiOXjOJYScI47vkvjtNywov6bct4OduKn0Bha9irVRthAzTBfl/jGdZsEnkVMG 4/AKsMe4+pU5/amF3o3UL/j33SxBbcCO5czYmXJsmJ2Y3x+F76/NYMpEQbq30Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724782025; a=rsa-sha256; cv=none; b=pTOr0gjVSaSIkTuZsw+6Fr3OpQSp/PUNHokXulbBquZ0+0tyADGVuDmTixnCmr/e4bhP9W E/ZH0+aTniVAkTT5NxXItI8aYM/TDFV0198K7c6CFW9yy1pPsnwCj7ngxHz9+lGhjDnbNy 97T95mDUM+wXDafq5WS8FegMn2ig0NEnbn6DgOvVHDiy3ZaGcg5t7bHAJk5bh0iOLb4iAs tRUmv7PLv93YKw/+Fy8MTIfat2z7woxb4wu+SLQQXgj1kx7R3XNCFKpo+HuiC1tSMEGntr ZPwslaoaJBJS6pCkeB0PJ6Hap2aO0InzyX1bZ8WL/L6HdzmdjyMEuN5IDRYO5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724782025; 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=iuJtdy8hV/V75rh4Lyn7TV7Yh23/kYxIhl1c98hEw+8=; b=CMz8+4ZNoFm6LruhsXA7jbLthe1rVkTmMaAWOgjRfyWFoo53Yb/eA9wlbmK+DER0tYwOPP PmV4CerCjmxCw4nY0UP9qeVthwfOpQdk7YE8s0jvm19bD3AWMU8reOCZvCucbw+RHcoFE4 d4YUAqxJ7XtsaRRopcL6/yGNfHvWpuSl78E1YLbU5DKvN31gbA02R/8JwAgtO3fk9vObEs 6bxn2W8i/dso/QcSs5vy7tEe6vn+lM8hm/zQUCoPoxxxtkj/czMzDo/T2ABruOdZnjp1N/ xBgP7LPszwVRONwuvVyeC9NIiy0Th62uElBwJ3OWJpeLktkw9XJoO/Ich6kH5Q== 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 4Wtb9503mHz111X; Tue, 27 Aug 2024 18:07:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47RI7487093618; Tue, 27 Aug 2024 18:07:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47RI74F0093615; Tue, 27 Aug 2024 18:07:04 GMT (envelope-from git) Date: Tue, 27 Aug 2024 18:07:04 GMT Message-Id: <202408271807.47RI74F0093615@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 8f586587daad - stable/14 - camcontrol: Enable WITH_NVME unconditionally 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8f586587daad64cb1d6c1bca0201bf97f0eae4c1 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8f586587daad64cb1d6c1bca0201bf97f0eae4c1 commit 8f586587daad64cb1d6c1bca0201bf97f0eae4c1 Author: John Baldwin AuthorDate: 2024-04-23 18:46:53 +0000 Commit: John Baldwin CommitDate: 2024-08-27 15:54:45 +0000 camcontrol: Enable WITH_NVME unconditionally MK_NVME is no longer marked broken for any platforms, so just include support for it always as we do for ATA and SCSI. Reviewed by: emaste Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D44841 (cherry picked from commit 2b676a66c00af03e4b64d072658d2478dbdf0a97) --- sbin/camcontrol/Makefile | 4 +--- sbin/camcontrol/camcontrol.c | 14 -------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/sbin/camcontrol/Makefile b/sbin/camcontrol/Makefile index e0407dd20a56..b04eb5614c62 100644 --- a/sbin/camcontrol/Makefile +++ b/sbin/camcontrol/Makefile @@ -14,14 +14,12 @@ SRCS+= progress.c SRCS+= timestamp.c SRCS+= util.c SRCS+= zone.c -.if ${MK_NVME} != "no" .PATH: ${SRCTOP}/sbin/nvmecontrol -CFLAGS+= -I${SRCTOP}/sbin/nvmecontrol -DWITH_NVME +CFLAGS+= -I${SRCTOP}/sbin/nvmecontrol SRCS+= identify_ext.c SRCS+= nc_util.c .PATH: ${SRCTOP}/sys/dev/nvme SRCS+= nvme_util.c -.endif # This is verboten .if ${MACHINE_CPUARCH} == "arm" WARNS?= 3 diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index 555a67001443..db26b45ac508 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -60,9 +60,7 @@ #include #include #include "camcontrol.h" -#ifdef WITH_NVME #include "nvmecontrol_ext.h" -#endif typedef enum { CAM_CMD_NONE, @@ -278,9 +276,7 @@ static int print_dev_ata(struct device_match_result *dev_result, char *tmpstr); static int print_dev_semb(struct device_match_result *dev_result, char *tmpstr); static int print_dev_mmcsd(struct device_match_result *dev_result, char *tmpstr); -#ifdef WITH_NVME static int print_dev_nvme(struct device_match_result *dev_result, char *tmpstr); -#endif static int requestsense(struct cam_device *device, int argc, char **argv, char *combinedopt, int task_attr, int retry_count, int timeout); @@ -600,14 +596,12 @@ getdevtree(int argc, char **argv, char *combinedopt) skip_device = 1; break; } -#ifdef WITH_NVME } else if (dev_result->protocol == PROTO_NVME) { if (print_dev_nvme(dev_result, &tmpstr[0]) != 0) { skip_device = 1; break; } -#endif } else { sprintf(tmpstr, "<>"); } @@ -781,7 +775,6 @@ print_dev_mmcsd(struct device_match_result *dev_result, char *tmpstr) return (0); } -#ifdef WITH_NVME static int nvme_get_cdata(struct cam_device *dev, struct nvme_controller_data *cdata) { @@ -843,7 +836,6 @@ print_dev_nvme(struct device_match_result *dev_result, char *tmpstr) cam_close_device(dev); return (0); } -#endif static int requestsense(struct cam_device *device, int argc, char **argv, @@ -2489,7 +2481,6 @@ ataidentify(struct cam_device *device, int retry_count, int timeout) return (0); } -#ifdef WITH_NVME static int nvmeidentify(struct cam_device *device, int retry_count __unused, int timeout __unused) { @@ -2501,12 +2492,10 @@ nvmeidentify(struct cam_device *device, int retry_count __unused, int timeout __ return (0); } -#endif static int identify(struct cam_device *device, int retry_count, int timeout) { -#ifdef WITH_NVME struct ccb_pathinq cpi; if (get_cpi(device, &cpi) != 0) { @@ -2517,7 +2506,6 @@ identify(struct cam_device *device, int retry_count, int timeout) if (cpi.protocol == PROTO_NVME) { return (nvmeidentify(device, retry_count, timeout)); } -#endif return (ataidentify(device, retry_count, timeout)); } @@ -5410,7 +5398,6 @@ cts_print(struct cam_device *device, struct ccb_trans_settings *cts) "enabled" : "disabled"); } } -#ifdef WITH_NVME if (cts->protocol == PROTO_NVME) { struct ccb_trans_settings_nvme *nvmex = &cts->xport_specific.nvme; @@ -5427,7 +5414,6 @@ cts_print(struct cam_device *device, struct ccb_trans_settings *cts) nvmex->speed, nvmex->max_speed); } } -#endif } /*