Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3417488pxb; Tue, 12 Jan 2021 14:16:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJw8WcF2rDD0DxngYshR35zvhrXjcPrEMWEwJSu28K1z+2Pkd9lHEiFa7wQrGGIEOGSBj/h5 X-Received: by 2002:aa7:dcd0:: with SMTP id w16mr1026609edu.229.1610489780674; Tue, 12 Jan 2021 14:16:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610489780; cv=none; d=google.com; s=arc-20160816; b=rxnK1DpeNeoL8gseNPmrvqCDK4S3rF9mL2uyRKDursgEPl+4DdsqcJi1Q7rxKJQJHE yrzkPhybwQTsah+7fSBKcvZT+zmAro/lglCn+LFn8RmOZbCH255GdrxOqp5XcZ2v73UH 3vVnd2fZDr5POA+Tf5C79AU3nd+dGXzur/3j7LVlPHR/LSUb7t+sYzlV3jPKjiqbywfR V1wWrj3oSOIzg7cbqtjNWk71tbByZDBsPF5CF779RZ0grzKj1ln6PXv0Xr2Rod1qh+iM 3yZSijfqXuLTvRsHmWafGtulVYvZK9MyYaqOFPSbvT4ofJgHZK8SlrkwF2h0tpW87BYt zHaQ== 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=djK3tr0YW8t8Pyhv6WxA+bpEQW8q4wEvYVFB5wuM0Uw=; b=TGNR15of7Z19+F2ERxeb0M01HKfZjGdbqC7bnpiJ+7j4lNvMzY0f/rpY4I4iCA9ANg JldNXVzEodSU0n2NBxui1uW79SXbXCWXI/qFRdKWVhX3jwXFoj345+t1yaXD833kmJfP TVcobHRM32LnZ7D1KKdT/tYelwS/he8wdiG4iJ5StfOsI+fRrLEpMXO8OnD7SSwIAudD +wwOMj4xUZRpqj7Itax35C1WlWEei+ue4hgrO55gzRYiLRvjZmNGHkXX09zc8TwQwDgf D41DSXbxZPAZc877McROT+lG17zJq8cpTOE1WxbMtecVFFVgHmwXhfMSSU3b1iYbUowy kv7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=sgJLMJbz; 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 b20si12677ejk.726.2021.01.12.14.15.52; Tue, 12 Jan 2021 14:16:20 -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=sgJLMJbz; 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 S2404551AbhALAYz (ORCPT + 99 others); Mon, 11 Jan 2021 19:24:55 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:26504 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403876AbhAKXNX (ORCPT ); Mon, 11 Jan 2021 18:13:23 -0500 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 10BN2UGm146087; Mon, 11 Jan 2021 18:12:36 -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=djK3tr0YW8t8Pyhv6WxA+bpEQW8q4wEvYVFB5wuM0Uw=; b=sgJLMJbzaLbFXZ5xwGVXiKtXFonyhVix8aAhZlgpOLR1XoXPKtJhnjLfLPiurGmbZ6kV /LFwyrRL+cmgkTqrLuX6Ggn5v/d3neQLDX26DYRmE25VAZ4PeAaTZIxrj0Ercg6nToxC NQZm9Mhg61vTfG4GsiMZnpLb98m0J0dmBHvehgrYdC5a3xoMD379cRg7762OON5WceGr 4lTp4x1C2r3ww9urHW6udCsxyINv4hhZQZeZ7k7zNsNUln0mi74/X6c05bLfK2DrbyZD WaNgJP/TwUtwvd/wZpIcURIi94pxZ2m5Y04pvkNWp/4FJDgCa8VzTL3WLOVdS0g804dD fQ== 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 360y93s7xh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Jan 2021 18:12:36 -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 10BN7Fx1018701; Mon, 11 Jan 2021 23:12:35 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma04wdc.us.ibm.com with ESMTP id 35y448sy6u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Jan 2021 23:12:35 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 10BNCYTp23790060 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 11 Jan 2021 23:12:34 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 286A078066; Mon, 11 Jan 2021 23:12:34 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BB0437805F; Mon, 11 Jan 2021 23:12:33 +0000 (GMT) Received: from vios4361.aus.stglabs.ibm.com (unknown [9.3.43.61]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Mon, 11 Jan 2021 23:12:33 +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 13/21] ibmvfc: advertise client support for using hardware channels Date: Mon, 11 Jan 2021 17:12:17 -0600 Message-Id: <20210111231225.105347-14-tyreld@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210111231225.105347-1-tyreld@linux.ibm.com> References: <20210111231225.105347-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.343,18.0.737 definitions=2021-01-11_32:2021-01-11,2021-01-11 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 bulkscore=0 suspectscore=0 mlxscore=0 spamscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 phishscore=0 mlxlogscore=999 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101110126 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 channelize via hardware backed 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 --- 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 a00f38558613..0653d52d4ea0 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -1410,6 +1410,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(async_crq->size * sizeof(*async_crq->msgs.async)); -- 2.27.0