From: Jeff Garzik <jgarzik@pobox.com>
To: Steven Dake <sdake@mvista.com>
Cc: Greg KH <greg@kroah.com>, Scott Murray <scottm@somanetworks.com>,
"Randy.Dunlap" <rddunlap@osdl.org>,
James Bottomley <James.Bottomley@steeleye.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [RFC] Advanced TCA SCSI Disk Hotswap
Date: Thu, 24 Oct 2002 20:20:49 -0400 [thread overview]
Message-ID: <3DB88E61.2010909@pobox.com> (raw)
In-Reply-To: 3DB886B9.3060304@mvista.com
Steven Dake wrote:
> Montavista has discussed at length Compact PCI hotswap using surprise
> removal events.
>
> The key feature of any hotswap operation that happens in a surprise
> fashion is that
> the device driver might want a hint that the hardware is no longer
> present so it can
> immediatly dump its buffers/io maps/etc and totally stop accessing the
> device. An
> expected removal, on the other hand, would give the device driver time
> to flush its
> buffers (for example a scsi driver could dump its outstanding queued
> scsi messages).
> Once the driver is done accessing the device, the blue led on the
> CompactPCI board
> can be lit and it can be removed.
>
> This is the main difference. Since the driver model of Linux doesn't
> support a surprise
> extract method call for drivers, I don't think its been implemented
> here. Further the
> drivers must be modified to actually use the hint instead of doing its
> normal shutdown
> operation.
Wrong. The _only_ supported method so far has been surprise removal.
For years now. This happens every day in the land of CardBus, which
was the first "PCI" hotplug implementation in the Linux kernel. PCI
HotPlug introduces a new, non-surprise removal.
Thus, the current model should be assumed to be surprise removal, and
you need an additional notification from the system if a "nice" removal
is about to occur.
> Surprise extraction is not a simple problem especially to ensure the
> device drivers exit
> cleanly without dumping more data on the PCI bus to a PCI device that
> may not
> exist.
PCI is electrically safe. Reads to non-existent areas return
0xffffffff, etc. Take a look at net drivers some day, we have been
handling this for years.
Surprise removal is actually easier from many perspectives -- you don't
have to worry about quiescing the hardware, you simply have to error out
all I/Os, and clean up the kernel structures that are left behind (host
info, device info, etc.). The non-surprise removal is more annoying, in
that you could potentially have an indefinite wait (and must actively
avoid such a situation) while shutting down the hardware, completing
I/Os, etc.
Jeff
next prev parent reply other threads:[~2002-10-25 0:20 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-24 0:48 [PATCH] [RFC] Advanced TCA SCSI Disk Hotswap Steven Dake
2002-10-24 14:25 ` James Bottomley
2002-10-24 19:40 ` Steven Dake
2002-10-24 20:02 ` James Bottomley
2002-10-24 20:45 ` Steven Dake
2002-10-24 21:05 ` Randy.Dunlap
2002-10-24 21:48 ` Steven Dake
2002-10-24 23:00 ` Scott Murray
2002-10-24 23:22 ` Greg KH
2002-10-24 23:48 ` Steven Dake
2002-10-25 0:20 ` Jeff Garzik [this message]
2002-10-25 10:04 ` Alan Cox
2002-10-25 0:18 ` Scott Murray
2002-10-24 23:42 ` James Bottomley
2002-10-24 23:52 ` Jeff Garzik
2002-10-27 15:08 ` Rob Landley
2002-10-27 20:25 ` Randy.Dunlap
2002-10-24 22:58 ` Mike Anderson
2002-10-24 22:32 ` Patrick Mansfield
2002-10-24 22:36 ` Mike Anderson
2002-10-24 22:47 ` Steven Dake
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=3DB88E61.2010909@pobox.com \
--to=jgarzik@pobox.com \
--cc=James.Bottomley@steeleye.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=rddunlap@osdl.org \
--cc=scottm@somanetworks.com \
--cc=sdake@mvista.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).