Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp560921pxb; Thu, 14 Jan 2021 12:37:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJzz65SJNahvlNO4ghNAAAq8iot8Jez5l3ddn/EBRJu0D2ex6AbVwQv53kg9E71iVBQjZ+HI X-Received: by 2002:a17:906:13da:: with SMTP id g26mr6421051ejc.285.1610656658948; Thu, 14 Jan 2021 12:37:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610656658; cv=none; d=google.com; s=arc-20160816; b=d633bzcJ9o/FOHQU2bChK2SslfdP4nppbeq7vTwulAa+9uh1Ty2NQkOJ5kFBBNgxXy IEO41j8wLUVM3h3ftydyfZiHPaIR7UCg+IAAOJqYewULLfelrXFgl03iia7eQoO9WePr LSVqUXjYHpPs1Ap8frAE6qvEZJt0sQH5R9oN5QbFZhQojc0od9uLJ/AqLhZ1lWmIf1/u qDHARwxUUM9QuXOVVu2mNqDN1pKeS2fkagLC1GS2tAORt8uhO5QXZRJXYXnnH5OJKThP M05hQsufCDxAu6zQtzxm43+Ywf4W9GKq/SAyPNVJdGk9r6IMTALzr+D3B6B2B9ughwde Eepg== 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=TGs63mVFywZBnj3AKF8wn2z5azFR5i+RSJ9O5mdxhAY=; b=UtcZixrsebK6vzFXMKITd2RTm0qY+AHla5VuykeZ7PwP6lwEO+kEH3OIJpdXYEJ30h Xn2sSZPgtVV2Ap61u6KELVA+qzcxE/NR3H0uRnMhcg9wgdReR11srjBqGM38cAuUncix rZSoYK8h8cs/j2gHN7U4rSPxYoC36GaN1ddYsilRZG6ymlIMH8DWI1FkDSOlmKvz0gyI s8NU0p1jSNllHpNUkbE/99wVzFtgOdNh79zgVREzLXGRHlcinyMTQr6IYdKa2cPkxDtT IVMssO1liawhF8IngoOp+csVZoT3Lm6xLWQLAGXwC+cxkxzowlXAZTWvgzpCKB+3FUZn Ih1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=RHe7J+pU; 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 j23si3181729eje.690.2021.01.14.12.37.14; Thu, 14 Jan 2021 12:37:38 -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=RHe7J+pU; 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 S1727421AbhANUcm (ORCPT + 99 others); Thu, 14 Jan 2021 15:32:42 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:11574 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726058AbhANUck (ORCPT ); Thu, 14 Jan 2021 15:32:40 -0500 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 10EKSQI9153407; Thu, 14 Jan 2021 15:31: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=TGs63mVFywZBnj3AKF8wn2z5azFR5i+RSJ9O5mdxhAY=; b=RHe7J+pU6cEpHQJ+IlvRr5YRpQk7t5H2fwK93HyK4YMQi4IPrRAE2aXgEKCRCwRX7WYr CUh6OSx0lHgMYJSWzO0e/jyDnSWhYWxK2BJAan/7mzmpF22nAxTobv+Gc9SLztKUhFUe +ivtEyzHv4ihAQXDA2zUgxPS73wUdVuxrXi6WABGbeHqCD6mFUkHlyqsyYW25i2A+GhZ Nmi9wl3Rg6i4vQ5unlpn/lFqngs57aZP/iVApRoJ+WfAAOV9LBe6Ib0ZMvyzjt7CJnIG WntF0FPBkh5uBDo7xP5IgoM6rXv/xtyXJ9z36sVXOhugDob9PdaZ+7fp9YxHj8eiRhWo xg== Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com with ESMTP id 362w19r1yg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Jan 2021 15:31:55 -0500 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 10EKHF38004680; Thu, 14 Jan 2021 20:31:54 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma02wdc.us.ibm.com with ESMTP id 35y449fry9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Jan 2021 20:31:54 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 10EKVqD925428354 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Jan 2021 20:31:52 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C378B6E04E; Thu, 14 Jan 2021 20:31:52 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7B1916E052; Thu, 14 Jan 2021 20:31:52 +0000 (GMT) Received: from vios4361.aus.stglabs.ibm.com (unknown [9.3.43.61]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 14 Jan 2021 20:31:52 +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 v5 06/21] ibmvfc: add Subordinate CRQ definitions Date: Thu, 14 Jan 2021 14:31:33 -0600 Message-Id: <20210114203148.246656-7-tyreld@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210114203148.246656-1-tyreld@linux.ibm.com> References: <20210114203148.246656-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-14_07:2021-01-14,2021-01-14 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 impostorscore=0 priorityscore=1501 mlxscore=0 clxscore=1015 adultscore=0 phishscore=0 malwarescore=0 bulkscore=0 lowpriorityscore=0 suspectscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101140111 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Subordinate Command Response Queues (Sub CRQ) are used in conjunction with the primary CRQ when more than one queue is needed by the virtual IO adapter. Recent phyp firmware versions support Sub CRQ's with ibmvfc adapters. This feature is a prerequisite for supporting multiple hardware backed submission queues in the vfc adapter. The Sub CRQ command element differs from the standard CRQ in that it is 32bytes long as opposed to 16bytes for the latter. Despite this extra 16bytes the ibmvfc protocol will use the original CRQ command element mapped to the first 16bytes of the Sub CRQ element initially. Add definitions for the Sub CRQ command element and queue. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.h b/drivers/scsi/ibmvscsi/ibmvfc.h index dd6d89292867..b9eed05c165f 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.h +++ b/drivers/scsi/ibmvscsi/ibmvfc.h @@ -650,6 +650,11 @@ struct ibmvfc_crq { volatile __be64 ioba; } __packed __aligned(8); +struct ibmvfc_sub_crq { + struct ibmvfc_crq crq; + __be64 reserved[2]; +} __packed __aligned(8); + enum ibmvfc_ae_link_state { IBMVFC_AE_LS_LINK_UP = 0x01, IBMVFC_AE_LS_LINK_BOUNCED = 0x02, @@ -761,12 +766,14 @@ struct ibmvfc_event_pool { enum ibmvfc_msg_fmt { IBMVFC_CRQ_FMT = 0, IBMVFC_ASYNC_FMT, + IBMVFC_SUB_CRQ_FMT, }; union ibmvfc_msgs { void *handle; struct ibmvfc_crq *crq; struct ibmvfc_async_crq *async; + struct ibmvfc_sub_crq *scrq; }; struct ibmvfc_queue { @@ -781,6 +788,20 @@ struct ibmvfc_queue { struct list_head sent; struct list_head free; spinlock_t l_lock; + + /* Sub-CRQ fields */ + struct ibmvfc_host *vhost; + unsigned long cookie; + unsigned long vios_cookie; + unsigned long hw_irq; + unsigned long irq; + unsigned long hwq_id; + char name[32]; +}; + +struct ibmvfc_scsi_channels { + struct ibmvfc_queue *scrqs; + unsigned int active_queues; }; enum ibmvfc_host_action { -- 2.27.0