All of lore.kernel.org
 help / color / mirror / Atom feed
From: Auke Kok <auke-jan.h.kok@intel.com>
To: Linas Vepstas <linas@austin.ibm.com>
Cc: gregkh@suse.de, linux-kernel@vger.kernel.org,
	linux-pci@atrey.karlin.mff.cuni.cz,
	Jesse Brandeburg <jesse.brandeburg@intel.com>
Subject: Re: [PATCH 2/2]: Use newly defined PCI channel offline routine
Date: Wed, 01 Nov 2006 16:20:11 -0800	[thread overview]
Message-ID: <454939BB.3060607@intel.com> (raw)
In-Reply-To: <20061102000035.GW6360@austin.ibm.com>

Linas Vepstas wrote:
> Subject: [PATCH 2/2]: Use newly defined PCI channel offline routine
> 
> Use newly minted routine to access the PCI channel state.


why not write this so that it reads:

 > +	if (pci_channel_offline(pdev))

iow are we assuming that there are multiple error_state's per pdev? That seems bogus.

Auke


> 
> Signed-off-by: Linas Vepstas <linas@linas.org>
> 
> ----
>  drivers/net/e1000/e1000_main.c |    2 +-
>  drivers/net/ixgb/ixgb_main.c   |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> Index: linux-2.6.19-rc4-git3/drivers/net/e1000/e1000_main.c
> ===================================================================
> --- linux-2.6.19-rc4-git3.orig/drivers/net/e1000/e1000_main.c	2006-11-01 16:15:24.000000000 -0600
> +++ linux-2.6.19-rc4-git3/drivers/net/e1000/e1000_main.c	2006-11-01 16:20:55.000000000 -0600
> @@ -3297,7 +3297,7 @@ e1000_update_stats(struct e1000_adapter 
>  	 */
>  	if (adapter->link_speed == 0)
>  		return;
> -	if (pdev->error_state && pdev->error_state != pci_channel_io_normal)
> +	if (pci_channel_offline(pdev->error_state))
>  		return;
>  
>  	spin_lock_irqsave(&adapter->stats_lock, flags);
> Index: linux-2.6.19-rc4-git3/drivers/net/ixgb/ixgb_main.c
> ===================================================================
> --- linux-2.6.19-rc4-git3.orig/drivers/net/ixgb/ixgb_main.c	2006-11-01 16:15:25.000000000 -0600
> +++ linux-2.6.19-rc4-git3/drivers/net/ixgb/ixgb_main.c	2006-11-01 16:20:55.000000000 -0600
> @@ -1564,7 +1564,7 @@ ixgb_update_stats(struct ixgb_adapter *a
>  	struct pci_dev *pdev = adapter->pdev;
>  
>  	/* Prevent stats update while adapter is being reset */
> -	if (pdev->error_state && pdev->error_state != pci_channel_io_normal)
> +	if (pci_channel_offline(pdev->error_state))
>  		return;
>  
>  	if((netdev->flags & IFF_PROMISC) || (netdev->flags & IFF_ALLMULTI) ||

  reply	other threads:[~2006-11-02  0:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-01 23:54 [PATCH 1/2]: Renumber PCI error enums to start at zero Linas Vepstas
2006-11-02  0:00 ` [PATCH 2/2]: Use newly defined PCI channel offline routine Linas Vepstas
2006-11-02  0:20   ` Auke Kok [this message]
2006-11-02  0:40     ` Linas Vepstas
2006-11-02  1:10   ` [PATCH 2/2 v2]: " Linas Vepstas
2006-11-02  5:13     ` Auke Kok
2006-11-02  1:08 ` [PATCH 1/2 v2]: Renumber PCI error enums to start at zero Linas Vepstas
  -- strict thread matches above, loose matches on Subject: below --
2006-12-12 19:55 [PATCH 1/2]: " Linas Vepstas
2006-12-12 20:01 ` [PATCH 2/2]: Use newly defined PCI channel offline routine Linas Vepstas
2006-12-12 21:27   ` Auke Kok
2006-12-12 22:55 Revised [PATCH 1/2]: define inline for test of channel error state Linas Vepstas
2006-12-13  0:29 ` [PATCH 2/2]: Use newly defined PCI channel offline routine Linas Vepstas

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=454939BB.3060607@intel.com \
    --to=auke-jan.h.kok@intel.com \
    --cc=gregkh@suse.de \
    --cc=jesse.brandeburg@intel.com \
    --cc=linas@austin.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.