On Tue, Mar 01, 2005 at 11:35:28AM -0500, [EMAIL PROTECTED] wrote:
> > On Tue, Mar 01, 2005 at 05:06:55PM +0800, Zhao, Forrest wrote:
> > > If I surprisingly hot-remove a SCSI disk from HBA manually
> > > without executing "echo "scsi remove-single-device
> > > <h> <b> <t <l>" > /proc/scsi/scsi", can the "hotplug"
> > > event be notified to SCSI mid-layer or user space?
> > >
> > > I briefly browse some code of LLDD, it seems that LLDD never
> > > report "hotplug" event to upper-level layer. Am I right?
> >
> > I don't think it *can* ... the SCSI protocols don't tell the
> > host "hey,
> > this device has disappeared".
>
> All depends on what transport it is... In FC, we can detect when
> a target is removed. In the most recent FC transport code (not
> all integrated yet), it will indeed automagically invoke
> scsi_remove_device() for all luns on the target.
And in the patches I posted a couple weeks ago, userspace can notify
the kernel about an added/removed device if it knows about it but the
kernel doesn't (say, a management app does the add/remove but the LLDD
doesn't get an interrupt from the firmware on such events).
There's also the slave_{alloc,configure,destroy} callbacks in the
drivers, that let the LLDDs know about a LUN creation or removal, if
you've got device state stored in the driver.
--
Matt Domsch
Software Architect
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html