Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp486528pxu; Tue, 1 Dec 2020 16:58:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJxkntuKs9kdLyhIh7VNwOj+u+3LYJWhoUrkv6eCAQ4C51xFVdwuSp6/AwajyTwlBIEvby4v X-Received: by 2002:aa7:c603:: with SMTP id h3mr294520edq.254.1606870733708; Tue, 01 Dec 2020 16:58:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606870733; cv=none; d=google.com; s=arc-20160816; b=jekVvN0ew9VmXv5W6erN8EIefBZlAZeeBAWxTb8yvAk0+kt2FU6oTmbXchdDolqT6v 32yFh2vrKU9EACTM9lN5i+w+AGTMel6UyEsZ3V2RusAYS1blpC1t1vWJ2gke2qhWqaQw mhM62C0TFs/62ygeYL1yP9IXKTmP4ARhpze2wwWYU8hRBb9L6zuYiwO6XSdEgZVIO6i6 nioByA/BitYvZj1lO2TqJHKfJ06rhhPyTCrRqifxQ/Y8mWKo6DO3Or7p7czvU+aj7Llw 1HJcrwTJ9b8b39XYIg5WPzjJZUbUROdbknrJrOWGfJYgyUyOAsNT2ivuHOgaEz46s/qE QcqQ== 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=Z2vhjZhm7GoP5hnLOxhFY06wdaOFKem263lQkV4c8To=; b=zO8D1lyTuT0IrVcdVLFpbk/8dSelDGyQYfUYhr8kupFo1hMzcofECxX+ageR+SJ97Y cn+DhY8dRqghXipilKyDAGcATrkaGJZMfUWliLOK4CiqEg5zsJtjv5274EPL8KeCQeoe x+Z1LVUAdOPaF1rPL2OKWaxl8UnUVPmAt4RN+5Kw5ptQpMT9WBevnYeQ4+jEqk7ebQmI pFJ1z3jd6HZolRfP8Wfovj3BQcqyikHWPqibouNT5xO5QOuApxEtq8x2al6YgvJVxuBd heVOQE0Em7W04uhtsCwysagku6XlpXPrGJHm9nFIQnvwCvCywxnz/Y4+Z7xYJjC8I/Ed zcFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=HAuimD4s; 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 se15si1019303ejb.270.2020.12.01.16.58.31; Tue, 01 Dec 2020 16:58:53 -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=HAuimD4s; 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 S1727910AbgLBAzp (ORCPT + 99 others); Tue, 1 Dec 2020 19:55:45 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:37014 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726023AbgLBAzo (ORCPT ); Tue, 1 Dec 2020 19:55:44 -0500 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B20WAIO073360; Tue, 1 Dec 2020 19:54:55 -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=Z2vhjZhm7GoP5hnLOxhFY06wdaOFKem263lQkV4c8To=; b=HAuimD4sAw3la1sOXnwalVVDUwqfQr9dGSf1f5JMg+On16WtkyrABRe9szdx64HgMc+b pDqSbu9i0xhLADAUVqEQAw3RKxpqdtVlQO88tjkHqiz2lfh/kN99YAF17RwxGPfrvzJD 2ftyDTUXiuNBwuhPRB7xjbXZ/R2ToayLFt4yx8s6yppk5lM1qv/pryIb3A+yTH7xMlCG /gwi+29W0jUTbty5QqS+vqxpSo+kut05v9K9a48ULvvpSLnmXAtDfPI674uLzaeKaD2h 1vho6sbMV8JtJLbMSkFURQidvtEPG5zl6KgoA1UdzXtYIhylCVlgsIwF6oFDRun6W6Jq GQ== Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0b-001b2d01.pphosted.com with ESMTP id 355k52u2ed-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 01 Dec 2020 19:54:53 -0500 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0B20f525016202; Wed, 2 Dec 2020 00:54:52 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma01wdc.us.ibm.com with ESMTP id 355vrfhrjm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Dec 2020 00:54:52 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0B20ragN15401224 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 Dec 2020 00:53:36 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6D8C07805F; Wed, 2 Dec 2020 00:53:36 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 078D47805E; Wed, 2 Dec 2020 00:53:36 +0000 (GMT) Received: from vios4361.aus.stglabs.ibm.com (unknown [9.3.43.61]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 2 Dec 2020 00:53:35 +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 v2 10/17] ibmvfc: advertise client support for using hardware channels Date: Tue, 1 Dec 2020 18:53:22 -0600 Message-Id: <20201202005329.4538-11-tyreld@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201202005329.4538-1-tyreld@linux.ibm.com> References: <20201202005329.4538-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-01_12:2020-11-30,2020-12-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 lowpriorityscore=0 mlxscore=0 malwarescore=0 priorityscore=1501 phishscore=0 bulkscore=0 impostorscore=0 spamscore=0 clxscore=1015 adultscore=0 suspectscore=1 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012010142 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 bfd3340eb0b6..0e6c9e55a221 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