Lines Matching defs:usb
10 #include <ddk/protocol/usb.h>
11 #include <ddk/usb/usb.h>
56 usb_protocol_t usb;
108 zx_status_t status = usb_control(ð->usb, USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
125 return usb_control(ð->usb, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, AX88179_REQ_MAC,
131 zx_status_t status = usb_control(ð->usb, USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
142 return usb_control(ð->usb, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, AX88179_REQ_PHY,
186 zxlogf(ERROR, "ax88179: invalid usb mode: %#x\n", usb_mode);
243 zx_status_t status = usb_req_mmap(ð->usb, request, (void*)&read_data);
315 usb_req_release(ð->usb, request);
322 usb_reset_endpoint(ð->usb, eth->bulk_in_addr);
329 usb_reset_endpoint(ð->usb, eth->bulk_in_addr);
336 usb_request_queue(ð->usb, request);
343 static zx_status_t ax88179_append_to_tx_req(usb_protocol_t* usb, usb_request_t* req,
352 usb_req_copy_to(usb, req, &hdr, sizeof(hdr), offset);
353 usb_req_copy_to(usb, req, netbuf->data, netbuf->len, offset + sizeof(hdr));
363 usb_req_release(ð->usb, request);
371 // If we have any pending netbufs, add them to the recently-freed usb request
375 while (next_netbuf != NULL && ax88179_append_to_tx_req(ð->usb, request,
392 usb_reset_endpoint(ð->usb, eth->bulk_out_addr);
399 usb_reset_endpoint(ð->usb, eth->bulk_out_addr);
409 usb_request_queue(ð->usb, next);
425 usb_req_copy_from(ð->usb, request, status, sizeof(status), 0);
442 usb_request_queue(ð->usb, req);
498 if (ax88179_append_to_tx_req(ð->usb, req, netbuf) == ZX_ERR_BUFFER_TOO_SMALL) {
507 ax88179_append_to_tx_req(ð->usb, req, netbuf);
524 usb_request_queue(ð->usb, req);
546 usb_req_release(ð->usb, req);
549 usb_req_release(ð->usb, req);
552 usb_req_release(ð->usb, req);
554 usb_req_release(ð->usb, eth->interrupt_req);
867 usb_request_queue(ð->usb, req);
889 usb_protocol_t usb;
890 zx_status_t result = device_get_protocol(device, ZX_PROTOCOL_USB, &usb);
897 result = usb_desc_iter_init(&usb, &iter);
946 memcpy(ð->usb, &usb, sizeof(eth->usb));
955 status = usb_req_alloc(ð->usb, &req, USB_BUF_SIZE, bulk_in_addr);
965 status = usb_req_alloc(ð->usb, &req, USB_BUF_SIZE, bulk_out_addr);
974 status = usb_req_alloc(ð->usb, &int_req, INTR_REQ_SIZE, intr_addr);