From patchwork Thu Mar 22 14:28:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 132283 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp919248ljb; Thu, 22 Mar 2018 07:30:11 -0700 (PDT) X-Google-Smtp-Source: AG47ELtpc+K3ak/NOdgeiy2xY4+ZOM7KHW9FoQhkE34H4ibshVHaPeG3vZybhEgIQjnMJ6iAM4/U X-Received: by 10.98.102.131 with SMTP id s3mr13999321pfj.89.1521729011715; Thu, 22 Mar 2018 07:30:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521729011; cv=none; d=google.com; s=arc-20160816; b=iyBI0l1PtIw89W2eIHMjNX//CpEanJ69TsYOyi7qF63Tb/r7EB2xBLHe0BX25sZ4zb 3ce5lpf5vxzarIK24bvHNHhrf1N8LbGEzGBoPeC9BRG9MvatPIem0yFeDAPcLKpOQuux CqitG2w1vrPBaAywwEsmsQac41d/0AcP5V8iuapFI56zjtf+vn+EnqimxocIiARaWe1H eGoBjYzpXCcknMvVkUD25+Fn06elPemF8eIoAGMKBYP2CcvQoDJD/HuLFqO8APhy5VDe q6VjCQEAV3OHFu7aLM7Bpt/OUmjnseabsBbpNjEzlNJiN6ArCCJVQuuaV7/D4Qv2OKH9 kcjQ== 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=63H7aNDvTtpMIZ2hsM/igcktR+oSM6wsvmwbN1l+Khc=; b=skh6oDVvU7tKVo5n4JgFQn+5AsAH6TFhVkvsZXxunyMSPNvlovXPv8AY47VV2IeGuQ eH9n6WrFKPi7uE9EzoB+jCkHrdmdfJct7cABu8izL4wy+do9meVAC12Nohs3Jn8WAQhz UhTzFL3j4hNuspIHH1TpZd1bVBTzXFIdDMLyn91Z8sJ8HjT4abYIJ8BUUwuNWHBpthaM TRftGwWEEtOXbTOIUf1urWlfbQSJn4UU6b40uvyoVW1geMXx5jXB7SSEpOP+zBeDmND4 JKEqpd7yE/NFBn8mgSbJLp9jL3lxokNRKra51EfiyDzzHkKb5tox5vtrAaYedhz80ryg BAYA== 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 m3si3652560pfh.80.2018.03.22.07.30.11; Thu, 22 Mar 2018 07:30:11 -0700 (PDT) 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 S1756015AbeCVOaI (ORCPT + 28 others); Thu, 22 Mar 2018 10:30:08 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:6259 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754583AbeCVOaG (ORCPT ); Thu, 22 Mar 2018 10:30:06 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 0A0742E47CBA7; Thu, 22 Mar 2018 22:29:52 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.202.226.47) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.361.1; Thu, 22 Mar 2018 22:29:43 +0800 From: Salil Mehta To: CC: , , , , , Subject: [PATCH net-next 0/9] Add support of VF Reset to HNS3 VF driver Date: Thu, 22 Mar 2018 14:28:51 +0000 Message-ID: <20180322142900.22860-1-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 MIME-Version: 1.0 X-Originating-IP: [10.202.226.47] 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-set adds the support of VF reset to the existing VF driver. VF Reset can be triggered due to TX watchdog firing as a result of TX data-path not working. VF reset could also be a result of some internal configuration changes if that requires reset, or as a result of the PF/Core/Global/IMP(Integrated Management Processor) reset happened in the PF. Summary of Patches: * Watchdog timer trigger chnages are present in Patch 1. * Reset Service Task and related Event handling is present in Patches {2,3} * Changes to send reset request to PF, reset stack and re-initialization of the hclge device is present in Patches {4,5,6} * Changes related to ARQ (Asynchronous Receive Queue) and its event handling are present in Patches {7,8} * Changes required in PF to handle the VF Reset request and actually perform hardware VF reset is there in Patch 9. NOTE: This patch depends upon "[PATCH net-next 00/11] fix some bugs for HNS3 driver" Link: https://lkml.org/lkml/2018/3/21/72 Salil Mehta (9): net: hns3: Changes to make enet watchdog timeout func common for PF/VF net: hns3: Add VF Reset Service Task to support event handling net: hns3: Add VF Reset device state and its handling net: hns3: Add support to request VF Reset to PF net: hns3: Add support to reset the enet/ring mgmt layer net: hns3: Add support to re-initialize the hclge device net: hns3: Changes to support ARQ(Asynchronous Receive Queue) net: hns3: Add *Asserting Reset* mailbox message & handling in VF net: hns3: Changes required in PF mailbox to support VF reset drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h | 16 + drivers/net/ethernet/hisilicon/hns3/hnae3.h | 8 +- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 30 +- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 2 - .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 38 +-- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 1 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 42 +++ .../ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c | 6 + .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 336 +++++++++++++++++++-- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 31 ++ .../ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c | 95 +++++- 11 files changed, 534 insertions(+), 71 deletions(-) -- 2.7.4