From a9e95f2793c17e208bb6dd7182f655c41f6ca24d Mon Sep 17 00:00:00 2001 From: Sven Schnelle Date: Mon, 23 Nov 2015 16:00:55 +0100 Subject: [PATCH] bcwc_pcie: remove waitqueue from wq to cmd_wq --- bcwc_drv.c | 4 ++-- bcwc_drv.h | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bcwc_drv.c b/bcwc_drv.c index 5b4bcaf..efd640d 100644 --- a/bcwc_drv.c +++ b/bcwc_drv.c @@ -196,7 +196,7 @@ static void bcwc_handle_irq(struct bcwc_private *dev_priv, struct fw_channel *ch } else if (chan == dev_priv->channel_buf_t2h) { buf_t2h_handler(dev_priv, chan, entry); } else if (chan == dev_priv->channel_io) { - wake_up_interruptible(&dev_priv->wq); + wake_up_interruptible(&dev_priv->cmd_wq); } else if (chan == dev_priv->channel_io_t2h) { io_t2h_handler(dev_priv, chan, entry); } else if (chan == dev_priv->channel_buf_h2t) { @@ -367,7 +367,7 @@ static int bcwc_pci_probe(struct pci_dev *pdev, mutex_init(&dev_priv->vb2_queue_lock); mutex_init(&dev_priv->ioctl_lock); - init_waitqueue_head(&dev_priv->wq); + init_waitqueue_head(&dev_priv->cmd_wq); INIT_LIST_HEAD(&dev_priv->buffer_queue); dev_priv->pdev = pdev; diff --git a/bcwc_drv.h b/bcwc_drv.h index a518879..43fbd40 100644 --- a/bcwc_drv.h +++ b/bcwc_drv.h @@ -55,7 +55,11 @@ struct fw_channel { u32 size; u32 source; u32 type; + int tx_lock; + int rx_lock; struct bcwc_ringbuf ringbuf; + spinlock_t lock; + char *name; }; @@ -69,11 +73,9 @@ struct bcwc_private { int users; /* lock for synchronizing with irq/workqueue */ spinlock_t io_lock; - /* lock for ringbuffer synchronization */ - spinlock_t rb_lock; /* waitqueue for signaling command completion */ - wait_queue_head_t wq; + wait_queue_head_t cmd_wq; /* Mapped PCI resources */ void *s2_io;