Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp159044pxu; Wed, 2 Dec 2020 18:12:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJzMGbrbKQb9zAzJj+/dP/3JW03g6ko3wX/Yz1Ms3PnZ6un7oCrG3qdMtvK+LjMgaASfvlaF X-Received: by 2002:a17:906:6d0b:: with SMTP id m11mr632429ejr.230.1606961538001; Wed, 02 Dec 2020 18:12:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606961537; cv=none; d=google.com; s=arc-20160816; b=MPypu9Yu91G1AhbRgtloL9RRj+ALZI/stbplzGkai7inySulupNolfmt7Oblb9Hp0/ llz49QEgy2X4vOcogeu0a0AHXgMjSoJf+EeKoioe6HMRmOFDwjREfn9uawwX07G1OSKe NGedwjPGJMxjCIjdjLZQX2T++2h+EgF6aKhuk0CZUArVEX5wD1CbrHR0DYhcs0BtQ9Vu 8qL982r7Wcgjr6Ugg3LXLBu2PRoGZWfxmUu0kY4Sz39t3QehG0BT3Bw895bkW2RAv7KX YqjPHyb3xyXn0+/ZA4xJzy5tq8yZrcK2LCPExqMl9dDz2ywtVMvIzp2HfE+S3Vly5EIO yCzQ== 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=Ox50fkjae/OHqq1pLBa+IgDlo9WflP2edAwjFagubcg=; b=piUjW0jVxtLcYYOOoDCXnfP2jtcEhuAKpUGtZ5scWqE2wKQJKHeI1jIwDYb6h8Ht9r gT+bzJEusT4Adelvy2tBMzPL9HuPCrQz4rOa99lHi03ZzgY1r44FS/M8W+8raH0orEfC CiZ5QdQpP6d6YOWcaTQYlhvpYUcaraFQHY91Ofp6ZaFrYXbGknLqwyktFlUej2Qqi8K/ vd4jlyyRdUaS1YVLMGUXygfGSDdtjQxTtiyqyCgjXM/8yZO64EeV2gPZtTS6uMvFQMvx WOWbg0fFvhPmB1gwjmqNgQ2htON5IadRWd+uLC3vlxkjUTnLSZqmkAva4PLmGzCwR5JH wq7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=oqgpdHZa; 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 x17si303824ejw.478.2020.12.02.18.11.55; Wed, 02 Dec 2020 18:12:17 -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=oqgpdHZa; 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 S2387480AbgLCCJU (ORCPT + 99 others); Wed, 2 Dec 2020 21:09:20 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37836 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729411AbgLCCJE (ORCPT ); Wed, 2 Dec 2020 21:09:04 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B3252dY128550; Wed, 2 Dec 2020 21:08:19 -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=Ox50fkjae/OHqq1pLBa+IgDlo9WflP2edAwjFagubcg=; b=oqgpdHZayC3BrmEO49VF3NFfnKNWnaPcFjZtWooWz7j4Mnml0Xcwml+bkSaSuKsNspGT rc25Qjf4rXHaMPqwbSb7MExj1KTL9bepalksq8Vqmc/V4V1uPtJXQqqGbcZm2uVGX+EW P0yb9/ydAYoLTp0CkYFCQB3b1I32zHnmYqyXHQM6sCgrPlXB0CJHxr9ImOoJQgBmQog3 XFOHlXaTkojExPwfQBHmYKxCIWX+TlE4IpGvEpFqLnUFKVJDQoeJBZ7+5KPo6OI2Tj25 w1sm0I37h3mZAWwmhw3S7gyFwb4S0lAt/BCeN9ZEpY2JsF8aUL6P48c8uQXxJWKNTSij 7Q== Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 356p2kh3jp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Dec 2020 21:08:18 -0500 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0B327Xcf010551; Thu, 3 Dec 2020 02:08:18 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma01dal.us.ibm.com with ESMTP id 355rf7pxam-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Dec 2020 02:08:17 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0B328Ga516581324 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 3 Dec 2020 02:08:16 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3517678060; Thu, 3 Dec 2020 02:08:16 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9DB967805F; Thu, 3 Dec 2020 02:08:15 +0000 (GMT) Received: from vios4361.aus.stglabs.ibm.com (unknown [9.3.43.61]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 3 Dec 2020 02:08:15 +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 , Brian King Subject: [PATCH v3 10/18] ibmvfc: advertise client support for using hardware channels Date: Wed, 2 Dec 2020 20:07:58 -0600 Message-Id: <20201203020806.14747-11-tyreld@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201203020806.14747-1-tyreld@linux.ibm.com> References: <20201203020806.14747-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.312,18.0.737 definitions=2020-12-02_14:2020-11-30,2020-12-02 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=1 lowpriorityscore=0 mlxlogscore=999 malwarescore=0 clxscore=1015 impostorscore=0 mlxscore=0 priorityscore=1501 phishscore=0 spamscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012030009 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Previous patches have plumbed the necessary Sub-CRQ interface and channel negotiation MADs to fully channelized hardware queues. Advertise client support via NPIV Login capability IBMVFC_CAN_USE_CHANNELS when the client bits have MQ enabled via vhost->mq_enabled, or when channels were already in use during a subsequent NPIV Login. The later is required because channel support is only renegotiated after a CRQ pair is broken. Simple NPIV Logout/Logins require the client to continue to advertise the channel capability until the CRQ pair between the client is broken. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index d584a4ce0682..0eb91ac86d96 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -1282,6 +1282,10 @@ static void ibmvfc_set_login_info(struct ibmvfc_host *vhost) login_info->max_cmds = cpu_to_be32(max_requests + IBMVFC_NUM_INTERNAL_REQ); login_info->capabilities = cpu_to_be64(IBMVFC_CAN_MIGRATE | IBMVFC_CAN_SEND_VF_WWPN); + + if (vhost->mq_enabled || vhost->using_channels) + login_info->capabilities |= cpu_to_be64(IBMVFC_CAN_USE_CHANNELS); + login_info->async.va = cpu_to_be64(vhost->async_crq.msg_token); login_info->async.len = cpu_to_be32(vhost->async_crq.size * sizeof(*vhost->async_crq.msgs)); strncpy(login_info->partition_name, vhost->partition_name, IBMVFC_MAX_NAME); -- 2.27.0