Lines Matching defs:req

21 static int32_t ReqToIoData(struct UsbFnRequest *req, struct IoData *ioData, uint32_t aio, uint32_t timeout)
23 if (req == NULL || ioData == NULL) {
27 struct ReqList *reqList = (struct ReqList *)req;
29 if (req->type == USB_REQUEST_TYPE_PIPE_WRITE) {
31 } else if (req->type == USB_REQUEST_TYPE_PIPE_READ) {
35 ioData->len = req->length;
108 struct UsbFnRequest *req = &reqList->req;
120 req->length = len;
121 req->obj = handle->intfMgr->interface.object;
122 req->buf = mapAddr;
123 req->type = GetReqType(handle, pipe);
125 return req;
128 int32_t UsbFnIoMgrRequestFree(struct UsbFnRequest *req)
132 if (req == NULL) {
137 struct ReqList *reqList = (struct ReqList *)req;
140 ret = fnOps->unmapAddr(req->buf, reqList->bufLen);
146 mem.buf = (uint64_t)req->buf;
158 int32_t UsbFnIoMgrRequestSubmitAsync(struct UsbFnRequest *req)
163 if (req == NULL) {
167 reqList = (struct ReqList *)req;
168 if (ReqToIoData(req, &ioData, 1, 0)) {
181 int32_t UsbFnIoMgrRequestCancel(struct UsbFnRequest *req)
186 if (req == NULL) {
190 reqList = (struct ReqList *)req;
191 if (ReqToIoData(req, &ioData, 1, 0)) {
200 int32_t UsbFnIoMgrRequestGetStatus(struct UsbFnRequest *req, UsbRequestStatus *status)
204 if (req == NULL) {
208 reqList = (struct ReqList *)req;
209 if (ReqToIoData(req, &ioData, 1, 0)) {
218 int32_t UsbFnIoMgrRequestSubmitSync(struct UsbFnRequest *req, uint32_t timeout)
224 if (req == NULL) {
228 reqList = (struct ReqList *)req;
229 if (ReqToIoData(req, &ioData, 0, timeout)) {
235 req->status = USB_REQUEST_COMPLETED;
236 req->actual = (uint32_t)ret;