Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unknown IOCTL in FUSB302 driver #14006

Closed
1 task done
TimJTi opened this issue Oct 9, 2024 · 3 comments
Closed
1 task done

[BUG] Unknown IOCTL in FUSB302 driver #14006

TimJTi opened this issue Oct 9, 2024 · 3 comments
Labels
Arch: arm Issues related to ARM (32-bit) architecture Area: Drivers Drivers issues

Comments

@TimJTi
Copy link
Contributor

TimJTi commented Oct 9, 2024

Description / Steps to reproduce the issue

I am seeing unrecognized IOCTL error reports from the FUSB302 USBMISC driver recently. I suspect there's a recent change that has caused this and am looking for suggestions as to where to look to investigate.
It happens if (for example) I run a ping from nsh (albeit via a CDC/NCM usb connection so there is a relevance).

The IOCTL is 0x30a which I think is a file system IOCTL, FIONBIO, so not sure why this driver is being sent this?

This is the call stack. Can anyone advise?

fusb302_ioctl@0x2001b4d4 (/home/tim/designs/nuttx/nuttx/drivers/usbmisc/fusb302.c:1739)
file_vioctl@0x2003988c (/home/tim/designs/nuttx/nuttx/fs/vfs/fs_ioctl.c:68)
file_ioctl@0x20039b04 (/home/tim/designs/nuttx/nuttx/fs/vfs/fs_ioctl.c:225)
file_dup3@0x200397f0 (/home/tim/designs/nuttx/nuttx/fs/vfs/fs_dup2.c:150)
file_dup2@0x20039838 (/home/tim/designs/nuttx/nuttx/fs/vfs/fs_dup2.c:200)
files_duplist@0x20038f98 (/home/tim/designs/nuttx/nuttx/fs/inode/fs_files.c:723)
group_setuptaskfiles@0x2000e534 (/home/tim/designs/nuttx/nuttx/sched/group/group_setuptaskfiles.c:99)
nxtask_init@0x2000cfb4 (/home/tim/designs/nuttx/nuttx/sched/task/task_init.c:139)
nxtask_spawn_create@0x2000d6cc (/home/tim/designs/nuttx/nuttx/sched/task/task_spawn.c:108)
nxtask_spawn_exec@0x2000d6cc (/home/tim/designs/nuttx/nuttx/sched/task/task_spawn.c:224)
task_spawn@0x2000d6cc (/home/tim/designs/nuttx/nuttx/sched/task/task_spawn.c:321)
exec_builtin@0x200338ac (/home/tim/designs/nuttx/apps/builtin/exec_builtin.c:189)
nsh_builtin@0x200336a0 (/home/tim/designs/nuttx/apps/nshlib/nsh_builtin.c:105)
nsh_execute@0x20030928 (/home/tim/designs/nuttx/apps/nshlib/nsh_parse.c:650)
nsh_parse_command@0x20030928 (/home/tim/designs/nuttx/apps/nshlib/nsh_parse.c:2840)
nsh_parse@0x20030d74 (/home/tim/designs/nuttx/apps/nshlib/nsh_parse.c:2930)
nsh_session@0x2002a2c4 (/home/tim/designs/nuttx/apps/nshlib/nsh_session.c:245)
nsh_consolemain@0x2002a0f0 (/home/tim/designs/nuttx/apps/nshlib/nsh_consolemain.c:75)
nsh_main@0x2002a094 (/home/tim/designs/nuttx/apps/system/nsh/nsh_main.c:74)
nxtask_startup@0x2001e390 (/home/tim/designs/nuttx/nuttx/libs/libc/sched/task_startup.c:70)

On which OS does this issue occur?

[OS: Linux]

What is the version of your OS?

Ubuntu 22.04.5 LTS

NuttX Version

Master

Issue Architecture

[Arch: arm]

Issue Area

[Area: Drivers]

Verification

  • I have verified before submitting the report.
@github-actions github-actions bot added Arch: arm Issues related to ARM (32-bit) architecture Area: Drivers Drivers issues labels Oct 9, 2024
@acassis
Copy link
Contributor

acassis commented Oct 12, 2024

@xiaoxiang781216 any idea?

@xiaoxiang781216
Copy link
Contributor

xiaoxiang781216 commented Oct 13, 2024

FIONBIO is a general ioctl which may be called from the common code, the driver should ignore any ioctl(include FIONBIO) which can't handle and return -ENOTTY without any other side effect.

@TimJTi
Copy link
Contributor Author

TimJTi commented Oct 14, 2024

FIONBIO is a general ioctl which may be called from the common code, the driver should ignore any ioctl(include FIONBIO) which can't handle and return -ENOTTY without any other side effect.

OK no worries - it does ignore it and return -ENOTTY as expected: I had turned on USB debug features which would be what caused this to show, didn't remember it from before.

@TimJTi TimJTi closed this as completed Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: arm Issues related to ARM (32-bit) architecture Area: Drivers Drivers issues
Projects
None yet
Development

No branches or pull requests

3 participants