summaryrefslogtreecommitdiffstats
path: root/sys/dev/aac/aac_pci.c
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2005-01-07 05:59:45 +0000
committerscottl <scottl@FreeBSD.org>2005-01-07 05:59:45 +0000
commit061dd4dce8eb0a02df071683b1928ddd82d57ef6 (patch)
treeaa42f9e0ca85151dd880325cf3178f7a40472671 /sys/dev/aac/aac_pci.c
parent403229a01e5b819600acb7085984f6c3b0cec7c6 (diff)
downloadFreeBSD-src-061dd4dce8eb0a02df071683b1928ddd82d57ef6.zip
FreeBSD-src-061dd4dce8eb0a02df071683b1928ddd82d57ef6.tar.gz
Add a default driver to attach to the "hidden" scsi channels of the Dell
PERC 3 controllers. This is needed to keep the PM code from powering them down.
Diffstat (limited to 'sys/dev/aac/aac_pci.c')
-rw-r--r--sys/dev/aac/aac_pci.c62
1 files changed, 62 insertions, 0 deletions
diff --git a/sys/dev/aac/aac_pci.c b/sys/dev/aac/aac_pci.c
index c6e4c8a..66ba9ab 100644
--- a/sys/dev/aac/aac_pci.c
+++ b/sys/dev/aac/aac_pci.c
@@ -322,3 +322,65 @@ out:
aac_free(sc);
return(error);
}
+
+/*
+ * Do nothing driver that will attach to the SCSI channels of a Dell PERC
+ * controller. This is needed to keep the power management subsystem from
+ * trying to power down these devices.
+ */
+static int aacch_probe(device_t dev);
+static int aacch_attach(device_t dev);
+static int aacch_detach(device_t dev);
+
+static device_method_t aacch_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, aacch_probe),
+ DEVMETHOD(device_attach, aacch_attach),
+ DEVMETHOD(device_detach, aacch_detach),
+ { 0, 0 }
+};
+
+struct aacch_softc {
+ device_t dev;
+};
+
+static driver_t aacch_driver = {
+ "aacch",
+ aacch_methods,
+ sizeof(struct aacch_softc)
+};
+
+static devclass_t aacch_devclass;
+DRIVER_MODULE(aacch, pci, aacch_driver, aacch_devclass, 0, 0);
+
+static int
+aacch_probe(device_t dev)
+{
+
+ if ((pci_get_subvendor(dev) != 0x9005) ||
+ (pci_get_subdevice(dev) != 0x00c5))
+ return (ENXIO);
+
+ device_set_desc(dev, "AAC RAID Channel");
+ return (-10);
+}
+
+static int
+aacch_attach(device_t dev)
+{
+ struct aacch_softc *sc;
+
+ sc = device_get_softc(dev);
+
+ sc->dev = dev;
+
+ return (0);
+}
+
+static int
+aacch_detach(device_t dev)
+{
+
+ return (0);
+}
+
OpenPOWER on IntegriCloud