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 B4B08C433DF for ; Fri, 16 Oct 2020 12:07:43 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 0AB93206E5 for ; Fri, 16 Oct 2020 12:07:42 +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="UBZlJQcL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0AB93206E5 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 whitealder.osuosl.org (Postfix) with ESMTP id 6ACD088473; Fri, 16 Oct 2020 12:07:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fbUxAf6Oc6Yv; Fri, 16 Oct 2020 12:07:41 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id C30FE88BBD; Fri, 16 Oct 2020 12:07:41 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id F19441BF3A4 for ; Fri, 16 Oct 2020 12:07:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id ECE1E88BBD for ; Fri, 16 Oct 2020 12:07:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZfHkaDaCsbm1 for ; Fri, 16 Oct 2020 12:07:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by whitealder.osuosl.org (Postfix) with ESMTPS id 3C10C88473 for ; Fri, 16 Oct 2020 12:07:40 +0000 (UTC) Received: by mail-pf1-f194.google.com with SMTP id w21so1384388pfc.7 for ; Fri, 16 Oct 2020 05:07:40 -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=UBZlJQcLl8KIAaleSLUZoq9dzHobnVdKwnlUnrvqBAXZFd6tgbqaaeYXV3OfuVp49y W4ivySVoE6TeNC0vKGUQXVG4HzLGUrlkCYtsm3ejmB//882+6+B4mNRr3zfwv+mvte+B H7agIxT6E3KY0l/KoReAkBoU/tScGCY71NN+zaqm2HZWvR0aA8ohVzFPfQBRQH3bZh4c hLSueNFeS0htFAMZkgkmSnMIpumV5SVrq+xkakEbPhcT94pv86BoAAuDi/5Rd27+HsqE wK6OOgLhc24+C3+dnwpKMUP3pkuZkpZOUsCGM6P4Eu8l/vZwy7UnuzBs5JGbJvqmZkUE sYmw== 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=ccdPCtCnWSbu+OOVNrMJaKtghnRpgCUHgDYvAshg8Qs4uJQGwtrGk8koc0y3FKOD/K aeK7U/zBNQYcMtkFj6lu8sPARXN245fvUpzZRdrUjsGTnP+GWTPx/iFQq/ZdySUTN6Iw CvvWYqV/XxG5zGSO5PTX8+WMx3RtXtZ7aX/Me1vNRmWGFx99V249KcAzzifl2aWGba1B KAZZ3RAoMPS2Xv0dFk3/+LZLk6Ew0zupHP5hzHKX8RtUqLq8Y9w5B4Dv5S98nwShVThC Whl+EWT4+eZRDSAK7SmPDyUfzo+S7y4X7X4PtwfL7e+vdJ8ElZJuF4cT+zJR0X0JUZ34 w6cA== X-Gm-Message-State: AOAM530kYY0SaFbHQm5d/joNOZWFh38BRKhX6xrPlixSzQSkObgKqs26 JE6Q021IMx96sWJGZNQgos/uYKUE7wzcUirI X-Google-Smtp-Source: ABdhPJyKcUGNc0tmqSEhPxCwTLLLobMo8LJCPW/z+CN9zqvSxG4H64w64PWRhtVQo+p1ewLPIFrkXQ== X-Received: by 2002:a63:a505:: with SMTP id n5mr2744545pgf.71.1602850059671; Fri, 16 Oct 2020 05:07:39 -0700 (PDT) Received: from localhost ([160.16.113.140]) by smtp.gmail.com with ESMTPSA id z20sm2721045pfk.199.2020.10.16.05.07.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Oct 2020 05:07:39 -0700 (PDT) From: Coiby Xu To: devel@driverdev.osuosl.org Subject: [PATCH v3 5/8] staging: qlge: support force_coredump option for devlink health dump Date: Fri, 16 Oct 2020 19:54:04 +0800 Message-Id: <20201016115407.170821-6-coiby.xu@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201016115407.170821-1-coiby.xu@gmail.com> References: <20201016115407.170821-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