From patchwork Mon Oct 24 03:20:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Gilbert X-Patchwork-Id: 618683 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D436CFA373D for ; Mon, 24 Oct 2022 03:26:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230450AbiJXD0Y (ORCPT ); Sun, 23 Oct 2022 23:26:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230453AbiJXDYU (ORCPT ); Sun, 23 Oct 2022 23:24:20 -0400 Received: from smtp.infotech.no (smtp.infotech.no [82.134.31.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 72CCE796AD for ; Sun, 23 Oct 2022 20:22:08 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by smtp.infotech.no (Postfix) with ESMTP id 8980F2041C0; Mon, 24 Oct 2022 05:22:07 +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 10Ex5dta122O; Mon, 24 Oct 2022 05:22:07 +0200 (CEST) Received: from treten.bingwo.ca (unknown [10.16.20.11]) by smtp.infotech.no (Postfix) with ESMTPA id 4536D2041AF; Mon, 24 Oct 2022 05:22:06 +0200 (CEST) From: Douglas Gilbert To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, jejb@linux.vnet.ibm.com, hare@suse.de, bvanassche@acm.org Subject: [PATCH v25 44/44] sg: bump version to 4.0.14 Date: Sun, 23 Oct 2022 23:20:58 -0400 Message-Id: <20221024032058.14077-45-dgilbert@interlog.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024032058.14077-1-dgilbert@interlog.com> References: <20221024032058.14077-1-dgilbert@interlog.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Now that the sg version 4 interface is supported: - with ioctl(SG_IO) for synchronous/blocking use - with ioctl(SG_IOSUBMIT) and ioctl(SG_IORECEIVE) for async/non-blocking use Plus new ioctl(SG_IOSUBMIT_V3) and ioctl(SG_IORECEIVE_V3) potentially replace write() and read() for the sg version 3 interface. Bump major driver version number from 3 to 4. The main new feature is the removal of the fixed 16 element array of requests per file descriptor. It is replaced by a xarray (eXtensible array) in their parent which is a sg_fd object (i.e. a file descriptor). The sg_request objects are not freed until the owning file descriptor is closed; instead these objects are re-used when multiple commands are sent to the same file descriptor. Reviewed-by: Hannes Reinecke Signed-off-by: Douglas Gilbert --- drivers/scsi/sg.c | 11 ++++++----- include/uapi/scsi/sg.h | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 9b362583b610..421aa678e9a6 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -7,13 +7,14 @@ * * Original driver (sg.c): * Copyright (C) 1992 Lawrence Foard - * Version 2 and 3 extensions to driver: - * Copyright (C) 1998 - 2019 Douglas Gilbert + * Version 2, 3 and 4 extensions to driver: + * Copyright (C) 1998 - 2022 Douglas Gilbert + * */ -static int sg_version_num = 30901; /* [x]xyyzz where [x] empty when x=0 */ -#define SG_VERSION_STR "3.9.01" /* [x]x.[y]y.zz */ -static char *sg_version_date = "20190606"; +static int sg_version_num = 40014; /* [x]xyyzz where [x] empty when x=0 */ +#define SG_VERSION_STR "4.0.14" /* [x]x.[y]y.zz */ +static char *sg_version_date = "20221016"; #include diff --git a/include/uapi/scsi/sg.h b/include/uapi/scsi/sg.h index 2e1e0cf5d686..b9c2d9783347 100644 --- a/include/uapi/scsi/sg.h +++ b/include/uapi/scsi/sg.h @@ -12,10 +12,10 @@ * Copyright (C) 1992 Lawrence Foard * * Later extensions (versions 2, 3 and 4) to driver: - * Copyright (C) 1998 - 2018 Douglas Gilbert + * Copyright (C) 1998 - 2022 Douglas Gilbert * - * Version 4.0.11 (20190502) - * This version is for Linux 4 and 5 series kernels. + * Version 4.0.14 (20221009) + * This version is for Linux 5 and 6 series kernels. * * Documentation * =============