netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Keller, Jacob E" <jacob.e.keller@intel.com>
To: "davem@davemloft.net" <davem@davemloft.net>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
	"sergei.shtylyov@cogentembedded.com"
	<sergei.shtylyov@cogentembedded.com>
Cc: "nhorman@redhat.com" <nhorman@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"guru.anbalagane@oracle.com" <guru.anbalagane@oracle.com>,
	"sassmann@redhat.com" <sassmann@redhat.com>,
	"jogreene@redhat.com" <jogreene@redhat.com>
Subject: ~~
Date: Thu, 21 Jul 2016 20:13:03 +0000	[thread overview]
Message-ID: <1469131981.6600.4.camel@intel.com> (raw)
In-Reply-To: <63e931a3-e447-5a1f-f998-578e1cb2eb8e@cogentembedded.com>

On Thu, 2016-07-21 at 13:51 +0300, Sergei Shtylyov wrote:
> Hello.
> 
> On 7/21/2016 1:23 AM, Jeff Kirsher wrote:
> 
> > From: Jacob Keller <jacob.e.keller@intel.com>
> > 
> > Sometimes, a VF driver will lose PCIe address access, such as due
> > to
> > a PF FLR event. In fm10k_detach_subtask, poll and check whether the
> > PCIe register space is active again and restore the device when it
> > has.
> > 
> > Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> > Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > ---
> >  drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> > 
> > diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> > b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> > index 5e40460..d4ccb2a 100644
> > --- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> > +++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> > @@ -123,11 +123,24 @@ static void fm10k_service_timer(unsigned long
> > data)
> >  static void fm10k_detach_subtask(struct fm10k_intfc *interface)
> >  {
> >  	struct net_device *netdev = interface->netdev;
> > +	u32 __iomem *hw_addr;
> > +	u32 value;
> > 
> >  	/* do nothing if device is still present or hw_addr is set
> > */
> >  	if (netif_device_present(netdev) || interface->hw.hw_addr)
> >  		return;
> > 
> > +	/* check the real address space to see if we've recovered
> > */
> > +	hw_addr = READ_ONCE(interface->uc_addr);
> > +	value = readl(hw_addr);
> > +	if ((~value)) {
> 
>     Why these double parens?
> 

You're right it doesn't need them. I think at one point the check was
"!(~value)" in some other portion of code, and likely got copied by
mistake.

Thanks,
Jake

> [...]
> 
> MBR, Sergei
> 

  reply	other threads:[~2016-07-21 20:13 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-20 22:23 [net-next 00/20][pull request] 100GbE Intel Wired LAN Driver Updates 2016-07-20 Jeff Kirsher
2016-07-20 22:23 ` [net-next 01/20] fm10k: no need to continue in fm10k_down if __FM10K_DOWN already set Jeff Kirsher
2016-07-20 22:23 ` [net-next 02/20] fm10k: avoid possible null pointer dereference in fm10k_update_stats Jeff Kirsher
2016-07-20 22:23 ` [net-next 03/20] fm10k: prevent multiple threads updating statistics Jeff Kirsher
2016-07-20 22:23 ` [net-next 04/20] fm10k: Reset mailbox global interrupts Jeff Kirsher
2016-07-20 22:23 ` [net-next 05/20] fm10k: don't stop reset due to FM10K_ERR_REQUESTS_PENDING Jeff Kirsher
2016-07-20 22:23 ` [net-next 06/20] fm10k: perform data path reset even when switch is not ready Jeff Kirsher
2016-07-20 22:23 ` [net-next 07/20] fm10k: use actual hardware registers when checking for pending Tx Jeff Kirsher
2016-07-20 22:23 ` [net-next 08/20] fm10k: only warn when stop_hw fails with FM10K_ERR_REQUESTS_PENDING Jeff Kirsher
2016-07-20 22:23 ` [net-next 09/20] fm10k: wait for queues to drain if stop_hw() fails once Jeff Kirsher
2016-07-20 22:23 ` [net-next 10/20] fm10k: split fm10k_reinit into two functions Jeff Kirsher
2016-07-20 22:23 ` [net-next 11/20] fm10k: implement prepare_suspend and handle_resume Jeff Kirsher
2016-07-20 22:23 ` [net-next 12/20] fm10k: use common reset flow when handling io errors from PCI stack Jeff Kirsher
2016-07-20 22:23 ` [net-next 13/20] fm10k: implement reset_notify handler for PCIe FLR events Jeff Kirsher
2016-07-20 22:23 ` [net-next 14/20] fm10k: use common flow for suspend and resume Jeff Kirsher
2016-07-20 22:23 ` [net-next 15/20] fm10k: enable bus master after every reset Jeff Kirsher
2016-07-20 22:23 ` [net-next 16/20] fm10k: check if PCIe link is restored Jeff Kirsher
2016-07-21 10:51   ` Sergei Shtylyov
2016-07-21 20:13     ` Keller, Jacob E [this message]
2016-07-20 22:23 ` [net-next 17/20] fm10k: implement request_lport_map pointer Jeff Kirsher
2016-07-20 22:23 ` [net-next 18/20] fm10k: force link to remain down for at least a second on resume events Jeff Kirsher
2016-07-20 22:23 ` [net-next 19/20] fm10k: return proper error code when pci_enable_msix_range fails Jeff Kirsher
2016-07-20 22:23 ` [net-next 20/20] fm10k: bump version number Jeff Kirsher
2016-07-21  5:05 ` [net-next 00/20][pull request] 100GbE Intel Wired LAN Driver Updates 2016-07-20 David Miller

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=1469131981.6600.4.camel@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=davem@davemloft.net \
    --cc=guru.anbalagane@oracle.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jogreene@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    --cc=sergei.shtylyov@cogentembedded.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).