From patchwork Tue Jan 22 18:57:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10776115 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 2DCC21399 for ; Tue, 22 Jan 2019 18:57:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D6342B881 for ; Tue, 22 Jan 2019 18:57:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1177D2B945; Tue, 22 Jan 2019 18:57:45 +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.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 A5A632B881 for ; Tue, 22 Jan 2019 18:57:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726069AbfAVS5o (ORCPT ); Tue, 22 Jan 2019 13:57:44 -0500 Received: from com-out001.mailprotect.be ([83.217.72.83]:52473 "EHLO com-out001.mailprotect.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725973AbfAVS5o (ORCPT ); Tue, 22 Jan 2019 13:57:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mailprotect.be; s=mail; h=Content-Transfer-Encoding:MIME-Version:Message-Id :Date:Subject:Cc:To:From:reply-to:sender:bcc:in-reply-to:references: content-type; bh=Er7Kju5A9OjH6qrMjE/xP/T6ZGHYIJJp0YQggADOjN4=; b=GWW6I5aGNk65 SLn6vBbZixiAYaG5DGAX7vuP3pUipFeFIPlLNtEFzL63jiCAnD7rimV2t+kzb8z6N11LHaUZ51TC9 HwEkn2z49t54pWyhMMByof36ncy0oqUzk/r0H62735PzOjY7a4fFSrUR1UL4W1y2dkGJ+m60bV2Jy L8aRRPeg7B4NxY6B6vCA/A8GwVMvnB14LMeYm64dy3CEV1TCt56aGTVR6lb5F1EzEqFnv7vohVHzy NMvwIh3bGXyc4e+uikpkQbcgr0LgIfbMKCrvteBdP3u8hws9BUp1Odqp8Z2ybZePTkTKBN2KOVp5e OtfAooAphDtraUNZxjkdPA==; Received: from smtp-auth.mailprotect.be ([178.208.39.159]) by com-mpt-out001.mailprotect.be with esmtp (Exim 4.89) (envelope-from ) id 1gm1Ex-00036z-FE; Tue, 22 Jan 2019 19:57:40 +0100 Received: from desktop-bart.svl.corp.google.com (unknown [104.133.8.89]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-auth.mailprotect.be (Postfix) with ESMTPSA id 1C3D1C060F; Tue, 22 Jan 2019 19:57:31 +0100 (CET) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Bart Van Assche Subject: [PATCH 0/7] Fix handling of bidi commands Date: Tue, 22 Jan 2019 10:57:17 -0800 Message-Id: <20190122185724.71598-1-bvanassche@acm.org> X-Mailer: git-send-email 2.20.1.321.g9e740568ce-goog MIME-Version: 1.0 X-Originating-IP: 178.208.39.159 X-SpamExperts-Domain: mailprotect.be X-SpamExperts-Username: 178.208.39.128/27 Authentication-Results: mailprotect.be; auth=pass smtp.auth=178.208.39.128/27@mailprotect.be X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.08) X-Recommended-Action: accept X-Filter-ID: EX5BVjFpneJeBchSMxfU5mikg3YikmuTjMu8BifEmKN602E9L7XzfQH6nu9C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Mg2vu WMdu+65sFAzW X-Report-Abuse-To: spam@com-mpt-mgt001.mailprotect.be 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 Hi Martin, Recently Doug Gilbert reported that handling of bidi commands is broken in the scsi-mq code. This patch series fixes that bug and also simplifies bidi command handling. Please consider these patches for kernel v5.1. Thanks, Bart. Bart Van Assche (7): Introduce the bidi_supported flag in the host template structure Change scsi_cmnd.prot_sdb from a pointer into a regular member Fix bidi handling Introduce scsi_out_cmd() Move several function definitions in Introduce scsi_in_[sg]et_resid() and scsi_out_[sg]et_resid() Move the resid member from struct scsi_data_buffer into struct scsi_cmnd drivers/scsi/iscsi_tcp.c | 8 +--- drivers/scsi/libiscsi.c | 12 ++--- drivers/scsi/scsi_debug.c | 20 +++------ drivers/scsi/scsi_lib.c | 70 ++++++++++++------------------ drivers/scsi/sd.c | 4 +- drivers/scsi/virtio_scsi.c | 4 +- drivers/target/loopback/tcm_loop.c | 8 +--- include/scsi/scsi_cmnd.h | 67 ++++++++++++++++++++-------- include/scsi/scsi_host.h | 2 + 9 files changed, 96 insertions(+), 99 deletions(-)