From patchwork Mon Jun 17 03:39:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Gilbert X-Patchwork-Id: 10997891 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0584F1398 for ; Mon, 17 Jun 2019 03:39:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7ACD2858A for ; Mon, 17 Jun 2019 03:39:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D8DAE28812; Mon, 17 Jun 2019 03:39:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9DCB2858A for ; Mon, 17 Jun 2019 03:39:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727652AbfFQDjp (ORCPT ); Sun, 16 Jun 2019 23:39:45 -0400 Received: from smtp.infotech.no ([82.134.31.41]:37763 "EHLO smtp.infotech.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727648AbfFQDjp (ORCPT ); Sun, 16 Jun 2019 23:39:45 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp.infotech.no (Postfix) with ESMTP id 5EBC620426C for ; Mon, 17 Jun 2019 05:39:44 +0200 (CEST) X-Virus-Scanned: by amavisd-new-2.6.6 (20110518) (Debian) at infotech.no Received: from smtp.infotech.no ([127.0.0.1]) by localhost (smtp.infotech.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FbT9h4TAmuWt for ; Mon, 17 Jun 2019 05:39:38 +0200 (CEST) Received: from xtwo70.bingwo.ca (host-45-58-224-183.dyn.295.ca [45.58.224.183]) by smtp.infotech.no (Postfix) with ESMTPA id F1F0F204187 for ; Mon, 17 Jun 2019 05:39:37 +0200 (CEST) From: Douglas Gilbert To: linux-scsi@vger.kernel.org Subject: [PATCH 00/18] sg: add v4 interface Date: Sun, 16 Jun 2019 23:39:16 -0400 Message-Id: <20190617033934.5051-1-dgilbert@interlog.com> X-Mailer: git-send-email 2.17.1 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patchset extends the SCSI generic (sg) driver found in lk 5.3 . The sg driver has a version number which is visible via an ioctl() and is bumped from 3.5.36 to 4.0.03 by this patchset. The additions and changes are described in some detail in this long webpage: http://sg.danny.cz/sg/sg_v40.html Most new features described in the above webpage are not implemented in this patchset. Features that are not included are file descriptor sharing, request sharing, multiple requests (in one invocation) and the extended ioctl(). A latter patchset may add those features. The SG_IOSUMIT, SG_IOSUBMIT_V3, SG_IORECEIVE and SG_IORECEIVE_V3 ioctls are added in this patchset. Testing: The sg3_utils package has several extensions in sg3_utils-1.45 beta (revision 826) to support and test the version 4 sg driver presented in this patchset. The new and revised testing utilities are outlined on the same webpage as above in the second half of the section titled: "15 Downloads and testing". This patchset is against Martin Petersen's 5.3/scsi-queue branch. It will also apply to lk 5.1 and probably lk 5.0 . Douglas Gilbert (18): sg: move functions around sg: remove typedefs, type+formatting cleanup sg: sg_log and is_enabled sg: rework sg_poll(), minor changes sg: bitops in sg_device sg: make open count an atomic sg: move header to uapi section sg: speed sg_poll and sg_get_num_waiting sg: sg_allow_if_err_recovery and renames sg: remove most access_ok functions sg: replace rq array with lists sg: sense buffer rework sg: add sg v4 interface support sg: rework debug info sg: add 8 byte SCSI LUN to sg_scsi_id sg: expand sg_comm_wr_t sg: add sg_iosubmit_v3 and sg_ioreceive_v3 ioctls sg: bump version to 4.0.03 drivers/scsi/sg.c | 4373 ++++++++++++++++++++++++++-------------- include/scsi/sg.h | 268 +-- include/uapi/scsi/sg.h | 373 ++++ 3 files changed, 3269 insertions(+), 1745 deletions(-) create mode 100644 include/uapi/scsi/sg.h