f_printer drive fail to disable USB in_ep

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

f_printer drive fail to disable USB in_ep

563 Views
lixuhui112
Contributor I
Hello
  I encountered an impossible problem when I used the f_printer driver. In some cases, the driver would reset the software for the USB, call the printer_soft_reset function, and the printer_reset_interface function, all failed because of the failure of the usb_ep_disable (dev->in_ep).Cause the Linux kernel to crash. I have no way to do that, I hope I can get your help.
       Thank you very much!!!
my version linux_4.1.15
log:
printer_soft_reset
Failed to disable USB in_ep
rx_complete
INFO: rcu_preempt detected stalls on CPUs/tasks:
0: (1 GPs behind) idle=405/140000000000000/0 softirq=670/671 fqs=2101
(detected by 2, t=2102 jiffies, g=159, c=158, q=513)
Task dump for CPU 0:
mx6q_voucher_sc R running 0 140 139 0x00000002
[<804603f0>] (__schedule) from [<806b1498>] (logbuf_lock+0x0/0x4)
INFO: rcu_preempt detected stalls on CPUs/tasks:
0: (1 GPs behind) idle=405/140000000000000/0 softirq=670/671 fqs=8404
(detected by 2, t=8407 jiffies, g=159, c=158, q=2045)
Labels (2)
0 Kudos
1 Reply

401 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Li,

The NXP Linux BSP doesn’t include printer class support as Device, however, it could be added using the hardware layer USB driver already included. From a software side, you could take a look at the printer support provided by the gadget API; you could check the following links:

http://www.linux-usb.org/gadget/

https://github.com/torvalds/linux/blob/master/drivers/usb/gadget/legacy/printer.c

Hope this will be useful for you.
Best regards!
/Carlos

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos