sys.dev.diff
| acpica5/acpi.c 25 Nov 2005 23:57:19 -0000 | ||
|---|---|---|
| 640 | 640 |
} |
| 641 | 641 | |
| 642 | 642 |
static void |
| 643 |
acpi_quirks_set() |
|
| 643 |
acpi_quirks_set(void)
|
|
| 644 | 644 |
{
|
| 645 | 645 |
XSDT_DESCRIPTOR *xsdt; |
| 646 | 646 |
struct acpi_quirks *quirk; |
| acpica5/acpi_cpu.c 25 Nov 2005 23:58:19 -0000 | ||
|---|---|---|
| 737 | 737 |
* port. |
| 738 | 738 |
*/ |
| 739 | 739 |
static void |
| 740 |
acpi_cpu_startup_throttling() |
|
| 740 |
acpi_cpu_startup_throttling(void)
|
|
| 741 | 741 |
{
|
| 742 | 742 |
ACPI_LOCK_DECL; |
| 743 | 743 | |
| ... | ... | |
| 786 | 786 |
} |
| 787 | 787 | |
| 788 | 788 |
static void |
| 789 |
acpi_cpu_startup_cx() |
|
| 789 |
acpi_cpu_startup_cx(void)
|
|
| 790 | 790 |
{
|
| 791 | 791 |
struct acpi_cpu_softc *sc; |
| 792 | 792 |
struct sbuf sb; |
| ... | ... | |
| 879 | 879 |
* interrupts are re-enabled. |
| 880 | 880 |
*/ |
| 881 | 881 |
static void |
| 882 |
acpi_cpu_idle() |
|
| 882 |
acpi_cpu_idle(void)
|
|
| 883 | 883 |
{
|
| 884 | 884 |
struct acpi_cpu_softc *sc; |
| 885 | 885 |
struct acpi_cx *cx_next; |
| ... | ... | |
| 984 | 984 | |
| 985 | 985 |
/* Put the CPU in C1 in a machine-dependant way. */ |
| 986 | 986 |
static void |
| 987 |
acpi_cpu_c1() |
|
| 987 |
acpi_cpu_c1(void)
|
|
| 988 | 988 |
{
|
| 989 | 989 |
#ifdef __ia64__ |
| 990 | 990 |
ia64_call_pal_static(PAL_HALT_LIGHT, 0, 0, 0); |
| acpica5/acpi_timer.c 25 Nov 2005 23:58:41 -0000 | ||
|---|---|---|
| 109 | 109 |
MODULE_DEPEND(acpi_timer, acpi, 1, 1, 1); |
| 110 | 110 | |
| 111 | 111 |
static u_int |
| 112 |
acpi_timer_read() |
|
| 112 |
acpi_timer_read(void)
|
|
| 113 | 113 |
{
|
| 114 | 114 |
return (bus_space_read_4(acpi_timer_bst, acpi_timer_bsh, 0)); |
| 115 | 115 |
} |
| ... | ... | |
| 329 | 329 |
*/ |
| 330 | 330 | |
| 331 | 331 |
static int |
| 332 |
acpi_timer_test() |
|
| 332 |
acpi_timer_test(void)
|
|
| 333 | 333 |
{
|
| 334 | 334 |
uint32_t last, this; |
| 335 | 335 |
int min, max, n, delta; |
| agp/agp.c 26 Nov 2005 00:00:14 -0000 | ||
|---|---|---|
| 94 | 94 |
/* Helper functions for implementing chipset mini drivers. */ |
| 95 | 95 | |
| 96 | 96 |
void |
| 97 |
agp_flush_cache() |
|
| 97 |
agp_flush_cache(void)
|
|
| 98 | 98 |
{
|
| 99 | 99 |
#ifdef __i386__ |
| 100 | 100 |
wbinvd(); |
| ... | ... | |
| 816 | 816 |
/* Implementation of the kernel api */ |
| 817 | 817 | |
| 818 | 818 |
device_t |
| 819 |
agp_find_device() |
|
| 819 |
agp_find_device(void)
|
|
| 820 | 820 |
{
|
| 821 | 821 |
if (!agp_devclass) |
| 822 | 822 |
return 0; |
| disk/aic7xxx/aicasm/aicasm.c 26 Nov 2005 00:03:51 -0000 | ||
|---|---|---|
| 306 | 306 |
} |
| 307 | 307 | |
| 308 | 308 |
static void |
| 309 |
usage() |
|
| 309 |
usage(void)
|
|
| 310 | 310 |
{
|
| 311 | 311 | |
| 312 | 312 |
(void)fprintf(stderr, |
| ... | ... | |
| 318 | 318 |
} |
| 319 | 319 | |
| 320 | 320 |
static void |
| 321 |
back_patch() |
|
| 321 |
back_patch(void)
|
|
| 322 | 322 |
{
|
| 323 | 323 |
struct instruction *cur_instr; |
| 324 | 324 | |
| ... | ... | |
| 347 | 347 |
} |
| 348 | 348 | |
| 349 | 349 |
static void |
| 350 |
output_code() |
|
| 350 |
output_code(void)
|
|
| 351 | 351 |
{
|
| 352 | 352 |
struct instruction *cur_instr; |
| 353 | 353 |
patch_t *cur_patch; |
| ... | ... | |
| 722 | 722 |
} |
| 723 | 723 | |
| 724 | 724 |
struct instruction * |
| 725 |
seq_alloc() |
|
| 725 |
seq_alloc(void)
|
|
| 726 | 726 |
{
|
| 727 | 727 |
struct instruction *new_instr; |
| 728 | 728 | |
| ... | ... | |
| 736 | 736 |
} |
| 737 | 737 | |
| 738 | 738 |
critical_section_t * |
| 739 |
cs_alloc() |
|
| 739 |
cs_alloc(void)
|
|
| 740 | 740 |
{
|
| 741 | 741 |
critical_section_t *new_cs; |
| 742 | 742 | |
| ... | ... | |
| 750 | 750 |
} |
| 751 | 751 | |
| 752 | 752 |
scope_t * |
| 753 |
scope_alloc() |
|
| 753 |
scope_alloc(void)
|
|
| 754 | 754 |
{
|
| 755 | 755 |
scope_t *new_scope; |
| 756 | 756 | |
| disk/aic7xxx/aicasm/aicasm_macro_scan.l 8 Dec 2005 22:14:39 -0000 | ||
|---|---|---|
| 150 | 150 |
%% |
| 151 | 151 | |
| 152 | 152 |
int |
| 153 |
mmwrap() |
|
| 153 |
mmwrap(void)
|
|
| 154 | 154 |
{
|
| 155 | 155 |
stop("EOF encountered in macro call", EX_DATAERR);
|
| 156 | 156 |
} |
| disk/aic7xxx/aicasm/aicasm_scan.l 8 Dec 2005 22:15:05 -0000 | ||
|---|---|---|
| 576 | 576 |
} |
| 577 | 577 | |
| 578 | 578 |
int |
| 579 |
yywrap() |
|
| 579 |
yywrap(void)
|
|
| 580 | 580 |
{
|
| 581 | 581 |
include_t *include; |
| 582 | 582 | |
| disk/aic7xxx/aicasm/aicasm_symbol.c 26 Nov 2005 00:04:15 -0000 | ||
|---|---|---|
| 129 | 129 |
} |
| 130 | 130 | |
| 131 | 131 |
void |
| 132 |
symtable_open() |
|
| 132 |
symtable_open(void)
|
|
| 133 | 133 |
{
|
| 134 | 134 |
symtable = dbopen(/*filename*/NULL, |
| 135 | 135 |
O_CREAT | O_NONBLOCK | O_RDWR, /*mode*/0, DB_HASH, |
| ... | ... | |
| 143 | 143 |
} |
| 144 | 144 | |
| 145 | 145 |
void |
| 146 |
symtable_close() |
|
| 146 |
symtable_close(void)
|
|
| 147 | 147 |
{
|
| 148 | 148 |
if (symtable != NULL) {
|
| 149 | 149 |
DBT key; |
| disk/ccd/ccd.c 26 Nov 2005 00:09:59 -0000 | ||
|---|---|---|
| 302 | 302 |
* add devsw entries. |
| 303 | 303 |
*/ |
| 304 | 304 |
static void |
| 305 |
ccdattach() |
|
| 305 |
ccdattach(void)
|
|
| 306 | 306 |
{
|
| 307 | 307 |
int i; |
| 308 | 308 |
int num = NCCD; |
| ... | ... | |
| 325 | 325 |
} |
| 326 | 326 | |
| 327 | 327 |
static int |
| 328 |
ccd_modevent(mod, type, data) |
|
| 329 |
module_t mod; |
|
| 330 |
int type; |
|
| 331 |
void *data; |
|
| 328 |
ccd_modevent(module_t mod, int type, void *data) |
|
| 332 | 329 |
{
|
| 333 | 330 |
int error = 0; |
| 334 | 331 | |
| ... | ... | |
| 557 | 554 |
} |
| 558 | 555 | |
| 559 | 556 |
static void |
| 560 |
ccdinterleave(cs, unit) |
|
| 561 |
struct ccd_softc *cs; |
|
| 562 |
int unit; |
|
| 557 |
ccdinterleave(struct ccd_softc *cs, int unit) |
|
| 563 | 558 |
{
|
| 564 | 559 |
struct ccdcinfo *ci, *smallci; |
| 565 | 560 |
struct ccdiinfo *ii; |
| ... | ... | |
| 754 | 749 |
} |
| 755 | 750 | |
| 756 | 751 |
static void |
| 757 |
ccdstrategy(bp) |
|
| 758 |
struct buf *bp; |
|
| 752 |
ccdstrategy(struct buf *bp) |
|
| 759 | 753 |
{
|
| 760 | 754 |
int unit = ccdunit(bp->b_dev); |
| 761 | 755 |
struct ccd_softc *cs = &ccd_softc[unit]; |
| ... | ... | |
| 830 | 824 |
} |
| 831 | 825 | |
| 832 | 826 |
static void |
| 833 |
ccdstart(cs, bp) |
|
| 834 |
struct ccd_softc *cs; |
|
| 835 |
struct buf *bp; |
|
| 827 |
ccdstart(struct ccd_softc *cs, struct buf *bp) |
|
| 836 | 828 |
{
|
| 837 | 829 |
long bcount, rcount; |
| 838 | 830 |
struct ccdbuf *cbp[4]; |
| ... | ... | |
| 913 | 905 |
* Build a component buffer header. |
| 914 | 906 |
*/ |
| 915 | 907 |
static void |
| 916 |
ccdbuffer(cb, cs, bp, bn, addr, bcount) |
|
| 917 |
struct ccdbuf **cb; |
|
| 918 |
struct ccd_softc *cs; |
|
| 919 |
struct buf *bp; |
|
| 920 |
daddr_t bn; |
|
| 921 |
caddr_t addr; |
|
| 922 |
long bcount; |
|
| 908 |
ccdbuffer(struct ccdbuf **cb, struct ccd_softc *cs, struct buf *bp, daddr_t bn, |
|
| 909 |
caddr_t addr, long bcount) |
|
| 923 | 910 |
{
|
| 924 | 911 |
struct ccdcinfo *ci, *ci2 = NULL; /* XXX */ |
| 925 | 912 |
struct ccdbuf *cbp; |
| ... | ... | |
| 1088 | 1075 |
} |
| 1089 | 1076 | |
| 1090 | 1077 |
static void |
| 1091 |
ccdintr(cs, bp) |
|
| 1092 |
struct ccd_softc *cs; |
|
| 1093 |
struct buf *bp; |
|
| 1078 |
ccdintr(struct ccd_softc *cs, struct buf *bp) |
|
| 1094 | 1079 |
{
|
| 1095 | 1080 |
#ifdef DEBUG |
| 1096 | 1081 |
if (ccddebug & CCDB_FOLLOW) |
| ... | ... | |
| 1111 | 1096 |
* take a ccd interrupt. |
| 1112 | 1097 |
*/ |
| 1113 | 1098 |
static void |
| 1114 |
ccdiodone(cbp) |
|
| 1115 |
struct ccdbuf *cbp; |
|
| 1099 |
ccdiodone(struct ccdbuf *cbp) |
|
| 1116 | 1100 |
{
|
| 1117 | 1101 |
struct buf *bp = cbp->cb_obp; |
| 1118 | 1102 |
int unit = cbp->cb_unit; |
| ... | ... | |
| 1586 | 1570 |
* up. |
| 1587 | 1571 |
*/ |
| 1588 | 1572 |
static void |
| 1589 |
ccdgetdisklabel(dev) |
|
| 1590 |
dev_t dev; |
|
| 1573 |
ccdgetdisklabel(dev_t dev) |
|
| 1591 | 1574 |
{
|
| 1592 | 1575 |
int unit = ccdunit(dev); |
| 1593 | 1576 |
struct ccd_softc *cs = &ccd_softc[unit]; |
| ... | ... | |
| 1645 | 1628 |
* that a disklabel isn't present. |
| 1646 | 1629 |
*/ |
| 1647 | 1630 |
static void |
| 1648 |
ccdmakedisklabel(cs) |
|
| 1649 |
struct ccd_softc *cs; |
|
| 1631 |
ccdmakedisklabel(struct ccd_softc *cs) |
|
| 1650 | 1632 |
{
|
| 1651 | 1633 |
struct disklabel *lp = &cs->sc_label; |
| 1652 | 1634 | |
| ... | ... | |
| 1666 | 1648 |
* Several drivers do this; it should be abstracted and made MP-safe. |
| 1667 | 1649 |
*/ |
| 1668 | 1650 |
static int |
| 1669 |
ccdlock(cs) |
|
| 1670 |
struct ccd_softc *cs; |
|
| 1651 |
ccdlock(struct ccd_softc *cs) |
|
| 1671 | 1652 |
{
|
| 1672 | 1653 |
int error; |
| 1673 | 1654 | |
| ... | ... | |
| 1684 | 1665 |
* Unlock and wake up any waiters. |
| 1685 | 1666 |
*/ |
| 1686 | 1667 |
static void |
| 1687 |
ccdunlock(cs) |
|
| 1688 |
struct ccd_softc *cs; |
|
| 1668 |
ccdunlock(struct ccd_softc *cs) |
|
| 1689 | 1669 |
{
|
| 1690 | 1670 | |
| 1691 | 1671 |
cs->sc_flags &= ~CCDF_LOCKED; |
| ... | ... | |
| 1697 | 1677 | |
| 1698 | 1678 |
#ifdef DEBUG |
| 1699 | 1679 |
static void |
| 1700 |
printiinfo(ii) |
|
| 1701 |
struct ccdiinfo *ii; |
|
| 1680 |
printiinfo(struct ccdiinfo *ii) |
|
| 1702 | 1681 |
{
|
| 1703 | 1682 |
int ix, i; |
| 1704 | 1683 | |
| disk/ncv/ncr53c500.c 26 Nov 2005 00:19:10 -0000 | ||
|---|---|---|
| 181 | 181 |
* hwfuncs |
| 182 | 182 |
**************************************************************/ |
| 183 | 183 |
static __inline void |
| 184 |
ncvhw_select_register_0(iot, ioh, hw) |
|
| 185 |
bus_space_tag_t iot; |
|
| 186 |
bus_space_handle_t ioh; |
|
| 187 |
struct ncv_hw *hw; |
|
| 184 |
ncvhw_select_register_0(bus_space_tag_t iot, bus_space_handle_t ioh, |
|
| 185 |
struct ncv_hw *hw) |
|
| 188 | 186 |
{
|
| 189 | 187 | |
| 190 | 188 |
bus_space_write_1(iot, ioh, cr0_cfg4, hw->hw_cfg4); |
| 191 | 189 |
} |
| 192 | 190 | |
| 193 | 191 |
static __inline void |
| 194 |
ncvhw_select_register_1(iot, ioh, hw) |
|
| 195 |
bus_space_tag_t iot; |
|
| 196 |
bus_space_handle_t ioh; |
|
| 197 |
struct ncv_hw *hw; |
|
| 192 |
ncvhw_select_register_1(bus_space_tag_t iot, bus_space_handle_t ioh, |
|
| 193 |
struct ncv_hw *hw) |
|
| 198 | 194 |
{
|
| 199 | 195 | |
| 200 | 196 |
bus_space_write_1(iot, ioh, cr1_cfg5, hw->hw_cfg5); |
| 201 | 197 |
} |
| 202 | 198 | |
| 203 | 199 |
static __inline void |
| 204 |
ncvhw_fpush(iot, ioh, buf, len) |
|
| 205 |
bus_space_tag_t iot; |
|
| 206 |
bus_space_handle_t ioh; |
|
| 207 |
u_int8_t *buf; |
|
| 208 |
int len; |
|
| 200 |
ncvhw_fpush(bus_space_tag_t iot, bus_space_handle_t ioh, u_int8_t *buf, |
|
| 201 |
int len) |
|
| 209 | 202 |
{
|
| 210 | 203 |
int ptr; |
| 211 | 204 | |
| ... | ... | |
| 214 | 207 |
} |
| 215 | 208 | |
| 216 | 209 |
static __inline void |
| 217 |
ncvhw_set_count(iot, ioh, count) |
|
| 218 |
bus_space_tag_t iot; |
|
| 219 |
bus_space_handle_t ioh; |
|
| 220 |
int count; |
|
| 210 |
ncvhw_set_count(bus_space_tag_t iot, bus_space_handle_t ioh, int count) |
|
| 221 | 211 |
{
|
| 222 | 212 | |
| 223 | 213 |
bus_space_write_1(iot, ioh, cr0_tclsb, (u_int8_t) count); |
| ... | ... | |
| 226 | 216 |
} |
| 227 | 217 | |
| 228 | 218 |
static __inline u_int |
| 229 |
ncvhw_get_count(iot, ioh) |
|
| 230 |
bus_space_tag_t iot; |
|
| 231 |
bus_space_handle_t ioh; |
|
| 219 |
ncvhw_get_count(bus_space_tag_t iot, bus_space_handle_t ioh) |
|
| 232 | 220 |
{
|
| 233 | 221 |
u_int count; |
| 234 | 222 | |
| ... | ... | |
| 239 | 227 |
} |
| 240 | 228 | |
| 241 | 229 |
static int |
| 242 |
ncvhw_check(iot, ioh, hw) |
|
| 243 |
bus_space_tag_t iot; |
|
| 244 |
bus_space_handle_t ioh; |
|
| 245 |
struct ncv_hw *hw; |
|
| 230 |
ncvhw_check(bus_space_tag_t iot, bus_space_handle_t ioh, struct ncv_hw *hw) |
|
| 246 | 231 |
{
|
| 247 | 232 |
u_int8_t stat; |
| 248 | 233 | |
| ... | ... | |
| 294 | 279 |
} |
| 295 | 280 | |
| 296 | 281 |
static void |
| 297 |
ncvhw_reset(iot, ioh, hw) |
|
| 298 |
bus_space_tag_t iot; |
|
| 299 |
bus_space_handle_t ioh; |
|
| 300 |
struct ncv_hw *hw; |
|
| 282 |
ncvhw_reset(bus_space_tag_t iot, bus_space_handle_t ioh, |
|
| 283 |
struct ncv_hw *hw) |
|
| 301 | 284 |
{
|
| 302 | 285 | |
| 303 | 286 |
ncvhw_select_register_0(iot, ioh, hw); |
| ... | ... | |
| 315 | 298 |
} |
| 316 | 299 | |
| 317 | 300 |
static void |
| 318 |
ncvhw_init(iot, ioh, hw) |
|
| 319 |
bus_space_tag_t iot; |
|
| 320 |
bus_space_handle_t ioh; |
|
| 321 |
struct ncv_hw *hw; |
|
| 301 |
ncvhw_init(bus_space_tag_t iot, bus_space_handle_t ioh, |
|
| 302 |
struct ncv_hw *hw) |
|
| 322 | 303 |
{
|
| 323 | 304 | |
| 324 | 305 |
ncvhw_select_register_0(iot, ioh, hw); |
| ... | ... | |
| 342 | 323 | |
| 343 | 324 |
#ifdef NCV_POWER_CONTROL |
| 344 | 325 |
static int |
| 345 |
ncvhw_power(sc, flags) |
|
| 346 |
struct ncv_softc *sc; |
|
| 347 |
u_int flags; |
|
| 326 |
ncvhw_power(struct ncv_softc *sc, u_int flags) |
|
| 348 | 327 |
{
|
| 349 | 328 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 350 | 329 |
bus_space_tag_t iot = sc->sc_iot; |
| ... | ... | |
| 382 | 361 |
* scsi low interface |
| 383 | 362 |
**************************************************************/ |
| 384 | 363 |
static void |
| 385 |
ncvhw_attention(sc) |
|
| 386 |
struct ncv_softc *sc; |
|
| 364 |
ncvhw_attention(struct ncv_softc *sc) |
|
| 387 | 365 |
{
|
| 388 | 366 | |
| 389 | 367 |
bus_space_write_1(sc->sc_iot, sc->sc_ioh, cr0_cmd, CMD_SETATN); |
| ... | ... | |
| 391 | 369 |
} |
| 392 | 370 | |
| 393 | 371 |
static void |
| 394 |
ncvhw_bus_reset(sc) |
|
| 395 |
struct ncv_softc *sc; |
|
| 372 |
ncvhw_bus_reset(struct ncv_softc *sc) |
|
| 396 | 373 |
{
|
| 397 | 374 |
bus_space_tag_t iot = sc->sc_iot; |
| 398 | 375 |
bus_space_handle_t ioh = sc->sc_ioh; |
| ... | ... | |
| 404 | 381 |
} |
| 405 | 382 | |
| 406 | 383 |
static int |
| 407 |
ncvhw_start_selection(sc, cb) |
|
| 408 |
struct ncv_softc *sc; |
|
| 409 |
struct slccb *cb; |
|
| 384 |
ncvhw_start_selection(struct ncv_softc *sc, struct slccb *cb) |
|
| 410 | 385 |
{
|
| 411 | 386 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 412 | 387 |
bus_space_tag_t iot = sc->sc_iot; |
| ... | ... | |
| 471 | 446 |
} |
| 472 | 447 | |
| 473 | 448 |
static int |
| 474 |
ncv_world_start(sc, fdone) |
|
| 475 |
struct ncv_softc *sc; |
|
| 476 |
int fdone; |
|
| 449 |
ncv_world_start(struct ncv_softc *sc, int fdone) |
|
| 477 | 450 |
{
|
| 478 | 451 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 479 | 452 |
bus_space_tag_t iot = sc->sc_iot; |
| ... | ... | |
| 504 | 477 |
} |
| 505 | 478 | |
| 506 | 479 |
static int |
| 507 |
ncv_msg(sc, ti, msg) |
|
| 508 |
struct ncv_softc *sc; |
|
| 509 |
struct targ_info *ti; |
|
| 510 |
u_int msg; |
|
| 480 |
ncv_msg(struct ncv_softc *sc, struct targ_info *ti, u_int msg) |
|
| 511 | 481 |
{
|
| 512 | 482 |
bus_space_tag_t iot = sc->sc_iot; |
| 513 | 483 |
bus_space_handle_t ioh = sc->sc_ioh; |
| ... | ... | |
| 547 | 517 |
} |
| 548 | 518 | |
| 549 | 519 |
static int |
| 550 |
ncv_targ_init(sc, ti, action) |
|
| 551 |
struct ncv_softc *sc; |
|
| 552 |
struct targ_info *ti; |
|
| 553 |
int action; |
|
| 520 |
ncv_targ_init(struct ncv_softc *sc, struct targ_info *ti, int action) |
|
| 554 | 521 |
{
|
| 555 | 522 |
struct ncv_targ_info *nti = (void *) ti; |
| 556 | 523 | |
| ... | ... | |
| 573 | 540 |
static int ncv_setup_img (struct ncv_hw *, u_int, int); |
| 574 | 541 | |
| 575 | 542 |
static int |
| 576 |
ncv_setup_img(hw, dvcfg, hostid) |
|
| 577 |
struct ncv_hw *hw; |
|
| 578 |
u_int dvcfg; |
|
| 579 |
int hostid; |
|
| 543 |
ncv_setup_img(struct ncv_hw *hw, u_int dvcfg, int hostid) |
|
| 580 | 544 |
{
|
| 581 | 545 | |
| 582 | 546 |
if (NCV_CLKFACTOR(dvcfg) > CLK_35M_F) |
| ... | ... | |
| 616 | 580 |
} |
| 617 | 581 | |
| 618 | 582 |
int |
| 619 |
ncvprobesubr(iot, ioh, dvcfg, hsid) |
|
| 620 |
bus_space_tag_t iot; |
|
| 621 |
bus_space_handle_t ioh; |
|
| 622 |
u_int dvcfg; |
|
| 623 |
int hsid; |
|
| 583 |
ncvprobesubr(bus_space_tag_t iot, bus_space_handle_t ioh, u_int dvcfg, |
|
| 584 |
int hsid) |
|
| 624 | 585 |
{
|
| 625 | 586 |
struct ncv_hw hwtab; |
| 626 | 587 | |
| ... | ... | |
| 634 | 595 |
} |
| 635 | 596 | |
| 636 | 597 |
int |
| 637 |
ncvprint(aux, name) |
|
| 638 |
void *aux; |
|
| 639 |
const char *name; |
|
| 598 |
ncvprint(void *aux, const char *name) |
|
| 640 | 599 |
{
|
| 641 | 600 | |
| 642 | 601 |
if (name != NULL) |
| ... | ... | |
| 645 | 604 |
} |
| 646 | 605 | |
| 647 | 606 |
void |
| 648 |
ncvattachsubr(sc) |
|
| 649 |
struct ncv_softc *sc; |
|
| 607 |
ncvattachsubr(struct ncv_softc *sc) |
|
| 650 | 608 |
{
|
| 651 | 609 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 652 | 610 | |
| ... | ... | |
| 665 | 623 |
* PDMA |
| 666 | 624 |
**************************************************************/ |
| 667 | 625 |
static __inline void |
| 668 |
ncv_setup_and_start_pio(sc, reqlen) |
|
| 669 |
struct ncv_softc *sc; |
|
| 670 |
u_int reqlen; |
|
| 626 |
ncv_setup_and_start_pio(struct ncv_softc *sc, u_int reqlen) |
|
| 671 | 627 |
{
|
| 672 | 628 |
bus_space_tag_t iot = sc->sc_iot; |
| 673 | 629 |
bus_space_handle_t ioh = sc->sc_ioh; |
| ... | ... | |
| 681 | 637 |
} |
| 682 | 638 | |
| 683 | 639 |
static void |
| 684 |
ncv_pdma_end(sc, ti) |
|
| 685 |
struct ncv_softc *sc; |
|
| 686 |
struct targ_info *ti; |
|
| 640 |
ncv_pdma_end(struct ncv_softc *sc, struct targ_info *ti) |
|
| 687 | 641 |
{
|
| 688 | 642 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 689 | 643 |
bus_space_tag_t iot = sc->sc_iot; |
| ... | ... | |
| 743 | 697 |
} |
| 744 | 698 | |
| 745 | 699 |
static void |
| 746 |
ncv_pio_read(sc, buf, reqlen) |
|
| 747 |
struct ncv_softc *sc; |
|
| 748 |
u_int8_t *buf; |
|
| 749 |
u_int reqlen; |
|
| 700 |
ncv_pio_read(struct ncv_softc *sc, u_int8_t *buf, u_int reqlen) |
|
| 750 | 701 |
{
|
| 751 | 702 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 752 | 703 |
bus_space_tag_t iot = sc->sc_iot; |
| ... | ... | |
| 809 | 760 |
} |
| 810 | 761 | |
| 811 | 762 |
static void |
| 812 |
ncv_pio_write(sc, buf, reqlen) |
|
| 813 |
struct ncv_softc *sc; |
|
| 814 |
u_int8_t *buf; |
|
| 815 |
u_int reqlen; |
|
| 763 |
ncv_pio_write(struct ncv_softc *sc, u_int8_t *buf, u_int reqlen) |
|
| 816 | 764 |
{
|
| 817 | 765 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 818 | 766 |
bus_space_tag_t iot = sc->sc_iot; |
| ... | ... | |
| 874 | 822 |
* disconnect & reselect (HW low) |
| 875 | 823 |
**************************************************************/ |
| 876 | 824 |
static int |
| 877 |
ncv_reselected(sc) |
|
| 878 |
struct ncv_softc *sc; |
|
| 825 |
ncv_reselected(struct ncv_softc *sc) |
|
| 879 | 826 |
{
|
| 880 | 827 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 881 | 828 |
bus_space_tag_t iot = sc->sc_iot; |
| ... | ... | |
| 905 | 852 |
} |
| 906 | 853 | |
| 907 | 854 |
static int |
| 908 |
ncv_disconnected(sc, ti) |
|
| 909 |
struct ncv_softc *sc; |
|
| 910 |
struct targ_info *ti; |
|
| 855 |
ncv_disconnected(struct ncv_softc *sc, struct targ_info *ti) |
|
| 911 | 856 |
{
|
| 912 | 857 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 913 | 858 |
bus_space_tag_t iot = sc->sc_iot; |
| ... | ... | |
| 928 | 873 |
* SEQUENCER |
| 929 | 874 |
**************************************************************/ |
| 930 | 875 |
static int |
| 931 |
ncv_target_nexus_establish(sc) |
|
| 932 |
struct ncv_softc *sc; |
|
| 876 |
ncv_target_nexus_establish(struct ncv_softc *sc) |
|
| 933 | 877 |
{
|
| 934 | 878 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 935 | 879 |
struct targ_info *ti = slp->sl_Tnexus; |
| ... | ... | |
| 944 | 888 |
} |
| 945 | 889 | |
| 946 | 890 |
static int |
| 947 |
ncv_lun_nexus_establish(sc) |
|
| 948 |
struct ncv_softc *sc; |
|
| 891 |
ncv_lun_nexus_establish(struct ncv_softc *sc) |
|
| 949 | 892 |
{
|
| 950 | 893 | |
| 951 | 894 |
return 0; |
| 952 | 895 |
} |
| 953 | 896 | |
| 954 | 897 |
static int |
| 955 |
ncv_ccb_nexus_establish(sc) |
|
| 956 |
struct ncv_softc *sc; |
|
| 898 |
ncv_ccb_nexus_establish(struct ncv_softc *sc) |
|
| 957 | 899 |
{
|
| 958 | 900 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 959 | 901 |
struct slccb *cb = slp->sl_Qnexus; |
| ... | ... | |
| 963 | 905 |
} |
| 964 | 906 | |
| 965 | 907 |
static int |
| 966 |
ncv_catch_intr(sc) |
|
| 967 |
struct ncv_softc *sc; |
|
| 908 |
ncv_catch_intr(struct ncv_softc *sc) |
|
| 968 | 909 |
{
|
| 969 | 910 |
bus_space_tag_t iot = sc->sc_iot; |
| 970 | 911 |
bus_space_handle_t ioh = sc->sc_ioh; |
| ... | ... | |
| 983 | 924 |
} |
| 984 | 925 | |
| 985 | 926 |
int |
| 986 |
ncvintr(arg) |
|
| 987 |
void *arg; |
|
| 927 |
ncvintr(void *arg) |
|
| 988 | 928 |
{
|
| 989 | 929 |
struct ncv_softc *sc = arg; |
| 990 | 930 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| disk/nsp/nsp.c 26 Nov 2005 00:38:58 -0000 | ||
|---|---|---|
| 211 | 211 |
static __inline void nsp_cr_write_1 (bus_space_tag_t bst, bus_space_handle_t bsh, bus_addr_t ofs, u_int8_t va); |
| 212 | 212 | |
| 213 | 213 |
static __inline u_int8_t |
| 214 |
nsp_cr_read_1(bst, bsh, ofs) |
|
| 215 |
bus_space_tag_t bst; |
|
| 216 |
bus_space_handle_t bsh; |
|
| 217 |
bus_addr_t ofs; |
|
| 214 |
nsp_cr_read_1(bus_space_tag_t bst, bus_space_handle_t bsh, bus_addr_t ofs) |
|
| 218 | 215 |
{
|
| 219 | 216 |
|
| 220 | 217 |
bus_space_write_1(bst, bsh, nsp_idxr, ofs); |
| ... | ... | |
| 222 | 219 |
} |
| 223 | 220 | |
| 224 | 221 |
static __inline void |
| 225 |
nsp_cr_write_1(bst, bsh, ofs, va) |
|
| 226 |
bus_space_tag_t bst; |
|
| 227 |
bus_space_handle_t bsh; |
|
| 228 |
bus_addr_t ofs; |
|
| 229 |
u_int8_t va; |
|
| 222 |
nsp_cr_write_1(bus_space_tag_t bst, bus_space_handle_t bsh, bus_addr_t ofs, |
|
| 223 |
u_int8_t va) |
|
| 230 | 224 |
{
|
| 231 | 225 | |
| 232 | 226 |
bus_space_write_1(bst, bsh, nsp_idxr, ofs); |
| ... | ... | |
| 234 | 228 |
} |
| 235 | 229 |
|
| 236 | 230 |
static int |
| 237 |
nsp_expect_signal(sc, curphase, mask) |
|
| 238 |
struct nsp_softc *sc; |
|
| 239 |
u_int8_t curphase, mask; |
|
| 231 |
nsp_expect_signal(struct nsp_softc *sc, u_int8_t curphase, u_int8_t mask) |
|
| 240 | 232 |
{
|
| 241 | 233 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 242 | 234 |
bus_space_tag_t bst = sc->sc_iot; |
| ... | ... | |
| 265 | 257 |
} |
| 266 | 258 | |
| 267 | 259 |
static void |
| 268 |
nsphw_init(sc) |
|
| 269 |
struct nsp_softc *sc; |
|
| 260 |
nsphw_init(struct nsp_softc *sc) |
|
| 270 | 261 |
{
|
| 271 | 262 |
bus_space_tag_t bst = sc->sc_iot; |
| 272 | 263 |
bus_space_handle_t bsh = sc->sc_ioh; |
| ... | ... | |
| 312 | 303 |
* scsi low interface |
| 313 | 304 |
****************************************************/ |
| 314 | 305 |
static void |
| 315 |
nsphw_attention(sc) |
|
| 316 |
struct nsp_softc *sc; |
|
| 306 |
nsphw_attention(struct nsp_softc *sc) |
|
| 317 | 307 |
{
|
| 318 | 308 |
bus_space_tag_t bst = sc->sc_iot; |
| 319 | 309 |
bus_space_handle_t bsh = sc->sc_ioh; |
| ... | ... | |
| 325 | 315 |
} |
| 326 | 316 | |
| 327 | 317 |
static void |
| 328 |
nsphw_bus_reset(sc) |
|
| 329 |
struct nsp_softc *sc; |
|
| 318 |
nsphw_bus_reset(struct nsp_softc *sc) |
|
| 330 | 319 |
{
|
| 331 | 320 |
bus_space_tag_t bst = sc->sc_iot; |
| 332 | 321 |
bus_space_handle_t bsh = sc->sc_ioh; |
| ... | ... | |
| 344 | 333 |
} |
| 345 | 334 | |
| 346 | 335 |
static void |
| 347 |
nsphw_selection_done_and_expect_msgout(sc) |
|
| 348 |
struct nsp_softc *sc; |
|
| 336 |
nsphw_selection_done_and_expect_msgout(struct nsp_softc *sc) |
|
| 349 | 337 |
{
|
| 350 | 338 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 351 | 339 |
bus_space_tag_t bst = sc->sc_iot; |
| ... | ... | |
| 366 | 354 |
} |
| 367 | 355 | |
| 368 | 356 |
static int |
| 369 |
nsphw_start_selection(sc, cb) |
|
| 370 |
struct nsp_softc *sc; |
|
| 371 |
struct slccb *cb; |
|
| 357 |
nsphw_start_selection(struct nsp_softc *sc, struct slccb *cb) |
|
| 372 | 358 |
{
|
| 373 | 359 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 374 | 360 |
bus_space_tag_t bst = sc->sc_iot; |
| ... | ... | |
| 470 | 456 |
} |
| 471 | 457 | |
| 472 | 458 |
static int |
| 473 |
nsp_world_start(sc, fdone) |
|
| 474 |
struct nsp_softc *sc; |
|
| 475 |
int fdone; |
|
| 459 |
nsp_world_start(struct nsp_softc *sc, int fdone) |
|
| 476 | 460 |
{
|
| 477 | 461 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 478 | 462 | |
| ... | ... | |
| 521 | 505 |
}; |
| 522 | 506 | |
| 523 | 507 |
static int |
| 524 |
nsp_msg(sc, ti, msg) |
|
| 525 |
struct nsp_softc *sc; |
|
| 526 |
struct targ_info *ti; |
|
| 527 |
u_int msg; |
|
| 508 |
nsp_msg(struct nsp_softc *sc, struct targ_info *ti, u_int msg) |
|
| 528 | 509 |
{
|
| 529 | 510 |
bus_space_tag_t bst = sc->sc_iot; |
| 530 | 511 |
bus_space_handle_t bsh = sc->sc_ioh; |
| ... | ... | |
| 585 | 566 |
} |
| 586 | 567 | |
| 587 | 568 |
static int |
| 588 |
nsp_targ_init(sc, ti, action) |
|
| 589 |
struct nsp_softc *sc; |
|
| 590 |
struct targ_info *ti; |
|
| 591 |
int action; |
|
| 569 |
nsp_targ_init(struct nsp_softc *sc, struct targ_info *ti, int action) |
|
| 592 | 570 |
{
|
| 593 | 571 |
struct nsp_targ_info *nti = (void *) ti; |
| 594 | 572 | |
| ... | ... | |
| 604 | 582 |
} |
| 605 | 583 | |
| 606 | 584 |
static void |
| 607 |
nsp_start_timer(sc, time) |
|
| 608 |
struct nsp_softc *sc; |
|
| 609 |
int time; |
|
| 585 |
nsp_start_timer(struct nsp_softc *sc, int time) |
|
| 610 | 586 |
{
|
| 611 | 587 |
bus_space_tag_t bst = sc->sc_iot; |
| 612 | 588 |
bus_space_handle_t bsh = sc->sc_ioh; |
| ... | ... | |
| 619 | 595 |
* General probe attach |
| 620 | 596 |
**************************************************************/ |
| 621 | 597 |
int |
| 622 |
nspprobesubr(iot, ioh, dvcfg) |
|
| 623 |
bus_space_tag_t iot; |
|
| 624 |
bus_space_handle_t ioh; |
|
| 625 |
u_int dvcfg; |
|
| 598 |
nspprobesubr(bus_space_tag_t iot, bus_space_handle_t ioh, u_int dvcfg) |
|
| 626 | 599 |
{
|
| 627 | 600 |
u_int8_t regv; |
| 628 | 601 | |
| ... | ... | |
| 633 | 606 |
} |
| 634 | 607 | |
| 635 | 608 |
int |
| 636 |
nspprint(aux, name) |
|
| 637 |
void *aux; |
|
| 638 |
const char *name; |
|
| 609 |
nspprint(void *aux, const char *name) |
|
| 639 | 610 |
{
|
| 640 | 611 | |
| 641 | 612 |
if (name != NULL) |
| ... | ... | |
| 644 | 615 |
} |
| 645 | 616 | |
| 646 | 617 |
void |
| 647 |
nspattachsubr(sc) |
|
| 648 |
struct nsp_softc *sc; |
|
| 618 |
nspattachsubr(struct nsp_softc *sc) |
|
| 649 | 619 |
{
|
| 650 | 620 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 651 | 621 | |
| ... | ... | |
| 664 | 634 |
* PDMA functions |
| 665 | 635 |
**************************************************************/ |
| 666 | 636 |
static u_int |
| 667 |
nsp_fifo_count(sc) |
|
| 668 |
struct nsp_softc *sc; |
|
| 637 |
nsp_fifo_count(struct nsp_softc *sc) |
|
| 669 | 638 |
{
|
| 670 | 639 |
bus_space_tag_t bst = sc->sc_iot; |
| 671 | 640 |
bus_space_handle_t bsh = sc->sc_ioh; |
| ... | ... | |
| 679 | 648 |
} |
| 680 | 649 | |
| 681 | 650 |
static u_int |
| 682 |
nsp_request_count(sc) |
|
| 683 |
struct nsp_softc *sc; |
|
| 651 |
nsp_request_count(struct nsp_softc *sc) |
|
| 684 | 652 |
{
|
| 685 | 653 |
bus_space_tag_t bst = sc->sc_iot; |
| 686 | 654 |
bus_space_handle_t bsh = sc->sc_ioh; |
| ... | ... | |
| 694 | 662 |
} |
| 695 | 663 | |
| 696 | 664 |
static void |
| 697 |
nsp_setup_fifo(sc, on, direction, datalen) |
|
| 698 |
struct nsp_softc *sc; |
|
| 699 |
int on; |
|
| 700 |
int direction; |
|
| 701 |
int datalen; |
|
| 665 |
nsp_setup_fifo(struct nsp_softc *sc, int on, int direction, int datalen) |
|
| 702 | 666 |
{
|
| 703 | 667 |
u_int8_t xfermode; |
| 704 | 668 | |
| ... | ... | |
| 753 | 717 |
} |
| 754 | 718 | |
| 755 | 719 |
static void |
| 756 |
nsp_pdma_end(sc, ti) |
|
| 757 |
struct nsp_softc *sc; |
|
| 758 |
struct targ_info *ti; |
|
| 720 |
nsp_pdma_end(struct nsp_softc *sc, struct targ_info *ti) |
|
| 759 | 721 |
{
|
| 760 | 722 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 761 | 723 |
struct slccb *cb = slp->sl_Qnexus; |
| ... | ... | |
| 823 | 785 |
#define WFIFO_CRIT 32 |
| 824 | 786 | |
| 825 | 787 |
static void |
| 826 |
nsp_data_padding(sc, direction, count) |
|
| 827 |
struct nsp_softc *sc; |
|
| 828 |
int direction; |
|
| 829 |
u_int count; |
|
| 788 |
nsp_data_padding(struct nsp_softc *sc, int direction, u_int count) |
|
| 830 | 789 |
{
|
| 831 | 790 |
bus_space_tag_t bst = sc->sc_iot; |
| 832 | 791 |
bus_space_handle_t bsh = sc->sc_ioh; |
| ... | ... | |
| 849 | 808 |
} |
| 850 | 809 | |
| 851 | 810 |
static int |
| 852 |
nsp_read_fifo(sc, suspendio) |
|
| 853 |
struct nsp_softc *sc; |
|
| 854 |
int suspendio; |
|
| 811 |
nsp_read_fifo(struct nsp_softc *sc, int suspendio) |
|
| 855 | 812 |
{
|
| 856 | 813 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 857 | 814 |
bus_space_tag_t bst = sc->sc_iot; |
| ... | ... | |
| 940 | 897 |
} |
| 941 | 898 | |
| 942 | 899 |
static int |
| 943 |
nsp_write_fifo(sc, suspendio) |
|
| 944 |
struct nsp_softc *sc; |
|
| 945 |
int suspendio; |
|
| 900 |
nsp_write_fifo(struct nsp_softc *sc, int suspendio) |
|
| 946 | 901 |
{
|
| 947 | 902 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 948 | 903 |
bus_space_tag_t bst = sc->sc_iot; |
| ... | ... | |
| 1012 | 967 |
} |
| 1013 | 968 | |
| 1014 | 969 |
static int |
| 1015 |
nsp_wait_interrupt(sc) |
|
| 1016 |
struct nsp_softc *sc; |
|
| 970 |
nsp_wait_interrupt(struct nsp_softc *sc) |
|
| 1017 | 971 |
{
|
| 1018 | 972 |
bus_space_tag_t bst = sc->sc_iot; |
| 1019 | 973 |
bus_space_handle_t bsh = sc->sc_ioh; |
| ... | ... | |
| 1038 | 992 |
} |
| 1039 | 993 | |
| 1040 | 994 |
static void |
| 1041 |
nsp_pio_read(sc, suspendio) |
|
| 1042 |
struct nsp_softc *sc; |
|
| 1043 |
int suspendio; |
|
| 995 |
nsp_pio_read(struct nsp_softc *sc, int suspendio) |
|
| 1044 | 996 |
{
|
| 1045 | 997 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 1046 | 998 |
bus_space_tag_t bst = sc->sc_iot; |
| ... | ... | |
| 1117 | 1069 |
} |
| 1118 | 1070 | |
| 1119 | 1071 |
static void |
| 1120 |
nsp_pio_write(sc, suspendio) |
|
| 1121 |
struct nsp_softc *sc; |
|
| 1122 |
int suspendio; |
|
| 1072 |
nsp_pio_write(struct nsp_softc *sc, int suspendio) |
|
| 1123 | 1073 |
{
|
| 1124 | 1074 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 1125 | 1075 |
bus_space_tag_t bst = sc->sc_iot; |
| ... | ... | |
| 1228 | 1178 |
} |
| 1229 | 1179 | |
| 1230 | 1180 |
static int |
| 1231 |
nsp_negate_signal(sc, mask, s) |
|
| 1232 |
struct nsp_softc *sc; |
|
| 1233 |
u_int8_t mask; |
|
| 1234 |
u_char *s; |
|
| 1181 |
nsp_negate_signal(struct nsp_softc *sc, u_int8_t mask, u_char *s) |
|
| 1235 | 1182 |
{
|
| 1236 | 1183 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 1237 | 1184 |
bus_space_tag_t bst = sc->sc_iot; |
| ... | ... | |
| 1254 | 1201 |
} |
| 1255 | 1202 | |
| 1256 | 1203 |
static int |
| 1257 |
nsp_xfer(sc, buf, len, phase, clear_atn) |
|
| 1258 |
struct nsp_softc *sc; |
|
| 1259 |
u_int8_t *buf; |
|
| 1260 |
int len; |
|
| 1261 |
int phase; |
|
| 1262 |
int clear_atn; |
|
| 1204 |
nsp_xfer(struct nsp_softc *sc, u_int8_t *buf, int len, int phase, |
|
| 1205 |
int clear_atn) |
|
| 1263 | 1206 |
{
|
| 1264 | 1207 |
bus_space_tag_t bst = sc->sc_iot; |
| 1265 | 1208 |
bus_space_handle_t bsh = sc->sc_ioh; |
| ... | ... | |
| 1297 | 1240 |
* disconnect & reselect (HW low) |
| 1298 | 1241 |
**************************************************************/ |
| 1299 | 1242 |
static int |
| 1300 |
nsp_reselected(sc) |
|
| 1301 |
struct nsp_softc *sc; |
|
| 1243 |
nsp_reselected(struct nsp_softc *sc) |
|
| 1302 | 1244 |
{
|
| 1303 | 1245 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 1304 | 1246 |
bus_space_tag_t bst = sc->sc_iot; |
| ... | ... | |
| 1328 | 1270 |
} |
| 1329 | 1271 | |
| 1330 | 1272 |
static int |
| 1331 |
nsp_disconnected(sc, ti) |
|
| 1332 |
struct nsp_softc *sc; |
|
| 1333 |
struct targ_info *ti; |
|
| 1273 |
nsp_disconnected(struct nsp_softc *sc, struct targ_info *ti) |
|
| 1334 | 1274 |
{
|
| 1335 | 1275 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 1336 | 1276 |
bus_space_tag_t bst = sc->sc_iot; |
| ... | ... | |
| 1358 | 1298 |
static void nsp_error (struct nsp_softc *, u_char *, u_int8_t, u_int8_t, u_int8_t); |
| 1359 | 1299 | |
| 1360 | 1300 |
static void |
| 1361 |
nsp_error(sc, s, isrc, ph, irqphs) |
|
| 1362 |
struct nsp_softc *sc; |
|
| 1363 |
u_char *s; |
|
| 1364 |
u_int8_t isrc, ph, irqphs; |
|
| 1301 |
nsp_error(struct nsp_softc *sc, u_char *s, u_int8_t isrc, u_int8_t ph, |
|
| 1302 |
u_int8_t irqphs) |
|
| 1365 | 1303 |
{
|
| 1366 | 1304 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 1367 | 1305 | |
| ... | ... | |
| 1371 | 1309 |
} |
| 1372 | 1310 | |
| 1373 | 1311 |
static int |
| 1374 |
nsp_target_nexus_establish(sc) |
|
| 1375 |
struct nsp_softc *sc; |
|
| 1312 |
nsp_target_nexus_establish(struct nsp_softc *sc) |
|
| 1376 | 1313 |
{
|
| 1377 | 1314 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 1378 | 1315 |
bus_space_tag_t bst = sc->sc_iot; |
| ... | ... | |
| 1390 | 1327 |
} |
| 1391 | 1328 | |
| 1392 | 1329 |
static int |
| 1393 |
nsp_lun_nexus_establish(sc) |
|
| 1394 |
struct nsp_softc *sc; |
|
| 1330 |
nsp_lun_nexus_establish(struct nsp_softc *sc) |
|
| 1395 | 1331 |
{
|
| 1396 | 1332 | |
| 1397 | 1333 |
return 0; |
| 1398 | 1334 |
} |
| 1399 | 1335 | |
| 1400 | 1336 |
static int |
| 1401 |
nsp_ccb_nexus_establish(sc) |
|
| 1402 |
struct nsp_softc *sc; |
|
| 1337 |
nsp_ccb_nexus_establish(struct nsp_softc *sc) |
|
| 1403 | 1338 |
{
|
| 1404 | 1339 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 1405 | 1340 |
struct slccb *cb = slp->sl_Qnexus; |
| ... | ... | |
| 1434 | 1369 |
} |
| 1435 | 1370 | |
| 1436 | 1371 |
static int |
| 1437 |
nsp_phase_match(sc, phase, stat) |
|
| 1438 |
struct nsp_softc *sc; |
|
| 1439 |
u_int8_t phase; |
|
| 1440 |
u_int8_t stat; |
|
| 1372 |
nsp_phase_match(struct nsp_softc *sc, u_int8_t phase, u_int8_t stat) |
|
| 1441 | 1373 |
{
|
| 1442 | 1374 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 1443 | 1375 | |
| ... | ... | |
| 1455 | 1387 |
} |
| 1456 | 1388 | |
| 1457 | 1389 |
int |
| 1458 |
nspintr(arg) |
|
| 1459 |
void *arg; |
|
| 1390 |
nspintr(void *arg) |
|
| 1460 | 1391 |
{
|
| 1461 | 1392 |
struct nsp_softc *sc = arg; |
| 1462 | 1393 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| ... | ... | |
| 1867 | 1798 |
} |
| 1868 | 1799 | |
| 1869 | 1800 |
static int |
| 1870 |
nsp_timeout(sc) |
|
| 1871 |
struct nsp_softc *sc; |
|
| 1801 |
nsp_timeout(struct nsp_softc *sc) |
|
| 1872 | 1802 |
{
|
| 1873 | 1803 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 1874 | 1804 |
bus_space_tag_t iot = sc->sc_iot; |
| disk/stg/tmc18c30.c 26 Nov 2005 00:45:22 -0000 | ||
|---|---|---|
| 191 | 191 |
* hwfuncs |
| 192 | 192 |
****************************************************/ |
| 193 | 193 |
static __inline void |
| 194 |
stghw_bcr_write_1(sc, bcv) |
|
| 195 |
struct stg_softc *sc; |
|
| 196 |
u_int8_t bcv; |
|
| 194 |
stghw_bcr_write_1(struct stg_softc *sc, u_int8_t bcv) |
|
| 197 | 195 |
{
|
| 198 | 196 | |
| 199 | 197 |
bus_space_write_1(sc->sc_iot, sc->sc_ioh, tmc_bctl, bcv); |
| ... | ... | |
| 201 | 199 |
} |
| 202 | 200 | |
| 203 | 201 |
static int |
| 204 |
stghw_check(sc) |
|
| 205 |
struct stg_softc *sc; |
|
| 202 |
stghw_check(struct stg_softc *sc) |
|
| 206 | 203 |
{
|
| 207 | 204 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 208 | 205 |
bus_space_tag_t iot = sc->sc_iot; |
| ... | ... | |
| 258 | 255 |
} |
| 259 | 256 | |
| 260 | 257 |
static void |
| 261 |
stghw_init(sc) |
|
| 262 |
struct stg_softc *sc; |
|
| 258 |
stghw_init(struct stg_softc *sc) |
|
| 263 | 259 |
{
|
| 264 | 260 |
bus_space_tag_t iot = sc->sc_iot; |
| 265 | 261 |
bus_space_handle_t ioh = sc->sc_ioh; |
| ... | ... | |
| 275 | 271 |
} |
| 276 | 272 | |
| 277 | 273 |
static int |
| 278 |
stg_targ_init(sc, ti, action) |
|
| 279 |
struct stg_softc *sc; |
|
| 280 |
struct targ_info *ti; |
|
| 281 |
int action; |
|
| 274 |
stg_targ_init(struct stg_softc *sc, struct targ_info *ti, int action) |
|
| 282 | 275 |
{
|
| 283 | 276 |
struct stg_targ_info *sti = (void *) ti; |
| 284 | 277 | |
| ... | ... | |
| 296 | 289 |
* scsi low interface |
| 297 | 290 |
****************************************************/ |
| 298 | 291 |
static void |
| 299 |
stghw_attention(sc) |
|
| 300 |
struct stg_softc *sc; |
|
| 292 |
stghw_attention(struct stg_softc *sc) |
|
| 301 | 293 |
{
|
| 302 | 294 | |
| 303 | 295 |
sc->sc_busc |= BCTL_ATN; |
| ... | ... | |
| 307 | 299 |
} |
| 308 | 300 | |
| 309 | 301 |
static void |
| 310 |
stghw_bus_reset(sc) |
|
| 311 |
struct stg_softc *sc; |
|
| 302 |
stghw_bus_reset(struct stg_softc *sc) |
|
| 312 | 303 |
{
|
| 313 | 304 |
bus_space_tag_t iot = sc->sc_iot; |
| 314 | 305 |
bus_space_handle_t ioh = sc->sc_ioh; |
| ... | ... | |
| 321 | 312 |
} |
| 322 | 313 | |
| 323 | 314 |
static int |
| 324 |
stghw_start_selection(sc, cb) |
|
| 325 |
struct stg_softc *sc; |
|
| 326 |
struct slccb *cb; |
|
| 315 |
stghw_start_selection(struct stg_softc *sc, struct slccb *cb) |
|
| 327 | 316 |
{
|
| 328 | 317 |
bus_space_tag_t iot = sc->sc_iot; |
| 329 | 318 |
bus_space_handle_t ioh = sc->sc_ioh; |
| ... | ... | |
| 353 | 342 |
} |
| 354 | 343 | |
| 355 | 344 |
static int |
| 356 |
stg_world_start(sc, fdone) |
|
| 357 |
struct stg_softc *sc; |
|
| 358 |
int fdone; |
|
| 345 |
stg_world_start(struct stg_softc *sc, int fdone) |
|
| 359 | 346 |
{
|
| 360 | 347 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 361 | 348 |
int error; |
| ... | ... | |
| 377 | 364 |
} |
| 378 | 365 | |
| 379 | 366 |
static int |
| 380 |
stg_msg(sc, ti, msg) |
|
| 381 |
struct stg_softc *sc; |
|
| 382 |
struct targ_info *ti; |
|
| 383 |
u_int msg; |
|
| 367 |
stg_msg(struct stg_softc *sc, struct targ_info *ti, u_int msg) |
|
| 384 | 368 |
{
|
| 385 | 369 |
bus_space_tag_t iot = sc->sc_iot; |
| 386 | 370 |
bus_space_handle_t ioh = sc->sc_ioh; |
| ... | ... | |
| 425 | 409 |
* General probe attach |
| 426 | 410 |
**************************************************************/ |
| 427 | 411 |
int |
| 428 |
stgprobesubr(iot, ioh, dvcfg) |
|
| 429 |
bus_space_tag_t iot; |
|
| 430 |
bus_space_handle_t ioh; |
|
| 431 |
u_int dvcfg; |
|
| 412 |
stgprobesubr(bus_space_tag_t iot, bus_space_handle_t ioh, u_int dvcfg) |
|
| 432 | 413 |
{
|
| 433 | 414 |
u_int16_t lsb, msb; |
| 434 | 415 | |
| ... | ... | |
| 448 | 429 |
} |
| 449 | 430 | |
| 450 | 431 |
int |
| 451 |
stgprint(aux, name) |
|
| 452 |
void *aux; |
|
| 453 |
const char *name; |
|
| 432 |
stgprint(void *aux, const char *name) |
|
| 454 | 433 |
{
|
| 455 | 434 | |
| 456 | 435 |
if (name != NULL) |
| ... | ... | |
| 459 | 438 |
} |
| 460 | 439 | |
| 461 | 440 |
void |
| 462 |
stgattachsubr(sc) |
|
| 463 |
struct stg_softc *sc; |
|
| 441 |
stgattachsubr(struct stg_softc *sc) |
|
| 464 | 442 |
{
|
| 465 | 443 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 466 | 444 | |
| ... | ... | |
| 481 | 459 |
* PDMA functions |
| 482 | 460 |
**************************************************************/ |
| 483 | 461 |
static __inline void |
| 484 |
stg_pdma_end(sc, ti) |
|
| 485 |
struct stg_softc *sc; |
|
| 486 |
struct targ_info *ti; |
|
| 462 |
stg_pdma_end(struct stg_softc *sc, struct targ_info *ti) |
|
| 487 | 463 |
{
|
| 488 | 464 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 489 | 465 |
bus_space_tag_t iot = sc->sc_iot; |
| ... | ... | |
| 546 | 522 |
} |
| 547 | 523 | |
| 548 | 524 |
static void |
| 549 |
stg_pio_read(sc, ti, thold) |
|
| 550 |
struct stg_softc *sc; |
|
| 551 |
struct targ_info *ti; |
|
| 552 |
u_int thold; |
|
| 525 |
stg_pio_read(struct stg_softc *sc, struct targ_info *ti, u_int thold) |
|
| 553 | 526 |
{
|
| 554 | 527 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 555 | 528 |
bus_space_tag_t iot = sc->sc_iot; |
| ... | ... | |
| 639 | 612 |
} |
| 640 | 613 | |
| 641 | 614 |
static void |
| 642 |
stg_pio_write(sc, ti, thold) |
|
| 643 |
struct stg_softc *sc; |
|
| 644 |
struct targ_info *ti; |
|
| 645 |
u_int thold; |
|
| 615 |
stg_pio_write(struct stg_softc *sc, struct targ_info *ti, u_int thold) |
|
| 646 | 616 |
{
|
| 647 | 617 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 648 | 618 |
bus_space_tag_t iot = sc->sc_iot; |
| ... | ... | |
| 721 | 691 |
} |
| 722 | 692 | |
| 723 | 693 |
static int |
| 724 |
stg_negate_signal(sc, mask, s) |
|
| 725 |
struct stg_softc *sc; |
|
| 726 |
u_int8_t mask; |
|
| 727 |
u_char *s; |
|
| 694 |
stg_negate_signal(struct stg_softc *sc, u_int8_t mask, u_char *s) |
|
| 728 | 695 |
{
|
| 729 | 696 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 730 | 697 |
bus_space_tag_t bst = sc->sc_iot; |
| ... | ... | |
| 748 | 715 |
} |
| 749 | 716 | |
| 750 | 717 |
static int |
| 751 |
stg_expect_signal(sc, phase, mask) |
|
| 752 |
struct stg_softc *sc; |
|
| 753 |
u_int8_t phase, mask; |
|
| 718 |
stg_expect_signal(struct stg_softc *sc, u_int8_t phase, u_int8_t mask) |
|
| 754 | 719 |
{
|
| 755 | 720 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 756 | 721 |
bus_space_tag_t bst = sc->sc_iot; |
| ... | ... | |
| 777 | 742 |
} |
| 778 | 743 | |
| 779 | 744 |
static int |
| 780 |
stg_xfer(sc, buf, len, phase, clear_atn) |
|
| 781 |
struct stg_softc *sc; |
|
| 782 |
u_int8_t *buf; |
|
| 783 |
int len; |
|
| 784 |
int phase; |
|
| 785 |
int clear_atn; |
|
| 745 |
stg_xfer(struct stg_softc *sc, u_int8_t *buf, int len, int phase, |
|
| 746 |
int clear_atn) |
|
| 786 | 747 |
{
|
| 787 | 748 |
bus_space_tag_t iot = sc->sc_iot; |
| 788 | 749 |
bus_space_handle_t ioh = sc->sc_ioh; |
| ... | ... | |
| 827 | 788 |
* disconnect & reselect (HW low) |
| 828 | 789 |
**************************************************************/ |
| 829 | 790 |
static int |
| 830 |
stg_reselected(sc) |
|
| 831 |
struct stg_softc *sc; |
|
| 791 |
stg_reselected(struct stg_softc *sc) |
|
| 832 | 792 |
{
|
| 833 | 793 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 834 | 794 |
bus_space_tag_t iot = sc->sc_iot; |
| ... | ... | |
| 910 | 870 |
} |
| 911 | 871 | |
| 912 | 872 |
static int |
| 913 |
stg_disconnected(sc, ti) |
|
| 914 |
struct stg_softc *sc; |
|
| 915 |
struct targ_info *ti; |
|
| 873 |
stg_disconnected(struct stg_softc *sc, struct targ_info *ti) |
|
| 916 | 874 |
{
|
| 917 | 875 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 918 | 876 |
bus_space_tag_t iot = sc->sc_iot; |
| ... | ... | |
| 938 | 896 |
* SEQUENCER |
| 939 | 897 |
**************************************************************/ |
| 940 | 898 |
static int |
| 941 |
stg_target_nexus_establish(sc) |
|
| 942 |
struct stg_softc *sc; |
|
| 899 |
stg_target_nexus_establish(struct stg_softc *sc) |
|
| 943 | 900 |
{
|
| 944 | 901 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 945 | 902 |
bus_space_tag_t iot = sc->sc_iot; |
| ... | ... | |
| 956 | 913 |
} |
| 957 | 914 | |
| 958 | 915 |
static int |
| 959 |
stg_lun_nexus_establish(sc) |
|
| 960 |
struct stg_softc *sc; |
|
| 916 |
stg_lun_nexus_establish(struct stg_softc *sc) |
|
| 961 | 917 |
{
|
| 962 | 918 | |
| 963 | 919 |
return 0; |
| 964 | 920 |
} |
| 965 | 921 | |
| 966 | 922 |
static int |
| 967 |
stg_ccb_nexus_establish(sc) |
|
| 968 |
struct stg_softc *sc; |
|
| 923 |
stg_ccb_nexus_establish(struct stg_softc *sc) |
|
| 969 | 924 |
{
|
| 970 | 925 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 971 | 926 |
struct slccb *cb = slp->sl_Qnexus; |
| ... | ... | |
| 977 | 932 |
#define STGHW_SELECT_INTERVAL 10 |
| 978 | 933 | |
| 979 | 934 |
static int |
| 980 |
stghw_select_targ_wait(sc, mu) |
|
| 981 |
struct stg_softc *sc; |
|
| 982 |
int mu; |
|
| 935 |
stghw_select_targ_wait(struct stg_softc *sc, int mu) |
|
| 983 | 936 |
{
|
| 984 | 937 |
bus_space_tag_t iot = sc->sc_iot; |
| 985 | 938 |
bus_space_handle_t ioh = sc->sc_ioh; |
| ... | ... | |
| 1002 | 955 |
} |
| 1003 | 956 | |
| 1004 | 957 |
static void |
| 1005 |
stg_selection_done_and_expect_msgout(sc) |
|
| 1006 |
struct stg_softc *sc; |
|
| 958 |
stg_selection_done_and_expect_msgout(struct stg_softc *sc) |
|
| 1007 | 959 |
{
|
| 1008 | 960 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 1009 | 961 |
bus_space_tag_t iot = sc->sc_iot; |
| ... | ... | |
| 1016 | 968 |
} |
| 1017 | 969 | |
| 1018 | 970 |
int |
| 1019 |
stgintr(arg) |
|
| 1020 |
void *arg; |
|
| 971 |
stgintr(void *arg) |
|
| 1021 | 972 |
{
|
| 1022 | 973 |
struct stg_softc *sc = arg; |
| 1023 | 974 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| ... | ... | |
| 1348 | 1299 |
} |
| 1349 | 1300 | |
| 1350 | 1301 |
static int |
| 1351 |
stg_timeout(sc) |
|
| 1352 |
struct stg_softc *sc; |
|
| 1302 |
stg_timeout(struct stg_softc *sc) |
|
| 1353 | 1303 |
{
|
| 1354 | 1304 |
struct scsi_low_softc *slp = &sc->sc_sclow; |
| 1355 | 1305 |
bus_space_tag_t iot = sc->sc_iot; |
| disk/trm/trm.c 26 Nov 2005 00:45:55 -0000 | ||
|---|---|---|
| 1262 | 1262 |
} |
| 1263 | 1263 | |
| 1264 | 1264 |
static void |
| 1265 |
trm_Interrupt(vpACB) |
|
| 1266 |
void *vpACB; |
|
| 1265 |
trm_Interrupt(void *vpACB) |
|
| 1267 | 1266 |
{
|
| 1268 | 1267 |
PACB pACB; |
| 1269 | 1268 |
PDCB pDCB; |
| disk/vn/vn.c 26 Nov 2005 00:47:16 -0000 | ||
|---|---|---|
| 540 | 540 |
*/ |
| 541 | 541 | |
| 542 | 542 |
static int |
| 543 |
vniocattach_file(vn, vio, dev, flag, td) |
|
| 544 |
struct vn_softc *vn; |
|
| 545 |
struct vn_ioctl *vio; |
|
| 546 |
dev_t dev; |
|
| 547 |
int flag; |
|
| 548 |
struct thread *td; |
|
| 543 |
vniocattach_file(struct vn_softc *vn, struct vn_ioctl *vio, dev_t dev, |
|
| 544 |
int flag, struct thread *td) |
|
| 549 | 545 |
{
|
| 550 | 546 |
struct vattr vattr; |
| 551 | 547 |
struct nlookupdata nd; |
| ... | ... | |
| 628 | 624 |
*/ |
| 629 | 625 | |
| 630 | 626 |
static int |
| 631 |
vniocattach_swap(vn, vio, dev, flag, td) |
|
| 632 |
struct vn_softc *vn; |
|
| 633 |
struct vn_ioctl *vio; |
|
| 634 |
dev_t dev; |
|
| 635 |
int flag; |
|
| 636 |
struct thread *td; |
|
| 627 |
vniocattach_swap(struct vn_softc *vn, struct vn_ioctl *vio, dev_t dev, |
|
| 628 |
int flag, struct thread *td) |
|
| 637 | 629 |
{
|
| 638 | 630 |
int error; |
| 639 | 631 |
struct proc *p = td->td_proc; |
| misc/gpib/gpib.c 8 Dec 2005 21:27:36 -0000 | ||
|---|---|---|
| 123 | 123 |
* Attach device and print the type of card to the screen. |
| 124 | 124 |
*/ |
| 125 | 125 |
static int |
| 126 |
gpattach(isdp) |
|
| 127 |
struct isa_device *isdp; |
|
| 126 |
gpattach(struct isa_device *isdp) |
|
| 128 | 127 |
{
|
| 129 | 128 |
struct gpib_softc *sc = &gpib_sc; |
| 130 | 129 | |
| ... | ... | |
| 150 | 149 |
* i.e. even if gpib5 is open, we can't open another minor device |
| 151 | 150 |
*/ |