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

Adapt drivers to USB architecture rework #524

Open
wants to merge 8 commits into
base: adamgreloch/RTOS-937
Choose a base branch
from

Conversation

adamgreloch
Copy link
Member

@adamgreloch adamgreloch commented Nov 22, 2024

Description

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (refactoring, style fixes, git/CI config, submodule management, no code logic changes)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: ia32-qemu (umass), imx6ull (usbacm)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

@adamgreloch adamgreloch changed the title Rework USB architecture Adapt drivers to USB architecture rework Nov 22, 2024
@adamgreloch adamgreloch force-pushed the adamgreloch/RTOS-937 branch 2 times, most recently from 31602b7 to 6f3a818 Compare November 25, 2024 09:04
@adamgreloch adamgreloch force-pushed the adamgreloch/RTOS-970 branch 2 times, most recently from d21d2bf to 79d2758 Compare November 25, 2024 09:07
@adamgreloch adamgreloch marked this pull request as ready for review November 25, 2024 09:07
@adamgreloch adamgreloch force-pushed the adamgreloch/RTOS-970 branch 4 times, most recently from fb0d6d3 to 6cf12ee Compare December 5, 2024 13:57
storage/umass/srv.c Outdated Show resolved Hide resolved
NAME := umass
ifeq ($(TARGET_FAMILY),ia32)
UMASS_LIBS := libext2
UMASS_CFLAGS := -DUMASS_MOUNT_EXT2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why limit this feature to the ia32 only?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of all targets that currently include umass (ia32 and imxrt*) only ia32 is built with libext2

storage/umass/umass.c Outdated Show resolved Hide resolved
storage/umass/umass.c Show resolved Hide resolved
storage/umass/umass.c Outdated Show resolved Hide resolved
JIRA: RTOS-970
This fixes race conditions happening when there are multiple usb
insertion/deletion/completion threads. Access to usbacm_common.devices
struct was not guarded, which lead i.e. to multiple concurrent attempts
of /dev/usbacm0 creation during insertion and possible double-free on
destruction, since usbacm_freeAll was also called outside of critical
section

JIRA: RTOS-970
Some real world sticks always fail few first commands but if REQUEST
SENSE is done immediately afterwards, they will later work with no
errors. Some others fail the first few READ commands, but recover after
few retries.

JIRA: RTOS-970
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants