Re: How to add/drop SCSI drives from within the driver?

From: James Bottomley
Date: Wed Dec 15 2004 - 15:36:55 EST


On Wed, 2004-12-15 at 10:48 -0600, Matt Domsch wrote:
> SCSI LLDDs don't show up in sysfs under /sys/bus/scsi/drivers at
> present, which is where, I think, you would want to put megaraid_mm
> with links to show the scsi_host and pci_dev associated with this
> adapter. Something like this:
>
> /sys
> |-- bus
> | `-- drivers
> | `-- scsi
> | `-- megaraid_mm
> | `-- adapter0
> | |-- pci_dev -> ../../../../../devices/pci0000:03/0000:03:06.0

Actually, there is a reason why this doesn't happen: The drivers
directory shows only drivers belonging to a bus. The megaraid_mm driver
is actually a PCI driver, and thus belongs to the PCI bus. So, you'll
see this under

/sys/bus/pci/drivers/megaraid_mm/<pci_id>/host<n>

That should be sufficient to obtain all instances. Note: the instances
aren't numerically indexed under this scheme (unlike your adapter<n>)
they'd be indexed by a unique pci_id.

So it looks like all the information is accessible today (if you look
for it in a slightly different way). Is there anything currently
missing?

James


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