From 061dd4dce8eb0a02df071683b1928ddd82d57ef6 Mon Sep 17 00:00:00 2001 From: scottl Date: Fri, 7 Jan 2005 05:59:45 +0000 Subject: 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. --- sys/dev/aac/aac_pci.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) (limited to 'sys/dev/aac/aac_pci.c') 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); +} + -- cgit v1.1