aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btmrvl_main.c
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2010-05-27 19:38:37 -0400
committerMarcel Holtmann <marcel@holtmann.org>2010-07-21 13:39:06 -0400
commitd1d10d783089cc26a14be92fc12fccda9aa6593a (patch)
tree109f208c61617a703993ac21a40d71d2e646c44b /drivers/bluetooth/btmrvl_main.c
parent2d0a03460a8a0c611843500735096ff799aa8510 (diff)
Bluetooth: Process interrupt in main thread of btmrvl driver as well
When driver is sending a command or data and the firmware is also sending a sleep event, sometimes it is observed that driver will continue to send the command/data to firmware right after processing sleep event. Once sleep event is processed driver is not supposed to send anything because firmware is in sleep state after that. Previously interrupt processing was done in SDIO interrupt callback handler. Now it is done in btmrvl driver main thread to solve the cross-sending properly. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/btmrvl_main.c')
-rw-r--r--drivers/bluetooth/btmrvl_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
index ee37ef0caee2..0d32ec82e9bf 100644
--- a/drivers/bluetooth/btmrvl_main.c
+++ b/drivers/bluetooth/btmrvl_main.c
@@ -502,14 +502,17 @@ static int btmrvl_service_main_thread(void *data)
502 spin_lock_irqsave(&priv->driver_lock, flags); 502 spin_lock_irqsave(&priv->driver_lock, flags);
503 if (adapter->int_count) { 503 if (adapter->int_count) {
504 adapter->int_count = 0; 504 adapter->int_count = 0;
505 spin_unlock_irqrestore(&priv->driver_lock, flags);
506 priv->hw_process_int_status(priv);
505 } else if (adapter->ps_state == PS_SLEEP && 507 } else if (adapter->ps_state == PS_SLEEP &&
506 !skb_queue_empty(&adapter->tx_queue)) { 508 !skb_queue_empty(&adapter->tx_queue)) {
507 spin_unlock_irqrestore(&priv->driver_lock, flags); 509 spin_unlock_irqrestore(&priv->driver_lock, flags);
508 adapter->wakeup_tries++; 510 adapter->wakeup_tries++;
509 priv->hw_wakeup_firmware(priv); 511 priv->hw_wakeup_firmware(priv);
510 continue; 512 continue;
513 } else {
514 spin_unlock_irqrestore(&priv->driver_lock, flags);
511 } 515 }
512 spin_unlock_irqrestore(&priv->driver_lock, flags);
513 516
514 if (adapter->ps_state == PS_SLEEP) 517 if (adapter->ps_state == PS_SLEEP)
515 continue; 518 continue;