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

From: Mukker, Atul
Date: Wed Dec 15 2004 - 14:54:43 EST


>
> 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?
Megaraid_mm module maintains all the controllers on a list
(mraid_mm_get_adapter), and each of the adapter maintains a pointer to the
host object.

>
> 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
Megaraid_mm is not a 'scsi' driver but only a conduit to pass the commands
from application to the megaraid_mbox scsi module.
-
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/