pccbb.c (261216) | pccbb.c (261790) |
---|---|
1/*- 2 * Copyright (c) 2002-2004 M. Warner Losh. 3 * Copyright (c) 2000-2001 Jonathan Chen. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 61 unchanged lines hidden (view full) --- 70 * The author would like to acknowledge: 71 * * HAYAKAWA Koichi: Author of the NetBSD code for the same thing 72 * * Warner Losh: Newbus/newcard guru and author of the pccard side of things 73 * * YAMAMOTO Shigeru: Author of another FreeBSD cardbus driver 74 * * David Cross: Author of the initial ugly hack for a specific cardbus card 75 */ 76 77#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002-2004 M. Warner Losh. 3 * Copyright (c) 2000-2001 Jonathan Chen. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 61 unchanged lines hidden (view full) --- 70 * The author would like to acknowledge: 71 * * HAYAKAWA Koichi: Author of the NetBSD code for the same thing 72 * * Warner Losh: Newbus/newcard guru and author of the pccard side of things 73 * * YAMAMOTO Shigeru: Author of another FreeBSD cardbus driver 74 * * David Cross: Author of the initial ugly hack for a specific cardbus card 75 */ 76 77#include <sys/cdefs.h> |
78__FBSDID("$FreeBSD: head/sys/dev/pccbb/pccbb.c 261216 2014-01-27 19:49:52Z jhb $"); | 78__FBSDID("$FreeBSD: head/sys/dev/pccbb/pccbb.c 261790 2014-02-12 04:30:37Z jhb $"); |
79 80#include <sys/param.h> 81#include <sys/bus.h> 82#include <sys/condvar.h> 83#include <sys/errno.h> 84#include <sys/kernel.h> 85#include <sys/module.h> 86#include <sys/kthread.h> --- 5 unchanged lines hidden (view full) --- 92#include <sys/rman.h> 93#include <sys/sysctl.h> 94#include <sys/systm.h> 95#include <machine/bus.h> 96#include <machine/resource.h> 97 98#include <dev/pci/pcireg.h> 99#include <dev/pci/pcivar.h> | 79 80#include <sys/param.h> 81#include <sys/bus.h> 82#include <sys/condvar.h> 83#include <sys/errno.h> 84#include <sys/kernel.h> 85#include <sys/module.h> 86#include <sys/kthread.h> --- 5 unchanged lines hidden (view full) --- 92#include <sys/rman.h> 93#include <sys/sysctl.h> 94#include <sys/systm.h> 95#include <machine/bus.h> 96#include <machine/resource.h> 97 98#include <dev/pci/pcireg.h> 99#include <dev/pci/pcivar.h> |
100#include <dev/pci/pcib_private.h> |
|
100 101#include <dev/pccard/pccardreg.h> 102#include <dev/pccard/pccardvar.h> 103 104#include <dev/exca/excareg.h> 105#include <dev/exca/excavar.h> 106 107#include <dev/pccbb/pccbbreg.h> --- 1435 unchanged lines hidden (view full) --- 1543{ 1544 struct cbb_softc *sc = device_get_softc(brdev); 1545 1546 switch (which) { 1547 case PCIB_IVAR_DOMAIN: 1548 *result = sc->domain; 1549 return (0); 1550 case PCIB_IVAR_BUS: | 101 102#include <dev/pccard/pccardreg.h> 103#include <dev/pccard/pccardvar.h> 104 105#include <dev/exca/excareg.h> 106#include <dev/exca/excavar.h> 107 108#include <dev/pccbb/pccbbreg.h> --- 1435 unchanged lines hidden (view full) --- 1544{ 1545 struct cbb_softc *sc = device_get_softc(brdev); 1546 1547 switch (which) { 1548 case PCIB_IVAR_DOMAIN: 1549 *result = sc->domain; 1550 return (0); 1551 case PCIB_IVAR_BUS: |
1551 *result = sc->secbus; | 1552 *result = sc->bus.sec; |
1552 return (0); 1553 } 1554 return (ENOENT); 1555} 1556 1557int 1558cbb_write_ivar(device_t brdev, device_t child, int which, uintptr_t value) 1559{ | 1553 return (0); 1554 } 1555 return (ENOENT); 1556} 1557 1558int 1559cbb_write_ivar(device_t brdev, device_t child, int which, uintptr_t value) 1560{ |
1560 struct cbb_softc *sc = device_get_softc(brdev); | |
1561 1562 switch (which) { 1563 case PCIB_IVAR_DOMAIN: 1564 return (EINVAL); 1565 case PCIB_IVAR_BUS: | 1561 1562 switch (which) { 1563 case PCIB_IVAR_DOMAIN: 1564 return (EINVAL); 1565 case PCIB_IVAR_BUS: |
1566 sc->secbus = value; 1567 return (0); | 1566 return (EINVAL); |
1568 } 1569 return (ENOENT); 1570} 1571 1572int 1573cbb_suspend(device_t self) 1574{ 1575 int error = 0; --- 56 unchanged lines hidden --- | 1567 } 1568 return (ENOENT); 1569} 1570 1571int 1572cbb_suspend(device_t self) 1573{ 1574 int error = 0; --- 56 unchanged lines hidden --- |