Re: [PATCH] Bluetooth: hci_uart: check for missing tty operations in protocol handlers

From: Marcel Holtmann
Date: Thu Jul 25 2019 - 14:07:10 EST


Hi Vladis,

>> why is this one hidden behind CONFIG_PM? The general baud rate changes are
>> independent of runtime power management support.
>
> hci_bcm calls hci_uart_set_flow_control() only from functions hidden behind
> #ifdef-CONFIG_PM (surely this can change in the future), and so without
> CONFIG_PM set it cannot hit the bug (as of now). So I've hidden the check
> for tiocm[gs]et() behind #ifdef-CONFIG_PM too.
>
> If you tell me it is better to remove this #ifdef, I'll remove it.

just remove it since I think that is a coincidence actually. And I think you also need to add a check in hci_h5.c since that got Realtek support, it should also use flow control or baud rate settings.

>> And I would introduce a bool hci_uart_has_tiocm_support(struct hci_uart *)
>> helper.
>
> Great, I will add it to the v2 fix. I guess a good place for it is hci_ldisc.c,
> near hci_uart_set_flow_control(), isn't it?

Sounds good.

Regards

Marcel