From patchwork Wed May 31 13:33:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dupuis, Chad" X-Patchwork-Id: 9757053 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 979F360390 for ; Wed, 31 May 2017 13:34:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9275920952 for ; Wed, 31 May 2017 13:34:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8734F281F9; Wed, 31 May 2017 13:34:38 +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 0E7ED20952 for ; Wed, 31 May 2017 13:34:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751190AbdEaNeh (ORCPT ); Wed, 31 May 2017 09:34:37 -0400 Received: from mail-sn1nam01on0089.outbound.protection.outlook.com ([104.47.32.89]:42902 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751146AbdEaNec (ORCPT ); Wed, 31 May 2017 09:34:32 -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=AcQDtb7EFXYtux9c05kPCB/F2bBox0W0fFi+3J1QGOU=; b=FQAUJ44tfzXatVYYIfoar4QXn/U0+hC9yUvOkJ/KoxstpgKyygGPeL27ZENtpcmCCc0bTy5s4W1JDFZL7AX5XyHdK7aVG3lruHP4HjUyALffSJziuOj4Kc0Gk0oNQ8rfR6/lhIZS9j8MvOkrZgOl3kONOGUGcMiiClEpIAcF144= Received: from DM5PR07CA0028.namprd07.prod.outlook.com (2603:10b6:3:16::14) by DM2PR07MB429.namprd07.prod.outlook.com (2a01:111:e400:243a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Wed, 31 May 2017 13:34:31 +0000 Received: from BL2FFO11OLC005.protection.gbl (2a01:111:f400:7c09::110) by DM5PR07CA0028.outlook.office365.com (2603:10b6:3:16::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9 via Frontend Transport; Wed, 31 May 2017 13:34:31 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; oracle.com; dkim=none (message not signed) header.d=none; oracle.com; 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 BL2FFO11OLC005.mail.protection.outlook.com (10.173.160.91) 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; Wed, 31 May 2017 13:34:30 +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, 31 May 2017 06:34:04 -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 v4VDY4rE016696; Wed, 31 May 2017 06:34:04 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v4VDY35H016695; Wed, 31 May 2017 06:34:03 -0700 From: "Dupuis, Chad" To: CC: , , Subject: [PATCH V2 08/15] qedf: Use same logic for SCSI host reset and FC lip_reset. Date: Wed, 31 May 2017 06:33:55 -0700 Message-ID: <20170531133402.16629-9-chad.dupuis@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170531133402.16629-1-chad.dupuis@cavium.com> References: <20170531133402.16629-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)(6009001)(39850400002)(39410400002)(39400400002)(39450400003)(39840400002)(2980300002)(428002)(189002)(199003)(9170700003)(106466001)(72206003)(50466002)(42186005)(107886003)(38730400002)(110136004)(8936002)(6666003)(2351001)(105586002)(86362001)(54906002)(5003940100001)(189998001)(76176999)(50986999)(33646002)(48376002)(305945005)(2950100002)(87636003)(478600001)(6916009)(5660300001)(80596001)(81166006)(1076002)(8676002)(356003)(2906002)(36756003)(50226002)(101416001)(4326008)(47776003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR07MB429; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC005; 1:jjGj52qDX+dHX54Wm93iliaYytbLIEoHuXR7cgj+ZWjQ3BG3RF5hq1kwhtTkAAhcw7tS5taboU2E1NKjevTQrWMJEHim3/TIcW3xRGIT+jtpEIax2B27x/dBDwOEG87CNwCZx1bq0Qh/yZTK+e2R0ek77p5G0NjQOBkAYT2iNBbJz+RqoWtkIXYNN/lQPCCB21NlpvmnW4tcSu6S454RExXoUZCGND7krnH2dMl+nvb2nzZkF0O5I2+qQAAA4xn/LzplvuYiEgQ1RFqKmS0y1HYFyLwH/IZjTS9B1wiPXhUAavJTOLZKyWrMw3IuanBWc3buF2u7s6GuFVaYOhTtFbsJ6Qu2wUKcC32HF1CHPyXYCgpRMUTKkg2YVjR/xMUqUIj5qj4l+LMzvdaGBxk0HLRmSPfBQ9mrWTHAu3ug2+tcPR5ef2i7oy2b1ta2Bu1DkRJMUCoDWc7RvuvXSp1pXg== X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM2PR07MB429: X-MS-Office365-Filtering-Correlation-Id: c4bbbc44-ea5b-4c08-2042-08d4a829c45c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:DM2PR07MB429; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB429; 3:LlLM4n1HsJq8mRmDfq0amrdzKv2hsR83I2i9mVDwm9ajUZsxLAhQZCe8Cu/aO62POiryU9AvoDvpso5D3gjUcVGdYyF55/t8K/C3H9K4NMjLzxoNQppP68YY9G+vfJ3EgQVJPovknYKn5dXkumImkEgiLWVRu4b3AErhxduc1syUjCgEOrQFIfpjp8oJNpjouFYkr7aJVmyzCcVaqpPoHKV+31PAWcVH8FXH5yCmmG4XiJqlcASxebGoH5+l90BqqGM6LN0GYbVUD+qf+HYIU/4ESJ5lW2pJBevz9mnUlvMg4c7bn8dT4YdXEFJhCBkGyVXGlJ3peLC1+tC0ZtnKyfyzEFGFpkDzKj1u/bqxgl1xEZTks5bsgp80UnwWWuwJgLbvsna61VN4NqS4Zr/6eGwHN/iRFaiv8KSEQB/8qHlGad1B+oDblYIhisu1ENnkoLrETOaU5uJJ3Hm/lh/OfZpz4AjjxmvkPdqhQnEe8mEM+1784PFGF3JhFMRAm/jn X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB429; 25:xD/kIYcMCjoTX+ZBfdTTZGo8bS/lMCKCBROKQx1DpbP1qUGjNPqkb122BzygP+N9FckrPhdilsCDXBFHY33sa8unKFwEWdtHE/vJETwTlpIaxCZTsEU9YOiCvcckwVb9NLQHmZ3aCON+olowHJo1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7oD6jlNe2evoVTUkaoraw5Zt6IiKCCX/IqZvSpUmQ198sBKSdd1VnrnqHy75aI7nHmszV7DrjR93UN78akXvoAnXxDQ2c6gZgJCk+lRs8 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700073)(100105000095)(100000701073)(100105300095)(100000702073)(100105100095)(6040450)(601004)(2401047)(13018025)(13016025)(8121501046)(5005006)(3002001)(10201501046)(100000703073)(100105400095)(93006095)(93001095)(6041248)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123564025)(6072148)(100000704073)(100105200095)(100000705073)(100105500095); SRVR:DM2PR07MB429; BCL:0; PCL:0; RULEID:(100000800073)(100110000095)(100000801073)(100110300095)(100000802073)(100110100095)(100000803073)(100110400095)(100000804073)(100110200095)(100000805073)(100110500095); SRVR:DM2PR07MB429; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR07MB429; 4:8qBqfs4WTOi8g91UZGgolE/E+H98T8RrV7Ni6Mc14zt?= =?us-ascii?Q?46NTok5HYIxjjKSM1bMMxKm/rtV+d56TQbZp/1QdDAyLkxgOw/UmI1fLQORk?= =?us-ascii?Q?MSdw+vK27Ed65ItbkfExK+KG4X2zmDA9ukwwrvG3qP7HMUY0TLNabHqXjgHi?= =?us-ascii?Q?wlTWIyrhJNn3VGtf20gxFTUfs1EBZtvkPtSJ5E17b1DD2yMXPXIJz5DDH/K1?= =?us-ascii?Q?ZQxuO7xWFwftafoIw9ggosXBTK+bjAI/Hza8abvNNmhM9tgnhjKsEhlLbL29?= =?us-ascii?Q?eJCdDabwJrzgP9+ZOqbsUCIT9Vkp0MdI2+PVzZAkrKazMw1wOIJJ3olchK3d?= =?us-ascii?Q?2lvXroV21zxgD2tnGkDL1YFvbkPlq6qd2ECTyCjhkdDaKdDPfKSx8enNg4MG?= =?us-ascii?Q?y+jfaFWvuMI4rVehnIfD4ExyCSIsVJ87ind+wpWPj9tY6hpoFO9NluRFXVjI?= =?us-ascii?Q?sVdJ4ssNxOdYi5EUneXpFfGx2A7VhCImh6cARDii1oKlsCbHvGutddESa1r1?= =?us-ascii?Q?SFHZCVXwW/eqP2QXv0R+fr7cOB9PUq7dYzTY/2EdOVKkHCn+sLfaqdlr59fI?= =?us-ascii?Q?lWGfVqTIXjjtznI/zL9IMsdH9xNBZr4CBGy6kb6cE19hqgK6qILzenIQcNHY?= =?us-ascii?Q?EhxBumbWOsAPXZwWmlR7oaNzxz6lyaHBEcOROlvx3b7LKkAaGaGxdgWzPvt6?= =?us-ascii?Q?YBog4l/TJ5xfJPiyK55nnBlqeGsVtDPltkbS7CKCnmyUMqL9QlPwBUkMEBaU?= =?us-ascii?Q?lI26N0r2ck0SEedlQ+9WTxh35gX/kPT81q46PqCeC556Yg8KJEafqExTcTki?= =?us-ascii?Q?fee/MX6d9yzqEBt1R8c9c3GB3SxaIbOb8vJtCSG5J2Q+zVNxYXRh3yw8L+VY?= =?us-ascii?Q?NmQ5t7pSrk1YOeqllGyT9fEbcqXTaAvAhy7PgOGlRS5Vsxy7pgU53B0/t+GT?= =?us-ascii?Q?ArUO93SI9qvlZoyRX2uzTfsXfiArFC8tSX7i5E6yC7Bxli4UzBAz8BGx/4DD?= =?us-ascii?Q?Bz9K+CRVbmHif6jFZICEwN5oGfcye5HVLDa3djSbCPoGi35ShO/LmZi5SLAH?= =?us-ascii?Q?XMazt9ZZ4ruUgDl63k4rieI/VE2t6SfoYF0EprqvHE6mfDlAQenRiPAdij3g?= =?us-ascii?Q?BysRu7bYj/0kufCHfPXUV9COukUZ7TumT1Csh7iNBYPmIbo624AS7/tsr3vr?= =?us-ascii?Q?oS8p2bTK7iU8=3D?= X-Forefront-PRVS: 0324C2C0E2 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR07MB429; 23:FwHhSiSVuW0km4dr6spprDY7IGIE8/65WCPItal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NVsXh0Hmf9tFS/jGV23pKq4nwcSm+7LsZ2ch/dm+1Q7DoCPTk8HVbWtbCQe6Wu+RLbegILtXg7I7v0zPHNIGKivxdJinrH2kUJR53nFmmfLnqE/FO7HvxEdig5fL2WKnjdBnmUpQ9iPGWGIkVKnxDtFU12Wx5t2vqGHyklJQcYD0D9tSmXuT2UuVZfPqOHAUOyY4lUQdUrOoyuR+VIcQSyHxJrKmkFq+Cybm+ZiQ1oU3N5gw1KqVtmSLY0VvIVqtHJv8j/C+c5NJA4o8a9681Gk8Zf25ElhdJNRIAKLilirg+G4MLSZC5YX78ei2Uy1sUFNgUj/P0ZfIQj8qNKokcoajMSo9IVEF8Qfewmgpn964Z15IkzMM0qRZ/jLMvUgNLH8ok; 24:Q/GlFiax9XBDYxNz3HlPD/kg43V8WKFU0I3bywk0Z4t7Bf9kbhWegqQrt3p08fg3VJmQeSqYJZs1TWgDm7zbcjoAz52L3oGtX4pZ75Kj7tw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB429; 7:iSRYPrFl4qhjJD8P/cpF3MmSuV4zYFsPpzaP1wjQEqSsjmS8QaV3k/LZydISK/zxD7gRDvJEOB0h/PvN/NyyB8CXccjLdyZPFjY5ylKGbUmikrwxE/0RDkqpHGnrj63FJaYrAPSUqqo2mGrq3spJXKPkNpdH+vjtEchuHpMC5Nag7V7BCJmwU8VI53N96nWBO52tce1KxdE+ghSj4MKtyrGHtPDBngMwN8Z2KnblKHOLyEegmXcRpf9RNi3thFqF6RzLbmiFm6LGpz+B46SGLCyA+0KQ1KfEugDz6wj5k/mpBBQVMV+CcSXqxuA3kk7g4H+JgsfTznX4tIAmPn3rSg== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2017 13:34:30.4148 (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: DM2PR07MB429 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 We should be using the same logic to do a soft reset of the FCoE function whether it is initiated via sg_reset or the fc_host issue_lip attribute. Refactor the host reset and fcoe reset handlers to use the preferred logic which is currently contained in qedf_eh_host_reset(). Signed-off-by: Chad Dupuis --- drivers/scsi/qedf/qedf_main.c | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index d08793e..99d8822 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -640,27 +640,17 @@ void qedf_wait_for_upload(struct qedf_ctx *qedf) } } -/* Reset the host by gracefully logging out and then logging back in */ -static int qedf_eh_host_reset(struct scsi_cmnd *sc_cmd) +/* Performs soft reset of qedf_ctx by simulating a link down/up */ +static void qedf_ctx_soft_reset(struct fc_lport *lport) { - struct fc_lport *lport; struct qedf_ctx *qedf; - lport = shost_priv(sc_cmd->device->host); - if (lport->vport) { QEDF_ERR(NULL, "Cannot issue host reset on NPIV port.\n"); - return SUCCESS; + return; } - qedf = (struct qedf_ctx *)lport_priv(lport); - - if (atomic_read(&qedf->link_state) == QEDF_LINK_DOWN || - test_bit(QEDF_UNLOADING, &qedf->flags) || - test_bit(QEDF_DBG_STOP_IO, &qedf->flags)) - return FAILED; - - QEDF_ERR(&(qedf->dbg_ctx), "HOST RESET Issued..."); + qedf = lport_priv(lport); /* For host reset, essentially do a soft link up/down */ atomic_set(&qedf->link_state, QEDF_LINK_DOWN); @@ -672,6 +662,24 @@ static int qedf_eh_host_reset(struct scsi_cmnd *sc_cmd) qedf->vlan_id = 0; queue_delayed_work(qedf->link_update_wq, &qedf->link_update, 0); +} + +/* Reset the host by gracefully logging out and then logging back in */ +static int qedf_eh_host_reset(struct scsi_cmnd *sc_cmd) +{ + struct fc_lport *lport; + struct qedf_ctx *qedf; + + lport = shost_priv(sc_cmd->device->host); + qedf = lport_priv(lport); + + if (atomic_read(&qedf->link_state) == QEDF_LINK_DOWN || + test_bit(QEDF_UNLOADING, &qedf->flags)) + return FAILED; + + QEDF_ERR(&(qedf->dbg_ctx), "HOST RESET Issued..."); + + qedf_ctx_soft_reset(lport); return SUCCESS; } @@ -1669,8 +1677,7 @@ static int qedf_fcoe_reset(struct Scsi_Host *shost) { struct fc_lport *lport = shost_priv(shost); - fc_fabric_logoff(lport); - fc_fabric_login(lport); + qedf_ctx_soft_reset(lport); return 0; }