> I'm working on the USB Mass Storage driver, which appears to be a SCSI
> host controller to the kernel.  The question I have is this: how do I
> inform the higher SCSI layers that a device has appeared and disappeared?

The scsi layer doesn't really have a generic idea about this except for with
entire adapters vanishing (PCMCIA). It might be worth looking at how the
parallel port zip drive handles some of these issues.

> Mostly, I'm concerned with when devices appear.  I can trace the code flow
> when a user does an "echo 'scsi add-single-device 0 0 0 0' >
> /proc/scsi/scsi, but is that safe to call at all times?  Are there any
> restrictions on it's use?

Hard to say, its horrible code and about to get a partial overhaul. It should
be safe to do that from a kernel thread context providing you don't hold the
io request lock and are not doing it from a scsi function. 

Its possible you want to swap your false persistence of controllers for a
controller per device and behave as PCMCIA does. 


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]

Reply via email to