@baidxi 最新定位到 D1s 报错在 sunxi_udc.c (能识别到新 UVC 摄像头设备,但是没有数据):
ret = dev->driver->setup(&dev->gadget, crq);
上面这一行返回了 -EOPNOTSUPP, 完整代码:
buildroot/dl/linux/git/drivers/usb/sunxi_usb/udc/sunxi_udc.c
Line 1383: DMSG_PANIC("ERR: Operation not supported\n");
spin_unlock(&dev->lock);
ret = dev->driver->setup(&dev->gadget, crq);
spin_lock(&dev->lock);
if (ret < 0) {
if (dev->req_config) {
DMSG_PANIC("ERR: config change %02x fail %d?\n",
crq->bRequest, ret);
return;
}
if (ret == -EOPNOTSUPP)
DMSG_PANIC("ERR: Operation not supported\n");
else
DMSG_PANIC("ERR: dev->driver->setup failed. (%d)\n",
ret);
udelay(5);
USBC_Dev_ReadDataStatus(
g_sunxi_udc_io.usb_bsp_hdle,
USBC_EP_TYPE_EP0, 1);
USBC_Dev_EpSendStall(
g_sunxi_udc_io.usb_bsp_hdle,
USBC_EP_TYPE_EP0);
dev->ep0state = EP0_IDLE;
/* deferred i/o == no response yet */
} else if (dev->req_pending) {
dev->req_pending = 0;
}