Lines Matching refs:errdef
916 struct bofi_errdef errdef; in bofi_ioctl() local
954 errdef.namesize = errdef_32.namesize; in bofi_ioctl()
955 (void) strncpy(errdef.name, errdef_32.name, NAMESIZE); in bofi_ioctl()
956 errdef.instance = errdef_32.instance; in bofi_ioctl()
957 errdef.rnumber = errdef_32.rnumber; in bofi_ioctl()
958 errdef.offset = errdef_32.offset; in bofi_ioctl()
959 errdef.len = errdef_32.len; in bofi_ioctl()
960 errdef.access_type = errdef_32.access_type; in bofi_ioctl()
961 errdef.access_count = errdef_32.access_count; in bofi_ioctl()
962 errdef.fail_count = errdef_32.fail_count; in bofi_ioctl()
963 errdef.acc_chk = errdef_32.acc_chk; in bofi_ioctl()
964 errdef.optype = errdef_32.optype; in bofi_ioctl()
965 errdef.operand = errdef_32.operand; in bofi_ioctl()
966 errdef.log.logsize = errdef_32.log.logsize; in bofi_ioctl()
967 errdef.log.entries = errdef_32.log.entries; in bofi_ioctl()
968 errdef.log.flags = errdef_32.log.flags; in bofi_ioctl()
969 errdef.log.wrapcnt = errdef_32.log.wrapcnt; in bofi_ioctl()
970 errdef.log.start_time = errdef_32.log.start_time; in bofi_ioctl()
971 errdef.log.stop_time = errdef_32.log.stop_time; in bofi_ioctl()
972 errdef.log.logbase = in bofi_ioctl()
974 errdef.errdef_handle = errdef_32.errdef_handle; in bofi_ioctl()
978 if (ddi_copyin((void *)arg, &errdef, in bofi_ioctl()
984 if (ddi_copyin((void *)arg, &errdef, in bofi_ioctl()
991 if (errdef.fail_count == 0) in bofi_ioctl()
992 errdef.optype = 0; in bofi_ioctl()
993 if (errdef.optype != 0) { in bofi_ioctl()
994 if (errdef.access_type & BOFI_INTR && in bofi_ioctl()
995 errdef.optype != BOFI_DELAY_INTR && in bofi_ioctl()
996 errdef.optype != BOFI_LOSE_INTR && in bofi_ioctl()
997 errdef.optype != BOFI_EXTRA_INTR) in bofi_ioctl()
999 if ((errdef.access_type & (BOFI_DMA_RW|BOFI_PIO_R)) && in bofi_ioctl()
1000 errdef.optype == BOFI_NO_TRANSFER) in bofi_ioctl()
1002 if ((errdef.access_type & (BOFI_PIO_RW)) && in bofi_ioctl()
1003 errdef.optype != BOFI_EQUAL && in bofi_ioctl()
1004 errdef.optype != BOFI_OR && in bofi_ioctl()
1005 errdef.optype != BOFI_XOR && in bofi_ioctl()
1006 errdef.optype != BOFI_AND && in bofi_ioctl()
1007 errdef.optype != BOFI_NO_TRANSFER) in bofi_ioctl()
1020 if (errdef.namesize > NAMESIZE) in bofi_ioctl()
1022 namep = kmem_zalloc(errdef.namesize+1, KM_SLEEP); in bofi_ioctl()
1023 (void) strncpy(namep, errdef.name, errdef.namesize); in bofi_ioctl()
1025 if (bofi_errdef_alloc(&errdef, namep, softc) != DDI_SUCCESS) { in bofi_ioctl()
1027 (uintptr_t)errdef.errdef_handle); in bofi_ioctl()
1028 kmem_free(namep, errdef.namesize+1); in bofi_ioctl()
1044 errdef_32.namesize = errdef.namesize; in bofi_ioctl()
1045 (void) strncpy(errdef_32.name, errdef.name, NAMESIZE); in bofi_ioctl()
1046 errdef_32.instance = errdef.instance; in bofi_ioctl()
1047 errdef_32.rnumber = errdef.rnumber; in bofi_ioctl()
1048 errdef_32.offset = errdef.offset; in bofi_ioctl()
1049 errdef_32.len = errdef.len; in bofi_ioctl()
1050 errdef_32.access_type = errdef.access_type; in bofi_ioctl()
1051 errdef_32.access_count = errdef.access_count; in bofi_ioctl()
1052 errdef_32.fail_count = errdef.fail_count; in bofi_ioctl()
1053 errdef_32.acc_chk = errdef.acc_chk; in bofi_ioctl()
1054 errdef_32.optype = errdef.optype; in bofi_ioctl()
1055 errdef_32.operand = errdef.operand; in bofi_ioctl()
1056 errdef_32.log.logsize = errdef.log.logsize; in bofi_ioctl()
1057 errdef_32.log.entries = errdef.log.entries; in bofi_ioctl()
1058 errdef_32.log.flags = errdef.log.flags; in bofi_ioctl()
1059 errdef_32.log.wrapcnt = errdef.log.wrapcnt; in bofi_ioctl()
1060 errdef_32.log.start_time = errdef.log.start_time; in bofi_ioctl()
1061 errdef_32.log.stop_time = errdef.log.stop_time; in bofi_ioctl()
1063 (caddr32_t)(uintptr_t)errdef.log.logbase; in bofi_ioctl()
1064 errdef_32.errdef_handle = errdef.errdef_handle; in bofi_ioctl()
1068 errdef.errdef_handle); in bofi_ioctl()
1069 kmem_free(namep, errdef.namesize+1); in bofi_ioctl()
1075 if (ddi_copyout(&errdef, (void *)arg, in bofi_ioctl()
1078 errdef.errdef_handle); in bofi_ioctl()
1079 kmem_free(namep, errdef.namesize+1); in bofi_ioctl()
1085 if (ddi_copyout(&errdef, (void *)arg, in bofi_ioctl()
1088 (uintptr_t)errdef.errdef_handle); in bofi_ioctl()
1089 kmem_free(namep, errdef.namesize+1); in bofi_ioctl()
1743 ep->errdef = *errdefp; in bofi_errdef_alloc()
1745 ep->errdef.errdef_handle = (uint64_t)(uintptr_t)ep; in bofi_errdef_alloc()
1752 ep->errdef.log.entries = 0; in bofi_errdef_alloc()
1753 ep->errdef.log.wrapcnt = 0; in bofi_errdef_alloc()
1754 if (ep->errdef.access_type & BOFI_LOG) in bofi_errdef_alloc()
1756 ep->errdef.log.logsize, KM_SLEEP); in bofi_errdef_alloc()
1782 (ep->errdef.rnumber == -1 || in bofi_errdef_alloc()
1783 hp->rnumber == ep->errdef.rnumber) && in bofi_errdef_alloc()
1785 (((uintptr_t)(hp->addr + ep->errdef.offset + in bofi_errdef_alloc()
1786 ep->errdef.len) & ~LLSZMASK) > in bofi_errdef_alloc()
1787 ((uintptr_t)((hp->addr + ep->errdef.offset) + in bofi_errdef_alloc()
1812 NULL, NULL, bofi_signal, (caddr_t)&ep->errdef)); in bofi_errdef_alloc()
1883 kmem_free(ep->name, ep->errdef.namesize+1); in bofi_errdef_free()
1884 if ((ep->errdef.access_type & BOFI_LOG) && in bofi_errdef_free()
1885 ep->errdef.log.logsize && ep->logbase) /* double check */ in bofi_errdef_free()
1887 sizeof (struct acc_log_elem) * ep->errdef.log.logsize); in bofi_errdef_free()
1910 errctlp->instance == ep->errdef.instance) { in bofi_start()
1912 (void) drv_getparm(TIME, &(ep->errdef.log.start_time)); in bofi_start()
1913 ep->errdef.log.stop_time = 0ul; in bofi_start()
1933 errctlp->instance == ep->errdef.instance) { in bofi_stop()
1935 if (ep->errdef.log.stop_time == 0ul) in bofi_stop()
1937 &(ep->errdef.log.stop_time)); in bofi_stop()
1964 if ((ep->errdef.access_type & BOFI_LOG) && in bofi_signal()
1997 errctlp->instance == ep->errdef.instance) { in bofi_broadcast()
2025 errctlp->instance == ep->errdef.instance) { in bofi_clear_acc_chk()
2027 if (ep->errdef.access_count == 0 && in bofi_clear_acc_chk()
2028 ep->errdef.fail_count == 0) in bofi_clear_acc_chk()
2029 ep->errdef.acc_chk = 0; in bofi_clear_acc_chk()
2058 errctlp->instance == ep->errdef.instance) { in bofi_clear_errors()
2060 if (ep->errdef.access_count == 0) { in bofi_clear_errors()
2061 ep->errdef.acc_chk = 0; in bofi_clear_errors()
2062 ep->errdef.fail_count = 0; in bofi_clear_errors()
2064 if (ep->errdef.log.stop_time == 0ul) in bofi_clear_errors()
2066 &(ep->errdef.log.stop_time)); in bofi_clear_errors()
2096 errctlp->instance == ep->errdef.instance) { in bofi_clear_errdefs()
2098 ep->errdef.acc_chk = 0; in bofi_clear_errdefs()
2099 ep->errdef.access_count = 0; in bofi_clear_errdefs()
2100 ep->errdef.fail_count = 0; in bofi_clear_errdefs()
2102 if (ep->errdef.log.stop_time == 0ul) in bofi_clear_errdefs()
2104 &(ep->errdef.log.stop_time)); in bofi_clear_errdefs()
2140 ep->errstate.access_count = ep->errdef.access_count; in bofi_errdef_check()
2141 ep->errstate.fail_count = ep->errdef.fail_count; in bofi_errdef_check()
2142 ep->errstate.acc_chk = ep->errdef.acc_chk; in bofi_errdef_check()
2143 ep->errstate.log = ep->errdef.log; in bofi_errdef_check()
2199 ep->errstate.access_count = ep->errdef.access_count; in bofi_errdef_check_w()
2200 ep->errstate.fail_count = ep->errdef.fail_count; in bofi_errdef_check_w()
2201 ep->errstate.acc_chk = ep->errdef.acc_chk; in bofi_errdef_check_w()
2202 ep->errstate.log = ep->errdef.log; in bofi_errdef_check_w()
2249 struct bofi_errdef *edp = &(ep->errdef); in log_acc_event()
2306 if ((ep->errdef.access_count || in do_dma_corrupt()
2307 ep->errdef.fail_count) && in do_dma_corrupt()
2308 (ep->errdef.access_type & BOFI_LOG)) { in do_dma_corrupt()
2318 if ((off <= ep->errdef.offset && in do_dma_corrupt()
2319 off + length > ep->errdef.offset) || in do_dma_corrupt()
2320 (off > ep->errdef.offset && in do_dma_corrupt()
2321 off < ep->errdef.offset + ep->errdef.len)) { in do_dma_corrupt()
2329 if (ep->errdef.access_count > 1) { in do_dma_corrupt()
2330 ep->errdef.access_count--; in do_dma_corrupt()
2331 } else if (ep->errdef.fail_count > 0) { in do_dma_corrupt()
2332 ep->errdef.fail_count--; in do_dma_corrupt()
2333 ep->errdef.access_count = 0; in do_dma_corrupt()
2347 ep->errdef.offset) + LLSZMASK) & ~LLSZMASK); in do_dma_corrupt()
2349 ep->errdef.offset + ep->errdef.len)) & ~LLSZMASK); in do_dma_corrupt()
2351 operand = ep->errdef.operand; in do_dma_corrupt()
2354 if (ep->errdef.acc_chk & 2) { in do_dma_corrupt()
2365 switch (ep->errdef.optype) { in do_dma_corrupt()
2426 if (ep->errdef.len == 0) in do_pior_corrupt()
2429 minlen = min(hp->len, ep->errdef.len); in do_pior_corrupt()
2430 base = addr - hp->addr - ep->errdef.offset + hp->offset; in do_pior_corrupt()
2431 if ((ep->errdef.access_type & BOFI_PIO_R) && in do_pior_corrupt()
2437 if (ep->errdef.access_count > 1) { in do_pior_corrupt()
2438 ep->errdef.access_count--; in do_pior_corrupt()
2443 if (ep->errdef.access_type & BOFI_LOG) { in do_pior_corrupt()
2448 } else if (ep->errdef.fail_count > 0) { in do_pior_corrupt()
2449 ep->errdef.fail_count--; in do_pior_corrupt()
2450 ep->errdef.access_count = 0; in do_pior_corrupt()
2456 operand = ep->errdef.operand; in do_pior_corrupt()
2458 if (ep->errdef.optype == in do_pior_corrupt()
2468 if (ep->errdef.access_type & BOFI_LOG) { in do_pior_corrupt()
2475 if (ep->errdef.acc_chk & 1) { in do_pior_corrupt()
2488 switch (ep->errdef.optype) { in do_pior_corrupt()
2542 if (ep->errdef.len == 0) in do_piow_corrupt()
2545 minlen = min(hp->len, ep->errdef.len); in do_piow_corrupt()
2546 base = (caddr_t)addr - hp->addr - ep->errdef.offset +hp->offset; in do_piow_corrupt()
2547 if ((ep->errdef.access_type & BOFI_PIO_W) && in do_piow_corrupt()
2554 if (ep->errdef.access_count > 1) { in do_piow_corrupt()
2555 ep->errdef.access_count--; in do_piow_corrupt()
2556 if (ep->errdef.access_type & BOFI_LOG) in do_piow_corrupt()
2560 } else if (ep->errdef.fail_count > 0) { in do_piow_corrupt()
2561 ep->errdef.fail_count--; in do_piow_corrupt()
2562 ep->errdef.access_count = 0; in do_piow_corrupt()
2563 if (ep->errdef.access_type & BOFI_LOG) in do_piow_corrupt()
2574 if (ep->errdef.acc_chk & 1) { in do_piow_corrupt()
2587 switch (ep->errdef.optype) { in do_piow_corrupt()
2589 *valuep = ep->errdef.operand; in do_piow_corrupt()
2592 *valuep &= ep->errdef.operand; in do_piow_corrupt()
2595 *valuep |= ep->errdef.operand; in do_piow_corrupt()
2598 *valuep ^= ep->errdef.operand; in do_piow_corrupt()
3199 hp->instance == ep->errdef.instance && in bofi_map()
3200 (ep->errdef.access_type & BOFI_PIO_RW) && in bofi_map()
3201 (ep->errdef.rnumber == -1 || in bofi_map()
3202 hp->rnumber == ep->errdef.rnumber) && in bofi_map()
3203 (ep->errdef.len == 0 || in bofi_map()
3204 offset < ep->errdef.offset + ep->errdef.len) && in bofi_map()
3205 offset + hp->len > ep->errdef.offset) { in bofi_map()
3293 hp->instance == ep->errdef.instance && in chain_on_errdefs()
3294 (ep->errdef.rnumber == -1 || in chain_on_errdefs()
3295 hp->rnumber == ep->errdef.rnumber) && in chain_on_errdefs()
3296 ((ep->errdef.access_type & BOFI_DMA_RW) && in chain_on_errdefs()
3297 (((uintptr_t)(hp->addr + ep->errdef.offset + in chain_on_errdefs()
3298 ep->errdef.len) & ~LLSZMASK) > in chain_on_errdefs()
3299 ((uintptr_t)((hp->addr + ep->errdef.offset) + in chain_on_errdefs()
3310 if ((ep->errdef.access_type & BOFI_DMA_W) && in chain_on_errdefs()
3678 if ((ep->errdef.access_type & BOFI_DMA_R) && in bofi_dma_unbindhdl()
3758 if ((((ep->errdef.access_type & BOFI_DMA_R) && in bofi_dma_flush()
3761 ((ep->errdef.access_type & BOFI_DMA_W) && in bofi_dma_flush()
4106 hp->instance == ep->errdef.instance && in bofi_dvma_kaddr_load()
4107 (ep->errdef.rnumber == -1 || in bofi_dvma_kaddr_load()
4108 hp->rnumber == ep->errdef.rnumber) && in bofi_dvma_kaddr_load()
4109 ((ep->errdef.access_type & BOFI_DMA_RW) && in bofi_dvma_kaddr_load()
4110 (((uintptr_t)(hp->addr + ep->errdef.offset + in bofi_dvma_kaddr_load()
4111 ep->errdef.len) & ~LLSZMASK) > in bofi_dvma_kaddr_load()
4112 ((uintptr_t)((hp->addr + ep->errdef.offset) + in bofi_dvma_kaddr_load()
4176 if ((ep->errdef.access_type & BOFI_DMA_R) && in bofi_dvma_unload()
4257 if ((((ep->errdef.access_type & BOFI_DMA_R) && in bofi_dvma_sync()
4260 ((ep->errdef.access_type & BOFI_DMA_W) && in bofi_dvma_sync()
4317 if ((ep->errdef.access_count || in bofi_intercept_intr()
4318 ep->errdef.fail_count) && in bofi_intercept_intr()
4319 (ep->errdef.access_type & BOFI_LOG)) in bofi_intercept_intr()
4321 if (ep->errdef.access_count > 1) { in bofi_intercept_intr()
4322 ep->errdef.access_count--; in bofi_intercept_intr()
4323 } else if (ep->errdef.fail_count > 0) { in bofi_intercept_intr()
4324 ep->errdef.fail_count--; in bofi_intercept_intr()
4325 ep->errdef.access_count = 0; in bofi_intercept_intr()
4331 switch (ep->errdef.optype) { in bofi_intercept_intr()
4335 (ep->errdef.operand); in bofi_intercept_intr()
4342 intr_count += ep->errdef.operand; in bofi_intercept_intr()
4398 if (lp->errentp->errdef.access_count == 0 && in bofi_check_acc_hdl()
4400 result = (lp->errentp->errdef.acc_chk & 1); in bofi_check_acc_hdl()
4439 if (lp->errentp->errdef.access_count == 0 && in bofi_check_dma_hdl()
4441 result = ((lp->errentp->errdef.acc_chk & 2) ? 1 : 0); in bofi_check_dma_hdl()
4651 hp->instance == ep->errdef.instance && in bofi_intr_ops()
4652 (ep->errdef.access_type & BOFI_INTR)) { in bofi_intr_ops()