Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp737848pxb; Thu, 25 Feb 2021 13:54:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVHJwBGc3GUEc4h12ZKjS8CGIBj0LEPhZ8uwT+5CjULx2o3sXFvndKITNLFqqsapp6BRLS X-Received: by 2002:a17:906:c1ca:: with SMTP id bw10mr4852564ejb.510.1614290087724; Thu, 25 Feb 2021 13:54:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614290087; cv=none; d=google.com; s=arc-20160816; b=aXQGSTW2kyfK9sU/gYeBgYGJ9vqUBVdZ895oDMMxMPTCo4kZ7ZM68udk+jhQrhknyO KbryMldYDlLoX7hdKPioiq1RLM1gDxpZ5QTJ9q+qgxRniVjPWTXpTda35G0yh5UJEMIn Au2KD/gH2l1k08bLpyCccbOhz40x5df3zbUTWvV6HdXsa3jWqOCk0GTTDPjSxR1ntXh4 FfeyOm8Zjx0wAsEsdidnfm3ZD1sJ+ozPlmgA5UtBoUF7hEw4wpSoE1qXUmmhQ0CV8mi9 iKq8/H61onDL/aBBaJExuuknA+gzwtyVYn0IcU8wNN0cMwPH+tTKPlhx3TSUHOsQXbsq YQzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UvwvlC54y4paFAvsUh+rgdZ3V7FM+LNSvEGafGNoUvM=; b=v6TaTJCqtY3BDBATtKiMGOUcT7bN7Cr3N/OPReH7objHGGpF4iGCUM8aH/+1SXKSzk qKxW8tzgtwlU4uY+N8BeLQOShLezVrx8KjFFoDIyFSRsa8+YbvNwg4Gu1S70hL6rxnmw Lk4iWzn9hoq6HHPYiwV2xyJmAh/8jqc1q88G04EEQcUfgrGyutoVU2aLo1JsL5Ek8/lS vrSUnF4n1JtgCPOI4MbbWvhuwvq0Ca/44sH1y/CPuTk90IGQFnHMWPQpIVVmnQfrbEfN VfIfenv112jIexjwIE9EtXea5g8shrl4zW9FMHpsf1BriSuovrkQtXTdqONEQzzuVzal Rc9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=dEdIKAuS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u16si3934378eds.13.2021.02.25.13.54.24; Thu, 25 Feb 2021 13:54:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=dEdIKAuS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234663AbhBYVxB (ORCPT + 99 others); Thu, 25 Feb 2021 16:53:01 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:20628 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233637AbhBYVvt (ORCPT ); Thu, 25 Feb 2021 16:51:49 -0500 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11PLX3Ol075512; Thu, 25 Feb 2021 16:51:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=UvwvlC54y4paFAvsUh+rgdZ3V7FM+LNSvEGafGNoUvM=; b=dEdIKAuS8RSLkUTkGASbZTNS7f2/FTDs+KtPsH81b/a14KgiUJHZ9cz8jb2Fr6grveyY hU2QLj7Oa/BGG+88LnQUUxHOVEZX4Ywt2dJeN7Valeh80whVlFP0g3F1aizM+8vrjaKP b89DpJtseD2Mm7RYjH0K4IFlRCQNvaAdz9nC+uKFZBkLW0g7Dgw1182x4sa8FaeH5KBe Ie18jio6zaD4hSVghAZTOj2syQ5mD8BE9J8bid1XYczxog4JEzNuG4HCUdtQftBsGvsS cS9IPWlo9AiY+WJrmjMPc/mzI2n4Mq9Lw/VBIUOLdQGhqXfeVYXGHQatiydfIzAJDToV kw== Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 36xh9953x5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 16:51:03 -0500 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 11PLmBX9008671; Thu, 25 Feb 2021 21:51:02 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma04wdc.us.ibm.com with ESMTP id 36tt2a1vn2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 21:51:01 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 11PLp0aV38207892 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Feb 2021 21:51:00 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 96BD66E052; Thu, 25 Feb 2021 21:51:00 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4EA496E04E; Thu, 25 Feb 2021 21:51:00 +0000 (GMT) Received: from vios4361.aus.stglabs.ibm.com (unknown [9.3.43.61]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 25 Feb 2021 21:51:00 +0000 (GMT) From: Tyrel Datwyler To: james.bottomley@hansenpartnership.com Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, brking@linux.ibm.com, Tyrel Datwyler Subject: [PATCH v4 5/5] ibmvfc: reinitialize sub-CRQs and perform channel enquiry after LPM Date: Thu, 25 Feb 2021 15:50:57 -0600 Message-Id: <20210225215057.23020-6-tyreld@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210225215057.23020-1-tyreld@linux.ibm.com> References: <20210225215057.23020-1-tyreld@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-02-25_14:2021-02-24,2021-02-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 phishscore=0 suspectscore=0 mlxlogscore=999 impostorscore=0 mlxscore=0 lowpriorityscore=0 spamscore=0 bulkscore=0 clxscore=1015 adultscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102250163 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A live partition migration (LPM) results in a CRQ disconnect similar to a hard reset. In this LPM case the hypervisor moslty perserves the CRQ transport such that it simply needs to be reenabled. However, the capabilities may have changed such as fewer channels, or no channels at all. Further, its possible that there may be sub-CRQ support, but no channel support. The CRQ reenable path currently doesn't take any of this into consideration. For simpilicty release and reinitialize sub-CRQs during reenable, and set do_enquiry and using_channels with the appropriate values to trigger channel renegotiation. fixes: faacf8c5f1d5 ("ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels") Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index ef03fa559433..1e2ea21713ad 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -903,6 +903,9 @@ static int ibmvfc_reenable_crq_queue(struct ibmvfc_host *vhost) { int rc = 0; struct vio_dev *vdev = to_vio_dev(vhost->dev); + unsigned long flags; + + ibmvfc_release_sub_crqs(vhost); /* Re-enable the CRQ */ do { @@ -914,6 +917,15 @@ static int ibmvfc_reenable_crq_queue(struct ibmvfc_host *vhost) if (rc) dev_err(vhost->dev, "Error enabling adapter (rc=%d)\n", rc); + spin_lock_irqsave(vhost->host->host_lock, flags); + spin_lock(vhost->crq.q_lock); + vhost->do_enquiry = 1; + vhost->using_channels = 0; + spin_unlock(vhost->crq.q_lock); + spin_unlock_irqrestore(vhost->host->host_lock, flags); + + ibmvfc_init_sub_crqs(vhost); + return rc; } -- 2.27.0