Gadget driver unload issue

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Gadget driver unload issue

ソリューションへジャンプ
2,752件の閲覧回数
hardikpadhariya
Contributor I

We are working on i.mx6ul based custom board and using L4.1.15-1.2.0.

Our requirement is to support  g_serial, g_hid, g_mass_storage drivers over USB OTG port. We are facing one issue that  unloading the USB gadget driver does not remove the device from PC. For example, if we unload the g_serial then host PC shows com port and if we unload the g_mass_storage driver then also host PC shows the device.

Is there any way so that device gets automatically disconnected from  PC after removing the gadget driver?

Regards,

Hardik

ラベル(2)
0 件の賞賛
返信
1 解決策
2,561件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Hardik

one can try to debug it using description in sect.65.6.18 USB Command Register (USB_nUSBCMD)

i.MX6DQ RM:

RS: Writing a 0 to this will cause a detach event.

RST: In order to ensure that the device is not in an attached state before initiating a device controller reset,

all primed endpoints should be flushed and the USBCMD Run/Stop bit should be set to 0.

One can check "remove" events in usb driver sources described in sect.39.2.2 Source Code Structure

attached Linux Manual.

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

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
2,562件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Hardik

one can try to debug it using description in sect.65.6.18 USB Command Register (USB_nUSBCMD)

i.MX6DQ RM:

RS: Writing a 0 to this will cause a detach event.

RST: In order to ensure that the device is not in an attached state before initiating a device controller reset,

all primed endpoints should be flushed and the USBCMD Run/Stop bit should be set to 0.

One can check "remove" events in usb driver sources described in sect.39.2.2 Source Code Structure

attached Linux Manual.

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

0 件の賞賛
返信