From nobody Mon May 06 22:30:27 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 4VYGM76xkVz5JTnp; Mon, 06 May 2024 22:30:27 +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 4VYGM76RBgz4S4L; Mon, 6 May 2024 22:30:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715034627; 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=7RwjYpNZ6sSW+JMTyDkdR6LMrLK9lc17qA9+yUhWH20=; b=skRn/GyCNavx8ft12vAkVLY1cIK2e6cb9SM1bKj5lZ+h7MtpupFoIR61JzhQV8Yb64rKJ7 8jiETW8/t/1VAN0yuuaQz7oDDtYOEyVcnewT/Af8mhWlFscKxPDbJALJd6mNyoVtGBi4WK S8oUxTso0kSsyxXrsKx/wn4qktvczP+VsTtrWzhX5nMaT8rhPPXeHDE8jGzJu2mAmFWh3K 6JlGXGFsa8ne0dIrjpflqYlKLDkp0d1lDEpU4/pEvi3nrJteqJKT4n2b6psOZwtNvKjcX/ p7mHjnK4OuG+pBKVLAJP3QFBE1bJrMKrWCt2/3YUvwIgfm2UAIsHEc4DCUwJDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715034627; a=rsa-sha256; cv=none; b=sXsubZPqUsTrekYB4KCc2ybdxaS+Xx8MvG2wzcY7tSYdOiRc1SO5H8oulRiEhqJWaYFvIm gC+p2Oo4pPaRuC/VPuRMx3e13zwLyKvEmwoUrNi9dfomDS1ajsz37/lyvP3A7sMlDAgk2m FDibvHViv5XYn2fwp8nxRfAaPgBcdIzhjiEaTIHEPwnE/DhXhhJBbApbH7qVvBSkW58qMs RZgldIeXcf92dXiqVJqHRRX4V4uJzIP/U32OvzyRE1z5er/IPmyzq3tElgzhmFerLEv3bJ h44kLHUft0bzopYewyjKlMsA820jDidFudhwig+fquzCFjixZvW1cTVFvsLvJw== 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=1715034627; 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=7RwjYpNZ6sSW+JMTyDkdR6LMrLK9lc17qA9+yUhWH20=; b=pFE+p7AcFyC/ccr0xaGQ6ZYdi0n1DGHKJ78Mcr6bxidggJC2Kg2gSDUK7oV79KXNZ5AQ62 bRyiuzUBc5T656Mvtveaw+TAEKcv+Gcp1hcD5XBN3s+U4SFILALtkqW8bdgxWWC4eD4GAW 9i/hJ07p9qv0vXdk+kcxB527KP86x2Qeq0cB0ELNbuwZOY4oB64rH4er5OYvsCqNTPqPtb nTFhnA2cCxYZaUwOo/FCfqLKwbXFkTubRixiR8jzgaCYgpcGUdQRitgAvQaL+X8RhQOwcp lJdzUP94LHSjZan9bfChXIhlpF3gdvYhonaiOldrvdCyIW/KTDxJVjP3odJMcA== 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 4VYGM7620TzFf4; Mon, 6 May 2024 22:30:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 446MURAE061454; Mon, 6 May 2024 22:30:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 446MURp8061451; Mon, 6 May 2024 22:30:27 GMT (envelope-from git) Date: Mon, 6 May 2024 22:30:27 GMT Message-Id: <202405062230.446MURp8061451@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: 08b452033834 - main - sg: Add sg(4) man page 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: 08b4520338349bc065ec184b32a6e700cb8e34ec Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=08b4520338349bc065ec184b32a6e700cb8e34ec commit 08b4520338349bc065ec184b32a6e700cb8e34ec Author: Warner Losh AuthorDate: 2024-05-06 22:28:09 +0000 Commit: Warner Losh CommitDate: 2024-05-06 22:29:58 +0000 sg: Add sg(4) man page Add minimal sg(4) manual page. This implements a subset of the Linux IOCTL interface for either native FreeBSD programs, or for Linux binaries in the linuxulator. Noticed by: Lexi Winter Sponsored by: Netflix --- share/man/man4/Makefile | 1 + share/man/man4/sg.4 | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 32ea3a1b6991..5503637611bd 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -494,6 +494,7 @@ MAN= aac.4 \ send.4 \ ses.4 \ ${_sfxge.4} \ + sg.4 \ sge.4 \ siba.4 \ siftr.4 \ diff --git a/share/man/man4/sg.4 b/share/man/man4/sg.4 new file mode 100644 index 000000000000..bf7cb93cfb09 --- /dev/null +++ b/share/man/man4/sg.4 @@ -0,0 +1,63 @@ +.\" +.\" Copyright (c) 2024 Netflix, Inc. +.\" +.\" SPDX-License-Expression: BSD-2-Clause +.\" +.Dd May 6, 2024 +.Dt SG 4 +.Os +.Sh NAME +.Nm sg +.Nd Linux ioclt-compatible SCSI passthru device +.Sh SYNOPSIS +.Cd device sg +.Cd device scbus +.Sh DESCRIPTION +The +.Nm +driver provides a Linux compatible scsi passthru device. +This driver attaches to all +.Xr cam 4 +peripheral devices. +It is similar to the +.Xr pass 4 +device, but uses the Linux interfaces, rather than the FreeBSD CAM interfaces. +.Sh IOCTL +The following subset of the Linux sg ioctl interfaces are implemented: +.Bl -tag -width 12 +.It Va SG_SET_TIMEOUT +.Fa u_int to +Set the timeout in milliseconds. +.It Va SG_GET_TIMEOUT +Get the timeout in milliseconds +.It Va SG_GET_RESERVED_SIZE +.Fa u_int +Returns the size of the I/O one can do this device. +.It Va SG_GET_SCSI_ID +.Fa struct sg_scsi_id +Returns the bus number, channel, scsi bus ID number, lun and other information +about the SCSI device. +.It Va SG_GET_SG_TABLESIZE +.Fa u_int +Returns the table size, though hard wired to 0. +.It Va SG_GET_VERSION_NUM +.Fa u_int +Return the version number that is implemented. +.It Va SG_IO +.Fa struct sg_io_hdr +.El +All other ioctl interfaces return +.Va ENODEV . +.Sh FILES +.Bl -tag -width ".Pa /dev/sg*" -compact +.It Pa /dev/sg* +Passthru devices. +.El +.Sh SEE ALSO +.Xr cam 4 , +.Xr pass 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 7.0 .