* Help - can Linux SCSI sub-system add newly-attached devices to /dev on the fly?
@ 2004-05-20 16:58 Lee Xing
2004-05-20 17:00 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Lee Xing @ 2004-05-20 16:58 UTC (permalink / raw)
To: linux-scsi
Hi,
Does any one know if there is a function low-level driver can invoke to notice
mid-layer the changes on the attached devices? Suppose we hot plug-in or
pull-off a disk, can low-level driver send a notice to mid-layer and let it
re-scan the bus and add a new sd/sg to /dev?
I was told we could run "echo scsi add-single-device h c t l > /proc/scsi/scsi"
(where "h c t l" are host_id, channel_id, target_id and lun_id) from user space
to add a newly-attached device to mid-layer. Is it the only way (besides reboot)
to add new devices to mid-layer on the fly?
Mid-layer in lk 2.6 defines two functions, scsi_add_device() and scsi_add_host(),
that can be called by low-level drivers based on the document. I'm not familiar
with lk2.6. Can low-level drivers in lk2.6 call scsi_add_device( ) to add
newly-attached disks to mid-layer on the fly? Does lk2.4 provide a similar
function to scsi_add_device( ) in lk2.6?
Thanks,
Lee
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Help - can Linux SCSI sub-system add newly-attached devices to /dev on the fly?
2004-05-20 16:58 Help - can Linux SCSI sub-system add newly-attached devices to /dev on the fly? Lee Xing
@ 2004-05-20 17:00 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2004-05-20 17:00 UTC (permalink / raw)
To: Lee Xing; +Cc: linux-scsi
On Thu, May 20, 2004 at 11:58:21AM -0500, Lee Xing wrote:
> Mid-layer in lk 2.6 defines two functions, scsi_add_device() and scsi_add_host(),
> that can be called by low-level drivers based on the document. I'm not familiar
> with lk2.6. Can low-level drivers in lk2.6 call scsi_add_device( ) to add
> newly-attached disks to mid-layer on the fly?
Yes. For an example take a look at drivers/ieee1394/sbp2.c.
> Does lk2.4 provide a similar
> function to scsi_add_device( ) in lk2.6?
No.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-05-20 17:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-20 16:58 Help - can Linux SCSI sub-system add newly-attached devices to /dev on the fly? Lee Xing
2004-05-20 17:00 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox