linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Gavin Shan <shangw@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 03/10] powerpc/eeh: Check PCIe link after reset
Date: Tue, 25 Jun 2013 16:06:24 +1000	[thread overview]
Message-ID: <1372140384.3944.189.camel@pasglop> (raw)
In-Reply-To: <1372139717-14885-4-git-send-email-shangw@linux.vnet.ibm.com>

On Tue, 2013-06-25 at 13:55 +0800, Gavin Shan wrote:
>         * don't touch the other command bits
>          */
> -       eeh_ops->read_config(dn, PCI_COMMAND, 4, &cmd);
> -       if (edev->config_space[1] & PCI_COMMAND_PARITY)
> -               cmd |= PCI_COMMAND_PARITY;
> -       else
> -               cmd &= ~PCI_COMMAND_PARITY;
> -       if (edev->config_space[1] & PCI_COMMAND_SERR)
> -               cmd |= PCI_COMMAND_SERR;
> -       else
> -               cmd &= ~PCI_COMMAND_SERR;
> -       eeh_ops->write_config(dn, PCI_COMMAND, 4, cmd);
> +       if (pdev) {
> +               eeh_ops->write_config(dn, PCI_COMMAND, 4,
> +                                     edev->config_space[1]);
> +       } else {

That needs a much better comment. Why are you doing that instead
of what's below ? In fact there is more to restore in a bridge
right ? (windows etc...). Do you do that ? Should we just have a
different function to restore a device vs. a bridge ?

I also don't see a need to do thing differently between phyp and
powernv. Bridges inside partitions would suffer the same fate in
both cases.

Ben.

> +               eeh_ops->read_config(dn, PCI_COMMAND, 4, &cmd);
> +               if (edev->config_space[1] & PCI_COMMAND_PARITY)
> +                       cmd |= PCI_COMMAND_PARITY;
> +               else
> +                       cmd &= ~PCI_COMMAND_PARITY;
> +               if (edev->config_space[1] & PCI_COMMAND_SERR)
> +                       cmd |= PCI_COMMAND_SERR;
> +               else
> +                       cmd &= ~PCI_COMMAND_SERR;
> +               eeh_ops->write_config(dn, PCI_COMMAND, 4, cmd);
> +       }
> +

  reply	other threads:[~2013-06-25  6:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25  5:55 [PATCH v1 00/10] powerpc/eeh: Remove eeh_mutex Gavin Shan
2013-06-25  5:55 ` [PATCH 01/10] " Gavin Shan
2013-06-25  5:55 ` [PATCH 02/10] powerpc/eeh: Don't collect PCI-CFG data on PHB Gavin Shan
2013-06-25  5:55 ` [PATCH 03/10] powerpc/eeh: Check PCIe link after reset Gavin Shan
2013-06-25  6:06   ` Benjamin Herrenschmidt [this message]
2013-06-25  7:47     ` Gavin Shan
2013-06-25  7:57       ` Benjamin Herrenschmidt
2013-06-25  8:04         ` Gavin Shan
2013-06-25  5:55 ` [PATCH 04/10] powerpc/eeh: Backends to get/set settings Gavin Shan
2013-06-25  6:07   ` Benjamin Herrenschmidt
2013-06-25  7:12     ` Gavin Shan
2013-06-25  5:55 ` [PATCH 05/10] powerpc/powernv: Support set/get EEH settings Gavin Shan
2013-06-25  5:55 ` [PATCH 06/10] powerpc/eeh: Support blocked IO access Gavin Shan
2013-06-25  5:55 ` [PATCH 07/10] powerpc/powernv: Block PCI-CFG access if necessary Gavin Shan
2013-06-25  5:55 ` [PATCH 08/10] powerpc/powernv: Hold PCI-CFG and I/O access Gavin Shan
2013-06-25  5:55 ` [PATCH 09/10] powerpc/eeh: Fix address catch for PowerNV Gavin Shan
2013-06-25  5:55 ` [PATCH 10/10] net/tg3: Avoid delay during MMIO access Gavin Shan
2013-06-25  6:15   ` Benjamin Herrenschmidt

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=1372140384.3944.189.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=shangw@linux.vnet.ibm.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).