From nobody Thu Jul 25 05:13:29 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 4WTzYj5JPdz5RHcp; Thu, 25 Jul 2024 05:13:29 +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 4WTzYj31DHz4bGb; Thu, 25 Jul 2024 05:13:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721884409; 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=OZ3RA4IvKDQRXe4TgTgCX0Zd+r2Fj8emIXMvZGtLl/Q=; b=Z/nMmoGwk9zu1sJ518vfdHMsnq3MYEwcJP0vtPCVMMh0xtjlRvsNrrghq3WZ7EqRf5FzWx Tg647ScVFLC40geot4A3BnP3LHnfPiC+XG9XBRtw915cRFUYlx5IowffDeWNlhjyMeZOJv /gNv/52KG0pRWC62Pg1E92OHBUXCgjJp/HF4THm0M8w+9EVrRz416xR6MMwYl4g4GrRKKc 3f9oTsbhj+U3zraLSdrKnKohjj9avOUEcZCwU5+vtO3iHnR9XGrmOiTdHhDOyemf9ujYrz rUm2L0CVZsFOMMo00b3jAyZylM5+T8Wchvg6lXtjdUcFDbF558Y4RX1T2D/Z7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721884409; a=rsa-sha256; cv=none; b=JPZVB0ETEvWEa/+dwKp4syfxHlpnBFb6iHHw9ViVPaDaUCVi87uljrUFdfF6RSBo1s4hC3 r0/7PDFgNJVEd81SmrpENsBrbtGKI4qTI+MU2pMQv02ScxJOwucESmBeRurykyTqUNHwlp 6sV0EcSnRjZCZqcAcoHT0p3fcuU9ybfiG1J3wjfLjx4eRHJXhIikdUovSXzhQFSsbT3uH3 63cziP2yrHmkns4zDUmrR4JXZDai2AXPPbbfmJZbJSQzW5bKC4gNONY63/9+WR9ohws+wi EECUCyqNETRXM8iM88sBZwwTvZQgk0KM6QHNCWl3esseT5M/Qp3WuvMSV3YboQ== 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=1721884409; 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=OZ3RA4IvKDQRXe4TgTgCX0Zd+r2Fj8emIXMvZGtLl/Q=; b=qRoajqq47Ng7v0V8pRTXn1hBYuwr6RQj8gDc34O5bd9AC4frkoTbSwn7ZHClrY6XCO/Frp zjwOlIJAFAgPaslWIsw4H+sG9zJ7MjXyHrhbYXmy+SWH4wt64Zuyr2kKi2NP+YgE83HyOY swISrFVgaFGxMQriA3jAsywD5zuo5WXijRbFk6zmJ1raaRhQPUtXvbC4QbtuWMJg8+TwUu PGDU6D63vKRz5eSMloMX6pmWNfLZVUWsNEEGOXyML8QXOYXR77Xf6bCvIEFpuidBVahmEJ ANT4N18mh7dw00omQItTpHPYilJZ0H97RXFuv6rYMVVgWni4b9dCtwKEt191UA== 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 4WTzYj2dYfzhjk; Thu, 25 Jul 2024 05:13:29 +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 46P5DT7L082676; Thu, 25 Jul 2024 05:13:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46P5DTLp082673; Thu, 25 Jul 2024 05:13:29 GMT (envelope-from git) Date: Thu, 25 Jul 2024 05:13:29 GMT Message-Id: <202407250513.46P5DTLp082673@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: 4eee292ab663 - main - Revert "cam: better ioctl compatibility for cd" 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4eee292ab66316c01bae887e6d5a3468e1c27e77 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4eee292ab66316c01bae887e6d5a3468e1c27e77 commit 4eee292ab66316c01bae887e6d5a3468e1c27e77 Author: Warner Losh AuthorDate: 2024-07-25 05:03:41 +0000 Commit: Warner Losh CommitDate: 2024-07-25 05:09:57 +0000 Revert "cam: better ioctl compatibility for cd" This reverts commit 028b16e2088a682c1abfb74fa5eb7ff64405ffff. The wrong version wound up in my branch, revert while I find the right version. Sponsored by: Netflix --- sys/cam/cam_compat.c | 6 ------ sys/cam/cam_periph.c | 22 +--------------------- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/sys/cam/cam_compat.c b/sys/cam/cam_compat.c index 896b071f86dc..fdb4ee8717ec 100644 --- a/sys/cam/cam_compat.c +++ b/sys/cam/cam_compat.c @@ -49,12 +49,6 @@ #include -/* - * Note: struct cdev *dev parameter here is simply passed through. For cdioctl - * we need to pass down a struct periph * which has been cast to a cdev and that - * is cast back again in cdioctl_dev(). - */ - static int cam_compat_handle_0x17(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td, d_ioctl_t *cbfnp); static int cam_compat_handle_0x18(struct cdev *dev, u_long cmd, caddr_t addr, diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index ed90ef91abce..e957edee67f1 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -1122,20 +1122,6 @@ cam_periph_unmapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo) return (error); } -static int -cam_periph_ioctl_compat(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) -{ - struct cam_periph *periph; - - /* - * For compat, we need to cast struct periph * into struct cdev *dev and - * then back again. - */ - periph = (struct cam_periph *)(void *)dev; - cam_periph_assert(periph, MA_OWNED); - return (cam_periph_ioctl(periph, cmd, addr, cderror)); -} - int cam_periph_ioctl(struct cam_periph *periph, u_long cmd, caddr_t addr, int (*error_routine)(union ccb *ccb, @@ -1192,13 +1178,7 @@ cam_periph_ioctl(struct cam_periph *periph, u_long cmd, caddr_t addr, break; default: - /* - * We assume that the compat layer doesn't care about - * the dev parameter. It just passes it through, so - * cheat a little. - */ - error = cam_compat_ioctl((struct cdev *)(void *)periph, - cmd, addr, flag, td, cam_periph_ioctl_compat); + error = ENOTTY; break; } return(error);