From patchwork Sun May 9 21:43:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 432935 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4204C433B4 for ; Sun, 9 May 2021 21:43:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 99669613C9 for ; Sun, 9 May 2021 21:43:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229876AbhEIVoX (ORCPT ); Sun, 9 May 2021 17:44:23 -0400 Received: from mail-pg1-f180.google.com ([209.85.215.180]:47055 "EHLO mail-pg1-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229815AbhEIVoU (ORCPT ); Sun, 9 May 2021 17:44:20 -0400 Received: by mail-pg1-f180.google.com with SMTP id m124so11863229pgm.13 for ; Sun, 09 May 2021 14:43:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BMjPvho0aXfcqdw6F9RPLM21ijwP7wFLH3CxLZw+RoI=; b=jFolYTCN2dkmtwdAFIL45tioijF58YEWCUy29WtfHjltMTGNNzpdI/+ZIiy8C3BzEo dZvV0sjEq+7N4fihCZzC3kvP8zge0HfKASoTzIz6fSDrB+sYRAanf5/Zjq8UHKOTmKHU apQmcR8qpkb3tahCD6prhRw3X198Nm34hcgj/27enb3D0+WtuN/xaqE5O9aBfFueRVhU pTpewaJlVC+i37+QxeOuCn/9HTj9WbZ1jn41WTWD1/P7ut3yXup2pbv1Dj3gd/JCsjIy 2ZNKkSRh+ngn3g6d6T3dXLcGcZ6Tt7/k4ph6N0dBvwSI2k2PfdQOKfck0TvB6B0rl85y Lb2g== X-Gm-Message-State: AOAM533VlsgR8TK8EpYGpKhIc7R1Vw0ijbn1ctBUkGJcfCX/TDFxWnQ3 iIqbXVWWuxVcmL/u0YnEe4RVdEcRi5g= X-Google-Smtp-Source: ABdhPJwt8TPOswxh037ga2uUqIuKzk6+n1ak87c6Odva/S25cPv7enHICcINhX2n12kYtsy0wBrVcw== X-Received: by 2002:a63:d710:: with SMTP id d16mr21910642pgg.214.1620596596415; Sun, 09 May 2021 14:43:16 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:1f3e:222f:39bb:cb2e]) by smtp.gmail.com with ESMTPSA id t4sm9712567pfq.165.2021.05.09.14.43.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 May 2021 14:43:15 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Hannes Reinecke , Ming Lei , Bart Van Assche Subject: [PATCH 1/7] Introduce scsi_get_pos() Date: Sun, 9 May 2021 14:43:01 -0700 Message-Id: <20210509214307.4610-2-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210509214307.4610-1-bvanassche@acm.org> References: <20210509214307.4610-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Since scsi_get_lba() returns a sector_t value instead of the LBA, the name of that function is confusing. Introduce an identical function scsi_get_pos(). A later patch will remove scsi_get_lba(). Signed-off-by: Bart Van Assche --- include/scsi/scsi_cmnd.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index adb8df40b942..8147b1c0f265 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -290,6 +290,11 @@ static inline sector_t scsi_get_lba(struct scsi_cmnd *scmd) return blk_rq_pos(scmd->request); } +static inline sector_t scsi_get_pos(struct scsi_cmnd *scmd) +{ + return blk_rq_pos(scmd->request); +} + static inline unsigned int scsi_prot_interval(struct scsi_cmnd *scmd) { return scmd->device->sector_size; From patchwork Sun May 9 21:43:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 433411 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 559F0C433ED for ; Sun, 9 May 2021 21:43:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 35B7F613C5 for ; Sun, 9 May 2021 21:43:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229925AbhEIVoX (ORCPT ); Sun, 9 May 2021 17:44:23 -0400 Received: from mail-pg1-f179.google.com ([209.85.215.179]:36555 "EHLO mail-pg1-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229662AbhEIVoW (ORCPT ); Sun, 9 May 2021 17:44:22 -0400 Received: by mail-pg1-f179.google.com with SMTP id c21so11904418pgg.3 for ; Sun, 09 May 2021 14:43:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nSv5X4y9sOkTjDLwOr2XKXeP6Cfhir7BXtEsp9sc/Hc=; b=FMU33u5XSK2CogrcYirrUS00vgUyaWGWctfGdt7UTzSq95ZiRLBAL+McRVmUdTQtKx XzSl7kFaeZRA7BNamiY4g2qLgg7du63XYn700IxgTX60fAW5a50cySvsclCz7duehy2M U9WjxpmulTcZX2W3xhJ3W6yMRZOtzAjSsb8fLsI+YL5Bt5nnTBwA2sPL6yPrMbTvLUUY ADL4I5Hbwt6NOfiG+Dv8jtg7TvN58NFrNnvlP5hWv7ejm8YfZWqbYx9/7yzlbemJkZWa GCNrhHxVgPIZn53dTuNg+rBdqc5zl2KdhjvI5FMjpgrNi/wJnV9FHJnYSBOzv5WCLMDM u3ZQ== X-Gm-Message-State: AOAM532oSuY0+1ubx4O1si0GJC0KCgGNoDzTrBen21KT85djoTL0FMA/ PqULDA53vSMEYSvp16XVU0M= X-Google-Smtp-Source: ABdhPJxN1cVG/omkovcQXjSFIE6uAkzVmWWRYD7fR0K6VLCT1yp+9a5TtY2s31WjBa8uOh6rYZ6WZQ== X-Received: by 2002:aa7:8d5a:0:b029:227:7b07:7d8b with SMTP id s26-20020aa78d5a0000b02902277b077d8bmr21346530pfe.26.1620596597838; Sun, 09 May 2021 14:43:17 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:1f3e:222f:39bb:cb2e]) by smtp.gmail.com with ESMTPSA id t4sm9712567pfq.165.2021.05.09.14.43.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 May 2021 14:43:17 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Hannes Reinecke , Ming Lei , Bart Van Assche , Sagi Grimberg Subject: [PATCH 2/7] iser: Use scsi_get_pos() instead of scsi_get_lba() Date: Sun, 9 May 2021 14:43:02 -0700 Message-Id: <20210509214307.4610-3-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210509214307.4610-1-bvanassche@acm.org> References: <20210509214307.4610-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Use scsi_get_pos() instead of scsi_get_lba() since the name of the latter is confusing. This patch does not change any functionality. Cc: Sagi Grimberg Signed-off-by: Bart Van Assche --- drivers/infiniband/ulp/iser/iser_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c index 136f6c4492e0..c33e113eeee5 100644 --- a/drivers/infiniband/ulp/iser/iser_verbs.c +++ b/drivers/infiniband/ulp/iser/iser_verbs.c @@ -949,7 +949,7 @@ u8 iser_check_task_pi_status(struct iscsi_iser_task *iser_task, sector_t sector_off = mr_status.sig_err.sig_err_offset; sector_div(sector_off, sector_size + 8); - *sector = scsi_get_lba(iser_task->sc) + sector_off; + *sector = scsi_get_pos(iser_task->sc) + sector_off; iser_err("PI error found type %d at sector %llx " "expected %x vs actual %x\n", From patchwork Sun May 9 21:43:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 432934 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6B96C43461 for ; Sun, 9 May 2021 21:43:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A756B613C9 for ; Sun, 9 May 2021 21:43:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229867AbhEIVoZ (ORCPT ); Sun, 9 May 2021 17:44:25 -0400 Received: from mail-pg1-f176.google.com ([209.85.215.176]:45919 "EHLO mail-pg1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229933AbhEIVoY (ORCPT ); Sun, 9 May 2021 17:44:24 -0400 Received: by mail-pg1-f176.google.com with SMTP id q15so7654276pgg.12 for ; Sun, 09 May 2021 14:43:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zneIuWKx5plbkVRnqUaXhx2tWvAwP5VCwlHKgsx7wvc=; b=UNeE+dsVC1EQ6LBI88CZy3TMf0Rnu4W7D6CTuQEwKVGaYKg/HciwLilX3v6epV3jjV Ke2MbpKqqGBSfb2COnC4yZIukfWlCiTimGndPB+2sM41nGy2vCSfhYc+xJA6ew717Kpd Y1BXSQAymKSEDURxpXWS1T/jcBddlt2jP9qBq0Y8O/6iCEueJMUHAMdGC6tM57efsYjL agWESRCkiDelhcXZM4vxDVyFIjWSmC22/ABqW2wQJUsjoujM1qHxxrWtq3SNvNwgP0Pq Eqzyk4hGNWU/p89p2M3ZHcATcmDGjzDDlhAxC/sQudMyz9H/3dQBf9h5jKGfxAj45M7P qGjA== X-Gm-Message-State: AOAM532g4yh4KI57W2dTBGrhe+qsU0Eve+tZTnL26jQi1J3QKFb+uhiU BABAuKWZGBbzy1aGehtV1Vw= X-Google-Smtp-Source: ABdhPJwlYB7noWC5LEYtiWUz4Lo+Tv6Cgw/o52rq1e4fVu/PJ31bC9ihgnQq4YpmmW9CSpgDrZE9Ew== X-Received: by 2002:a62:1ec1:0:b029:24d:b3de:25be with SMTP id e184-20020a621ec10000b029024db3de25bemr21540931pfe.17.1620596599370; Sun, 09 May 2021 14:43:19 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:1f3e:222f:39bb:cb2e]) by smtp.gmail.com with ESMTPSA id t4sm9712567pfq.165.2021.05.09.14.43.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 May 2021 14:43:18 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Hannes Reinecke , Ming Lei , Bart Van Assche , Benjamin Block Subject: [PATCH 3/7] zfcp: Use scsi_get_pos() instead of scsi_get_lba() Date: Sun, 9 May 2021 14:43:03 -0700 Message-Id: <20210509214307.4610-4-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210509214307.4610-1-bvanassche@acm.org> References: <20210509214307.4610-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Use scsi_get_pos() instead of scsi_get_lba() since the name of the latter is confusing. Additionally, use lower_32_bits() instead of open-coding it. This patch does not change any functionality. Cc: Benjamin Block Signed-off-by: Bart Van Assche --- drivers/s390/scsi/zfcp_fsf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 2e4804ef2fb9..ae308ef06714 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -2600,7 +2600,7 @@ int zfcp_fsf_fcp_cmnd(struct scsi_cmnd *scsi_cmnd) if (scsi_get_prot_op(scsi_cmnd) != SCSI_PROT_NORMAL) { io->data_block_length = scsi_cmnd->device->sector_size; - io->ref_tag_value = scsi_get_lba(scsi_cmnd) & 0xFFFFFFFF; + io->ref_tag_value = lower_32_bits(scsi_get_pos(scsi_cmnd)); } if (zfcp_fsf_set_data_dir(scsi_cmnd, &io->data_direction)) From patchwork Sun May 9 21:43:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 433410 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81905C433ED for ; Sun, 9 May 2021 21:43:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 507C6613C9 for ; Sun, 9 May 2021 21:43:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229940AbhEIVo0 (ORCPT ); Sun, 9 May 2021 17:44:26 -0400 Received: from mail-pg1-f171.google.com ([209.85.215.171]:44886 "EHLO mail-pg1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229840AbhEIVoZ (ORCPT ); Sun, 9 May 2021 17:44:25 -0400 Received: by mail-pg1-f171.google.com with SMTP id y32so11877311pga.11 for ; Sun, 09 May 2021 14:43:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/uEiR8Myw753xwA4FBJJWxbBNnQCiKa0NeoVyaUQmYs=; b=YAItiyJoeyWVnUI5W5MfUPRNMumuA7sMRkevNz6i7u3lLBd67twf6J3lDUlqocS/Rd LsK4otwKCN324tM69eu5De6qg9wuMOETkqjY3xmNHfh/Gqdcauf2jxw36Ygq/CwDNeTS FBT102zVwvmEQ0AMbg7PX6uwx6NEri9iFUejd4ZDw4rHdBIXYx9WIP6i40JntdXoTmlK Xo9nfWnEOISNPP+2AnW+fflRL2kve9ogt1A578yGHlq5PlvyUdt5SiSSkxnPf8zRrQMy nK5iZWMOTRbWlBz32TIHtqwv+tHSNkkkuMIpm/R+871cCCefKAjmLbqOFsM3+e9XdO0X k6AQ== X-Gm-Message-State: AOAM532F0UakXZSOOFv3q1t8vdmORxhhMxD5FntAJ17S3LiJIWqBvrMp 9cFykBJZoC1w5vCieg+gV58= X-Google-Smtp-Source: ABdhPJzIyOs3JBUOdil7EUqE8qi4lb54IiUfSzF1OBp4V7GjA8ia1Of2csxsM/HPQW+614sj9zZOfA== X-Received: by 2002:a62:8fd2:0:b029:28e:8c64:52a4 with SMTP id n201-20020a628fd20000b029028e8c6452a4mr22130785pfd.3.1620596600896; Sun, 09 May 2021 14:43:20 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:1f3e:222f:39bb:cb2e]) by smtp.gmail.com with ESMTPSA id t4sm9712567pfq.165.2021.05.09.14.43.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 May 2021 14:43:20 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Hannes Reinecke , Ming Lei , Bart Van Assche , Lee Duncan Subject: [PATCH 4/7] iscsi: Use scsi_get_pos() instead of scsi_get_lba() Date: Sun, 9 May 2021 14:43:04 -0700 Message-Id: <20210509214307.4610-5-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210509214307.4610-1-bvanassche@acm.org> References: <20210509214307.4610-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Use scsi_get_pos() instead of scsi_get_lba() since the name of the latter is confusing. Additionally, use lower_32_bits() instead of open-coding it. This patch does not change any functionality. Cc: Lee Duncan Signed-off-by: Bart Van Assche Reviewed-by: Lee Duncan --- drivers/scsi/isci/request.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c index e7c6cb4c1556..1c25f28385fd 100644 --- a/drivers/scsi/isci/request.c +++ b/drivers/scsi/isci/request.c @@ -341,7 +341,7 @@ static void scu_ssp_ireq_dif_insert(struct isci_request *ireq, u8 type, u8 op) tc->reserved_E8_0 = 0; if ((type & SCSI_PROT_DIF_TYPE1) || (type & SCSI_PROT_DIF_TYPE2)) - tc->ref_tag_seed_gen = scsi_get_lba(scmd) & 0xffffffff; + tc->ref_tag_seed_gen = lower_32_bits(scsi_get_pos(scmd)); else if (type & SCSI_PROT_DIF_TYPE3) tc->ref_tag_seed_gen = 0; } @@ -369,7 +369,7 @@ static void scu_ssp_ireq_dif_strip(struct isci_request *ireq, u8 type, u8 op) tc->app_tag_gen = 0; if ((type & SCSI_PROT_DIF_TYPE1) || (type & SCSI_PROT_DIF_TYPE2)) - tc->ref_tag_seed_verify = scsi_get_lba(scmd) & 0xffffffff; + tc->ref_tag_seed_verify = lower_32_bits(scsi_get_pos(scmd)); else if (type & SCSI_PROT_DIF_TYPE3) tc->ref_tag_seed_verify = 0; From patchwork Sun May 9 21:43:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 432933 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FB64C433B4 for ; Sun, 9 May 2021 21:43:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1D219613C5 for ; Sun, 9 May 2021 21:43:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229898AbhEIVo1 (ORCPT ); Sun, 9 May 2021 17:44:27 -0400 Received: from mail-pf1-f178.google.com ([209.85.210.178]:40463 "EHLO mail-pf1-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229946AbhEIVo0 (ORCPT ); Sun, 9 May 2021 17:44:26 -0400 Received: by mail-pf1-f178.google.com with SMTP id x188so12247903pfd.7 for ; Sun, 09 May 2021 14:43:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8jH2Jxi9XojAxNVkKHEc9MTbyOFDVnZbcqlLKnfbM78=; b=LaGGIn8w0dB/IyVwZiZIq2eHopUwJzcg7YM0yjojKK81LgLU8s7dcjvFjAZZaOR0t8 9fj9jBfl/S5tzgx/rG+4wc2OOdx1sk03JMeV9RWivnsiu4b5YaIEXhXq7klw8h6FlJRt fyLkXeRDfZIMX96/TtpZFqa+NqJzgToAHTCiZiNy4bfreAvmCoNfVoQJvM3c5GQsv7nm gZcTT3Z1JlDcGyGqk/pBtdYLSZwTancCi1+g6KHqul+CXnE5N4SSd2Ie49uv7wUtaDpy yy5wuZb+QZWIoqzOj2rEafdpUV0s+WFNXC2zAw7LeQmiTjyEcnsN0a/Y9CYR2wvQUOOr ZG1A== X-Gm-Message-State: AOAM5311wKD+fThwVCjIDirkHfTwM6wrhBoY5ToDo4SMhVuf8XWqaLBX 9wxyeVGXSoHhUisS/Nsc1tM= X-Google-Smtp-Source: ABdhPJz868R0exg6ThxGdGgXvs+boL54oE2874XVm0/1oweFKXcFE6ObYnMyo191l9m/kCZ4XtmPZA== X-Received: by 2002:aa7:8503:0:b029:27d:497f:1da6 with SMTP id v3-20020aa785030000b029027d497f1da6mr22370189pfn.28.1620596602336; Sun, 09 May 2021 14:43:22 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:1f3e:222f:39bb:cb2e]) by smtp.gmail.com with ESMTPSA id t4sm9712567pfq.165.2021.05.09.14.43.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 May 2021 14:43:21 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Hannes Reinecke , Ming Lei , Bart Van Assche , Nilesh Javali Subject: [PATCH 5/7] qla2xxx: Use scsi_get_pos() instead of scsi_get_lba() Date: Sun, 9 May 2021 14:43:05 -0700 Message-Id: <20210509214307.4610-6-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210509214307.4610-1-bvanassche@acm.org> References: <20210509214307.4610-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Use scsi_get_pos() instead of scsi_get_lba() since the name of the latter is confusing. Additionally, use lower_32_bits() instead of open-coding it. This patch does not change any functionality. Cc: Nilesh Javali Signed-off-by: Bart Van Assche --- drivers/scsi/lpfc/lpfc_scsi.c | 12 ++++++------ drivers/scsi/qla2xxx/qla_iocb.c | 9 +++------ drivers/scsi/qla2xxx/qla_isr.c | 8 ++++---- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index eefbb9b22798..ebce57c7b742 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -2963,7 +2963,7 @@ lpfc_sli4_parse_bg_err(struct lpfc_hba *phba, struct lpfc_io_buf *lpfc_cmd, "9059 BLKGRD: Guard Tag error in cmd" " 0x%x lba 0x%llx blk cnt 0x%x " "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], - (unsigned long long)scsi_get_lba(cmd), + (u64)scsi_get_pos(cmd), blk_rq_sectors(cmd->request), bgstat, bghm); } @@ -2980,7 +2980,7 @@ lpfc_sli4_parse_bg_err(struct lpfc_hba *phba, struct lpfc_io_buf *lpfc_cmd, "9060 BLKGRD: Ref Tag error in cmd" " 0x%x lba 0x%llx blk cnt 0x%x " "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], - (unsigned long long)scsi_get_lba(cmd), + (u64)scsi_get_pos(cmd), blk_rq_sectors(cmd->request), bgstat, bghm); } @@ -2997,7 +2997,7 @@ lpfc_sli4_parse_bg_err(struct lpfc_hba *phba, struct lpfc_io_buf *lpfc_cmd, "9062 BLKGRD: App Tag error in cmd" " 0x%x lba 0x%llx blk cnt 0x%x " "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], - (unsigned long long)scsi_get_lba(cmd), + (u64)scsi_get_pos(cmd), blk_rq_sectors(cmd->request), bgstat, bghm); } @@ -3028,7 +3028,7 @@ lpfc_sli4_parse_bg_err(struct lpfc_hba *phba, struct lpfc_io_buf *lpfc_cmd, break; } - failing_sector = scsi_get_lba(cmd); + failing_sector = scsi_get_pos(cmd); failing_sector += bghm; /* Descriptor Information */ @@ -3041,7 +3041,7 @@ lpfc_sli4_parse_bg_err(struct lpfc_hba *phba, struct lpfc_io_buf *lpfc_cmd, "9068 BLKGRD: Unknown error in cmd" " 0x%x lba 0x%llx blk cnt 0x%x " "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], - (unsigned long long)scsi_get_lba(cmd), + (u64)scsi_get_pos(cmd), blk_rq_sectors(cmd->request), bgstat, bghm); /* Calcuate what type of error it was */ @@ -3174,7 +3174,7 @@ lpfc_parse_bg_err(struct lpfc_hba *phba, struct lpfc_io_buf *lpfc_cmd, break; } - failing_sector = scsi_get_lba(cmd); + failing_sector = scsi_get_pos(cmd); failing_sector += bghm; /* Descriptor Information */ diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index 38b5bdde2405..66e469890a7d 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c @@ -778,8 +778,7 @@ qla24xx_set_t10dif_tags(srb_t *sp, struct fw_dif_context *pkt, * No check for ql2xenablehba_err_chk, as it would be an * I/O error if hba tag generation is not done. */ - pkt->ref_tag = cpu_to_le32((uint32_t) - (0xffffffff & scsi_get_lba(cmd))); + pkt->ref_tag = cpu_to_le32(lower_32_bits(scsi_get_pos(cmd))); if (!qla2x00_hba_err_chk_enabled(sp)) break; @@ -799,8 +798,7 @@ qla24xx_set_t10dif_tags(srb_t *sp, struct fw_dif_context *pkt, pkt->app_tag_mask[0] = 0x0; pkt->app_tag_mask[1] = 0x0; - pkt->ref_tag = cpu_to_le32((uint32_t) - (0xffffffff & scsi_get_lba(cmd))); + pkt->ref_tag = cpu_to_le32(lower_32_bits(scsi_get_pos(cmd))); if (!qla2x00_hba_err_chk_enabled(sp)) break; @@ -824,8 +822,7 @@ qla24xx_set_t10dif_tags(srb_t *sp, struct fw_dif_context *pkt, * 16 bit app tag. */ case SCSI_PROT_DIF_TYPE1: - pkt->ref_tag = cpu_to_le32((uint32_t) - (0xffffffff & scsi_get_lba(cmd))); + pkt->ref_tag = cpu_to_le32(lower_32_bits(scsi_get_pos(cmd))); pkt->app_tag = cpu_to_le16(0); pkt->app_tag_mask[0] = 0x0; pkt->app_tag_mask[1] = 0x0; diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 67229af4c142..d6b405d71f45 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -2632,7 +2632,7 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24) "DIF ERROR in cmd 0x%x lba 0x%llx act ref" " tag=0x%x, exp ref_tag=0x%x, act app tag=0x%x, exp app" " tag=0x%x, act guard=0x%x, exp guard=0x%x.\n", - cmd->cmnd[0], (u64)scsi_get_lba(cmd), a_ref_tag, e_ref_tag, + cmd->cmnd[0], (u64)scsi_get_pos(cmd), a_ref_tag, e_ref_tag, a_app_tag, e_app_tag, a_guard, e_guard); /* @@ -2644,10 +2644,10 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24) (scsi_get_prot_type(cmd) != SCSI_PROT_DIF_TYPE3 || a_ref_tag == be32_to_cpu(T10_PI_REF_ESCAPE))) { uint32_t blocks_done, resid; - sector_t lba_s = scsi_get_lba(cmd); + sector_t pos = scsi_get_pos(cmd); /* 2TB boundary case covered automatically with this */ - blocks_done = e_ref_tag - (uint32_t)lba_s + 1; + blocks_done = e_ref_tag - (uint32_t)pos + 1; resid = scsi_bufflen(cmd) - (blocks_done * cmd->device->sector_size); @@ -2677,7 +2677,7 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24) if (k != blocks_done) { ql_log(ql_log_warn, vha, 0x302f, "unexpected tag values tag:lba=%x:%llx)\n", - e_ref_tag, (unsigned long long)lba_s); + e_ref_tag, (u64)pos); return 1; } From patchwork Sun May 9 21:43:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 433409 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A1F5C433ED for ; Sun, 9 May 2021 21:43:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 39974613C5 for ; Sun, 9 May 2021 21:43:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229953AbhEIVo2 (ORCPT ); Sun, 9 May 2021 17:44:28 -0400 Received: from mail-pf1-f175.google.com ([209.85.210.175]:34508 "EHLO mail-pf1-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229950AbhEIVo1 (ORCPT ); Sun, 9 May 2021 17:44:27 -0400 Received: by mail-pf1-f175.google.com with SMTP id 10so12394366pfl.1 for ; Sun, 09 May 2021 14:43:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OC22MMvqJy/P/6458EekJliNh+cqkEOFyYCS9onfExY=; b=DkSzu8Jed3OFbm/q4KxTlney+I33y+fLfn3KVQPL9DPeq2az/fSfLPD7si17qLtx3A JeLza6rH5IQlGtdFZMQ/E6ZOC9SWKTQNCTO9k4qFbWKoQAOLz1R/BSYj3n3QzXqtQ8SE Ifc6vFTkGw4/8VrbMdrtckENKQBf9pVN36h0Cn5ad9Fu2tlId7+mpB5hc3nWFc9DkGnW yYUPNKaROAENF0/N9r0ZoqvPvLbF1/fgKGcwiYJhacx2Fj+2hMT+IVgGRWYO4t5jvgcp fhRlrdajl6+MzQ7kR7Yd+97QvLadtX7N0fEC2WSitWlJ2plIAVMe3qPPd1uM4Xg87io0 CHNA== X-Gm-Message-State: AOAM533v/NnqEzAZg10Cd+V6SPvf/4N/EAmkdWy28AdP0n2pKSfNIPdH 6TBNYqrt2r0HvX9TRQmlyyg= X-Google-Smtp-Source: ABdhPJx0uVTqvzmGokgp8QdnT3LFJQEHnjOZUH1vl38dHVKp8v2ZYvPMN9JtLdmoA6PZu+gPEszdGg== X-Received: by 2002:aa7:9992:0:b029:28e:b432:190a with SMTP id k18-20020aa799920000b029028eb432190amr21354446pfh.50.1620596603894; Sun, 09 May 2021 14:43:23 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:1f3e:222f:39bb:cb2e]) by smtp.gmail.com with ESMTPSA id t4sm9712567pfq.165.2021.05.09.14.43.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 May 2021 14:43:23 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Hannes Reinecke , Ming Lei , Bart Van Assche , Lee Susman , Subhash Jadavani , Can Guo Subject: [PATCH 6/7] ufs: Fix the tracing code Date: Sun, 9 May 2021 14:43:06 -0700 Message-Id: <20210509214307.4610-7-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210509214307.4610-1-bvanassche@acm.org> References: <20210509214307.4610-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Use scsi_get_pos() instead of scsi_get_lba() since the name of the latter is confusing. Use scsi_get_pos() for all SCSI requests since all SCSI requests have a block layer request attached and hence calling scsi_get_pos() is allowed. Convert the scsi_get_pos() result from sector_t into an LBA with sectors_to_logical(). Since both READ(10) and WRITE(10) have a GROUP NUMBER field, extract the GROUP NUMBER field for both types of commands. Apply the 0x3f mask to that field since the upper two bits are reserved. Rename the 'transfer_len' variable into 'affected_bytes' since it represents the number of bytes affected on the storage medium instead of the size of the SCSI data buffer. Cc: Lee Susman Cc: Subhash Jadavani Cc: Can Guo Signed-off-by: Bart Van Assche --- drivers/scsi/ufs/ufshcd.c | 20 +++++++------------- include/trace/events/ufs.h | 10 +++++----- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 0625da7a42ee..63de6b8a2e26 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -16,6 +16,8 @@ #include #include #include +#include +#include "../sd.h" #include "ufshcd.h" #include "ufs_quirks.h" #include "unipro.h" @@ -366,7 +368,7 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, unsigned int tag, u32 intr, doorbell; struct ufshcd_lrb *lrbp = &hba->lrb[tag]; struct scsi_cmnd *cmd = lrbp->cmd; - int transfer_len = -1; + int affected_bytes = -1; if (!trace_ufshcd_command_enabled()) { /* trace UPIU W/O tracing command */ @@ -378,30 +380,22 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, unsigned int tag, if (cmd) { /* data phase exists */ /* trace UPIU also */ ufshcd_add_cmd_upiu_trace(hba, tag, str_t); + lba = sectors_to_logical(cmd->device, scsi_get_pos(cmd)); + affected_bytes = blk_rq_bytes(cmd->request); opcode = cmd->cmnd[0]; if ((opcode == READ_10) || (opcode == WRITE_10)) { /* * Currently we only fully trace read(10) and write(10) * commands */ - if (cmd->request && cmd->request->bio) - lba = cmd->request->bio->bi_iter.bi_sector; - transfer_len = be32_to_cpu( - lrbp->ucd_req_ptr->sc.exp_data_transfer_len); - if (opcode == WRITE_10) - group_id = lrbp->cmd->cmnd[6]; - } else if (opcode == UNMAP) { - if (cmd->request) { - lba = scsi_get_lba(cmd); - transfer_len = blk_rq_bytes(cmd->request); - } + group_id = lrbp->cmd->cmnd[6] & 0x3f; } } intr = ufshcd_readl(hba, REG_INTERRUPT_STATUS); doorbell = ufshcd_readl(hba, REG_UTP_TRANSFER_REQ_DOOR_BELL); trace_ufshcd_command(dev_name(hba->dev), str_t, tag, - doorbell, transfer_len, intr, lba, opcode, group_id); + doorbell, affected_bytes, intr, lba, opcode, group_id); } static void ufshcd_print_clk_freqs(struct ufs_hba *hba) diff --git a/include/trace/events/ufs.h b/include/trace/events/ufs.h index 1cb6f1afba0e..b36df5b20ad1 100644 --- a/include/trace/events/ufs.h +++ b/include/trace/events/ufs.h @@ -248,10 +248,10 @@ DEFINE_EVENT(ufshcd_template, ufshcd_init, TRACE_EVENT(ufshcd_command, TP_PROTO(const char *dev_name, enum ufs_trace_str_t str_t, - unsigned int tag, u32 doorbell, int transfer_len, u32 intr, + unsigned int tag, u32 doorbell, int affected_bytes, u32 intr, u64 lba, u8 opcode, u8 group_id), - TP_ARGS(dev_name, str_t, tag, doorbell, transfer_len, + TP_ARGS(dev_name, str_t, tag, doorbell, affected_bytes, intr, lba, opcode, group_id), TP_STRUCT__entry( @@ -259,7 +259,7 @@ TRACE_EVENT(ufshcd_command, __field(enum ufs_trace_str_t, str_t) __field(unsigned int, tag) __field(u32, doorbell) - __field(int, transfer_len) + __field(int, affected_bytes) __field(u32, intr) __field(u64, lba) __field(u8, opcode) @@ -271,7 +271,7 @@ TRACE_EVENT(ufshcd_command, __entry->str_t = str_t; __entry->tag = tag; __entry->doorbell = doorbell; - __entry->transfer_len = transfer_len; + __entry->affected_bytes = affected_bytes; __entry->intr = intr; __entry->lba = lba; __entry->opcode = opcode; @@ -281,7 +281,7 @@ TRACE_EVENT(ufshcd_command, TP_printk( "%s: %s: tag: %u, DB: 0x%x, size: %d, IS: %u, LBA: %llu, opcode: 0x%x (%s), group_id: 0x%x", show_ufs_cmd_trace_str(__entry->str_t), __get_str(dev_name), - __entry->tag, __entry->doorbell, __entry->transfer_len, + __entry->tag, __entry->doorbell, __entry->affected_bytes, __entry->intr, __entry->lba, (u32)__entry->opcode, str_opcode(__entry->opcode), (u32)__entry->group_id ) From patchwork Sun May 9 21:43:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 432932 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E822CC433ED for ; Sun, 9 May 2021 21:43:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B1ACA613C9 for ; Sun, 9 May 2021 21:43:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229950AbhEIVoa (ORCPT ); Sun, 9 May 2021 17:44:30 -0400 Received: from mail-pj1-f54.google.com ([209.85.216.54]:37836 "EHLO mail-pj1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229956AbhEIVoa (ORCPT ); Sun, 9 May 2021 17:44:30 -0400 Received: by mail-pj1-f54.google.com with SMTP id k3-20020a17090ad083b0290155b934a295so8919526pju.2 for ; Sun, 09 May 2021 14:43:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5CRYrR8tLOss97dnykfoSW68Pm6YmpN8dAjrxHzMmjs=; b=M+yud5qGJyph4GH2IIoO5gw6ErlgJSfngsJelz3o1aQHQYiUKIIkvIfsAyt0Cx7Tmx C7wiMxY9dVQG6cRL6oXhfciyBZCd356Bzem/6zDuRXgPEg3t9fURYBjWC8tKvttZUv/p lpVs0GjLgbV3lJzuoaDvgstsTz9n5oj/9POSwVuJMT1eAkWi91GnKM/sOsWQUhKurBhI Qrl0/z1bNG39NAeTOkNAxWwxox3LhkhkINJUrrJBmxeZ3LmI6VDW9idtPS+fSqAIP68T BwYXIEQARGR6ANWqTSJzAdr8zPhkcPDLkjHrCCljmciu2aL6OAwi5W+WUHqlGFa5Z89E XnhQ== X-Gm-Message-State: AOAM532zE3pomHQZNYda+URfQgKKSrxn8/+7nEpovv5RrgBu5bkuxNPN 8t2eQfUfBMRa8Bt5tuVDvPg= X-Google-Smtp-Source: ABdhPJyoyHYapkIukvNOTi0XnqZLauBY2HElYQBvnO5rAJBJGF+B3D5StzHs7CYu6livTNcQgJOkCQ== X-Received: by 2002:a17:90a:1a43:: with SMTP id 3mr4659027pjl.154.1620596605245; Sun, 09 May 2021 14:43:25 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:1f3e:222f:39bb:cb2e]) by smtp.gmail.com with ESMTPSA id t4sm9712567pfq.165.2021.05.09.14.43.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 May 2021 14:43:24 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Hannes Reinecke , Ming Lei , Bart Van Assche Subject: [PATCH 7/7] Remove scsi_get_lba() Date: Sun, 9 May 2021 14:43:07 -0700 Message-Id: <20210509214307.4610-8-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210509214307.4610-1-bvanassche@acm.org> References: <20210509214307.4610-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Remove scsi_get_lba() since all callers have been converted to scsi_get_pos(). Signed-off-by: Bart Van Assche --- include/scsi/scsi_cmnd.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 8147b1c0f265..f8084efa9838 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -285,11 +285,6 @@ static inline unsigned char scsi_get_prot_type(struct scsi_cmnd *scmd) return scmd->prot_type; } -static inline sector_t scsi_get_lba(struct scsi_cmnd *scmd) -{ - return blk_rq_pos(scmd->request); -} - static inline sector_t scsi_get_pos(struct scsi_cmnd *scmd) { return blk_rq_pos(scmd->request);