OSDN Git Service

Merge tag 'usb-ci-v4.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter...
[uclinux-h8/linux.git] / drivers / usb / chipidea / udc.c
index c592b6f..a637da2 100644 (file)
@@ -445,7 +445,7 @@ static int _hardware_enqueue(struct ci_hw_ep *hwep, struct ci_hw_req *hwreq)
                rest -= count;
        }
 
-       if (hwreq->req.zero && hwreq->req.length
+       if (hwreq->req.zero && hwreq->req.length && hwep->dir == TX
            && (hwreq->req.length % hwep->ep.maxpacket == 0))
                add_td_to_list(hwep, hwreq, 0);
 
@@ -1090,6 +1090,13 @@ __acquires(ci->lock)
                                if (ci_otg_is_fsm_mode(ci))
                                        err = otg_a_alt_hnp_support(ci);
                                break;
+                       case USB_DEVICE_A_HNP_SUPPORT:
+                               if (ci_otg_is_fsm_mode(ci)) {
+                                       ci->gadget.a_hnp_support = 1;
+                                       err = isr_setup_status_phase(
+                                                       ci);
+                               }
+                               break;
                        default:
                                goto delegate;
                        }