Lines Matching refs:errdef

916 	struct bofi_errdef errdef;
954 errdef.namesize = errdef_32.namesize;
955 (void) strncpy(errdef.name, errdef_32.name, NAMESIZE);
956 errdef.instance = errdef_32.instance;
957 errdef.rnumber = errdef_32.rnumber;
958 errdef.offset = errdef_32.offset;
959 errdef.len = errdef_32.len;
960 errdef.access_type = errdef_32.access_type;
961 errdef.access_count = errdef_32.access_count;
962 errdef.fail_count = errdef_32.fail_count;
963 errdef.acc_chk = errdef_32.acc_chk;
964 errdef.optype = errdef_32.optype;
965 errdef.operand = errdef_32.operand;
966 errdef.log.logsize = errdef_32.log.logsize;
967 errdef.log.entries = errdef_32.log.entries;
968 errdef.log.flags = errdef_32.log.flags;
969 errdef.log.wrapcnt = errdef_32.log.wrapcnt;
970 errdef.log.start_time = errdef_32.log.start_time;
971 errdef.log.stop_time = errdef_32.log.stop_time;
972 errdef.log.logbase =
974 errdef.errdef_handle = errdef_32.errdef_handle;
978 if (ddi_copyin((void *)arg, &errdef,
984 if (ddi_copyin((void *)arg, &errdef,
991 if (errdef.fail_count == 0)
992 errdef.optype = 0;
993 if (errdef.optype != 0) {
994 if (errdef.access_type & BOFI_INTR &&
995 errdef.optype != BOFI_DELAY_INTR &&
996 errdef.optype != BOFI_LOSE_INTR &&
997 errdef.optype != BOFI_EXTRA_INTR)
999 if ((errdef.access_type & (BOFI_DMA_RW|BOFI_PIO_R)) &&
1000 errdef.optype == BOFI_NO_TRANSFER)
1002 if ((errdef.access_type & (BOFI_PIO_RW)) &&
1003 errdef.optype != BOFI_EQUAL &&
1004 errdef.optype != BOFI_OR &&
1005 errdef.optype != BOFI_XOR &&
1006 errdef.optype != BOFI_AND &&
1007 errdef.optype != BOFI_NO_TRANSFER)
1012 * new errdef on to it
1020 if (errdef.namesize > NAMESIZE)
1022 namep = kmem_zalloc(errdef.namesize+1, KM_SLEEP);
1023 (void) strncpy(namep, errdef.name, errdef.namesize);
1025 if (bofi_errdef_alloc(&errdef, namep, softc) != DDI_SUCCESS) {
1027 (uintptr_t)errdef.errdef_handle);
1028 kmem_free(namep, errdef.namesize+1);
1032 * copy out errdef again, including filled in errdef_handle
1044 errdef_32.namesize = errdef.namesize;
1045 (void) strncpy(errdef_32.name, errdef.name, NAMESIZE);
1046 errdef_32.instance = errdef.instance;
1047 errdef_32.rnumber = errdef.rnumber;
1048 errdef_32.offset = errdef.offset;
1049 errdef_32.len = errdef.len;
1050 errdef_32.access_type = errdef.access_type;
1051 errdef_32.access_count = errdef.access_count;
1052 errdef_32.fail_count = errdef.fail_count;
1053 errdef_32.acc_chk = errdef.acc_chk;
1054 errdef_32.optype = errdef.optype;
1055 errdef_32.operand = errdef.operand;
1056 errdef_32.log.logsize = errdef.log.logsize;
1057 errdef_32.log.entries = errdef.log.entries;
1058 errdef_32.log.flags = errdef.log.flags;
1059 errdef_32.log.wrapcnt = errdef.log.wrapcnt;
1060 errdef_32.log.start_time = errdef.log.start_time;
1061 errdef_32.log.stop_time = errdef.log.stop_time;
1063 (caddr32_t)(uintptr_t)errdef.log.logbase;
1064 errdef_32.errdef_handle = errdef.errdef_handle;
1068 errdef.errdef_handle);
1069 kmem_free(namep, errdef.namesize+1);
1075 if (ddi_copyout(&errdef, (void *)arg,
1078 errdef.errdef_handle);
1079 kmem_free(namep, errdef.namesize+1);
1085 if (ddi_copyout(&errdef, (void *)arg,
1088 (uintptr_t)errdef.errdef_handle);
1089 kmem_free(namep, errdef.namesize+1);
1096 * delete existing errdef
1216 * get state for this errdef - read in dummy errstate
1334 * get state for this errdef - read in dummy errstate
1740 * allocate errdef structure and put on in-use list
1743 ep->errdef = *errdefp;
1745 ep->errdef.errdef_handle = (uint64_t)(uintptr_t)ep;
1752 ep->errdef.log.entries = 0;
1753 ep->errdef.log.wrapcnt = 0;
1754 if (ep->errdef.access_type & BOFI_LOG)
1756 ep->errdef.log.logsize, KM_SLEEP);
1776 * tag this errdef structure on to their link lists.
1782 (ep->errdef.rnumber == -1 ||
1783 hp->rnumber == ep->errdef.rnumber) &&
1785 (((uintptr_t)(hp->addr + ep->errdef.offset +
1786 ep->errdef.len) & ~LLSZMASK) >
1787 ((uintptr_t)((hp->addr + ep->errdef.offset) +
1812 NULL, NULL, bofi_signal, (caddr_t)&ep->errdef));
1817 * delete existing errdef
1883 kmem_free(ep->name, ep->errdef.namesize+1);
1884 if ((ep->errdef.access_type & BOFI_LOG) &&
1885 ep->errdef.log.logsize && ep->logbase) /* double check */
1887 sizeof (struct acc_log_elem) * ep->errdef.log.logsize);
1910 errctlp->instance == ep->errdef.instance) {
1912 (void) drv_getparm(TIME, &(ep->errdef.log.start_time));
1913 ep->errdef.log.stop_time = 0ul;
1933 errctlp->instance == ep->errdef.instance) {
1935 if (ep->errdef.log.stop_time == 0ul)
1937 &(ep->errdef.log.stop_time));
1964 if ((ep->errdef.access_type & BOFI_LOG) &&
1997 errctlp->instance == ep->errdef.instance) {
2025 errctlp->instance == ep->errdef.instance) {
2027 if (ep->errdef.access_count == 0 &&
2028 ep->errdef.fail_count == 0)
2029 ep->errdef.acc_chk = 0;
2058 errctlp->instance == ep->errdef.instance) {
2060 if (ep->errdef.access_count == 0) {
2061 ep->errdef.acc_chk = 0;
2062 ep->errdef.fail_count = 0;
2064 if (ep->errdef.log.stop_time == 0ul)
2066 &(ep->errdef.log.stop_time));
2096 errctlp->instance == ep->errdef.instance) {
2098 ep->errdef.acc_chk = 0;
2099 ep->errdef.access_count = 0;
2100 ep->errdef.fail_count = 0;
2102 if (ep->errdef.log.stop_time == 0ul)
2104 &(ep->errdef.log.stop_time));
2118 * get state for this errdef
2140 ep->errstate.access_count = ep->errdef.access_count;
2141 ep->errstate.fail_count = ep->errdef.fail_count;
2142 ep->errstate.acc_chk = ep->errdef.acc_chk;
2143 ep->errstate.log = ep->errdef.log;
2153 * Wait for a ddi_report_fault message to come back for this errdef
2154 * Then return state for this errdef.
2183 * to this errdef
2199 ep->errstate.access_count = ep->errdef.access_count;
2200 ep->errstate.fail_count = ep->errdef.fail_count;
2201 ep->errstate.acc_chk = ep->errdef.acc_chk;
2202 ep->errstate.log = ep->errdef.log;
2249 struct bofi_errdef *edp = &(ep->errdef);
2306 if ((ep->errdef.access_count ||
2307 ep->errdef.fail_count) &&
2308 (ep->errdef.access_type & BOFI_LOG)) {
2318 if ((off <= ep->errdef.offset &&
2319 off + length > ep->errdef.offset) ||
2320 (off > ep->errdef.offset &&
2321 off < ep->errdef.offset + ep->errdef.len)) {
2329 if (ep->errdef.access_count > 1) {
2330 ep->errdef.access_count--;
2331 } else if (ep->errdef.fail_count > 0) {
2332 ep->errdef.fail_count--;
2333 ep->errdef.access_count = 0;
2347 ep->errdef.offset) + LLSZMASK) & ~LLSZMASK);
2349 ep->errdef.offset + ep->errdef.len)) & ~LLSZMASK);
2351 operand = ep->errdef.operand;
2354 if (ep->errdef.acc_chk & 2) {
2365 switch (ep->errdef.optype) {
2426 if (ep->errdef.len == 0)
2429 minlen = min(hp->len, ep->errdef.len);
2430 base = addr - hp->addr - ep->errdef.offset + hp->offset;
2431 if ((ep->errdef.access_type & BOFI_PIO_R) &&
2437 if (ep->errdef.access_count > 1) {
2438 ep->errdef.access_count--;
2443 if (ep->errdef.access_type & BOFI_LOG) {
2448 } else if (ep->errdef.fail_count > 0) {
2449 ep->errdef.fail_count--;
2450 ep->errdef.access_count = 0;
2456 operand = ep->errdef.operand;
2458 if (ep->errdef.optype ==
2468 if (ep->errdef.access_type & BOFI_LOG) {
2475 if (ep->errdef.acc_chk & 1) {
2488 switch (ep->errdef.optype) {
2542 if (ep->errdef.len == 0)
2545 minlen = min(hp->len, ep->errdef.len);
2546 base = (caddr_t)addr - hp->addr - ep->errdef.offset +hp->offset;
2547 if ((ep->errdef.access_type & BOFI_PIO_W) &&
2554 if (ep->errdef.access_count > 1) {
2555 ep->errdef.access_count--;
2556 if (ep->errdef.access_type & BOFI_LOG)
2560 } else if (ep->errdef.fail_count > 0) {
2561 ep->errdef.fail_count--;
2562 ep->errdef.access_count = 0;
2563 if (ep->errdef.access_type & BOFI_LOG)
2574 if (ep->errdef.acc_chk & 1) {
2587 switch (ep->errdef.optype) {
2589 *valuep = ep->errdef.operand;
2592 *valuep &= ep->errdef.operand;
2595 *valuep |= ep->errdef.operand;
2598 *valuep ^= ep->errdef.operand;
3199 hp->instance == ep->errdef.instance &&
3200 (ep->errdef.access_type & BOFI_PIO_RW) &&
3201 (ep->errdef.rnumber == -1 ||
3202 hp->rnumber == ep->errdef.rnumber) &&
3203 (ep->errdef.len == 0 ||
3204 offset < ep->errdef.offset + ep->errdef.len) &&
3205 offset + hp->len > ep->errdef.offset) {
3253 * free any errdef link structures tagged onto the shadow handle
3293 hp->instance == ep->errdef.instance &&
3294 (ep->errdef.rnumber == -1 ||
3295 hp->rnumber == ep->errdef.rnumber) &&
3296 ((ep->errdef.access_type & BOFI_DMA_RW) &&
3297 (((uintptr_t)(hp->addr + ep->errdef.offset +
3298 ep->errdef.len) & ~LLSZMASK) >
3299 ((uintptr_t)((hp->addr + ep->errdef.offset) +
3310 if ((ep->errdef.access_type & BOFI_DMA_W) &&
3668 * free any errdef link structures tagged on to this
3678 if ((ep->errdef.access_type & BOFI_DMA_R) &&
3758 if ((((ep->errdef.access_type & BOFI_DMA_R) &&
3761 ((ep->errdef.access_type & BOFI_DMA_W) &&
4106 hp->instance == ep->errdef.instance &&
4107 (ep->errdef.rnumber == -1 ||
4108 hp->rnumber == ep->errdef.rnumber) &&
4109 ((ep->errdef.access_type & BOFI_DMA_RW) &&
4110 (((uintptr_t)(hp->addr + ep->errdef.offset +
4111 ep->errdef.len) & ~LLSZMASK) >
4112 ((uintptr_t)((hp->addr + ep->errdef.offset) +
4168 * free any errdef link structures tagged on to this
4176 if ((ep->errdef.access_type & BOFI_DMA_R) &&
4257 if ((((ep->errdef.access_type & BOFI_DMA_R) &&
4260 ((ep->errdef.access_type & BOFI_DMA_W) &&
4317 if ((ep->errdef.access_count ||
4318 ep->errdef.fail_count) &&
4319 (ep->errdef.access_type & BOFI_LOG))
4321 if (ep->errdef.access_count > 1) {
4322 ep->errdef.access_count--;
4323 } else if (ep->errdef.fail_count > 0) {
4324 ep->errdef.fail_count--;
4325 ep->errdef.access_count = 0;
4331 switch (ep->errdef.optype) {
4335 (ep->errdef.operand);
4342 intr_count += ep->errdef.operand;
4396 * errdef structures
4398 if (lp->errentp->errdef.access_count == 0 &&
4400 result = (lp->errentp->errdef.acc_chk & 1);
4437 * errdef structures
4439 if (lp->errentp->errdef.access_count == 0 &&
4441 result = ((lp->errentp->errdef.acc_chk & 2) ? 1 : 0);
4473 * and set error reported on all associated errdef structures
4527 * and set error reported on all associated errdef structures
4651 hp->instance == ep->errdef.instance &&
4652 (ep->errdef.access_type & BOFI_INTR)) {
4699 * free any errdef link structures