From patchwork Thu Oct 15 03:27:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muneendra Kumar M X-Patchwork-Id: 11838863 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 76CE01580 for ; Thu, 15 Oct 2020 10:21:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4CE112224A for ; Thu, 15 Oct 2020 10:21:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="Msv2rVIs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389245AbgJOKVn (ORCPT ); Thu, 15 Oct 2020 06:21:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389243AbgJOKVm (ORCPT ); Thu, 15 Oct 2020 06:21:42 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EE5FC061755 for ; Thu, 15 Oct 2020 03:21:42 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id u3so1736353pjr.3 for ; Thu, 15 Oct 2020 03:21:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4/GAtVgC24BwoogjJsIEcKonml1BrIlHY3WmHjgaPig=; b=Msv2rVIs4JuzQpjG/kIFA/t1mWv4ToS5qqfMTe8E2cvJZu3YX7mHBws6I/MbMmirBS WlYBvSJn+llCT5qF7Rp+nzmqXEKEo67RfwTwJ1QQmFekDORNZBFe2+CPQ5FUj1jVeR0h /Tnk3SgfcBFJDnSWBZTnd9c7zWRjmZ3pvZ+fs= 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; bh=4/GAtVgC24BwoogjJsIEcKonml1BrIlHY3WmHjgaPig=; b=FvyY42tfcyeICvL6J0NVcMS9MHpDgtle2bkeJpPeyxWOjfVcWJTGyPxGD/Zd9qRYn3 EhoOk+eKPp5TztJzaqsvNLuAyjvK6JOwQRuEhqp4KB/63brV0043/fJomA9NBZ/HW+yz sXOsA7XBAHXfKxk8wWDoQdgGfd/EGp2MmNfHm/mD2+HF8CxdsWmuiSUQb+AyjEWonhiU yQ09KfOEXNpL6JTZH1U3X0cAaX3HIG7wCetQ1GfUl4OVZyKsg99fyPc9HlXAgB1F1LGR MQa+f3RgJP6y+uQyu9ZjqmH997sNtiDkepP+AiZIeV4KQuGJJh2+hvvJ8JR/jBlIxyDk QbwA== X-Gm-Message-State: AOAM530nguVw3E4iqSpIkYVael1W7ZAl0WMb7y9W/5AQG2ELTYIHAAig QOl/ws/FckB94c3YHrd6YEYIklkefdpjO3V7gVLuCwHikjMyAQHHdgZkp1LlVQEMePU1o/WwDq2 MKY138G5pt6OR69r1BmdbsO2tObBdnEJZspROhoq/xnX4Znn8npPB8whAoQo7hKzYXfoW4gIfMH TrMHy5u/5m6h0= X-Google-Smtp-Source: ABdhPJyKN2fT8qu1eMxmjHd5suE8Ijv6p6AZvdB4GkIp074cTXuW4AMnamreFLaQIsfKZbLyB2DWXw== X-Received: by 2002:a17:90a:dd46:: with SMTP id u6mr3859376pjv.67.1602757301386; Thu, 15 Oct 2020 03:21:41 -0700 (PDT) Received: from localhost.localdomain ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 194sm2802258pfz.182.2020.10.15.03.21.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2020 03:21:40 -0700 (PDT) From: Muneendra To: linux-scsi@vger.kernel.org, hare@suse.de Cc: jsmart2021@gmail.com, emilne@redhat.com, mkumar@redhat.com, Muneendra Subject: [PATCH v3 12/17] scsi:fnic: Added changes to fc_remote_port_chkready Date: Thu, 15 Oct 2020 08:57:37 +0530 Message-Id: <1602732462-10443-13-git-send-email-muneendra.kumar@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1602732462-10443-1-git-send-email-muneendra.kumar@broadcom.com> References: <1602732462-10443-1-git-send-email-muneendra.kumar@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Added changes to pass a new argument to fc_remote_port_chkready Signed-off-by: Muneendra --- v3: New Patch --- drivers/scsi/fnic/fnic_main.c | 2 +- drivers/scsi/fnic/fnic_scsi.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c index 5f8a7ef8f6a8..f312b4be2846 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c @@ -100,7 +100,7 @@ static int fnic_slave_alloc(struct scsi_device *sdev) { struct fc_rport *rport = starget_to_rport(scsi_target(sdev)); - if (!rport || fc_remote_port_chkready(rport)) + if (!rport || fc_remote_port_chkready(rport, NULL)) return -ENXIO; scsi_change_queue_depth(sdev, fnic_max_qdepth); diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c index d1f7b84bbfe8..943b2bf7aaa4 100644 --- a/drivers/scsi/fnic/fnic_scsi.c +++ b/drivers/scsi/fnic/fnic_scsi.c @@ -452,7 +452,7 @@ static int fnic_queuecommand_lck(struct scsi_cmnd *sc, void (*done)(struct scsi_ return 0; } - ret = fc_remote_port_chkready(rport); + ret = fc_remote_port_chkready(rport, sc); if (ret) { FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, "rport is not ready\n"); @@ -1938,7 +1938,7 @@ int fnic_abort_cmd(struct scsi_cmnd *sc) * port is up, then send abts to the remote port to terminate * the IO. Else, just locally terminate the IO in the firmware */ - if (fc_remote_port_chkready(rport) == 0) + if (fc_remote_port_chkready(rport, sc) == 0) task_req = FCPIO_ITMF_ABT_TASK; else { atomic64_inc(&fnic_stats->misc_stats.rport_not_ready); @@ -2364,7 +2364,7 @@ int fnic_device_reset(struct scsi_cmnd *sc) goto fnic_device_reset_end; /* Check if remote port up */ - if (fc_remote_port_chkready(rport)) { + if (fc_remote_port_chkready(rport, sc)) { atomic64_inc(&fnic_stats->misc_stats.rport_not_ready); goto fnic_device_reset_end; }