From patchwork Mon Dec 4 01:29:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 120472 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp3865219qgn; Sun, 3 Dec 2017 17:31:34 -0800 (PST) X-Google-Smtp-Source: AGs4zMaj8Lw0C2Fgf4Zp8e0Jz+sxfQXcV6n+Ma2Gbv4vDSemSifXIR0ZHANOJb3AKNBradhgoPdS X-Received: by 10.101.96.213 with SMTP id r21mr12138809pgv.395.1512351094228; Sun, 03 Dec 2017 17:31:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512351094; cv=none; d=google.com; s=arc-20160816; b=Iwpj8PwKa+Z6e+2VoRmFASo4NNc5sVMPhxPgfLV6a26K8KyXtwOa57xIMqNFJU0or1 x5a4r9X/D1dIzSwkcl4QOkK8YwNW8SbOExQnmbfWr/+eO1r6q0siyvgMdHlx0I0O1ape UkTIdqvkFk89wO0eGPiz+TQKxVic/vxAcFITXztGYv5KVRHcRzhPh45FhmYMn6QAqKbi Oy+1FE9xBTBwHPQZTvehr1dW9sUSo8DxPsY9pBYEDJg5riNOx7NFrbngSLYmdjJJlwo+ qmf8u7d/OWuzLJjyF/vJxxWUR4uYObqvn3+zOhbCuZQM3yxw6QVDVObhtBFQ6A5twn4V K9ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=tj4WUSAO4EX/jHAp8ncF0r6Bga4wxWc7ShhfFdibQpw=; b=Ra6yNqWuxlDPBtjVG73wGqCqOZEahb9fPonMLVoVUMyYa3H8b49RjVDzIJh156NYJK euv9UGglGIsr9DhfL3FdeLZLLHWRG2dJjDwn0X7HCm2VFO+X9NMAWVDXiDotuSCosiwt m9iSgWIh5cF6oEwPN4ZG2Spbh7VvgtlMTTktPvGQWY9xyBJ0sHQNtlwVwoWoKYZTPQg6 jy9TID++tjfL4PLYgxmh1L5KB8wWG8YNSQFe03BkvClmBd8GpDuUYH0oeL8E4FM0052R h2euN4y1zekJ2E1SoWDSiBujOaOP0gJxBtpi3KZzDSkGoOGGk1/EwWHTVRiCGuU5xEQ0 OjBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n6si8762892pla.772.2017.12.03.17.31.33; Sun, 03 Dec 2017 17:31:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753020AbdLDBbb (ORCPT + 28 others); Sun, 3 Dec 2017 20:31:31 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:56228 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752750AbdLDBav (ORCPT ); Sun, 3 Dec 2017 20:30:51 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 75F4BE35D9FDC; Mon, 4 Dec 2017 09:30:37 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.47.83.141) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.361.1; Mon, 4 Dec 2017 09:30:30 +0800 From: Salil Mehta To: CC: , , , , , , , Subject: [PATCH V2 net-next 0/3] net: hns3: Refactors "reset" handling code in HCLGE layer of HNS3 driver Date: Mon, 4 Dec 2017 01:29:52 +0000 Message-ID: <20171204012955.17560-1-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 MIME-Version: 1.0 X-Originating-IP: [10.47.83.141] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch refactors the code of the reset feature in HCLGE layer of HNS3 PF driver. Prime motivation to do this change is: 1. To reduce the time for which common miscellaneous Vector 0 interrupt is disabled because of the reset. Simplification of the common miscellaneous interrupt handler routine(for Vector 0) used to handle reset and other sources of Vector 0 interrupt. 2. Separate the task for handling the reset 3. Simplification of reset request submission and pending reset logic. To achieve above below few things have been done: 1. Interrupt is disabled while common miscellaneous interrupt handler is entered and re-enabled before it is exit. This reduces the interrupt handling latency as compared to older interrupt handling scheme where interrupt was being disabled in interrupt handler context and re-enabled in task context some time later. Made Miscellaneous interrupt handler more generic to handle all sources including reset interrupt source. 2. New reset service task has been introduced to service the reset handling. 3. Introduces new reset service task for honoring software reset requests like from network stack related to timeout and serving the pending reset request(to reset the driver and associated clients). Change Log: Patch V2: Addressed comment by Andrew Lunn Link: https://lkml.org/lkml/2017/12/1/366 Patch V1: Initial Submit Salil Mehta (3): net: hns3: Refactor of the reset interrupt handling logic net: hns3: Add reset service task for handling reset requests net: hns3: Refactors the requested reset & pending reset handling code .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 222 ++++++++++++++------- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 12 +- 2 files changed, 166 insertions(+), 68 deletions(-) -- 2.11.0