public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Linas Vepstas <linas@austin.ibm.com>
To: Andi Kleen <ak@muc.de>, sfr@canb.auug.org.au
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	linux-kernel@vger.kernel.org,
	long <tlnguyen@snoqualmie.dp.intel.com>,
	Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>,
	Greg KH <greg@kroah.com>, Paul Mackerras <paulus@samba.org>,
	linuxppc64-dev <linuxppc64-dev@ozlabs.org>,
	linux-pci@atrey.karlin.mff.cuni.cz, johnrose@us.ibm.com,
	linux-laptop@vger.kernel.org, mochel@transmeta.com,
	pavel@suse.cz
Subject: Re: PCI Power management (was: Re: [PATCH 4/13]: PCI Err: e100 ethernet driver recovery
Date: Thu, 30 Jun 2005 16:07:48 -0500	[thread overview]
Message-ID: <20050630210748.GZ28499@austin.ibm.com> (raw)
In-Reply-To: <20050630203931.GY28499@austin.ibm.com>


Hm,

Scratch the idea I outline below, seems like its not a good idea.

I'm reading the e100, e1000 and the ixgb power management code, and they
go through all sorts of steps I don't need to do for PCI device reset.
There's no clear abstraction that would serve both needs.

On Thu, Jun 30, 2005 at 03:39:31PM -0500, Linas Vepstas was heard to remark:
> On Wed, Jun 29, 2005 at 06:58:29PM +0200, Andi Kleen was heard to remark:
> > > Yep, OK. Pushig the timer would in fact break if the device was marked
> > > perm disabled.
> > 
> > I think for network drivers you should just write a generic error handler
> > (perhaps in net/core/dev.c) that calls the watchdog handler. 
> > Then all drivers could be easily converted without much code duplication.
> 
> Well, there's no watchdog per-se in "struct net_device" -- are you
> suggesting I add one?
> 
> It looks like I can almost create generic handlers for net devices; 
> looks like calling netdev->stop() is enough to handle the error
> detection. 
> 
> However, a generic bringup would need to call pci_enable_device(), 
> and net/core/dev.c does not include pci.h so I can't really do it 
> there.  Other than that, a generic recovry routine looks like it might
> be possible; I'll have to experiment; its hard to tell by reading code.
> 
> This might be the wrong paradigm, though.  The pci error recovery 
> routines are *almost identical* to the power-management suspend/resume
> routines.  From what I can tell, the only real difference is that 
> I want to not actually turn off/on the power. 
> 
> Thus, the right thing to do might be to split up the 
> struct pci_dev->suspend() and pci_dev->resume() calls into
> 
>    suspend()
>    poweroff()
>    poweron()
>    resume()
> 
> and then have the generic pci error recovery routines call
> suspend/resume only, skipping the poweroff-on calls.  Does that 
> sound good?
> 
> I'm not sure I can pull this off without having someone from 
> the power-management world throw a brick at me.
> 
> --linas
> 
> 

  reply	other threads:[~2005-06-30 21:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-28 23:58 [PATCH 4/13]: PCI Err: e100 ethernet driver recovery Linas Vepstas
2005-06-29  1:46 ` Benjamin Herrenschmidt
2005-06-29 15:59   ` Linas Vepstas
2005-06-29 16:58     ` Andi Kleen
2005-06-29 23:40       ` Benjamin Herrenschmidt
2005-06-30 20:39       ` PCI Power management (was: " Linas Vepstas
2005-06-30 21:07         ` Linas Vepstas [this message]
2005-06-30 23:32         ` 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=20050630210748.GZ28499@austin.ibm.com \
    --to=linas@austin.ibm.com \
    --cc=ak@muc.de \
    --cc=benh@kernel.crashing.org \
    --cc=greg@kroah.com \
    --cc=johnrose@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-laptop@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=linuxppc64-dev@ozlabs.org \
    --cc=mochel@transmeta.com \
    --cc=paulus@samba.org \
    --cc=pavel@suse.cz \
    --cc=seto.hidetoshi@jp.fujitsu.com \
    --cc=sfr@canb.auug.org.au \
    --cc=tlnguyen@snoqualmie.dp.intel.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