linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Brian King <brking@linux.vnet.ibm.com>
Cc: James.Bottomley@steeleye.com, linux-scsi@vger.kernel.org,
	gregkh@suse.de, linuxppc-dev@ozlabs.org, paulus@samba.org,
	linux-pci@atrey.karlin.mff.cuni.cz
Subject: Re: [PATCH 1/3] pci: New PCI-E reset API
Date: Thu, 1 Feb 2007 12:12:35 -0700	[thread overview]
Message-ID: <20070201191235.GQ7585@parisc-linux.org> (raw)
In-Reply-To: <11703510202911-patch-mail.ibm.com>

On Thu, Feb 01, 2007 at 11:30:21AM -0600, Brian King wrote:
> Adds a new API which can be used to issue various types
> of PCI-E reset, including PCI-E warm reset and PCI-E hot reset.
> This is needed for an ipr PCI-E adapter which does not properly
> implement BIST. Running BIST on this adapter results in PCI-E
> errors. The only reliable reset mechanism that exists on this
> hardware is PCI Fundamental reset (warm reset). Since driving
> this type of reset is architecture unique, this provides the
> necessary hooks for architectures to add this support.

A few points ...

 - When doing a warm reset, you reset the entire device not just the
   function (== pci_dev) that gets passed in.  How happy are drivers for
   the other functions going to be about this?

 - You've missed the requirement:

"To allow components to perform internal initialization, system software
must wait for at least 100 ms from the end of a Conventional Reset of one
or more devices before it is permitted to issue Configuration Requests
to those devices."

   To fix this, we need to call pci_block_user_cfg_access() before
   calling the pcibios function, then msleep(100) after calling it, then
   call pci_unblock_user_cfg_access().

 - There's no attempt to support either cold or function-level reset in
   this patch.

I suspect the Right Way of handling hot/warm/cold reset is going to be
some kind of integration with error handling.  This driver understands
about slots being different from functions, and has the ability to
notify drivers of other functions that a reset is happening.

To a certain extent, what's going on with IPR here *is* an error
condition, it's just that we can recover from it with a warm reset
rather than a hot reset.

  parent reply	other threads:[~2007-02-01 19:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-01 17:30 [PATCH 1/3] pci: New PCI-E reset API Brian King
2007-02-01 17:30 ` [PATCH 2/3] powerpc: Add powerpc PCI-E reset API implementation Brian King
2007-02-01 17:30 ` [PATCH 3/3] ipr: Use PCI-E reset API for new ipr adapter Brian King
2007-02-01 19:12 ` Matthew Wilcox [this message]
2007-02-01 22:14   ` [PATCH 1/3] pci: New PCI-E reset API Brian King
2007-02-09 15:20     ` Brian King
  -- strict thread matches above, loose matches on Subject: below --
2007-02-19 14:47 Brian King
2007-03-08 20:44 ` Brian King
2007-03-09  0:32   ` Greg KH
2007-03-09 14:53     ` Brian King

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=20070201191235.GQ7585@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=James.Bottomley@steeleye.com \
    --cc=brking@linux.vnet.ibm.com \
    --cc=gregkh@suse.de \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /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).