方案商的开发板上otg功能只能做device,硬件看过后说没有5v供电,加上后能够识别U盘了,但是内核报了错

[ 3.264000] usb 2-1: new high-speed USB device number 2 using dwc_otg
[ 3.280000] BUG: sleeping function called from invalid context at mm/page_alloc.c:2444
[ 3.284000] in_atomic(): 1, irqs_disabled(): 128, pid: 29, name: khubd
[ 3.300000] [<c00154dc>] (unwind_backtrace+0x0/0x12c) from [<c00efb34>] (__alloc_pages_nodemask+0x208/0x91c)
[ 3.336000] [<c00efb34>] (__alloc_pages_nodemask+0x208/0x91c) from [<c001892c>] (__dma_alloc+0xa0/0x378)
[ 3.352000] [<c001892c>] (__dma_alloc+0xa0/0x378) from [<c0018f08>] (dma_alloc_coherent+0x68/0x70)
[ 3.376000] [<c0018f08>] (dma_alloc_coherent+0x68/0x70) from [<c038c8d8>] (__DWC_DMA_ALLOC+0x10/0x38)
[ 3.400000] [<c038c8d8>] (__DWC_DMA_ALLOC+0x10/0x38) from [<c0389658>] (dwc_otg_hcd_qh_init_ddma+0x38/0x278)
[ 3.416000] [<c0389658>] (dwc_otg_hcd_qh_init_ddma+0x38/0x278) from [<c03885cc>] (dwc_otg_hcd_qh_create+0x74/0xc8)
[ 3.432000] [<c03885cc>] (dwc_otg_hcd_qh_create+0x74/0xc8) from [<c0389034>] (dwc_otg_hcd_qtd_add+0x88/0xa0)
[ 3.464000] [<c0389034>] (dwc_otg_hcd_qtd_add+0x88/0xa0) from [<c0382d68>] (dwc_otg_hcd_urb_enqueue+0x88/0x1e4)
[ 3.480000] [<c0382d68>] (dwc_otg_hcd_urb_enqueue+0x88/0x1e4) from [<c03845f0>] (dwc_otg_urb_enqueue+0x198/0x2d0)
[ 3.496000] [<c03845f0>] (dwc_otg_urb_enqueue+0x198/0x2d0) from [<c03552bc>] (usb_hcd_submit_urb+0xa4/0x77c)
[ 3.528000] [<c03552bc>] (usb_hcd_submit_urb+0xa4/0x77c) from [<c0356f7c>] (usb_start_wait_urb+0x4c/0x138)
[ 3.544000] [<c0356f7c>] (usb_start_wait_urb+0x4c/0x138) from [<c0357114>] (usb_control_msg+0xac/0xe4)
[ 3.560000] [<c0357114>] (usb_control_msg+0xac/0xe4) from [<c034fbd4>] (hub_port_init+0x4d8/0x86c)
[ 3.596000] [<c034fbd4>] (hub_port_init+0x4d8/0x86c) from [<c035232c>] (hub_thread+0x6b8/0x1454)
[ 3.612000] [<c035232c>] (hub_thread+0x6b8/0x1454) from [<c00649d0>] (kthread+0x90/0x94)
[ 3.628000] [<c00649d0>] (kthread+0x90/0x94) from [<c000f86c>] (kernel_thread_exit+0x0/0x8)

追进去

  dwc_otg_set_param_dma_desc_enable函数里有以下代码

#if defined(CONFIG_ARCH_CPU_SLSI)

    val = ;

#if defined(CONFIG_USB_VIDEO_CLASS)

    val = ;

#endif

#endif

强制打开了dma_desc_enable,看起来host模式时应该不需要打开,果然注释之后错误消失

    //val = 1;

不明白这段代码和uvc有什么关系,其实我就是用这个来插usb camera的,这个地方反而导致操作uvc驱动的时候报错;

uvc报错:

Failed to resubmit video URB (-1)

解决,记录一下

最新文章

  1. JavaScript创建对象及对象继承
  2. 基于淘宝弹性布局方案lib-flexible的问题研究
  3. Shader LOD
  4. First day on cnblogs,破壳日~~
  5. Android程序设计-RecyclerView的使用
  6. 电商O2O-11种最佳运营模式
  7. Asp.net与Dojo交互:仪器仪表实现
  8. SpringMVC经典系列-14自己定义SpringMVC的拦截器---【LinusZhu】
  9. 实时时钟、系统时钟和CPU时钟的区别
  10. 记录参加QCon的心得
  11. onCreate和onStart谁的开销大?
  12. 【原创】驱动枚举之QueryServiceStatus
  13. python 模块之-pickle
  14. [费用流][NOI2008]志愿者招募
  15. centos安装图形化界面
  16. elastalert邮件报警
  17. Should Assertion Library
  18. hdu 1023 卡特兰数《 大数》java
  19. Cannot find name &#39;AsyncIterator&#39; error in Typescript compilation process 问题解决
  20. ora-01045错误的解决办法

热门文章

  1. 使用四种框架分别实现百万websocket常连接的服务器--转
  2. 10.1、android输入系统_必备Linux编程知识_inotify和epoll
  3. [Ramda] Complement: Logic opposite function
  4. Apache多虚拟主机多版本PHP(5.3+5.6+N)共存运行配置全过程
  5. 微信小程序--成语猜猜看
  6. 【u108】取数游戏
  7. Perl按行分割文件
  8. IIS最大并发连接数 = 队列长度 + IIS最大并发工作线程数
  9. J2EE&JavaEE概述
  10. HDOJ 2043 password