Page MenuHomeFreeBSD

umass: add quirk to not probe
ClosedPublic

Authored by bz on Dec 1 2020, 9:37 AM.

Details

Summary

Some USB WLAN devices have "on-board" storage showing up as umass
and making the root mount wait for a very long time.
The WLAN drivers know how to deal with that an issue an eject
command later when attaching themselves.
Introduce a quirk to not probe these devices as umass and avoid
hangs and confusion altogether.

MFC after: 1 week

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

bz requested review of this revision.Dec 1 2020, 9:37 AM

I am not sure if I can sort the new quirk type into the middle of the enum list or if I should rather add it to the end?

The order of the enumeration list doesn't. It is exported to user-space as strings.

You can move the if (usb_test_quirk()) before ret.error = BUS_PROBE_GENERIC, then you don't set the variable twice (minor nit).

This revision is now accepted and ready to land.Dec 1 2020, 10:04 AM

The order of the enumeration list doesn't matter. It is exported to user-space as strings.

I was more concerned about the enum in quirks.h as putting the new value in the middle means the integers are moving and hence all modules might have to be recompiled? Is that an issue we care about in head (and/or when later merging to stable)?

Just bump the __FreeBSD_version when merging to 12-stable, or add the enum last in the table. Most quirks are within the kernel as I'm aware about.

This revision was automatically updated to reflect the committed changes.