From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06955C43457 for ; Wed, 14 Oct 2020 10:44:10 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7E57B2173E for ; Wed, 14 Oct 2020 10:44:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nNzeEZfx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E57B2173E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 1E7602E430; Wed, 14 Oct 2020 10:44:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rna40oC3QtvU; Wed, 14 Oct 2020 10:44:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id CF4932E490; Wed, 14 Oct 2020 10:43:46 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 933FD1BF575 for ; Wed, 14 Oct 2020 10:43:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 8968F2E490 for ; Wed, 14 Oct 2020 10:43:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k+pQlqwgeGQK for ; Wed, 14 Oct 2020 10:43:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by silver.osuosl.org (Postfix) with ESMTPS id 3F0D92E274 for ; Wed, 14 Oct 2020 10:43:37 +0000 (UTC) Received: by mail-pl1-f194.google.com with SMTP id d6so1521939plo.13 for ; Wed, 14 Oct 2020 03:43:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=k9YX9rQZlgFAfivrs5grc+B9grYX9g3LqejLDIU/3NE=; b=nNzeEZfx4U63s4a3aMcwaBwgz9rq54PcoKizd7b+yAmy9zzPHqnMHBUXQCw7Fpzi5s u1+ULJIkTk1G2qciIbujRxiUL5aVmO+twyJ06OlN1HyGaYeTwdKrTFCOXk8evf2t/fV4 ITMEAeG6Pf7atn9rLmNCgTYyATkQxTrN5y7NEBvgIjQPvpVLmRNztZncbjnYioczz/Ly e/XowHPwd7sCccGYGMuhmQepTjVZnDJPckpyLZOHx0N99J7TWScikJPoUNYliLRLZzhk AsL1+jD7Echb6Q4/V8IeAjOrP4q7o4xGMpb1u7xk4QF7Z+TAg++3DqriXrwa9c+rAKGg hmRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=k9YX9rQZlgFAfivrs5grc+B9grYX9g3LqejLDIU/3NE=; b=Ntn/Opz/j3ozTnXfKd+ZSEjIZloHlS5FJm1k03vC1Uy4ZRnnfYL720s2bmhQXmqpql pyxMDfTuTe4SoLoZjbD6D/smAt5irS65TM1jRVAhFs9G5keLENVnvCfuIMjvwBxPpGX5 l8MB8HJzKsIqJRpH3yvhxaZ0sMoGeIWOmAvqTUIaTyx9JiRb//qCPt0edlowexJ4TaSW DqfvhLktDKqcOHmuU4hk9pEvdlHBe+2Xt/hD8LY7P+qmjkziEnUVE2daSW6scvOTBjlM a4mC5EK0LO+nW43RQ/ZlPdQRfAh8ttBFpwPjY9gnwmt5yEv6rNHI/LbpII5cPNTikAeu 2y6w== X-Gm-Message-State: AOAM5338S/t8xYS72U4LQymAh4CRY3/HH0LvCfOS8U0v0xTIZYqnPey4 bVY7ZwEYS4MNixbcXjDLeCI6aVayXPLaUzYe X-Google-Smtp-Source: ABdhPJzRhCPIvE3jJwwWVGdoAh5p7xUXUFQJKRU8+V2GHrmjmGUGK8ebA9Wbm+XZ7n5yj/7dlTumTg== X-Received: by 2002:a17:902:a5c6:b029:d3:8dc1:5240 with SMTP id t6-20020a170902a5c6b02900d38dc15240mr3761125plq.16.1602672216661; Wed, 14 Oct 2020 03:43:36 -0700 (PDT) Received: from localhost ([2001:e42:102:1532:160:16:113:140]) by smtp.gmail.com with ESMTPSA id bj17sm2545488pjb.15.2020.10.14.03.43.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2020 03:43:36 -0700 (PDT) From: Coiby Xu To: devel@driverdev.osuosl.org Subject: [PATCH v2 4/7] staging: qlge: support force_coredump option for devlink health dump Date: Wed, 14 Oct 2020 18:43:03 +0800 Message-Id: <20201014104306.63756-5-coiby.xu@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201014104306.63756-1-coiby.xu@gmail.com> References: <20201014104306.63756-1-coiby.xu@gmail.com> MIME-Version: 1.0 X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Willem de Bruijn , "supporter:QLOGIC QLGE 10Gb ETHERNET DRIVER" , Manish Chopra , Greg Kroah-Hartman , Shung-Hsi Yu , open list , Benjamin Poirier , "open list:QLOGIC QLGE 10Gb ETHERNET DRIVER" , Dan Carpenter Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" With force_coredump module parameter set, devlink health dump will reset the MPI RISC first which takes 5 secs to be finished. Signed-off-by: Coiby Xu --- drivers/staging/qlge/qlge_devlink.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/staging/qlge/qlge_devlink.c b/drivers/staging/qlge/qlge_devlink.c index b75ec5bff26a..92db531ad5e0 100644 --- a/drivers/staging/qlge/qlge_devlink.c +++ b/drivers/staging/qlge/qlge_devlink.c @@ -56,10 +56,17 @@ static int qlge_reporter_coredump(struct devlink_health_reporter *reporter, struct qlge_adapter *qdev = devlink_health_reporter_priv(reporter); struct qlge_mpi_coredump *dump; + wait_queue_head_t wait; if (!netif_running(qdev->ndev)) return 0; + if (test_bit(QL_FRC_COREDUMP, &qdev->flags)) { + qlge_queue_fw_error(qdev); + init_waitqueue_head(&wait); + wait_event_timeout(wait, 0, 5 * HZ); + } + dump = kvmalloc(sizeof(*dump), GFP_KERNEL); if (!dump) return -ENOMEM; -- 2.28.0 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel