aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/aac/aac_pci.c
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2005-01-07 05:59:45 +0000
committerScott Long <scottl@FreeBSD.org>2005-01-07 05:59:45 +0000
commit608d7ac260f68dcafa613f05186436462fd560c0 (patch)
treeaa42f9e0ca85151dd880325cf3178f7a40472671 /sys/dev/aac/aac_pci.c
parent46fbc58202f6ebbc4b5516e7eab4b7ef263b489c (diff)
downloadsrc-608d7ac260f68dcafa613f05186436462fd560c0.tar.gz
src-608d7ac260f68dcafa613f05186436462fd560c0.zip
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.
Notes
Notes: svn path=/head/; revision=139836
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 c6e4c8affcb0..66ba9ab67259 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);
+}
+