From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hinds Date: Thu, 15 Jan 2004 21:22:07 +0000 Subject: Re: unclean yanking out of device? Message-Id: <20040115132207.B23434@sonic.net> List-Id: References: <20040114160002.G57254@forte.austin.ibm.com> In-Reply-To: <20040114160002.G57254@forte.austin.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Thu, 15 Jan 2004 12:38:53 -0600, linas@austin.ibm.com wrote: > On Thu, Jan 15, 2004 at 11:17:31AM -0600, Richard Troth wrote: > > > remove() is what notifies the pci driver that the device is about to go > > > away. ... > > > > (cardbus aside) > > Perhaps we need a removed() entry point? > > Something that explicitly means "has already gone" > > rather than implying "is about to go". > > That's exactly what I was thinking. > > This is based on the assumption that some device driver writers > really want a remove() that is different from been_removed(). > > Forcing a device driver writer to implement been_removed() > only (as pcmcia does) does not give them the chance to clean > up the way they might have wanted to if they could have assumed > the device was still 'live', e.g. clean up some lock on some > remote device (such as some iSCSI lock sitting on the disk drive > or something, i dunno). PCMCIA actually does not implement a "been removed" event. It reports the removal as soon as possible, which will be while the hardware is still available, if the user requested the removal before ejecting the hardware. (the removal request is actually reported as another event, and a driver can choose to field these events, and accept/deny the requests) Separate entry points for clean and unclean removal are not useful, because the clean removal case has to be hardened against the device going away while the removal is in progress... and once you've done that, you'd might as well call the clean removal code even when you know the hardware is already gone. -- Dave ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ 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