aac_pci.c (138884) | aac_pci.c (139836) |
---|---|
1/*- 2 * Copyright (c) 2000 Michael Smith 3 * Copyright (c) 2001 Scott Long 4 * Copyright (c) 2000 BSDi 5 * Copyright (c) 2001 Adaptec, Inc. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2000 Michael Smith 3 * Copyright (c) 2001 Scott Long 4 * Copyright (c) 2000 BSDi 5 * Copyright (c) 2001 Adaptec, Inc. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/dev/aac/aac_pci.c 138884 2004-12-15 07:03:21Z scottl $"); | 31__FBSDID("$FreeBSD: head/sys/dev/aac/aac_pci.c 139836 2005-01-07 05:59:45Z scottl $"); |
32 33/* 34 * PCI bus interface and resource allocation. 35 */ 36 37#include "opt_aac.h" 38 39#include <sys/param.h> --- 277 unchanged lines hidden (view full) --- 317 */ 318 error = aac_attach(sc); 319 320out: 321 if (error) 322 aac_free(sc); 323 return(error); 324} | 32 33/* 34 * PCI bus interface and resource allocation. 35 */ 36 37#include "opt_aac.h" 38 39#include <sys/param.h> --- 277 unchanged lines hidden (view full) --- 317 */ 318 error = aac_attach(sc); 319 320out: 321 if (error) 322 aac_free(sc); 323 return(error); 324} |
325 326/* 327 * Do nothing driver that will attach to the SCSI channels of a Dell PERC 328 * controller. This is needed to keep the power management subsystem from 329 * trying to power down these devices. 330 */ 331static int aacch_probe(device_t dev); 332static int aacch_attach(device_t dev); 333static int aacch_detach(device_t dev); 334 335static device_method_t aacch_methods[] = { 336 /* Device interface */ 337 DEVMETHOD(device_probe, aacch_probe), 338 DEVMETHOD(device_attach, aacch_attach), 339 DEVMETHOD(device_detach, aacch_detach), 340 { 0, 0 } 341}; 342 343struct aacch_softc { 344 device_t dev; 345}; 346 347static driver_t aacch_driver = { 348 "aacch", 349 aacch_methods, 350 sizeof(struct aacch_softc) 351}; 352 353static devclass_t aacch_devclass; 354DRIVER_MODULE(aacch, pci, aacch_driver, aacch_devclass, 0, 0); 355 356static int 357aacch_probe(device_t dev) 358{ 359 360 if ((pci_get_subvendor(dev) != 0x9005) || 361 (pci_get_subdevice(dev) != 0x00c5)) 362 return (ENXIO); 363 364 device_set_desc(dev, "AAC RAID Channel"); 365 return (-10); 366} 367 368static int 369aacch_attach(device_t dev) 370{ 371 struct aacch_softc *sc; 372 373 sc = device_get_softc(dev); 374 375 sc->dev = dev; 376 377 return (0); 378} 379 380static int 381aacch_detach(device_t dev) 382{ 383 384 return (0); 385} 386 |
|