RE: question regarding ordering in btintel_pcie_send_sync()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Oliver,


>-----Original Message-----
>From: Oliver Neukum <oneukum@xxxxxxxx>
>Sent: Thursday, May 16, 2024 11:28 AM
>To: K, Kiran <kiran.k@xxxxxxxxx>; Marcel Holtmann <marcel@xxxxxxxxxxxx>
>Cc: linux-bluetooth@xxxxxxxxxxxxxxx
>Subject: question regarding ordering in btintel_pcie_send_sync()
>
>Hi,
>
>I was looking at the code. I do not have documentation for the device, but it
>looks relatively ordinary. Hence this piece of code caught my eye:
>
>
>         /* Set the doorbell to notify the device */
>         btintel_pcie_set_tx_db(data, tfd_index);
>
>Requesting an interrupt. However, are you sure the IO can be processed and
>trigger an interrupt only after the PCI write, which this triggers?
>
This wait is for reception of packet at the device side.  Bluetooth controller can raise the interrupt with different causes. Here driver waits for interrupt BTINTEL_*_CAUSE_0 which indicates that TX has been completed. Device raises BTINTEL_*_CAUSE_1 interrupt when TX packet has been processed and there is some data in RX queue to be read by driver.

>         /* Wait for the complete interrupt - URBD0 */
>         ret = wait_event_timeout(data->tx_wait_q, data->tx_wait_done,
>                                  msecs_to_jiffies(BTINTEL_PCIE_TX_WAIT_TIMEOUT_MS));
>
>	Regards
>		Oliver

Thanks,
Kiran






[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux