lkml.org 
[lkml]   [2004]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: How to add/drop SCSI drives from within the driver?
From
Date
On Wed, 2004-12-15 at 01:24 -0600, Matt Domsch wrote:
> James, I've been thinking about this a little more, and you may be on
> to something here. Let each driver add files as such:
>
> /sys/class/scsi_host
> |-- host0
> | |-- add_logical_drive
> | |-- remove_logical_drive
> | `-- rescan_logical_drive
>
> Then we can go 2 ways with this.
> 1) driver functions directly call scsi_add_device(),
> scsi_remove_device(), and something for rescan (option 2 handles this
> one cleanly for us). ATM, megaraid_mbox doesn't implement a rescan
> function, so this point may be moot.
>
> 2) driver functions call a midlayer library function, which invokes
> /sbin/hotplug with appropriate data, and add a new /etc/hotplug.d
> helper app which would then write to these files:
>
> /sys/class/scsi_host
> |-- host0
> | |-- scan
> /sys/devices/pci0000:0x/0000:0x:0x.0/host0
> |-- 0:0:0:0
> | |-- delete
> | |-- rescan
>
> to do likewise.

I'll buy this (option 2).. it seems like a good way to export the
megaraid specific information and at the same time integrate it more
fully into the evolving hotplug infrastructure.

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.069 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site