linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: unclean yanking out of device?
Date: Thu, 15 Jan 2004 01:33:39 +0000	[thread overview]
Message-ID: <20040115013339.GA10717@kroah.com> (raw)
In-Reply-To: <20040114160002.G57254@forte.austin.ibm.com>

On Wed, Jan 14, 2004 at 07:16:04PM -0600, linas@austin.ibm.com wrote:
> On Wed, Jan 14, 2004 at 04:19:39PM -0800, Greg KH wrote:
> > 
> > What kind of hardware base is this?  (PPC64, ia64, etc.)?
> 
> ppc64

The ppc64 pci hotplug driver that is currently in the ppc64 cvs tree
should already work for your hardware, right?  Or is this for iSeries
machines?  Some other hardware?

Seriously, that driver, or another one like it is what you need to use
to tell the pci card that it needs to disable the device and unbind from
it, even if the slot power has for some reason been removed.

> > What specific drivers?
> 
> pcnet32 ethernet, some gigabit ethernet cards, some fibre-channel cards,
> and the symbios-2 scsi driver.

None of these should need to be modified.

> > > Hmm.  Let me point out that other operating systems already do this
> > > (and have been doing so for a while).   The chipset I'm working with
> > > has been shipping for, I dunno, a couple of years or something like 
> > > that.
> > 
> > What chipset?
> 
> The one in the ppc64 mainframes.

Which ppc64 mainframes exactly?  iSeries?  pSeries?  Model numbers?  I
seem to have access to quite a lot of different ppc hardware through my
employer :)

> It shows up in the ppc64 arch code 
> under the name of "phb", and its eeh.c that deals with configing the
> support I'm talking about.  Right now, eeh.c calls panic() when things
> go kaboom, and my goal is to replace the panic with a graceful recovery.

Ok, it shouldn't call panic().  No driver should ever call panic().
That's just bad coding...

> > I think you just need to change the way you are thinking about this.
> > Linux already has a pci hotplug framework.  Just implement your specific
> > pci controller into this framework.  That way you will not have to
> > modify any specific PCI card device drivers.  If you do this, then all
> > of the existing userspace tools will work for your hardware.
> 
> I really really wasn't joking about the cosmic ray.  It hits. There
> is an unrecoverable parity error.  What do I do?  

Ah, ok, I've talked to Paul M. and others at IBM you are probably
working with a lot about this.  They have tried to come up with a way
for a write or read to be notified that an error just occurred, right?

> Lets assume the adapter is in the middle of a dma when this happens.
> Do I pass the known-bad garbled data to the device driver, possibly
> corupting the file system, etc?  Suppose the bad data was something
> that trashed a pointer; some million or billion cpu cycles later
> the kernel oopses for some mystery reason.   Instead of allowing
> this kind of 'silent corruption' to occur, the current ppc64
> code for this simply halts the system, it calls panic (in eeh.c), 
> and that's that.

Again, it should not do that.  We need to have a way to notify that the
write or read failed.  Work on fixing that, and then modify the driver
to gracefully recover is the proper sequence.  If you really want to,
tell the pci slot controller that it now needs to disable that slot,
which will cause the driver to shut down the device.

I seem to remember the proposal was quite complex last time I saw it,
has it been cleaned up any since?

If you don't know of any such proposal, I suggest you look into it, as
you don't want to duplicate the work others are already doing.

thanks,

greg k-h


-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2004-01-15  1:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-14 22:00 unclean yanking out of device? linas
2004-01-14 22:15 ` Måns Rullgård
2004-01-14 22:19 ` Greg KH
2004-01-14 23:08 ` linas
2004-01-14 23:24 ` Greg KH
2004-01-14 23:49 ` Paul Ionescu
2004-01-14 23:57 ` linas
2004-01-15  0:19 ` Oliver Neukum
2004-01-15  0:19 ` Greg KH
2004-01-15  0:34 ` Greg KH
2004-01-15  0:36 ` David Brownell
2004-01-15  1:16 ` linas
2004-01-15  1:20 ` linas
2004-01-15  1:33 ` Greg KH [this message]
2004-01-15  1:35 ` Greg KH
2004-01-15  1:57 ` linas
2004-01-15 17:17 ` Richard Troth
2004-01-15 18:38 ` linas
2004-01-15 21:22 ` David Hinds
2004-01-24  0:38 ` Greg KH

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=20040115013339.GA10717@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-hotplug@vger.kernel.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).