From patchwork Fri Jun 2 16:12:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 9762965 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5245560365 for ; Fri, 2 Jun 2017 16:12:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42F4528569 for ; Fri, 2 Jun 2017 16:12:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3773D28573; Fri, 2 Jun 2017 16:12:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 302B528569 for ; Fri, 2 Jun 2017 16:12:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751239AbdFBQMe (ORCPT ); Fri, 2 Jun 2017 12:12:34 -0400 Received: from mail-by2nam01on0051.outbound.protection.outlook.com ([104.47.34.51]:14656 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751204AbdFBQM2 (ORCPT ); Fri, 2 Jun 2017 12:12:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=2clQUqvHm6n1jG7CvTGV3rvTgh+H0hR08mYGXsMxoxE=; b=iDr3Tg2ivNkJx/IGvurMnwMHpexNpvf8FnWbeX3Rzky1dJBlLcKVdTObZH/Hy1TucCk3UU8c3Q03D96Euqf5ZO9IXGP8SJ3Eu2i3NVbMY46C57x2tKGsrisXWdbn5el+iAJyM1ERMQKFb+3RgjvaE5cd5zgD9m7c7DIYNubjXP8= Received: from SN1PR0701CA0065.namprd07.prod.outlook.com (10.163.126.33) by BLUPR07MB419.namprd07.prod.outlook.com (10.141.28.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10; Fri, 2 Jun 2017 16:12:25 +0000 Received: from BL2FFO11FD046.protection.gbl (2a01:111:f400:7c09::114) by SN1PR0701CA0065.outlook.office365.com (2a01:111:e400:52fd::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10 via Frontend Transport; Fri, 2 Jun 2017 16:12:25 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=cavium.com; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BL2FFO11FD046.mail.protection.outlook.com (10.173.161.208) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1101.12 via Frontend Transport; Fri, 2 Jun 2017 16:12:25 +0000 Received: from dut1171.mv.qlogic.com (172.29.51.171) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Fri, 2 Jun 2017 09:12:09 -0700 Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id v52GC9Tt006739; Fri, 2 Jun 2017 09:12:09 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v52GC9pM006738; Fri, 2 Jun 2017 09:12:09 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH v3 11/15] qla2xxx: Add ql2xiniexchg parameter Date: Fri, 2 Jun 2017 09:12:03 -0700 Message-ID: <20170602161207.6660-12-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170602161207.6660-1-himanshu.madhani@cavium.com> References: <20170602161207.6660-1-himanshu.madhani@cavium.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39840400002)(39450400003)(39850400002)(39400400002)(39410400002)(2980300002)(428002)(189002)(199003)(9170700003)(478600001)(1076002)(72206003)(305945005)(38730400002)(86362001)(575784001)(47776003)(87636003)(54906002)(5660300001)(101416001)(50986999)(6666003)(36756003)(2950100002)(106466001)(105586002)(33646002)(2906002)(48376002)(76176999)(50466002)(356003)(8676002)(189998001)(8936002)(80596001)(42186005)(4326008)(81166006)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR07MB419; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD046; 1:wjCIezkrOCeRNIPgNxq/y3cRepDXQK37FBXm6O/RCaPbZMECuqiugewJ0dcX7/9bQ196ZTor7X+nn1i+rarhhCXfRDsk3tuvkbk7mkJMCIyiaqAARN/hQE/jt/eodVfssg7OnYlDmTUyrQpDd5psJuP33tLbYmDX4dukh9Vygs9t6GJk/sPAg3RKOjF4M9j5Q4Xq2pBx/leMtC9868gWGyCtxuMpwcdpbIaQcnGNdc8ttIjDAeRUhodmX5bVj6oPVw6JsMrLDqKM3Qf2uCyB2k8ug8W34w4LuExIxS8FI9LMcz217yP/ZR5tLjU1b1KZ91E6u6zEABH/fDyI3//0RxIOdCGatb/N1vmHh+L9N1vIuBVYP7mTvhj5rRmyYnVHsDuOCgi4jJy93aCE+ieYmXiYJVZllw9YHIFHXoH0VvQxJjy+o4uKwQTTgOaA74l0KbRgkHfEGVT1s0h9UsadH/cmtUzMoV8EazwgjkhC5j2Bo7z8nMsQ6EBHzVsIcc5tZuK16QdH0umb3/0SpAI58Q== X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLUPR07MB419: X-MS-Office365-Filtering-Correlation-Id: 1fb3148c-e182-4313-b1c3-08d4a9d228b0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:BLUPR07MB419; X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB419; 3:IwvUU0gMUWWBubvwpMBgLvuufqYZQsnzfpaAemrcKiECEr4E2N065NcfRdjnWFHqALT+VGJMMKQZ2O7ldXE/B25X3T6XEjPgNrWL9mrh3jDidjighGfc6b1ajYUOBcYDL5IVjrFtgA8bIWdrLTMQEQ006S6ekI5LeiCuKXrV/ggvjFAm23CY9ZMTFKIIIC9vgMo4mMxP6DhPQ2FDKO+BZsBTsh9vZPqE0dDTqkieSr9nA6uQV/Vs1wkje76DjuLWROKqUEYoUhLBzt+hXMOSKSAAEWVAVUhF7WQsjSzzwlLuCPY8VcTj5OtXq8IlWsNoAH4bJXkVNO7nJPjFXQgDb5RpT618dPHLrTEgmkz35/GAOwO1bLL8To4YW9PWQ6fTj/+FK5f8ZESsLlQdll4ZX3jtk+WEql7Sry9j9U9E7/3K42//GN6w01VVOaXpH3J3QboVCeur7xgsv2ZadkDkxkKlJgFZUX+dbfYHDngHrJPwa/4YMZF6SQPZCVLVVGoJ X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB419; 25:pHdFPdUADMXOnXAB87Un7gi8LJaluD75CWO8nt5SH8IDilTA2PmUNazCiWHioMyT5q7W+Oa84KBNTfdEVGUQ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K35PBvJutDppadOd53GHOjbn6ysdPah3s7bhfSxwTDMViSkvaB9svER5XKKTVRoCgFVIm/MvJ3rEUq3x4ANXcwEKS8OnBpOCpZ2/Ojs0g0QB+7EmIsve5tWquVSuBx5/wPX3S3YCMot/gnNGWO++0bYFOOG3jJ2hSxM X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(13018025)(8121501046)(5005006)(13016025)(3002001)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(6041248)(20161123558100)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR07MB419; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR07MB419; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR07MB419; 4:No3sNr0VLiKREOSiniHTbb6Il8wh3xLIG0qBTcy0f7e?= =?us-ascii?Q?MfUmW3eF/PeV38jFrLCL+F9IDcXumX7HpYTJGs0cSHU8XjBjWOmPbq07I/Qo?= =?us-ascii?Q?jv12gQiPJ7qPrpjj6EC3JmXtn3LvPYLzgxAseX5K8ljdBdtyK4kI7SlRQhuw?= =?us-ascii?Q?nYSwgl5mLSb2BAm126OcaPVui+4DO64leOgUvownRxsdIdy9jOGw/dzX68nJ?= =?us-ascii?Q?EPvEpg8AZxvfH0Rpdx0462qmpLK0SlGfmv7YJum+1PIcNhNa9QkJr6pFLFCa?= =?us-ascii?Q?pJDN7yOSsyRGclq+HOmFjNZiPRHdlzzogVEonLI/PkftozhZdmrOOA5MTs7n?= =?us-ascii?Q?0N806UEpwc/1rvlTxe0vL1ICWgfVvJcTQpFbQiFVXKUMl4+jTcs3Lw6WInC3?= =?us-ascii?Q?0YnHp2i9b3QXSdOjXeNXpJf9TP+2rgybfr4Cq+npypQozZXObUBdoAoQ9ZL2?= =?us-ascii?Q?vYnxHqkQk66TO1Y0rB8KbKiLVpBt40Z7wBZ3fHJ1gKgQfrhPl0XdiyfQI+ow?= =?us-ascii?Q?XRm+cTi2cPJOl5JejfWlw4tq22xqEMFa5laODiOVmvFfxd+RU27W4WGIKxaW?= =?us-ascii?Q?6xItTBGBPSfcbxqa0wP84twAZLAzJeDzYXYSsekPauiAveJIKUNc8PPs7XVQ?= =?us-ascii?Q?Kr36EkWspsSbSca5G5r/uXmUmLUYgzChfh0cINhxfKhof/zU3v2ucQ2JF4pG?= =?us-ascii?Q?pLujcjMBEF0D8FMmWovPPddIH5TiN9xeRNWHk/AYZAOb9LYQO25IqOxhxdwX?= =?us-ascii?Q?6SmKKejLsuqzZFLG1IJOpLUm6xj8BJa071+pykdxSqCfkutbcxgCDsj9ds3U?= =?us-ascii?Q?JEaV+yURZUX6nPyTsixnZiB0+Q1Nah9hvLkHWqg+/wXK/moxmefdwgopCMSp?= =?us-ascii?Q?AsVmqYnZ+LGCnKUF3/axGrPuz8JtWWq7n21y+OJgolvlCMiRvbr8duIHaWch?= =?us-ascii?Q?sU46ReptrqX2lbBdONwinDgPAsElZBpxod9uDkroKqaujl/H24ci18YI51w9?= =?us-ascii?Q?hUeSns9yoUs+e06tG0kpWzVWUQ78kNYpH582S8sGB25QNceXAH3gkm5Md/Rz?= =?us-ascii?Q?EUWt4qdZ9FqNU4bQZSDAz+9KQZ+7bfB0t2+SNMwcvjsNAJ7sxrafObD1tPEi?= =?us-ascii?Q?AKNEJC9W7S6nCiwulGCBh8t3jfBePWmB3b1QrdEyR1e8rGgF7d+dbE3mBIkG?= =?us-ascii?Q?BDkEHUz/45to=3D?= X-Forefront-PRVS: 03264AEA72 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR07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PY7o1bx+xpi0h8hU8uO4fIVI589v7dmqlkkI9wwpXkQGz8RKXac576sXKa6vyxOa+2PbsffPaeEHIl2O3ipvrNeZ65eaSD76jFmqXU0fBhoJlPTpJ/18p/En6K9q5XZdoRSRsUNYfNUs3XPpsEsf4MrWzwwHO+nkhMjIy8vnj7Xz59SH/r32Hp/jUabO4eAj2Sc1kpYwpXNNL23x9XWeRSAH5EE9OIbX8DmRlFTNVum1pNyIz53D1zerc3i7RWLfAO8d9cugWk7jvd7jKXrLqUeE97d1CnnaAZ3Okqt4VQvAhAsBMVkdX4zgp; 24:ew/VsF7CWx1FvQaECv48FI1ymXA99m99/Rj3yT1DE4lKDmsYgI6veXPWxhj92231jpsSjReSbX0rMUxOqBHq9e+pNMIB5b4oE8hAeIXCe3s= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB419; 7:x5RfosrKDRgBNvTKGf2x+jyatK5LMHJaWnUHBRmYA6keib57ZR5gC6MeiwM1lzrRgmBmnm4USVqY6/G9Ubkypz3PpD3c0q+SxTm7+VpHdvYEw5Q5mJDZMpYVzW9RCBBOuRRTpDeghPAO27dlrgsP6AsEt9fy+gqMAH7u/wjyFGyqhqoxwETD9MVEe39hPeLBnBf9d0TNih0thx7+gWwGt4icmDj0L4IckgQWIQ/6S+c2jctcY4Rr1mhyjsq6sTkdPqaeFcbYGrugL7H6wZMnHLVCGy8FrSPP6rAYe6G32vqpiHAp580udwGqJ0b1Ty8gcUngkdwNJdTg6RR6nu8geQ== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2017 16:12:25.3545 (UTC) X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR07MB419 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Quinn Tran Previously, the ql2xexchoffld module parameter was used to control the max number of exchanges to be offload onto host memory. Module parameter ql_dm_tgt_ex_pct was used to control the percentage of exchanges allocated to the Target side. With this patch, module parameter ql_dm_tgt_ex_pct is no longer used to control exchanges for the driver. New module parameter ql2xiniexchg is added to control exchanges between target mode and initiator mode. With the updated module parameters, users can control the exact number of exchanges for either Initiator or Target. The exchange offload feature will be automatically enabled when the total number of exchanges exceeds 2048 limit. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 6 +- drivers/scsi/qla2xxx/qla_gbl.h | 3 +- drivers/scsi/qla2xxx/qla_init.c | 2 +- drivers/scsi/qla2xxx/qla_inline.h | 16 +++++ drivers/scsi/qla2xxx/qla_mbx.c | 14 ++-- drivers/scsi/qla2xxx/qla_os.c | 136 +++++++++++++++++++++++++++----------- drivers/scsi/qla2xxx/qla_target.c | 48 +++----------- 7 files changed, 140 insertions(+), 85 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 51b262b236b4..ddf93efe3986 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -286,7 +286,7 @@ struct name_list_extended { #define RESPONSE_ENTRY_CNT_MQ 128 /* Number of response entries.*/ #define ATIO_ENTRY_CNT_24XX 4096 /* Number of ATIO entries. */ #define RESPONSE_ENTRY_CNT_FX00 256 /* Number of response entries.*/ -#define EXTENDED_EXCH_ENTRY_CNT 32768 /* Entries for offload case */ +#define FW_DEF_EXCHANGES_CNT 2048 struct req_que; struct qla_tgt_sess; @@ -3593,6 +3593,10 @@ struct qla_hw_data { #define IS_SHADOW_REG_CAPABLE(ha) (IS_QLA27XX(ha)) #define IS_DPORT_CAPABLE(ha) (IS_QLA83XX(ha) || IS_QLA27XX(ha)) #define IS_FAWWN_CAPABLE(ha) (IS_QLA83XX(ha) || IS_QLA27XX(ha)) +#define IS_EXCHG_OFFLD_CAPABLE(ha) \ + (IS_QLA81XX(ha) || IS_QLA83XX(ha) || IS_QLA27XX(ha)) +#define IS_EXLOGIN_OFFLD_CAPABLE(ha) \ + (IS_QLA25XX(ha) || IS_QLA81XX(ha) || IS_QLA83XX(ha) || IS_QLA27XX(ha)) /* HBA serial number */ uint8_t serial0; diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index 5b2451745e9f..f8540f5c9e5d 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h @@ -137,6 +137,7 @@ extern int ql2xmdcapmask; extern int ql2xmdenable; extern int ql2xexlogins; extern int ql2xexchoffld; +extern int ql2xiniexchg; extern int ql2xfwholdabts; extern int ql2xmvasynctoatio; @@ -839,7 +840,7 @@ extern int qla_get_exlogin_status(scsi_qla_host_t *, uint16_t *, uint16_t *); extern int qla_set_exlogin_mem_cfg(scsi_qla_host_t *vha, dma_addr_t phys_addr); extern int qla_get_exchoffld_status(scsi_qla_host_t *, uint16_t *, uint16_t *); -extern int qla_set_exchoffld_mem_cfg(scsi_qla_host_t *, dma_addr_t); +extern int qla_set_exchoffld_mem_cfg(scsi_qla_host_t *); extern void qlt_handle_abts_recv(struct scsi_qla_host *, response_t *); int qla24xx_async_notify_ack(scsi_qla_host_t *, fc_port_t *, diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index f92e74639bb1..08000aebe8d4 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -2723,7 +2723,7 @@ qla2x00_setup_chip(scsi_qla_host_t *vha) if (ql2xexlogins) ha->flags.exlogins_enabled = 1; - if (ql2xexchoffld) + if (qla_is_exch_offld_enabled(vha)) ha->flags.exchoffld_enabled = 1; rval = qla2x00_execute_fw(vha, srisc_address); diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h index c61a6a871c8e..9996ec0daab1 100644 --- a/drivers/scsi/qla2xxx/qla_inline.h +++ b/drivers/scsi/qla2xxx/qla_inline.h @@ -307,3 +307,19 @@ qla2x00_set_retry_delay_timestamp(fc_port_t *fcport, uint16_t retry_delay) fcport->retry_delay_timestamp = jiffies + (retry_delay * HZ / 10); } + +static inline bool +qla_is_exch_offld_enabled(struct scsi_qla_host *vha) +{ + if (qla_ini_mode_enabled(vha) && + (ql2xiniexchg > FW_DEF_EXCHANGES_CNT)) + return true; + else if (qla_tgt_mode_enabled(vha) && + (ql2xexchoffld > FW_DEF_EXCHANGES_CNT)) + return true; + else if (qla_dual_mode_enabled(vha) && + ((ql2xiniexchg + ql2xexchoffld) > FW_DEF_EXCHANGES_CNT)) + return true; + else + return false; +} diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 5e74600b99c2..bebac42d9e9e 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -821,7 +821,7 @@ qla_get_exchoffld_status(scsi_qla_host_t *vha, uint16_t *buf_sz, */ #define CONFIG_XCHOFFLD_MEM 0x3 int -qla_set_exchoffld_mem_cfg(scsi_qla_host_t *vha, dma_addr_t phys_addr) +qla_set_exchoffld_mem_cfg(scsi_qla_host_t *vha) { int rval; mbx_cmd_t mc; @@ -834,12 +834,12 @@ qla_set_exchoffld_mem_cfg(scsi_qla_host_t *vha, dma_addr_t phys_addr) memset(mcp->mb, 0 , sizeof(mcp->mb)); mcp->mb[0] = MBC_GET_MEM_OFFLOAD_CNTRL_STAT; mcp->mb[1] = CONFIG_XCHOFFLD_MEM; - mcp->mb[2] = MSW(phys_addr); - mcp->mb[3] = LSW(phys_addr); - mcp->mb[6] = MSW(MSD(phys_addr)); - mcp->mb[7] = LSW(MSD(phys_addr)); - mcp->mb[8] = MSW(ha->exlogin_size); - mcp->mb[9] = LSW(ha->exlogin_size); + mcp->mb[2] = MSW(ha->exchoffld_buf_dma); + mcp->mb[3] = LSW(ha->exchoffld_buf_dma); + mcp->mb[6] = MSW(MSD(ha->exchoffld_buf_dma)); + mcp->mb[7] = LSW(MSD(ha->exchoffld_buf_dma)); + mcp->mb[8] = MSW(ha->exchoffld_size); + mcp->mb[9] = LSW(ha->exchoffld_size); mcp->out_mb = MBX_9|MBX_8|MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0; mcp->in_mb = MBX_11|MBX_0; mcp->tov = MBX_TOV_SECONDS; diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index e00b607906cf..93c5c6fa68b4 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -224,11 +224,15 @@ MODULE_PARM_DESC(ql2xexlogins, "Number of extended Logins. " "0 (Default)- Disabled."); -int ql2xexchoffld = 0; -module_param(ql2xexchoffld, uint, S_IRUGO|S_IWUSR); +int ql2xexchoffld = 1024; +module_param(ql2xexchoffld, uint, 0644); MODULE_PARM_DESC(ql2xexchoffld, - "Number of exchanges to offload. " - "0 (Default)- Disabled."); + "Number of target exchanges."); + +int ql2xiniexchg = 1024; +module_param(ql2xiniexchg, uint, 0644); +MODULE_PARM_DESC(ql2xiniexchg, + "Number of initiator exchanges."); int ql2xfwholdabts = 0; module_param(ql2xfwholdabts, int, S_IRUGO); @@ -3982,6 +3986,9 @@ qla2x00_set_exlogins_buffer(scsi_qla_host_t *vha) if (!ql2xexlogins) return QLA_SUCCESS; + if (!IS_EXLOGIN_OFFLD_CAPABLE(ha)) + return QLA_SUCCESS; + ql_log(ql_log_info, vha, 0xd021, "EXLOGIN count: %d.\n", ql2xexlogins); max_cnt = 0; rval = qla_get_exlogin_status(vha, &size, &max_cnt); @@ -3992,21 +3999,27 @@ qla2x00_set_exlogins_buffer(scsi_qla_host_t *vha) } temp = (ql2xexlogins > max_cnt) ? max_cnt : ql2xexlogins; - ha->exlogin_size = (size * temp); - ql_log(ql_log_info, vha, 0xd024, - "EXLOGIN: max_logins=%d, portdb=0x%x, total=%d.\n", - max_cnt, size, temp); - - ql_log(ql_log_info, vha, 0xd025, "EXLOGIN: requested size=0x%x\n", - ha->exlogin_size); - - /* Get consistent memory for extended logins */ - ha->exlogin_buf = dma_alloc_coherent(&ha->pdev->dev, - ha->exlogin_size, &ha->exlogin_buf_dma, GFP_KERNEL); - if (!ha->exlogin_buf) { - ql_log_pci(ql_log_fatal, ha->pdev, 0xd02a, + temp *= size; + + if (temp != ha->exlogin_size) { + qla2x00_free_exlogin_buffer(ha); + ha->exlogin_size = temp; + + ql_log(ql_log_info, vha, 0xd024, + "EXLOGIN: max_logins=%d, portdb=0x%x, total=%d.\n", + max_cnt, size, temp); + + ql_log(ql_log_info, vha, 0xd025, + "EXLOGIN: requested size=0x%x\n", ha->exlogin_size); + + /* Get consistent memory for extended logins */ + ha->exlogin_buf = dma_alloc_coherent(&ha->pdev->dev, + ha->exlogin_size, &ha->exlogin_buf_dma, GFP_KERNEL); + if (!ha->exlogin_buf) { + ql_log_pci(ql_log_fatal, ha->pdev, 0xd02a, "Failed to allocate memory for exlogin_buf_dma.\n"); - return -ENOMEM; + return -ENOMEM; + } } /* Now configure the dma buffer */ @@ -4037,15 +4050,49 @@ qla2x00_free_exlogin_buffer(struct qla_hw_data *ha) } } +static void +qla2x00_number_of_exch(scsi_qla_host_t *vha, u32 *ret_cnt, u16 max_cnt) +{ + u32 temp; + *ret_cnt = FW_DEF_EXCHANGES_CNT; + + if (qla_ini_mode_enabled(vha)) { + if (ql2xiniexchg > max_cnt) + ql2xiniexchg = max_cnt; + + if (ql2xiniexchg > FW_DEF_EXCHANGES_CNT) + *ret_cnt = ql2xiniexchg; + } else if (qla_tgt_mode_enabled(vha)) { + if (ql2xexchoffld > max_cnt) + ql2xexchoffld = max_cnt; + + if (ql2xexchoffld > FW_DEF_EXCHANGES_CNT) + *ret_cnt = ql2xexchoffld; + } else if (qla_dual_mode_enabled(vha)) { + temp = ql2xiniexchg + ql2xexchoffld; + if (temp > max_cnt) { + ql2xiniexchg -= (temp - max_cnt)/2; + ql2xexchoffld -= (((temp - max_cnt)/2) + 1); + temp = max_cnt; + } + + if (temp > FW_DEF_EXCHANGES_CNT) + *ret_cnt = temp; + } +} + int qla2x00_set_exchoffld_buffer(scsi_qla_host_t *vha) { int rval; - uint16_t size, max_cnt, temp; + u16 size, max_cnt; + u32 temp; struct qla_hw_data *ha = vha->hw; - /* Return if we don't need to alloacate any extended logins */ - if (!ql2xexchoffld) + if (!ha->flags.exchoffld_enabled) + return QLA_SUCCESS; + + if (!IS_EXCHG_OFFLD_CAPABLE(ha)) return QLA_SUCCESS; ql_log(ql_log_info, vha, 0xd014, @@ -4059,30 +4106,45 @@ qla2x00_set_exchoffld_buffer(scsi_qla_host_t *vha) return rval; } - temp = (ql2xexchoffld > max_cnt) ? max_cnt : ql2xexchoffld; - ha->exchoffld_size = (size * temp); - ql_log(ql_log_info, vha, 0xd016, - "Exchange offload: max_count=%d, buffers=0x%x, total=%d.\n", - max_cnt, size, temp); + qla2x00_number_of_exch(vha, &temp, max_cnt); + temp *= size; - ql_log(ql_log_info, vha, 0xd017, - "Exchange Buffers requested size = 0x%x\n", ha->exchoffld_size); - - /* Get consistent memory for extended logins */ - ha->exchoffld_buf = dma_alloc_coherent(&ha->pdev->dev, - ha->exchoffld_size, &ha->exchoffld_buf_dma, GFP_KERNEL); - if (!ha->exchoffld_buf) { - ql_log_pci(ql_log_fatal, ha->pdev, 0xd013, - "Failed to allocate memory for exchoffld_buf_dma.\n"); - return -ENOMEM; + if (temp != ha->exchoffld_size) { + qla2x00_free_exchoffld_buffer(ha); + ha->exchoffld_size = temp; + + ql_log(ql_log_info, vha, 0xd016, + "Exchange offload: max_count=%d, buffers=0x%x, total=%d.\n", + max_cnt, size, temp); + + ql_log(ql_log_info, vha, 0xd017, + "Exchange Buffers requested size = 0x%x\n", + ha->exchoffld_size); + + /* Get consistent memory for extended logins */ + ha->exchoffld_buf = dma_alloc_coherent(&ha->pdev->dev, + ha->exchoffld_size, &ha->exchoffld_buf_dma, GFP_KERNEL); + if (!ha->exchoffld_buf) { + ql_log_pci(ql_log_fatal, ha->pdev, 0xd013, + "Failed to allocate memory for exchoffld_buf_dma.\n"); + return -ENOMEM; + } } /* Now configure the dma buffer */ - rval = qla_set_exchoffld_mem_cfg(vha, ha->exchoffld_buf_dma); + rval = qla_set_exchoffld_mem_cfg(vha); if (rval) { ql_log(ql_log_fatal, vha, 0xd02e, "Setup exchange offload buffer ****FAILED****.\n"); qla2x00_free_exchoffld_buffer(ha); + } else { + /* re-adjust number of target exchange */ + struct init_cb_81xx *icb = (struct init_cb_81xx *)ha->init_cb; + + if (qla_ini_mode_enabled(vha)) + icb->exchange_count = 0; + else + icb->exchange_count = cpu_to_le16(ql2xexchoffld); } return rval; diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 3cdffdd90279..324048476d9e 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -59,7 +59,7 @@ MODULE_PARM_DESC(qlini_mode, "when ready " "\"enabled\" (default) - initiator mode will always stay enabled."); -static int ql_dm_tgt_ex_pct = 50; +static int ql_dm_tgt_ex_pct = 0; module_param(ql_dm_tgt_ex_pct, int, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(ql_dm_tgt_ex_pct, "For Dual Mode (qlini_mode=dual), this parameter determines " @@ -6438,8 +6438,9 @@ void qlt_24xx_config_nvram_stage1(struct scsi_qla_host *vha, struct nvram_24xx *nv) { struct qla_hw_data *ha = vha->hw; - u32 tmp; - u16 t; + + if (!QLA_TGT_MODE_ENABLED()) + return; if (qla_tgt_mode_enabled(vha) || qla_dual_mode_enabled(vha)) { if (!ha->tgt.saved_set) { @@ -6454,24 +6455,10 @@ qlt_24xx_config_nvram_stage1(struct scsi_qla_host *vha, struct nvram_24xx *nv) ha->tgt.saved_set = 1; } - if (qla_tgt_mode_enabled(vha)) { + if (qla_tgt_mode_enabled(vha)) nv->exchange_count = cpu_to_le16(0xFFFF); - } else { /* dual */ - if (ql_dm_tgt_ex_pct > 100) { - ql_dm_tgt_ex_pct = 50; - } else if (ql_dm_tgt_ex_pct == 100) { - /* leave some for FW */ - ql_dm_tgt_ex_pct = 95; - } - - tmp = ha->orig_fw_xcb_count * ql_dm_tgt_ex_pct; - tmp = tmp/100; - if (tmp > 0xffff) - tmp = 0xffff; - - t = tmp & 0xffff; - nv->exchange_count = cpu_to_le16(t); - } + else /* dual */ + nv->exchange_count = cpu_to_le16(ql2xexchoffld); /* Enable target mode */ nv->firmware_options_1 |= cpu_to_le32(BIT_4); @@ -6556,8 +6543,6 @@ void qlt_81xx_config_nvram_stage1(struct scsi_qla_host *vha, struct nvram_81xx *nv) { struct qla_hw_data *ha = vha->hw; - u32 tmp; - u16 t; if (!QLA_TGT_MODE_ENABLED()) return; @@ -6575,23 +6560,10 @@ qlt_81xx_config_nvram_stage1(struct scsi_qla_host *vha, struct nvram_81xx *nv) ha->tgt.saved_set = 1; } - if (qla_tgt_mode_enabled(vha)) { + if (qla_tgt_mode_enabled(vha)) nv->exchange_count = cpu_to_le16(0xFFFF); - } else { /* dual */ - if (ql_dm_tgt_ex_pct > 100) { - ql_dm_tgt_ex_pct = 50; - } else if (ql_dm_tgt_ex_pct == 100) { - /* leave some for FW */ - ql_dm_tgt_ex_pct = 95; - } - - tmp = ha->orig_fw_xcb_count * ql_dm_tgt_ex_pct; - tmp = tmp/100; - if (tmp > 0xffff) - tmp = 0xffff; - t = tmp & 0xffff; - nv->exchange_count = cpu_to_le16(t); - } + else /* dual */ + nv->exchange_count = cpu_to_le16(ql2xexchoffld); /* Enable target mode */ nv->firmware_options_1 |= cpu_to_le32(BIT_4);