Skip to content

GadgetFsPhy does not handle OUT control requests with data #11

@BinyaminSharet

Description

@BinyaminSharet

The reason for this issue is not clear yet, however, but some of the OUT control messages that has data are often not received by the phy, and when they do, an attempt to read the data cause OSError 43 (Identifier removed):

[INFO  ] [GadgetFsPhy] length of events buffer: 0xc
[DEBUG ] [GadgetFsPhy] EP0 event type SETUP(0x3)
[INFO  ] [GadgetFsPhy] expecting additional data on control ep - 0x2 bytes
[INFO  ] [GadgetFsPhy] dir=0x0 (out), type=0x1 (class), rec=0x1 (interface), req=0x4, val=0x200, idx=0xd00, len=0x2
[ERROR ] Got exception while connecting/running device
[ERROR ] Traceback (most recent call last):
  File "/root/umap2/umap2/apps/emulate.py", line 39, in run
    self.dev.run()
  File "/root/umap2/umap2/core/usb_device.py", line 143, in run
    self.phy.run()
  File "/root/umap2/umap2/phy/gadgetfs/gadgetfs_phy.py", line 185, in run
    self._handle_ep0()
  File "/root/umap2/umap2/phy/gadgetfs/gadgetfs_phy.py", line 248, in _handle_ep0
    self._handle_ep0_setup(event)
  File "/root/umap2/umap2/phy/gadgetfs/gadgetfs_phy.py", line 275, in _handle_ep0_setup
    data = os.read(self.control_fd, req.length)
OSError: [Errno 43] Identifier removed

[INFO  ] [GadgetFsPhy] Disconnected device AudioDevice

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions