From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Neukum Date: Thu, 10 Apr 2003 07:51:13 +0000 Subject: Re: [PATCH] scsi_set_host_offline (resend) Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org > *But*, the _important__point_ is that the LLDD must be able to handle > requests (queuecommand()) to non-existant (= just removed) devices, > and not oops, or whatever. For how long? That's the question. > So, in effect, you just call usb_dev_removal(dev) (to be written), > and free _your_ resources on the device. (note important point above) The way it is in USB is a little different as the USB device drivers do not go directly to the hardware. It would be: HCD -> USB core -> LLDD -> generic SCSI -> ... Steps 1 to 3 work, 4 doesn't. For a PCMCIA LLDD it would be different, but that really doesn't matter to the generic SCSI layer. > > We have indeed discussed this before and the need to notify > > user space was never questioned, as far as I recall. > > The point of contention always was whether the notification > > had to do specific things for the process of unplugging to finish > > as far as it concerns the low level driver. > > Right. As far as I can see, those subsystem entries, xxx_dev_removal(dev), > would do things which do not block, like flip a bit, flags, integer, > wake up a thread, etc, call the above subsystem's xxx_dev_removal(dev), > and return immediately. (as per my other posting) > (this needs more thinking though) If they can't block, they cannot clean up commands still in flight. Eventually something needs to wait for the outstanding commands. Regards Oliver ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com _______________________________________________ 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