Lines Matching refs:req
572 usbgem_rx_start_unit(struct usbgem_dev *dp, usb_bulk_req_t *req)
578 ASSERT(req);
587 req->bulk_len = dp->rx_buf_len;
588 req->bulk_data = mp;
589 req->bulk_client_private = (usb_opaque_t)dp;
590 req->bulk_timeout = 0;
591 req->bulk_attributes = USB_ATTRS_SHORT_XFER_OK;
592 req->bulk_cb = usbgem_bulkin_cb;
593 req->bulk_exc_cb = usbgem_bulkin_cb;
594 req->bulk_completion_reason = 0;
595 req->bulk_cb_flags = 0;
598 err = usb_pipe_bulk_xfer(dp->bulkin_pipe, req, flags);
604 /* free req and mp */
605 usb_free_bulk_req(req);
622 usb_bulk_req_t *req;
627 req = usb_alloc_bulk_req(dp->dip, 0, USB_FLAGS_SLEEP);
628 if (req == NULL) {
634 if (!usbgem_rx_start_unit(dp, req)) {
652 usb_bulk_req_t *req;
655 while ((req = dp->tx_free_list) != NULL) {
657 (usb_bulk_req_t *)req->bulk_client_private;
658 req->bulk_data = NULL;
659 usb_free_bulk_req(req);
668 usb_bulk_req_t *req;
673 req = usb_alloc_bulk_req(dp->dip, 0, USB_FLAGS_SLEEP);
674 if (req == NULL) {
685 req->bulk_client_private = (usb_opaque_t)dp->tx_free_list;
686 dp->tx_free_list = req;
711 usb_bulk_req_t *req;
769 req = dp->tx_free_list;
770 dp->tx_free_list = (usb_bulk_req_t *)req->bulk_client_private;
794 req->bulk_len = (long)new->b_wptr - (long)new->b_rptr;
795 req->bulk_data = new;
796 req->bulk_client_private = (usb_opaque_t)dp;
797 req->bulk_timeout = dp->bulkout_timeout; /* in second */
798 req->bulk_attributes = 0;
799 req->bulk_cb = usbgem_bulkout_cb;
800 req->bulk_exc_cb = usbgem_bulkout_cb;
801 req->bulk_completion_reason = 0;
802 req->bulk_cb_flags = 0;
807 if ((err = usb_pipe_bulk_xfer(dp->bulkout_pipe, req, usb_flags))
812 req->bulk_data = NULL;
817 req->bulk_client_private = (usb_opaque_t)dp->tx_free_list;
818 dp->tx_free_list = req;
835 usbgem_bulkout_cb(dp->bulkout_pipe, req);
1020 usbgem_bulkin_cb(usb_pipe_handle_t pipe, usb_bulk_req_t *req)
1032 dp = (struct usbgem_dev *)req->bulk_client_private;
1033 mp = req->bulk_data;
1034 req->bulk_data = NULL;
1038 usb_str_cr(req->bulk_completion_reason),
1039 req->bulk_completion_reason));
1049 if (req->bulk_completion_reason == USB_CR_OK &&
1104 if (usbgem_rx_start_unit(dp, req)) {
1121 usb_free_bulk_req(req);
1137 usbgem_bulkout_cb(usb_pipe_handle_t pipe, usb_bulk_req_t *req)
1143 dp = (struct usbgem_dev *)req->bulk_client_private;
1149 usb_str_cr(req->bulk_completion_reason),
1150 req->bulk_completion_reason,
1151 req->bulk_cb_flags,
1155 intr = DB_TCI(req->bulk_data);
1156 freemsg(req->bulk_data);
1158 if (req->bulk_completion_reason != USB_CR_OK &&
1174 req->bulk_client_private = (usb_opaque_t)dp->tx_free_list;
1175 dp->tx_free_list = req;
1200 usbgem_intr_cb(usb_pipe_handle_t ph, usb_intr_req_t *req)
1204 dp = (struct usbgem_dev *)req->intr_client_private;
1207 if (req->intr_completion_reason == USB_CR_OK) {
1208 (*dp->ugc.usbgc_interrupt)(dp, req->intr_data);
1212 usb_free_intr_req(req);
2443 usb_intr_req_t *req;
2480 req = usb_alloc_intr_req(dp->dip, 0, USB_FLAGS_SLEEP);
2481 if (req == NULL) {
2486 req->intr_data = NULL;
2487 req->intr_client_private = (usb_opaque_t)dp;
2488 req->intr_timeout = 0;
2489 req->intr_attributes =
2491 req->intr_len = dp->ep_intr->wMaxPacketSize;
2492 req->intr_cb = usbgem_intr_cb;
2493 req->intr_exc_cb = usbgem_intr_cb;
2494 req->intr_completion_reason = 0;
2495 req->intr_cb_flags = 0;
2497 err = usb_pipe_intr_xfer(dp->intr_pipe, req, flags);
5457 uint8_t reqt, uint8_t req, uint16_t val, uint16_t ix, uint16_t len,
5469 "reqt:0x%02x req:0x%02x val:0x%04x ix:0x%04x len:0x%02x "
5471 dp->name, __func__, reqt, req, val, ix, len, bp, dp->nic_state));
5488 setup.bRequest = req;
5507 "reqt:0x%x req:0x%x val:0x%x ix:0x%x len:0x%x "
5509 dp->name, __func__, reqt, req, val, ix, len,
5526 uint8_t reqt, uint8_t req, uint16_t val, uint16_t ix, uint16_t len,
5539 " reqt:0x%02x req:0x%02x val:0x%04x ix:0x%04x len:0x%02x"
5541 dp->name, __func__, reqt, req, val, ix, len, bp, dp->mac_state));
5550 setup.bRequest = req;
5570 "reqt:0x%x req:0x%x val:0x%x ix:0x%x len:0x%x "
5573 reqt, req, val, ix, len,
5590 uint8_t reqt, uint8_t req, uint16_t val, uint16_t ix, uint16_t len,
5608 return (usbgem_ctrl_out(dp, reqt, req, val, ix, len, buf, len));
5613 uint8_t reqt, uint8_t req, uint16_t val, uint16_t ix, uint16_t len,
5623 err = usbgem_ctrl_in(dp, reqt, req, val, ix, len, buf, len);