netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: davem@davemloft.net, Kai-Heng Feng <kai.heng.feng@canonical.com>,
	netdev@vger.kernel.org, sassmann@redhat.com,
	Sasha Neftin <sasha.neftin@intel.com>
Subject: Re: [PATCH net 1/4] igc: Report speed and duplex as unknown when device is runtime suspended
Date: Fri, 29 Jan 2021 22:22:55 -0800	[thread overview]
Message-ID: <20210129222255.5e7115bd@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <20210128213851.2499012-2-anthony.l.nguyen@intel.com>

On Thu, 28 Jan 2021 13:38:48 -0800 Tony Nguyen wrote:
> From: Kai-Heng Feng <kai.heng.feng@canonical.com>
> 
> Similar to commit 165ae7a8feb5 ("igb: Report speed and duplex as unknown
> when device is runtime suspended"), if we try to read speed and duplex
> sysfs while the device is runtime suspended, igc will complain and
> stops working:

> The more generic approach will be wrap get_link_ksettings() with begin()
> and complete() callbacks, and calls runtime resume and runtime suspend
> routine respectively. However, igc is like igb, runtime resume routine
> uses rtnl_lock() which upper ethtool layer also uses.
> 
> So to prevent a deadlock on rtnl, take a different approach, use
> pm_runtime_suspended() to avoid reading register while device is runtime
> suspended.

Is someone working on the full fix to how PM operates?

There is another rd32(IGC_STATUS) in this file which I don't think 
is protected either. 

  reply	other threads:[~2021-01-30  9:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-28 21:38 [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2021-01-28 Tony Nguyen
2021-01-28 21:38 ` [PATCH net 1/4] igc: Report speed and duplex as unknown when device is runtime suspended Tony Nguyen
2021-01-30  6:22   ` Jakub Kicinski [this message]
2021-01-30 14:00     ` Neftin, Sasha
2021-01-30 18:12       ` Jakub Kicinski
2021-01-31 10:22         ` Neftin, Sasha
2021-02-01 22:04           ` Jakub Kicinski
2021-01-28 21:38 ` [PATCH net 2/4] igc: set the default return value to -IGC_ERR_NVM in igc_write_nvm_srwr Tony Nguyen
2021-01-28 21:38 ` [PATCH net 3/4] igc: check return value of ret_val in igc_config_fc_after_link_up Tony Nguyen
2021-01-28 21:38 ` [PATCH net 4/4] i40e: Revert "i40e: don't report link up for a VF who hasn't enabled queues" Tony Nguyen
2021-01-29 20:23   ` Willem de Bruijn
2021-01-30  0:09     ` Jacob Keller
2021-01-30  2:00       ` Willem de Bruijn
2021-01-30  6:18         ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210129222255.5e7115bd@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
    --to=kuba@kernel.org \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=kai.heng.feng@canonical.com \
    --cc=netdev@vger.kernel.org \
    --cc=sasha.neftin@intel.com \
    --cc=sassmann@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).