RE: [PATCH net v2] iavf: Detach device during reset task
From: "Keller, Jacob E" <jacob.e.keller@intel.com>
Date: 2022-08-31 20:09:55
Also in:
intel-wired-lan, lkml
-----Original Message----- From: Ivan Vecera <ivecera@redhat.com> Sent: Wednesday, August 31, 2022 12:06 AM To: Laba, SlawomirX <redacted> Cc: netdev@vger.kernel.org; Keller, Jacob E <jacob.e.keller@intel.com>; Piotrowski, Patryk [off-list ref]; Vitaly Grinberg [off-list ref]; Brandeburg, Jesse [off-list ref]; Nguyen, Anthony L [off-list ref]; David S. Miller [off-list ref]; Eric Dumazet [off-list ref]; Jakub Kicinski [off-list ref]; Paolo Abeni [off-list ref]; Jeff Kirsher [off-list ref]; moderated list:INTEL ETHERNET DRIVERS <intel- wired-lan@lists.osuosl.org>; open list [off-list ref] Subject: Re: [PATCH net v2] iavf: Detach device during reset task On Tue, 30 Aug 2022 20:49:54 +0000 "Laba, SlawomirX" [off-list ref] wrote:quoted
Ivan, what do you think about this flow [1]? Shouldn't it also goto reset_finishlabel?quoted
if (i == IAVF_RESET_WAIT_COMPLETE_COUNT) { dev_err(&adapter->pdev->dev, "Reset never finished (%x)\n", reg_val); iavf_disable_vf(adapter); mutex_unlock(&adapter->client_lock); mutex_unlock(&adapter->crit_lock); return; /* Do not attempt to reinit. It's dead, Jim. */ } I am concerned that if the reset never finishes and iavf goes into disabled state,and then for example if driver reload operation is performed, bad things can happen. I think we should not re-attach device back as the VF is disabled. Detached device causes that userspace (user) won't be able to configure associated interface that is correct. Driver reload won't cause anything special in this situation because during module removal the interface is unregistered. Thanks, Ivan
I agree. It's safe to remove a detached device. Thanks, Jake