Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp487483pxu; Tue, 1 Dec 2020 17:00:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxZsbnvtWALUPHNe/WQXuxrp3DykDODexpfNNZc8MQ++5A0q8p6W8h5NEuLOuSTaT+4fkAv X-Received: by 2002:aa7:db56:: with SMTP id n22mr310726edt.4.1606870832574; Tue, 01 Dec 2020 17:00:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606870832; cv=none; d=google.com; s=arc-20160816; b=svkvvKwxLYerAIE29gN3d9yvE9WATUJm7UwL8xAkK3+jkLDyRgdeO99SpvApFI4+sy Vae1bwWKFPTMSDb1hf/Y52cHKuczyuDX227vH3nNtynmtT6CY0L1HktporT59pzI8Htm PUVpb7Di94b+6FENJrGBE1Dl1JuzjnZAuy3MGJCSd1tvcEYohfhFPSB2A8fudBW7ExYk Ll+cqtI441pCrQG87s5RNer6EiGRwrAOY3d4kOWQ7f+dkvquCXfNU3S9m2dHe7euWj11 sk18Y8RJkFslQgx4doizBhhYGa1AO73McB7PBBg1brUlNii5S/e866PDYcqaxVh4Lyt1 8X7w== 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=Ha0FOy6E8I+tI7lwXqTzJBaUCliQzbpcCb7INf6xGxbYflrun25g95o+Y5RWLd4ziA mxqbJfUYm1+t2HFQr3j3xC4ViH7pXHPwHLtE1jOFFEiNoH2mAP49s10YKq0ZMDGVK4OM 3k95qaY7Da+ziUVr636ZjMOnUPlXbKr8VOr6Jw6XHk5XhzZE7z25Qr3bXPboFHPAdGMH CrdPrJjiUzXOwYJBEJosvLZxLE1S/gqTpxL7PlFAMs+t8KKD1dwc9nGa3+o0riIx51MK L8XWKeTRfzZJL1pXBLtNAH4jHQWq64om5/Wik6xzguValUOZrqLDn00heU+2YTe4f1mk WT7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=lmAeSNTv; 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 x13si1017781ejb.243.2020.12.01.17.00.10; Tue, 01 Dec 2020 17:00:32 -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=lmAeSNTv; 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 S1727894AbgLBAzm (ORCPT + 99 others); Tue, 1 Dec 2020 19:55:42 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:21726 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726023AbgLBAzl (ORCPT ); Tue, 1 Dec 2020 19:55:41 -0500 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B20Vnka139589; Tue, 1 Dec 2020 19:54:51 -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=lmAeSNTv/FI30iPksMnCsXcAi3enc+RHLwHXSJmdqfn+TbVHl+zqSzPWPuG2ku2tL/te XJBRpTXmSGPJa8CqCAnAbBoiMi/2dW9eiJeT0879gQ8QhMccz/PZa6T60wzbEk4ecOJT YJfhUj2MfSV+Hobjoy5rOt/WgkmcbD046X5n1HXoAQlV8Mj1hyN+P60FQ3fU6Enowze0 Suzx2BuKBfUlt8Axbf9iKMhsHdhtt+6kKzKZifiT55877PI0XRpAeFk58JsRzCtW0i4C qncbNDoSjfSFTlirx/XbaCXhdoI7Hw2BqBVp6dD9Wba9G7i/YGx9rbPMZWYZ+M78pwhP Pw== Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0a-001b2d01.pphosted.com with ESMTP id 355d9duykk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 01 Dec 2020 19:54:49 -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 0B20f5mk016203; Wed, 2 Dec 2020 00:54:48 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma01wdc.us.ibm.com with ESMTP id 355vrfhrj9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Dec 2020 00:54:48 +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 0B20rVOL7012752 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 Dec 2020 00:53:32 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E379078064; Wed, 2 Dec 2020 00:53:31 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 861AD7805F; Wed, 2 Dec 2020 00:53:31 +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:31 +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 v2 01/17] ibmvfc: add vhost fields and defaults for MQ enablement Date: Tue, 1 Dec 2020 18:53:13 -0600 Message-Id: <20201202005329.4538-2-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 priorityscore=1501 impostorscore=0 lowpriorityscore=0 phishscore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 malwarescore=0 spamscore=0 bulkscore=0 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 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