From patchwork Wed Apr 25 13:08:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dupuis, Chad" X-Patchwork-Id: 10363159 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 6AD986032C for ; Wed, 25 Apr 2018 13:09:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B29328DF1 for ; Wed, 25 Apr 2018 13:09:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4FF3428DFA; Wed, 25 Apr 2018 13:09:26 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI, 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 CE90628DF6 for ; Wed, 25 Apr 2018 13:09:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753971AbeDYNJZ (ORCPT ); Wed, 25 Apr 2018 09:09:25 -0400 Received: from mail-cys01nam02on0074.outbound.protection.outlook.com ([104.47.37.74]:63854 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752885AbeDYNJT (ORCPT ); Wed, 25 Apr 2018 09:09:19 -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=YhwpQz8zx3pJv7BRfSal9RcsZb7CprbAmcTGU7LIskA=; b=Qy4cUBg5zNVG8Sr0Ds0v44RYBej3V6LA9jGjtmRYtEQ6M7RkGfMd0T1jaEog7TJnLJlQqZ9AtNHPWeeFF5Q9LG5BvwcI4EtklwhB0WniJCupamBOl7gwsmijMuBepaJwNEXuq8A30z4FsFLk2dgdi6lkzMv4mFV3euyj7VD7/WI= Received: from SN4PR0701CA0011.namprd07.prod.outlook.com (2603:10b6:803:28::21) by BN6PR07MB3169.namprd07.prod.outlook.com (2603:10b6:404:a6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.715.18; Wed, 25 Apr 2018 13:09:18 +0000 Received: from BN1AFFO11FD006.protection.gbl (2a01:111:f400:7c10::133) by SN4PR0701CA0011.outlook.office365.com (2603:10b6:803:28::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.696.13 via Frontend Transport; Wed, 25 Apr 2018 13:09:18 +0000 Authentication-Results: spf=pass (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; oracle.com; dkim=none (message not signed) header.d=none;oracle.com; dmarc=bestguesspass action=none header.from=cavium.com; Received-SPF: Pass (protection.outlook.com: domain of cavium.com designates 50.232.66.26 as permitted sender) receiver=protection.outlook.com; client-ip=50.232.66.26; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BN1AFFO11FD006.mail.protection.outlook.com (10.58.52.66) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.653.14 via Frontend Transport; Wed, 25 Apr 2018 13:09:17 +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; Wed, 25 Apr 2018 06:09:21 -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 w3PD97Bd006444; Wed, 25 Apr 2018 06:09:07 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w3PD974i006443; Wed, 25 Apr 2018 06:09:07 -0700 From: Chad Dupuis To: CC: , , Subject: [PATCH 06/21] qedf: Sanity check FCoE/FIP priority value to make sure it's between 0 and 7. Date: Wed, 25 Apr 2018 06:08:50 -0700 Message-ID: <20180425130905.6385-7-chad.dupuis@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180425130905.6385-1-chad.dupuis@cavium.com> References: <20180425130905.6385-1-chad.dupuis@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)(396003)(39380400002)(346002)(39860400002)(376002)(2980300002)(438002)(189003)(199004)(106466001)(356003)(50226002)(8936002)(81166006)(81156014)(8676002)(1076002)(107886003)(305945005)(51416003)(72206003)(5660300001)(478600001)(76176011)(47776003)(4326008)(87636003)(26005)(48376002)(6916009)(50466002)(2351001)(80596001)(186003)(446003)(11346002)(476003)(2616005)(126002)(486006)(36756003)(54906003)(69596002)(336012)(2906002)(316002)(16586007)(42186006)(86362001)(44832011)(106002)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3169; H:CAEXCH02.caveonetworks.com; FPR:; SPF:Pass; LANG:en; PTR:50-232-66-26-static.hfc.comcastbusiness.net; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD006; 1:72xMTq03eSqMN5sTeeSPr9UOQvpQBN0A0zSElO9iMWcwewkYqu2Fp7fC7JLWPfu6ZmnVqQvgpYQvbRWlXUaAvINqeZRh+PiKXsHX/4DdjeTGqddx27XNHiN0Z235sFx7 X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4608076)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060); SRVR:BN6PR07MB3169; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3169; 3:l0rmo7/1v7s2//FbwcykzUt1mphaw7v9lZ3WB6MumCdANX4eKlaE7kqFT7tPdwgszU2297thrAqO1XyaJTDRLTO+JV0YroQbYKmWE9SDD0We6mQ0p/z+edpRzP0ja7iIo32f2jQfGcDEyNlwN/XyBl1M2lJcQ+vsnTbLwJ1kkuAr1aFm8f/mCIHypCRYzKe3VPyy5VzOyEusSLYMEaq1VxfeE8u8A29qzD/qGUhhSv1nobuYdCf4UGr1AGWffzZzHBLRUFzhYGsH1Pl3LAtAYwxHWp4trE2dW4LGagRXmqBfsNCFEkqOcvv7+VBSHq5wiqDhcKeuYaL4x9dc2rcxXpeZScdz7STVeG/n4d9JuMc=; 25:OX3qB0XevZdFNOCvXYsQvnghLS5dWUmkpUZk1a8D0VKlHuMRne/ULynfJDdrVm+deO10jA40akny0w8frHMHYXoWaK9vPwNJDr6m5YGzXuOoVMdPny7ph5Yov9hEUhQWOUFW+uI3uVk8UTRg1CG825/9RuA+r3xhoQNLzKI8ZVZjf9H2/BKmNFbJwHd7ewgDY1kH2W3qJ6Yz3TYit9Jnt7+LKrbzyMbhtW2mEw9vquVJPSWJ7zV4cTTCczm+R/EwkyHal5Vq2VBQQ6O+mEY7HlseZeLjESE13UIrkpeZ6/zrG9oBnFczoDSTZISUHb4flVELD4+kXIRRr6+qRQjkEw== X-MS-TrafficTypeDiagnostic: BN6PR07MB3169: X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3169; 31:92TQlvQNNpny9VOxr69j8DE0UEoMnRFE9Ok3oFDa9EOmLxK/qEI1l8UrEqbKv6VKRdrmqLJj50HgtmkyXJYKfvUOCFceUX/j52eXR6pAVBEToeJTI49R2ZQEueYQh4ZQIo29hfMTLaqZerZJYbCI8GeC4B0E6d6VP1l132OyT2X1PHZLMhCmeQtMI1BHlSuUeTXjpOSFKZWKQlw7Oa1gaP2iymOJ1fltgDrVcIjgXzc=; 20:mtiyJ9rSBssgasl9GB0y1/d6VGOvQVlUEQ6o556TNNUnSwdySL4kM3Lzj0lUF2/zew/xBgO9z41PKMMrRzol8Dm+7TnALURzarb2dwdjxdUD9GenrNah4qB4PDg60K2ck7kA8bjVqvP4MA0g6F4HBz8LKbLvTYGB9CRGtQrVE8lW8TpUFlwNej9TcwIJ4eD4np+tTtkrooRB1ijTel9lGG0edPpyM+RyxfW/uyP2iyXfZcC6GSzaa4hDq5Yk6p8ZYJzq8nIknVnQlgMojnuyTuW6JCIjW+E/6rUs8lnn9geUoYgxjySHFF8A5LG3MsWl76V6J5gJ42ZBEsLxgubLHL6KBkE3kGN36CZZnk9VqO05UOarI/NTiJnm3Ym1DxdF4d0AqjONVCnpB4b9Ix02xmQZ8aAd8rc9eAkOGIESWAGqWqXJbKfXF8fvxOw/ELGuDSq51YBQyckGwHnnTV12YIrek8Yq6MBmXahD85N1+P3lm9Notk62dYJnRDbdOsAx X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231232)(944501410)(52105095)(93006095)(93004095)(3002001)(10201501046)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:BN6PR07MB3169; BCL:0; PCL:0; RULEID:; SRVR:BN6PR07MB3169; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3169; 4:RiqQQtGRXGz3WvMyRRAm1KcQ11CeQ1J3pwSr6FNIcx5yUuczsET3ZCkjvTxPf/6PaZN3MNqDo9TQLUZOV/xm2YreQr4Q8adH5qiE5QZKYZeypgWk17jwv1g/cx78jaDm3iNCOvMsjyymYL7436OvHVXA0HAfLtlqkPOjuOe7tm9kbNGGyH4ptt8szYYhmet3lVea/hYKvYWjjTGgIqIeCKwW+3NrO1JVFFIVEYXGJE02UJM8GnPtwvtn7btDclo7tnu1RhLnnMN4Y+2gtu4meA== X-Forefront-PRVS: 06530126A4 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR07MB3169; 23:EoGc//2FtySG0QhZxsMOtyLTaILKxXiu2by8ysg96?= =?us-ascii?Q?qmoFbzXwO2pSEWNeo++izgwU7j4y0kpdkbS5MZb089Gal13dsTsHBhYnQMC8?= =?us-ascii?Q?hoTW7VEvbmvyxOpom/VMLA4DfMH7xMUini8Lm4e9dlcWNc7zV2Gr3NzKW/V4?= =?us-ascii?Q?+o8aDSwHaPHzMgnxnSB8f/uXKCTZs6JT7YbhzMINf5OhpfLaWMB1pRZ8WR+P?= =?us-ascii?Q?KCkBrikRsq3PbmE8Ywk/+YlkCnudyF1JV+yBmoYvKOiQep43tZ8dgX+pMDhN?= =?us-ascii?Q?ctWBIb9w0AlPy7EVQAAnK9R8xA2pmRNU6yLQ+wznhbDW+5NqeN1xenFDVhsk?= =?us-ascii?Q?I4o6AztZRhLEz+vkha1LFk3pdnOpYEvqdDqsCekpYNOMtymZXHR+hvjisCkP?= =?us-ascii?Q?ifSw9loe0hSkC8+YzgMnlibOehkVwupRBOoL9hqnXlQwzvTeROXNJp3OvgSr?= =?us-ascii?Q?wXgw6CrRbnvlA7s0mQrI2mqDmcc92bHWaa7jGWHIF8QTJZH1owi4Opk7Q3TI?= =?us-ascii?Q?uxMythkiH73PYkrh/ppWKBTb4W3FdseGKMXT+uT8icCO9X7YEm3KqE9an3Ke?= =?us-ascii?Q?RwWNJUPfdN/H6gH0e5DD2rmZawpbn81pIslaeDAe7++wol20Cv4q4ZTfTRQr?= =?us-ascii?Q?1bZEc4ayzz6nyVBPlz2RLxzfNLR/N1OrL+w9xN/jfrAU9n5bzWjd6ygEMiRg?= =?us-ascii?Q?+Dt5XAxh1nJGhvBtLmv0gOO7CGy81e6kKqQoyq/y8lrvrlnyG40lDunirxzn?= =?us-ascii?Q?mC5fS/PGWT4YGhtiQWlXwhAADYriGqNLRh3KIPqKKWHyYbCTmQJ+Tgir2sFX?= =?us-ascii?Q?XgSgKmiLGS9gmQX7yOBKLDQDfjjeugVFdus2i8Th7wA0bce/su7KstBLsx9D?= =?us-ascii?Q?4T11Sv8zUre3DoCNBzVcjb3JD4AGvdzHs7z15lbKO3AjznbSWajr88SousC/?= =?us-ascii?Q?uk+9438FwsIeoOuJErC6f3l49T2r0Oz/l5Jx9QK9DerDxx4I2pSLKko/CsO6?= =?us-ascii?Q?ith6CPJkc+ZrGOHpn/vbZ3o0W6VWBmwLUXBczut1kXzRKn8juJl4dePwIotc?= =?us-ascii?Q?+NsfveC2Cfx4mSNx7hXfvrdECTnaSB19HjMSjM2rfNBM7bBeunvGEcXTrLuC?= =?us-ascii?Q?c0oaseT3hmq3Kvoh3Vi0v9gI2x1jTAG/MIYrY/yjtSX1Pxq9ugEBg=3D=3D?= X-Microsoft-Antispam-Message-Info: 3+sYk/yZ87Q4wHHuA5SxSdOIg/8AWpxsSKDU0lrQAoQI2EPB/F8uBd2irSJAamSwQO4MrHg0fbnKt/OiETV+nHiOLbfQSXmshDu6wofREMLD9PXL5hP3WAlJA2HfrSIVMR5VfUXlJluqnLFLh72X2LiB8G2mc2c8PLqeSB9Whv64WKw/oSZlIbDxsifHcrRi X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3169; 6:Xlrx5h7+l/cMjXnPtMMgcE939KlvZYqTaO7eurGCvg5BA9LJRdf6MbL/q6EhLBSfuuWrlZM2lMWnndJkVZXnIyXti2VV/v45V054mJt84b1YVs6qwgU0Ey7sh7YiksFW6nyeCw3N3IOUU4Dt5EpUIzAgzgbqmZFRQk/LG0uKwh0sGHUCoTLiazbWrLxIfunXiURw/0O77wEkzqQxtN5JJv664qQ0hVbeEpVkDKuDj9SEndCVgA6iCY+p+teW0ix98NWqSwKX5Hf2n/lEE/escXykAcwyBYS5Pv6NPp7KZ9/8VEcbRItcQniiWqrYT6mZNBHH+FdN2Ft3ZxElU7kkGed7Jez9Ivw6bgWBVVjMDIOOLvZnzBnvs+yjWDK6gq7tuKR/FJ4giNHV29yKy/aFpiti8+ocnaFQcGP4nVs4qWKgN2Y2B/nJsXn7BOb3S6RwnDXMfnv3qBL3P1KttO0NLA==; 5:792niUz7Tji2CHYdy6tpJFBVVgFqsBNl4zR0t97OuhGWscnOSRBiYrWGqXJmpBo8cL0hw8Xqjv/qTFLuTxc/Q4kBqlK1nSYLTRVuaDlXCqXPhs4tZHVV7RQe4vYmFhEU55qcWi9rX1Ujn+kZaAZMYrocWLGJAjBtuZHzkG2+RAg=; 24:2jJ6vk+A6xbUgfypag9SGeE3WsPRmhVq33g15WgehGc2+OKEUEnp7xcDc/xNUJ3CvbBnOM6n07tZt+8Sxj6NLwTFxypt5Iqv78F959yHbDI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3169; 7:FqV+Nlplrva53gZRiYOdOm40AQwp7QuM++D43u5TGC6CThYEpaJm3xwYWfll62cDKXPxZwPkODsZz+6G24Nk+dAQuH0Swr6u3r8nuIygQKcMpc1yOODfvSxHrlCjTHlzSmNlZfazUd7jXJPNEuux0Oq/eALazRPoSPVVnhgJpNf8dT6O0uyLE5NjSJMHEBlaErrOHrSnkVEEMkRnm5ITwVFKa6+cIu4BxzHDE4zguO6Mqv2Q2vQbtglAMbdMUttC X-MS-Office365-Filtering-Correlation-Id: ff8ed70c-f36a-4639-62ab-08d5aaadc0bf X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2018 13:09:17.9193 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ff8ed70c-f36a-4639-62ab-08d5aaadc0bf 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: BN6PR07MB3169 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 Signed-off-by: Chad Dupuis --- drivers/scsi/qedf/qedf_main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 8dcacc5b5f60..1a58f4a9cdf9 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -3405,6 +3405,13 @@ static int __init qedf_init(void) if (qedf_debug == QEDF_LOG_DEFAULT) qedf_debug = QEDF_DEFAULT_LOG_MASK; + /* Check that default prio for FIP/FCoE traffic is between 0..7 */ + if (qedf_default_prio > 7) { + qedf_default_prio = QEDF_DEFAULT_PRIO; + QEDF_ERR(NULL, "FCoE/FIP priority out of range, resetting to %d.\n", + QEDF_DEFAULT_PRIO); + } + /* Print driver banner */ QEDF_INFO(NULL, QEDF_LOG_INFO, "%s v%s.\n", QEDF_DESCR, QEDF_VERSION);