Linux-Bluetooth Archive mirror
 help / color / mirror / Atom feed
From: "K, Kiran" <kiran.k@intel.com>
To: Oliver Neukum <oneukum@suse.com>, Marcel Holtmann <marcel@holtmann.org>
Cc: "linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	"Srivatsa, Ravishankar" <ravishankar.srivatsa@intel.com>,
	"Devegowda, Chandrashekar" <chandrashekar.devegowda@intel.com>,
	"Tumkur Narayan, Chethan" <chethan.tumkur.narayan@intel.com>
Subject: RE: question regarding ordering in btintel_pcie_send_sync()
Date: Thu, 16 May 2024 13:28:58 +0000	[thread overview]
Message-ID: <PH0PR11MB7585901BCD41AC665844FF73F5ED2@PH0PR11MB7585.namprd11.prod.outlook.com> (raw)
In-Reply-To: <2ec916ce-c7b9-40f5-bb08-d1d2ba564456@suse.com>

Hi Oliver,


>-----Original Message-----
>From: Oliver Neukum <oneukum@suse.com>
>Sent: Thursday, May 16, 2024 11:28 AM
>To: K, Kiran <kiran.k@intel.com>; Marcel Holtmann <marcel@holtmann.org>
>Cc: linux-bluetooth@vger.kernel.org
>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



      reply	other threads:[~2024-05-16 13:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-16  5:57 question regarding ordering in btintel_pcie_send_sync() Oliver Neukum
2024-05-16 13:28 ` K, Kiran [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH0PR11MB7585901BCD41AC665844FF73F5ED2@PH0PR11MB7585.namprd11.prod.outlook.com \
    --to=kiran.k@intel.com \
    --cc=chandrashekar.devegowda@intel.com \
    --cc=chethan.tumkur.narayan@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=oneukum@suse.com \
    --cc=ravishankar.srivatsa@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).