From patchwork Fri Aug 13 13:49:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 496564 Delivered-To: patch@linaro.org Received: by 2002:a02:cf8a:0:0:0:0:0 with SMTP id w10csp585283jar; Fri, 13 Aug 2021 06:54:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzu5c9s+H0dsUpQe7BksnwGCs2DwWeWUYffkCtI7zG1MjWU9kWnMpjMB7oK5jjBkbnAGW1d X-Received: by 2002:a17:906:769a:: with SMTP id o26mr2662855ejm.18.1628862851332; Fri, 13 Aug 2021 06:54:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628862851; cv=none; d=google.com; s=arc-20160816; b=rtqPsiMcs1czi6LCyCRGekJD0qEvuwM2g6dNThVqZoYg0tKR3ua9b++VNOWGIujjK+ boNadIzY6IbtYuG78apLMvGvv1tzaPQ66YFWH7m7df9OdY2uWUiPm/wJnco1Lu8NGjw3 mrlHzK+zZEhErF+b+XledqGG6UvD95u7eTxu/tZN+rFP9fLspv7vC7ZzNP3KMIOn7gF1 JSUiZeRRm+Ytqt29bda0h2dHJf4k13mHF9jlZvExVGQxXDmbyqkeRuXXLDSNGJXd4Be7 f+WPSASQGipy4EeltwCmUUVXH4wA7igobKSUoxRwl1TaehUupcAQznT5ih1ffN/w6b+G TiXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=u4K6I3ZosRRoJgbkkk1qOY1ny0jl6Jb/RVFFVGqcUPY=; b=frruCSsUd6Dgxse/B1+AAyHBXHkZofFLSO8Rd7BIWTfdkzZ/SIzBZmBB5yqodKkpYO o1BkfrmelufZm/Jca3X2u8zeQEFEg3V/1dFSudGmalwWaMib0iCAX9QwMiby94npF8wU /4bAfJwRZyfeHVQm2Hqr5dDlSyERVJhxWKHs/9S7UZlnawV+lkcmeCtglM6I6yhmpgwv y2NITvcjvXduRDWp0iebt47TFgoHAeDdgLfH1vBirbXj9ZXM/Qch6jiAkzN6HILMPQAh FneT16LBwjFN8LBgE713QZ3UBAP666a863RN7AO16uWxxRuJKItI2g0/wvcOuKoneCVc XYyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id aq6si1764414ejc.589.2021.08.13.06.54.11 for ; Fri, 13 Aug 2021 06:54:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240755AbhHMNyf (ORCPT ); Fri, 13 Aug 2021 09:54:35 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3647 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240678AbhHMNye (ORCPT ); Fri, 13 Aug 2021 09:54:34 -0400 Received: from fraeml736-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4GmQ4h4Dl2z6GBx3; Fri, 13 Aug 2021 21:53:24 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml736-chm.china.huawei.com (10.206.15.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Fri, 13 Aug 2021 15:54:06 +0200 Received: from localhost.localdomain (10.69.192.58) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 13 Aug 2021 14:54:03 +0100 From: John Garry To: , , , , CC: , , , , , John Garry Subject: [PATCH 1/3] scsi: wd719: Stop using scsi_cmnd.tag Date: Fri, 13 Aug 2021 21:49:11 +0800 Message-ID: <1628862553-179450-2-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1628862553-179450-1-git-send-email-john.garry@huawei.com> References: <1628862553-179450-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Use scsi_cmd_to_rq(cmd)->tag instead. Signed-off-by: John Garry --- drivers/scsi/wd719x.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 2.26.2 Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche diff --git a/drivers/scsi/wd719x.c b/drivers/scsi/wd719x.c index edc8a139a60d..622aec075aba 100644 --- a/drivers/scsi/wd719x.c +++ b/drivers/scsi/wd719x.c @@ -466,14 +466,16 @@ static int wd719x_abort(struct scsi_cmnd *cmd) unsigned long flags; struct wd719x_scb *scb = scsi_cmd_priv(cmd); struct wd719x *wd = shost_priv(cmd->device->host); + struct device *dev = &wd->pdev->dev; - dev_info(&wd->pdev->dev, "abort command, tag: %x\n", cmd->tag); + dev_info(dev, "abort command, tag: %x\n", scsi_cmd_to_rq(cmd)->tag); - action = /*cmd->tag ? WD719X_CMD_ABORT_TAG : */WD719X_CMD_ABORT; + action = /*tag ? WD719X_CMD_ABORT_TAG : */WD719X_CMD_ABORT; spin_lock_irqsave(wd->sh->host_lock, flags); result = wd719x_direct_cmd(wd, action, cmd->device->id, - cmd->device->lun, cmd->tag, scb->phys, 0); + cmd->device->lun, scsi_cmd_to_rq(cmd)->tag, + scb->phys, 0); wd719x_finish_cmd(scb, DID_ABORT); spin_unlock_irqrestore(wd->sh->host_lock, flags); if (result) From patchwork Fri Aug 13 13:49:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 496565 Delivered-To: patch@linaro.org Received: by 2002:a02:cf8a:0:0:0:0:0 with SMTP id w10csp585338jar; Fri, 13 Aug 2021 06:54:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWotlxwxRxH93hnY7BBfks+uJEpqg+5UavXdQtbvB4HOs1HxTSsHgajBv2NFZN/6eNy6Bn X-Received: by 2002:a17:906:4a51:: with SMTP id a17mr2517198ejv.435.1628862854610; Fri, 13 Aug 2021 06:54:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628862854; cv=none; d=google.com; s=arc-20160816; b=TUu3YPrDKbLa6M8OuOzNGgbDzNu7iBYr6bOz6qGt6bHhmFrRBX5uClFF8JSVHOV9Mk T99Lg9dN057j5Y1m5buoTD2YRCCDg/T+oOjpaAlsoFIjMkfQDlJRCn0B+Nn/hfrNYfbK lFzhj+3gIPD6PJmtlFiRYpFwkBS7UgXaN98VaQGs2WDpwQ49v0/GbV66TKOcGtjmM0wq PRBPqe84XBOQG3TYbD872GKW6oGF0/9biob6MmoAOzBk2nn2zY4Jz/jbIjR32afaMoOA 9/TkswNofDB7hc0tJWPSIg4GuLPbl5FH/QPQScee3ulb2VrRlhLN3Dxjt9S/rRP1NIZG GAJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=aUDtlGi3kW5PjimkWmIWUVsfjpe7bJQtlrvZYOmJzQY=; b=BHBauvybPK37Z+dqf5XmjnmVYHdiwnvg3zGx1kU4uRaZuLII6H2EjcwyIIule8gsVt icasScHpD4cwYNG96FyW3Tt2c2AgmIYETchLCrAlvsn4EnsFLn8vs+S0Oswt0jnJYzCD 15VEWOtlYr1lPzWDYhQ800Skt6eY2TY413lP3fNRXfxZMDioSI3/uqN6LBvSBUyUvo8P 5P8WnudgOY3nWDZCVnQ6DH3aHQcXYbqkruOFIk4p1/A3y7ngH4nZSkHr8p0zwmTHXCJw f77O4MTsaCPD4ZL9yWQ/TQELqpckE6Wr3yVkopzly0CglLCwKbnEbUYGvUYgzmKTf1Sb XCuw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id aq6si1764414ejc.589.2021.08.13.06.54.14 for ; Fri, 13 Aug 2021 06:54:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240763AbhHMNyj (ORCPT ); Fri, 13 Aug 2021 09:54:39 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3648 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240753AbhHMNyh (ORCPT ); Fri, 13 Aug 2021 09:54:37 -0400 Received: from fraeml737-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4GmQ4p5mwHz6GDFx; Fri, 13 Aug 2021 21:53:30 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml737-chm.china.huawei.com (10.206.15.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Fri, 13 Aug 2021 15:54:08 +0200 Received: from localhost.localdomain (10.69.192.58) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 13 Aug 2021 14:54:06 +0100 From: John Garry To: , , , , CC: , , , , , John Garry Subject: [PATCH 2/3] scsi: fnic: Stop setting scsi_cmnd.tag Date: Fri, 13 Aug 2021 21:49:12 +0800 Message-ID: <1628862553-179450-3-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1628862553-179450-1-git-send-email-john.garry@huawei.com> References: <1628862553-179450-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org It is never read. Setting it and the request tag seems dodgy anyway. Signed-off-by: John Garry --- drivers/scsi/fnic/fnic_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.26.2 Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c index 0f9cedf78872..f8afbfb468dc 100644 --- a/drivers/scsi/fnic/fnic_scsi.c +++ b/drivers/scsi/fnic/fnic_scsi.c @@ -2213,7 +2213,7 @@ fnic_scsi_host_start_tag(struct fnic *fnic, struct scsi_cmnd *sc) if (IS_ERR(dummy)) return SCSI_NO_TAG; - sc->tag = rq->tag = dummy->tag; + rq->tag = dummy->tag; sc->host_scribble = (unsigned char *)dummy; return dummy->tag; From patchwork Fri Aug 13 13:49:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 496566 Delivered-To: patch@linaro.org Received: by 2002:a02:cf8a:0:0:0:0:0 with SMTP id w10csp585398jar; Fri, 13 Aug 2021 06:54:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywr1i6Q2jPxBBJotkFW//sv5RyNOL2fdyyuzOL7/i9LWc8gN6SjLG0IPliB7S9VxI0b0q8 X-Received: by 2002:a17:906:b0d1:: with SMTP id bk17mr2558037ejb.59.1628862858341; Fri, 13 Aug 2021 06:54:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628862858; cv=none; d=google.com; s=arc-20160816; b=0oRv7SXq9XGe1ZSsmbLUGoCkIT7ihV7RqXd9879VBIhdIQeq0Cyv/CSVAyDPDLxRPP hdjUxT/2mS8YQ2tGlqqOng4fOQyeDkR+X/tef1myKoRCE7S6RxRmIcMMZgQJfLXZaBdm sNJYD3/2LLgEmqRmzdAd+c7kgFUMQGxOycCZhuHmB8fjvcD86+ndnRSAysLeL9dSwsbJ +puELB8BfSmQKSUPVzWyoCbtKPgE9USMewWq2pRM/FzXPVzNScmCQqAep8Is/klgL1vM I6/QEEPP5zIbHUbtCAyvplI76FGu25KcqpZFHaKTRgXRETJti/Gn4NDYoCiWW8VbFIOS uLkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=ouYD2uzqHwhOw9HjkxPBeYRFEny971PJHszhpTZS0YA=; b=T1XlU3YyiDLi4eUGfOdQ58TiZUI7gReJNfLGY5j1gaNTsj1gNtYr0lTF3kpsYcI4N7 na6587Y5MaE3jJzhfLrnvDULq8sI4cvCfdVDI02oH+dy51ux9oflSdvS6/lDv3wvayE+ 4f9rg5zr6Xbdud1ywabn7dI+xJ0huOh+zxmSUlVTgE+UHein3XPI48FYA6+xl8nggu1a yIDwWAYDHTuuaTZy2+oHSEbfA5wCZvZ8srHtQIR1Xtv2iR1dHeOuQTpIydOj2SLHn4Ps d2Jag20wuMYyI60gg1I6TcUIpgx8G4gqrh0nGbRdyvN9k4YIlA/sc6WvOkTvdUqcmu1N P3xA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id aq6si1764414ejc.589.2021.08.13.06.54.18 for ; Fri, 13 Aug 2021 06:54:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240785AbhHMNyn (ORCPT ); Fri, 13 Aug 2021 09:54:43 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3649 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240762AbhHMNyj (ORCPT ); Fri, 13 Aug 2021 09:54:39 -0400 Received: from fraeml735-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4GmQ4m5BBYz6D8Vt; Fri, 13 Aug 2021 21:53:28 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml735-chm.china.huawei.com (10.206.15.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Fri, 13 Aug 2021 15:54:11 +0200 Received: from localhost.localdomain (10.69.192.58) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 13 Aug 2021 14:54:08 +0100 From: John Garry To: , , , , CC: , , , , , John Garry Subject: [PATCH 3/3] scsi: Remove scsi_cmnd.tag Date: Fri, 13 Aug 2021 21:49:13 +0800 Message-ID: <1628862553-179450-4-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1628862553-179450-1-git-send-email-john.garry@huawei.com> References: <1628862553-179450-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org It is never read, so get rid of it. Signed-off-by: John Garry --- drivers/scsi/scsi_lib.c | 1 - include/scsi/scsi_cmnd.h | 1 - 2 files changed, 2 deletions(-) -- 2.26.2 Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 9ba1aa7530a9..572673873ddf 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1540,7 +1540,6 @@ static blk_status_t scsi_prepare_cmd(struct request *req) scsi_init_command(sdev, cmd); - cmd->tag = req->tag; cmd->prot_op = SCSI_PROT_NORMAL; if (blk_rq_bytes(req)) cmd->sc_data_direction = rq_dma_dir(req); diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 6c5a1c1c6b1e..eaf04c9a1dfc 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -139,7 +139,6 @@ struct scsi_cmnd { int flags; /* Command flags */ unsigned long state; /* Command completion state */ - unsigned char tag; /* SCSI-II queued command tag */ unsigned int extra_len; /* length of alignment and padding */ };