BZ: 26747
As the USB spec request, a SetFeature() or ClearFeature() that
references a feature that cannot be set or that does not exist
should causes STALL to be returned in the Status stage of the
request.
Change-Id: I118d32bd7e5f4e66f4c23d109c9186c8898657a7
Signed-off-by: Li Wenji <wenji.li@intel.com>
Reviewed-on: http://android.intel.com:8080/37939
Reviewed-by: Zhuang, Jin Can <jin.can.zhuang@intel.com>
Reviewed-by: Tang, Richard <richard.tang@intel.com>
Reviewed-by: Saripalli, Ramakrishna <ramakrishna.saripalli@intel.com>
Reviewed-by: Meng, Zhe <zhe.meng@intel.com>
Tested-by: Meng, Zhe <zhe.meng@intel.com>
Reviewed-by: Wu, Hao <hao.wu@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
}
if (wValue != 0 || wLength != 0
- || epn->ep_num > dev->ep_max)
+ || epn->ep_num > dev->ep_max) {
+ ep0_stall(dev);
break;
+ }
spin_unlock(&dev->lock);
rc = _langwell_ep_set_halt(&epn->ep,
if (rc == 0) {
if (prime_status_phase(dev, EP_DIR_IN))
ep0_stall(dev);
- }
+ } else if (rc == -EOPNOTSUPP)
+ ep0_stall(dev);
goto end;
}