Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp158897pxu; Wed, 2 Dec 2020 18:12:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJy1cGfZPbUXKKo7mdurf8fHBsI21JFkU8EyHCZxqqpWlczyEQVSPCZBdphMG+GZpPMAbAQJ X-Received: by 2002:a05:6402:1c0a:: with SMTP id ck10mr858353edb.266.1606961519865; Wed, 02 Dec 2020 18:11:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606961519; cv=none; d=google.com; s=arc-20160816; b=QNXx5Y7eA/mAEzQPbfeVyA5BjAF/UVNtJQKR13VUUvN6ovmpA04ht8RIPobkOMySE+ 8h3uNAtxQfabbzSuayyOstIbaQxKvRxLnMmPtJaAg7A+ZeHW8tw3d7laXkw3kD4es1v/ rPbwB26HYmMcjNm6BH+I0STxQ6uDqxcXLS2OX4qZdCsTfbcYhsNyepjLQJHTl8vmhJkO Rz0YwI4TDz9DJ9y6Dj0sl8MfrdBJMSCEpphn8lYzFQbNlRcOAn8ZR4CzHXYNlvuidTAD ZgRKQzN4gUpQC+qCkroU+OBAeUXkZ0rBzlk3TcPl7necInBPVetmSQmHNq5S+N3oFiiZ Ezug== 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=THr3PwzrisLGs197EgpbEA4rC/U8om6fT6y4XZnnpL0=; b=LL56zfHCfI4lsp+nJH30w6mI5QAtEne4/RID+w68z7s8QquqyGNvQi2EBoBGRXvKXR +NEw4HlKTVKw8t4825/ACVbBTOwkKzRnKBY7Rh00UDhA6q8roBwkTLg1UMBMGIfnCpvK XMBJPQPjXqhUrjT0SzEWVusXo9gyhWVCMrC1eJAgFM28dkzmtAhLzC5752nD+c7IQHyp 4nm0o0/Hi1XdCvKrdoUwaaSFjEXJRLduYdmGCwt2O7AfFXHtnOF7H0U9rjg+mgOMw13v QhCXHh3pt2qa/0CtEPMi00F6ixSezQQqrU+ZIUjQkGuFzIM3Scf6CHKTpwnE+hYKQjaY CoPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=C16QrCKu; 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 z15si263915eju.429.2020.12.02.18.11.37; Wed, 02 Dec 2020 18:11:59 -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=C16QrCKu; 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 S1729482AbgLCCJD (ORCPT + 99 others); Wed, 2 Dec 2020 21:09:03 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:16990 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729411AbgLCCJC (ORCPT ); Wed, 2 Dec 2020 21:09:02 -0500 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B321hco159395; Wed, 2 Dec 2020 21:08:12 -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=THr3PwzrisLGs197EgpbEA4rC/U8om6fT6y4XZnnpL0=; b=C16QrCKubYmpygmHlMZ0grJMXqpJFgSA4eO6LZWrq3AGpDV4G2mn9q5zZ8jr96lVdH9y 8QaUytZ5cBDdX1IMU6CwEEXge9UIPC46zk8M5/e7zfJZRtuLJW+eTg/eraDQzJaEVTvz n5aPLVZgcXM+tKTcmdurye1JEsHZgPWl6EKlZCuf0O9qnW/BeFLmGS3JY7v2SYikz7Ji U5J0Np1i5fK2DawWmzeNKfme6HU0t4pHlcUNywFfmUfxWiO0wrz+WK+3mnSgsWvOqAuS n/AnZRwiyXQftW/PzRUBj59/03QOL8ihzJJjQBBqNap+/ZN7TxmyJ+AkZsiP6tM4dM6i pg== Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0b-001b2d01.pphosted.com with ESMTP id 3569tgx4ku-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Dec 2020 21:08:12 -0500 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0B31uStT006206; Thu, 3 Dec 2020 02:08:11 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma03dal.us.ibm.com with ESMTP id 353e69pd7w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Dec 2020 02:08:11 +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 0B328AtF62390658 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 3 Dec 2020 02:08:10 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0343D78063; Thu, 3 Dec 2020 02:08:10 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 77A847805C; Thu, 3 Dec 2020 02:08:09 +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:09 +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 v3 01/18] ibmvfc: add vhost fields and defaults for MQ enablement Date: Wed, 2 Dec 2020 20:07:49 -0600 Message-Id: <20201203020806.14747-2-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 priorityscore=1501 mlxscore=0 mlxlogscore=999 suspectscore=1 clxscore=1015 lowpriorityscore=0 adultscore=0 spamscore=0 impostorscore=0 bulkscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012030006 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Introduce several new vhost fields for managing MQ state of the adapter as well as initial defaults for MQ enablement. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 9 ++++++++- drivers/scsi/ibmvscsi/ibmvfc.h | 13 +++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 42e4d35e0d35..f1d677a7423d 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -5161,12 +5161,13 @@ static int ibmvfc_probe(struct vio_dev *vdev, const struct vio_device_id *id) } shost->transportt = ibmvfc_transport_template; - shost->can_queue = max_requests; + shost->can_queue = (max_requests / IBMVFC_SCSI_HW_QUEUES); shost->max_lun = max_lun; shost->max_id = max_targets; shost->max_sectors = IBMVFC_MAX_SECTORS; shost->max_cmd_len = IBMVFC_MAX_CDB_LEN; shost->unique_id = shost->host_no; + shost->nr_hw_queues = IBMVFC_SCSI_HW_QUEUES; vhost = shost_priv(shost); INIT_LIST_HEAD(&vhost->sent); @@ -5178,6 +5179,12 @@ static int ibmvfc_probe(struct vio_dev *vdev, const struct vio_device_id *id) vhost->partition_number = -1; vhost->log_level = log_level; vhost->task_set = 1; + + vhost->mq_enabled = IBMVFC_MQ; + vhost->client_scsi_channels = IBMVFC_SCSI_CHANNELS; + vhost->using_channels = 0; + vhost->do_enquiry = 1; + strcpy(vhost->partition_name, "UNKNOWN"); init_waitqueue_head(&vhost->work_wait_q); init_waitqueue_head(&vhost->init_wait_q); diff --git a/drivers/scsi/ibmvscsi/ibmvfc.h b/drivers/scsi/ibmvscsi/ibmvfc.h index 9d58cfd774d3..e095daada70e 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.h +++ b/drivers/scsi/ibmvscsi/ibmvfc.h @@ -41,16 +41,21 @@ #define IBMVFC_DEFAULT_LOG_LEVEL 2 #define IBMVFC_MAX_CDB_LEN 16 #define IBMVFC_CLS3_ERROR 0 +#define IBMVFC_MQ 0 +#define IBMVFC_SCSI_CHANNELS 0 +#define IBMVFC_SCSI_HW_QUEUES 1 +#define IBMVFC_MIG_NO_SUB_TO_CRQ 0 +#define IBMVFC_MIG_NO_N_TO_M 0 /* * Ensure we have resources for ERP and initialization: - * 1 for ERP * 1 for initialization * 1 for NPIV Logout * 2 for BSG passthru * 2 for each discovery thread + * 1 ERP for each possible HW Queue */ -#define IBMVFC_NUM_INTERNAL_REQ (1 + 1 + 1 + 2 + (disc_threads * 2)) +#define IBMVFC_NUM_INTERNAL_REQ (1 + 1 + 2 + (disc_threads * 2) + IBMVFC_SCSI_HW_QUEUES) #define IBMVFC_MAD_SUCCESS 0x00 #define IBMVFC_MAD_NOT_SUPPORTED 0xF1 @@ -826,6 +831,10 @@ struct ibmvfc_host { int delay_init; int scan_complete; int logged_in; + int mq_enabled; + int using_channels; + int do_enquiry; + int client_scsi_channels; int aborting_passthru; int events_to_log; #define IBMVFC_AE_LINKUP 0x0001 -- 2.27.0