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

From: Matt Domsch
Date: Wed Dec 15 2004 - 11:52:32 EST


On Wed, Dec 15, 2004 at 01:24:53AM -0600, Matt Domsch wrote:
> /sys/class/scsi_host
> |-- host0
> | |-- add_logical_drive
> | |-- remove_logical_drive
> | `-- rescan_logical_drive

Atul, Sreenivas:

Your management apps currently issue a private ioctl MEGAIOC_QNADAP
which returns the number of megaraid_mm-handled adapters in the
system. How do you map a megaraid adapter number to a struct
Scsi_Host device, to be sure you're acting on the controller you think
you are?

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
| `-- scsi_host -> ../../../../../class/scsi/scsi_host/host0
|-- class
| `-- scsi
| `-- scsi_host
| `-- host0
`-- devices
`-- pci0000:03
`-- 0000:03:06.0

Thoughts?
Matt

--
Matt Domsch
Sr. Software Engineer, Lead Engineer
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
-
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/