udc = (struct nbu2ss_udc *)_req->context;
p_ctrl = &udc->ctrl;
if ((p_ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
-
if (p_ctrl->bRequest == USB_REQ_SET_FEATURE) {
/*-------------------------------------------------*/
/* SET_FEATURE */
/* Receive data confirmation */
iRecvLength = _nbu2ss_readl(&udc->p_regs->EP0_LENGTH) & EP0_LDATA;
if (iRecvLength != 0) {
-
fRcvZero = 0;
iRemainSize = req->req.length - req->req.actual;
if ((req->req.actual == req->req.length)
|| ((req->req.actual % ep->ep.maxpacket) != 0)) {
-
result = 0;
}
} else {
if ((req->req.actual == req->req.length)
|| ((req->req.actual % ep->ep.maxpacket) != 0)) {
-
result = 0;
}
}
for (limit_cnt = 0
; limit_cnt < IN_DATA_EMPTY_COUNT
; limit_cnt++) {
-
regdata = _nbu2ss_readl(
&preg->EP_REGS[ep->epnum - 1].EP_STATUS);
if ((udc->ctrl.wValue != 0x0000)
|| (direction != USB_DIR_IN)) {
-
return result;
}
} else {
if (req->zero && ((req->req.actual % ep->ep.maxpacket) == 0)) {
-
status =
_nbu2ss_readl(&preg->EP_REGS[ep->epnum - 1].EP_STATUS);
/* VBUS ON Check*/
reg_dt = gpio_get_value(VBUS_VALUE);
if (reg_dt == 0) {
-
udc->linux_suspended = 0;
_nbu2ss_reset_controller(udc);
int_bit = status >> 8;
for (epnum = 0; epnum < NUM_ENDPOINTS; epnum++) {
-
if (0x01 & int_bit)
_nbu2ss_ep_int(udc, epnum);
ep_type = usb_endpoint_type(desc);
if ((ep_type == USB_ENDPOINT_XFER_CONTROL)
|| (ep_type == USB_ENDPOINT_XFER_ISOC)) {
-
pr_err(" *** %s, bat bmAttributes\n", __func__);
return -EINVAL;
}
if ((!udc->driver)
|| (udc->gadget.speed == USB_SPEED_UNKNOWN)) {
-
dev_err(ep->udc->dev, " *** %s, udc !!\n", __func__);
return -ESHUTDOWN;
}
if (unlikely
(!_req->complete || !_req->buf
|| !list_empty(&req->queue))) {
-
if (!_req->complete)
pr_err("udc: %s --- !_req->complete\n", __func__);
list_add_tail(&req->queue, &ep->queue);
if (bflag && !ep->stalled) {
-
result = _nbu2ss_start_transfer(udc, ep, req, FALSE);
if (result < 0) {
dev_err(udc->dev, " *** %s, result = %d\n", __func__,