Project

General

Profile

Bug #5908

asy should not adjust line control or speed on attach

Added by Joshua M. Clulow about 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
kernel
Start date:
2015-05-05
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

The asy driver exposes each COM port in an x86 system for use by usermode software (e.g. login sessions, etc). On attach, the driver resets some of control registers for each UART to default values; e.g. 9600 baud, 8 bit words, etc.

This is problematic as the values chosen for the reset are hard-coded, and may not match up with the tty*-mode boot options. If single-stepping through the asy attach routine with kmdb, it's possible that the console (which may not be operating at 9600 baud) will become inaccessible during this initialisation, bringing the system to rest.

Presumably the bootloader (e.g. grub) will, in a system with a serial console, configure the UART to the correct operating settings for early boot. The ttymon service will configure any serial ports used for login to the correct settings. The console subsystem itself likely does some early configuration based on the boot arguments. Needless to say there are probably enough cooks in this kitchen already, and asy should only be reconfiguring the UART in the event that somebody opens an asy device node.

Also available in: Atom PDF