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=-3.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 D5119C433E7 for ; Thu, 15 Oct 2020 03:37:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6CFFB20691 for ; Thu, 15 Oct 2020 03:37:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="msNV6Orz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387847AbgJODhz (ORCPT ); Wed, 14 Oct 2020 23:37:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387414AbgJODhz (ORCPT ); Wed, 14 Oct 2020 23:37:55 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14213C061755; Wed, 14 Oct 2020 20:37:55 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id b19so856219pld.0; Wed, 14 Oct 2020 20:37:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/mQ7jx+jeXIbaNrpQPCSMXM92HTMwnXaMr1S9Xsvdic=; b=msNV6Orz5tIcLKfH6tSrRA8png2sZHaShdmQ1xxAJeQJLL6+BOcFhBDLCmQYy7Ccgk CMfuUojr0tcTQEI2DZ5tqRQTnzMTKJLpfYdVdnEntexlbFyP4IiuRNcYpXCvlHQ7qZwP aRvK/Za9yzAm8eDHzqHIfWJ5mCpBphYxO9fkGUEQOHbABi4tQg/J2foybXPm/y+42/tM ouJWFMH95/rjDyMkdZVigErfi0FGaLW2dvYO73H70LMGb7YhQfzvoZnKk0zt+My/YkNt Izqdj38ZzRRd2qXUJjZdvchXZMeBkkYPNjP8bvdGO3qbCR7cvHqmOBNSWRvAsaZM1X5h a+Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/mQ7jx+jeXIbaNrpQPCSMXM92HTMwnXaMr1S9Xsvdic=; b=VmCdVvj4S7nTOXcbQwB9CZ9/IoVFXDWqRJiH1QAOIOhyxZGNNOWhULfXZ0FavsUwr1 2mCIViPVB9AaxhuNoV9XWmx0S7VzkKVOwt77pHVrEYcy3cg3D4SM0UCZb4yLOE0qQdrJ Z2h/o3HNqo9+/0K9uGmGWtjFz+lVvgDYyTk0Jit+6q86OullIk0D29BgLwBa/F8Efdh7 wMMdkBbhgSg4eARh2NGgYLjCpQNuMTKzVvSsJ9QQ7FdUcUYTTL1C+S1NZFKep6z1uNV0 0oyLevkoJDhxCbvAV5cuQqV77fYbTFj9hnetHXt7C7KP+sBNi43p2YO1LPIN6WQFIQCE DUbA== X-Gm-Message-State: AOAM533QiAN/1m6hKsiGN8HiXUgQxRhUa9xo+tIg8R6W8yU5euVmrm4j bwZOhgEF4rqH0yOohSRBe+s= X-Google-Smtp-Source: ABdhPJx5y3SL9k8GNspZ7+P3F73iyidQ4SjpBOapqyGYzsEDF50l6W/lTYfck8vz2QBQJsWYY3ImyA== X-Received: by 2002:a17:90b:11d6:: with SMTP id gv22mr2397850pjb.159.1602733074647; Wed, 14 Oct 2020 20:37:54 -0700 (PDT) Received: from localhost ([2001:e42:102:1532:160:16:113:140]) by smtp.gmail.com with ESMTPSA id a19sm1099267pjq.29.2020.10.14.20.37.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2020 20:37:53 -0700 (PDT) From: Coiby Xu X-Google-Original-From: Coiby Xu Date: Thu, 15 Oct 2020 11:37:32 +0800 To: Benjamin Poirier Cc: devel@driverdev.osuosl.org, Shung-Hsi Yu , Manish Chopra , "supporter:QLOGIC QLGE 10Gb ETHERNET DRIVER" , Greg Kroah-Hartman , open list , "open list:QLOGIC QLGE 10Gb ETHERNET DRIVER" Subject: Re: [PATCH v1 1/6] staging: qlge: Initialize devlink health dump framework for the dlge driver Message-ID: <20201015033732.qaihehernm2jzoln@Rk> References: <20201008115808.91850-1-coiby.xu@gmail.com> <20201008115808.91850-2-coiby.xu@gmail.com> <20201010073514.GA14495@f3> <20201010102416.hvbgx3mgyadmu6ui@Rk> <20201010134855.GB17351@f3> <20201012112406.6mxta2mapifkbeyw@Rk> <20201013003704.GA41031@f3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20201013003704.GA41031@f3> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 13, 2020 at 09:37:04AM +0900, Benjamin Poirier wrote: >On 2020-10-12 19:24 +0800, Coiby Xu wrote: >[...] >> > I think, but didn't check in depth, that in those drivers, the devlink >> > device is tied to the pci device and can exist independently of the >> > netdev, at least in principle. >> > >> You are right. Take drivers/net/ethernet/mellanox/mlxsw as an example, >> devlink reload would first first unregister_netdev and then >> register_netdev but struct devlink stays put. But I have yet to >> understand when unregister/register_netdev is needed. > >Maybe it can be useful to manually recover if the hardware or driver >gets in an erroneous state. I've used `modprobe -r qlge && modprobe >qlge` for the same in the past. Thank you for providing this user case! > >> Do we need to >> add "devlink reload" for qlge? > >Not for this patchset. That would be a new feature. To implement this feature, it seems I need to understand how qlge work under the hood. For example, what's the difference between qlge_soft_reset_mpi_risc and qlge_hard_reset_mpi_risc? Or should we use a brute-force way like do the tasks in qlge_remove and then re-do the tasks in qlge_probe? Is a hardware reference manual for qlge device? -- Best regards, Coiby 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=-3.3 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 33764C433E7 for ; Thu, 15 Oct 2020 03:38:00 +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 9904820691 for ; Thu, 15 Oct 2020 03:37:59 +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="msNV6Orz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9904820691 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 0B5C288616; Thu, 15 Oct 2020 03:37:59 +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 fV-RiKAr5upn; Thu, 15 Oct 2020 03:37:58 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 4014B885EB; Thu, 15 Oct 2020 03:37:58 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 343B11BF345 for ; Thu, 15 Oct 2020 03:37:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 2C5508783E for ; Thu, 15 Oct 2020 03:37:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AhNssAAfJse9 for ; Thu, 15 Oct 2020 03:37:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by hemlock.osuosl.org (Postfix) with ESMTPS id 0938E8782A for ; Thu, 15 Oct 2020 03:37:55 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id 1so848435ple.2 for ; Wed, 14 Oct 2020 20:37:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/mQ7jx+jeXIbaNrpQPCSMXM92HTMwnXaMr1S9Xsvdic=; b=msNV6Orz5tIcLKfH6tSrRA8png2sZHaShdmQ1xxAJeQJLL6+BOcFhBDLCmQYy7Ccgk CMfuUojr0tcTQEI2DZ5tqRQTnzMTKJLpfYdVdnEntexlbFyP4IiuRNcYpXCvlHQ7qZwP aRvK/Za9yzAm8eDHzqHIfWJ5mCpBphYxO9fkGUEQOHbABi4tQg/J2foybXPm/y+42/tM ouJWFMH95/rjDyMkdZVigErfi0FGaLW2dvYO73H70LMGb7YhQfzvoZnKk0zt+My/YkNt Izqdj38ZzRRd2qXUJjZdvchXZMeBkkYPNjP8bvdGO3qbCR7cvHqmOBNSWRvAsaZM1X5h a+Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/mQ7jx+jeXIbaNrpQPCSMXM92HTMwnXaMr1S9Xsvdic=; b=AuO6VVQlsWNbT1Zb0RVchd4YeWCL7souahLvPirtf+byuoKukR9AdXm8MbW9nXkT4A qm8HWC9JSCIIVjQiMbNFVg53Q/rZOe2yuzfFaftvhRJH/u17WT/rfYae8Snm1+PQJbag p5yCYXzd18RHysCBbrp5tJ6Bk7cIZ86YMuEMaEbYvppEhWUuR8Clap7Dx9vOyZLAsZN9 Z7ksNrhomP8+igTfJzqpoQTXSssiZ/37gTjlvfDVjiv3FfGcvLDn4ikaQLmI32Tg1nT3 LzHiFUwUnPJomRB+wz9kJhw/1HNC+ehbhdiRk7AGWEAvnLTPuYRf/niSl3ENx+7Sp3q1 avFw== X-Gm-Message-State: AOAM5337d7/h9QBP/e1dffppO6NrOAbHlsuPuAPqrTifbJMX8zgy+tDo tyobpJQNzgnLV9f9jyZNXmM= X-Google-Smtp-Source: ABdhPJx5y3SL9k8GNspZ7+P3F73iyidQ4SjpBOapqyGYzsEDF50l6W/lTYfck8vz2QBQJsWYY3ImyA== X-Received: by 2002:a17:90b:11d6:: with SMTP id gv22mr2397850pjb.159.1602733074647; Wed, 14 Oct 2020 20:37:54 -0700 (PDT) Received: from localhost ([2001:e42:102:1532:160:16:113:140]) by smtp.gmail.com with ESMTPSA id a19sm1099267pjq.29.2020.10.14.20.37.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2020 20:37:53 -0700 (PDT) From: Coiby Xu X-Google-Original-From: Coiby Xu Date: Thu, 15 Oct 2020 11:37:32 +0800 To: Benjamin Poirier Subject: Re: [PATCH v1 1/6] staging: qlge: Initialize devlink health dump framework for the dlge driver Message-ID: <20201015033732.qaihehernm2jzoln@Rk> References: <20201008115808.91850-1-coiby.xu@gmail.com> <20201008115808.91850-2-coiby.xu@gmail.com> <20201010073514.GA14495@f3> <20201010102416.hvbgx3mgyadmu6ui@Rk> <20201010134855.GB17351@f3> <20201012112406.6mxta2mapifkbeyw@Rk> <20201013003704.GA41031@f3> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201013003704.GA41031@f3> 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: devel@driverdev.osuosl.org, "supporter:QLOGIC QLGE 10Gb ETHERNET DRIVER" , Manish Chopra , Greg Kroah-Hartman , Shung-Hsi Yu , open list , "open list:QLOGIC QLGE 10Gb ETHERNET DRIVER" Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" On Tue, Oct 13, 2020 at 09:37:04AM +0900, Benjamin Poirier wrote: >On 2020-10-12 19:24 +0800, Coiby Xu wrote: >[...] >> > I think, but didn't check in depth, that in those drivers, the devlink >> > device is tied to the pci device and can exist independently of the >> > netdev, at least in principle. >> > >> You are right. Take drivers/net/ethernet/mellanox/mlxsw as an example, >> devlink reload would first first unregister_netdev and then >> register_netdev but struct devlink stays put. But I have yet to >> understand when unregister/register_netdev is needed. > >Maybe it can be useful to manually recover if the hardware or driver >gets in an erroneous state. I've used `modprobe -r qlge && modprobe >qlge` for the same in the past. Thank you for providing this user case! > >> Do we need to >> add "devlink reload" for qlge? > >Not for this patchset. That would be a new feature. To implement this feature, it seems I need to understand how qlge work under the hood. For example, what's the difference between qlge_soft_reset_mpi_risc and qlge_hard_reset_mpi_risc? Or should we use a brute-force way like do the tasks in qlge_remove and then re-do the tasks in qlge_probe? Is a hardware reference manual for qlge device? -- Best regards, Coiby _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel