From patchwork Tue May 24 06:15:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 575928 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 6F9A5C433F5 for ; Tue, 24 May 2022 06:16:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234147AbiEXGQV (ORCPT ); Tue, 24 May 2022 02:16:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234249AbiEXGQN (ORCPT ); Tue, 24 May 2022 02:16:13 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29CFCF593 for ; Mon, 23 May 2022 23:16:12 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id D973721A56; Tue, 24 May 2022 06:16:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1653372970; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H/1ETwxkJukyVVDocUCoC35f8IAK29K1uZ3fU9P2d/Y=; b=nsWZxpZnxjYoY3fB8z2q5RbFaaOY2OW6vs+CibXdldhTAB/vbxSDVK8OsD6IV1tVPvdMpm 2pVo+JgIDd7ftlc9vbAXVkpH/GhqZA0mmY9RNHYnmvSTxcjd05HwxgFy9afiuwx0tsPw/6 8ZnAKYmFZpUc4WbYAzRH6DWu7ZwCG4E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1653372970; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H/1ETwxkJukyVVDocUCoC35f8IAK29K1uZ3fU9P2d/Y=; b=+q1hsAv+ZSEQsgBpwoDPbaeZwVA3lh2UZaDp0s9XAE5ihZKPZRMbPktShOvhttUj3+mPNV Bpy5hAp1KiP0gWAQ== Received: from adalid.arch.suse.de (adalid.arch.suse.de [10.161.8.13]) by relay2.suse.de (Postfix) with ESMTP id CA5002C152; Tue, 24 May 2022 06:16:10 +0000 (UTC) Received: by adalid.arch.suse.de (Postfix, from userid 16045) id B1F08519464A; Tue, 24 May 2022 08:16:10 +0200 (CEST) From: Hannes Reinecke To: "Martin K. Petersen" Cc: Christoph Hellwig , James Bottomley , linux-scsi@vger.kernel.org, Hannes Reinecke , Bart Van Assche , Johannes Thumshirn Subject: [PATCH 09/16] ibmvfc: use fc_block_rport() Date: Tue, 24 May 2022 08:15:55 +0200 Message-Id: <20220524061602.86760-10-hare@suse.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20220524061602.86760-1-hare@suse.de> References: <20220524061602.86760-1-hare@suse.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Use fc_block_rport() instead of fc_block_scsi_eh() as the latter will be deprecated. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Johannes Thumshirn --- drivers/scsi/ibmvscsi/ibmvfc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 1287153ec053..dcae22ecb31f 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -2857,12 +2857,13 @@ static int ibmvfc_abort_task_set(struct scsi_device *sdev) static int ibmvfc_eh_abort_handler(struct scsi_cmnd *cmd) { struct scsi_device *sdev = cmd->device; + struct fc_rport *rport = starget_to_rport(scsi_target(sdev)); struct ibmvfc_host *vhost = shost_priv(sdev->host); int cancel_rc, block_rc; int rc = FAILED; ENTER; - block_rc = fc_block_scsi_eh(cmd); + block_rc = fc_block_rport(rport); ibmvfc_wait_while_resetting(vhost); if (block_rc != FAST_IO_FAIL) { cancel_rc = ibmvfc_cancel_all(sdev, IBMVFC_TMF_ABORT_TASK_SET); @@ -2890,12 +2891,13 @@ static int ibmvfc_eh_abort_handler(struct scsi_cmnd *cmd) static int ibmvfc_eh_device_reset_handler(struct scsi_cmnd *cmd) { struct scsi_device *sdev = cmd->device; + struct fc_rport *rport = starget_to_rport(scsi_target(sdev)); struct ibmvfc_host *vhost = shost_priv(sdev->host); int cancel_rc, block_rc, reset_rc = 0; int rc = FAILED; ENTER; - block_rc = fc_block_scsi_eh(cmd); + block_rc = fc_block_rport(rport); ibmvfc_wait_while_resetting(vhost); if (block_rc != FAST_IO_FAIL) { cancel_rc = ibmvfc_cancel_all(sdev, IBMVFC_TMF_LUN_RESET);