[7665] in linux-scsi channel archive
Re: How do I invoke a re-probe from kernel space?
daemon@ATHENA.MIT.EDU (Alan Cox)
Sun Dec 12 12:17:35 1999
To: mdharm@one-eyed-alien.net
Date: Sun, 12 Dec 1999 17:08:10 +0000 (GMT)
Cc: linux-scsi@vger.rutgers.edu
In-Reply-To: <Pine.LNX.4.10.9912112229590.27606-100000@ziggy.one-eyed-alien.net> from "Matthew Dharm" at Dec 11, 99 10:34:21 pm
Content-Type: text
Content-Length: 1010
Message-Id: <E11xCTj-0005yK-00@the-village.bc.nu>
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
> 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 majordomo@vger.rutgers.edu