Page MenuHomeFreeBSD

usb: serial: propagate errors from ucom_queue_command()
ClosedPublic

Authored by kevans on Dec 6 2024, 10:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jan 6, 11:39 PM
Unknown Object (File)
Mon, Jan 6, 3:38 PM
Unknown Object (File)
Mon, Jan 6, 9:19 AM
Unknown Object (File)
Mon, Jan 6, 4:35 AM
Unknown Object (File)
Mon, Jan 6, 12:09 AM
Unknown Object (File)
Fri, Dec 27, 3:02 PM
Unknown Object (File)
Thu, Dec 12, 7:29 PM
Unknown Object (File)
Dec 11 2024, 1:25 AM

Details

Summary

There's only one error that we can get back right now, but future
changes will add some more cases that we need to watch out for. Start
by returning errors and propagating them back.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kevans created this revision.
sys/dev/usb/serial/usb_serial.c
809

Why return ENOTTY and then translate the error?

sys/dev/usb/serial/usb_serial.c
809

Will fix- originally this bubbled up to ucom_ioctl as well, where it didn't get translated. Later revisions added ucom_command_barrier which will get used in some contexts where ENOTTY makes sense for the tty layer (ioctl) and others where ENXIO makes more sense.

Return ENXIO from ucom_queue_command; the ENOTTY conversion to ENXIO in some
callers goes away for now.

This revision is now accepted and ready to land.Dec 7 2024, 11:23 PM