Re: [PATCH] Bluetooth: hci_uart: Fix a race for write_work scheduling

2020-12-18 Thread Marcel Holtmann
Hi Claire, > In hci_uart_write_work, there is a loop/goto checking the value of > HCI_UART_TX_WAKEUP. If HCI_UART_TX_WAKEUP is set again, it keeps trying > hci_uart_dequeue; otherwise, it clears HCI_UART_SENDING and returns. > > In hci_uart_tx_wakeup, if HCI_UART_SENDING is already set, it sets >

[PATCH] Bluetooth: hci_uart: Fix a race for write_work scheduling

2020-12-13 Thread Claire Chang
In hci_uart_write_work, there is a loop/goto checking the value of HCI_UART_TX_WAKEUP. If HCI_UART_TX_WAKEUP is set again, it keeps trying hci_uart_dequeue; otherwise, it clears HCI_UART_SENDING and returns. In hci_uart_tx_wakeup, if HCI_UART_SENDING is already set, it sets HCI_UART_TX_WAKEUP, ski