Lines Matching refs:ip
882 irp *ip;
884 ip = IoBuildAsynchronousFsdRequest(func, dobj, buf, len, off, status);
885 if (ip == NULL)
887 ip->irp_usrevent = event;
889 return (ip);
901 irp *ip;
904 ip = IoAllocateIrp(dobj->do_stacksize, TRUE);
905 if (ip == NULL)
908 ip->irp_usriostat = status;
909 ip->irp_tail.irp_overlay.irp_thread = NULL;
911 sl = IoGetNextIrpStackLocation(ip);
920 ip->irp_userbuf = buf;
923 ip->irp_assoc.irp_sysbuf =
925 if (ip->irp_assoc.irp_sysbuf == NULL) {
926 IoFreeIrp(ip);
929 bcopy(buf, ip->irp_assoc.irp_sysbuf, len);
933 ip->irp_mdl = IoAllocateMdl(buf, len, FALSE, FALSE, ip);
934 if (ip->irp_mdl == NULL) {
935 if (ip->irp_assoc.irp_sysbuf != NULL)
936 ExFreePool(ip->irp_assoc.irp_sysbuf);
937 IoFreeIrp(ip);
940 ip->irp_userbuf = NULL;
941 ip->irp_assoc.irp_sysbuf = NULL;
960 return (ip);
968 irp *ip;
972 ip = IoAllocateIrp(dobj->do_stacksize, TRUE);
973 if (ip == NULL)
975 ip->irp_usrevent = event;
976 ip->irp_usriostat = status;
977 ip->irp_tail.irp_overlay.irp_thread = NULL;
979 sl = IoGetNextIrpStackLocation(ip);
999 ip->irp_assoc.irp_sysbuf =
1001 if (ip->irp_assoc.irp_sysbuf == NULL) {
1002 IoFreeIrp(ip);
1007 bcopy(ibuf, ip->irp_assoc.irp_sysbuf, ilen);
1008 bzero((char *)ip->irp_assoc.irp_sysbuf + ilen,
1011 bzero(ip->irp_assoc.irp_sysbuf, ilen);
1012 ip->irp_userbuf = obuf;
1017 ip->irp_assoc.irp_sysbuf =
1019 if (ip->irp_assoc.irp_sysbuf == NULL) {
1020 IoFreeIrp(ip);
1023 bcopy(ibuf, ip->irp_assoc.irp_sysbuf, ilen);
1026 ip->irp_mdl = IoAllocateMdl(obuf, olen,
1027 FALSE, FALSE, ip);
1036 ip->irp_userbuf = obuf;
1048 return (ip);
1066 IoMakeAssociatedIrp(irp *ip, uint8_t stsize)
1077 ip->irp_tail.irp_overlay.irp_thread;
1078 associrp->irp_assoc.irp_master = ip;
1085 IoFreeIrp(ip)
1086 irp *ip;
1088 ExFreePool(ip);
1104 IoReuseIrp(ip, status)
1105 irp *ip;
1110 allocflags = ip->irp_allocflags;
1111 IoInitializeIrp(ip, ip->irp_size, ip->irp_stackcnt);
1112 ip->irp_iostat.isb_status = status;
1113 ip->irp_allocflags = allocflags;
1129 IoCancelIrp(irp *ip)
1135 cfunc = IoSetCancelRoutine(ip, NULL);
1136 ip->irp_cancel = TRUE;
1141 ip->irp_cancelirql = cancelirql;
1142 MSCALL2(cfunc, IoGetCurrentIrpStackLocation(ip)->isl_devobj, ip);
1143 return (uint8_t)IoSetCancelValue(ip, TRUE);
1147 IofCallDriver(dobj, ip)
1149 irp *ip;
1158 if (ip->irp_currentstackloc <= 0)
1161 IoSetNextIrpStackLocation(ip);
1162 sl = IoGetCurrentIrpStackLocation(ip);
1167 status = MSCALL2(disp, dobj, ip);
1173 IofCompleteRequest(irp *ip, uint8_t prioboost)
1180 KASSERT(ip->irp_iostat.isb_status != STATUS_PENDING,
1181 ("incorrect IRP(%p) status (STATUS_PENDING)", ip));
1183 sl = IoGetCurrentIrpStackLocation(ip);
1184 IoSkipCurrentIrpStackLocation(ip);
1188 ip->irp_pendingreturned = TRUE;
1190 if (ip->irp_currentstackloc != (ip->irp_stackcnt + 1))
1191 dobj = IoGetCurrentIrpStackLocation(ip)->isl_devobj;
1196 ((ip->irp_iostat.isb_status == STATUS_SUCCESS &&
1198 (ip->irp_iostat.isb_status != STATUS_SUCCESS &&
1200 (ip->irp_cancel == TRUE &&
1203 status = MSCALL3(cf, dobj, ip, sl->isl_completionctx);
1207 if ((ip->irp_currentstackloc <= ip->irp_stackcnt) &&
1208 (ip->irp_pendingreturned == TRUE))
1209 IoMarkIrpPending(ip);
1213 IoSkipCurrentIrpStackLocation(ip);
1215 } while (ip->irp_currentstackloc <= (ip->irp_stackcnt + 1));
1217 if (ip->irp_usriostat != NULL)
1218 *ip->irp_usriostat = ip->irp_iostat;
1219 if (ip->irp_usrevent != NULL)
1220 KeSetEvent(ip->irp_usrevent, prioboost, FALSE);
1224 if (ip->irp_flags & IRP_ASSOCIATED_IRP) {
1229 masterirp = ip->irp_assoc.irp_master;
1233 while ((m = ip->irp_mdl) != NULL) {
1234 ip->irp_mdl = m->mdl_next;
1237 IoFreeIrp(ip);
1245 if (ip->irp_flags & IRP_PAGING_IO) {
1246 if (ip->irp_mdl != NULL)
1247 IoFreeMdl(ip->irp_mdl);
1248 IoFreeIrp(ip);