From: Scott Branden <scott.branden@broadcom.com>
To: Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Scott Branden <scott.branden@broadcom.com>
Cc: Kees Cook <keescook@chromium.org>,
linux-kernel@vger.kernel.org,
bcm-kernel-feedback-list@broadcom.com
Subject: [PATCH v4 13/16] misc: bcm-vk: add tty irq handler
Date: Mon, 28 Sep 2020 17:12:06 -0700 [thread overview]
Message-ID: <20200929001209.16393-14-scott.branden@broadcom.com> (raw)
In-Reply-To: <20200929001209.16393-1-scott.branden@broadcom.com>
Add irq handler for tty interfaces to VK. If irq not enable
poll method will still be used.
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
---
drivers/misc/bcm-vk/bcm_vk.h | 2 ++
drivers/misc/bcm-vk/bcm_vk_dev.c | 13 +++++++++++++
2 files changed, 15 insertions(+)
diff --git a/drivers/misc/bcm-vk/bcm_vk.h b/drivers/misc/bcm-vk/bcm_vk.h
index 084be53a9518..64894c77759e 100644
--- a/drivers/misc/bcm-vk/bcm_vk.h
+++ b/drivers/misc/bcm-vk/bcm_vk.h
@@ -8,6 +8,7 @@
#include <linux/atomic.h>
#include <linux/firmware.h>
+#include <linux/irq.h>
#include <linux/kref.h>
#include <linux/miscdevice.h>
#include <linux/mutex.h>
@@ -484,6 +485,7 @@ int bcm_vk_release(struct inode *inode, struct file *p_file);
void bcm_vk_release_data(struct kref *kref);
irqreturn_t bcm_vk_msgq_irqhandler(int irq, void *dev_id);
irqreturn_t bcm_vk_notf_irqhandler(int irq, void *dev_id);
+irqreturn_t bcm_vk_tty_irqhandler(int irq, void *dev_id);
int bcm_vk_msg_init(struct bcm_vk *vk);
void bcm_vk_msg_remove(struct bcm_vk *vk);
void bcm_vk_drain_msg_on_reset(struct bcm_vk *vk);
diff --git a/drivers/misc/bcm-vk/bcm_vk_dev.c b/drivers/misc/bcm-vk/bcm_vk_dev.c
index 76fe58fc98e2..18e11c8633fd 100644
--- a/drivers/misc/bcm-vk/bcm_vk_dev.c
+++ b/drivers/misc/bcm-vk/bcm_vk_dev.c
@@ -1338,6 +1338,19 @@ static int bcm_vk_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
}
vk->num_irqs++;
+ for (i = 0;
+ (i < VK_MSIX_TTY_MAX) && (vk->num_irqs < irq);
+ i++, vk->num_irqs++) {
+ err = devm_request_irq(dev, pci_irq_vector(pdev, vk->num_irqs),
+ bcm_vk_tty_irqhandler,
+ IRQF_SHARED, DRV_MODULE_NAME, vk);
+ if (err) {
+ dev_err(dev, "failed request tty IRQ %d for MSIX %d\n",
+ pdev->irq + vk->num_irqs, vk->num_irqs + 1);
+ goto err_irq;
+ }
+ vk->tty[i].irq_enabled = true;
+ }
id = ida_simple_get(&bcm_vk_ida, 0, 0, GFP_KERNEL);
if (id < 0) {
--
2.17.1
next prev parent reply other threads:[~2020-09-29 0:13 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-29 0:11 [PATCH v4 00/16] Add Broadcom VK driver Scott Branden
2020-09-29 0:11 ` [PATCH v4 01/16] bcm-vk: add bcm_vk UAPI Scott Branden
2020-09-29 10:25 ` Greg Kroah-Hartman
2020-09-29 16:44 ` Scott Branden
2020-09-29 17:08 ` Greg Kroah-Hartman
2020-09-29 17:38 ` Scott Branden
2020-09-29 0:11 ` [PATCH v4 02/16] misc: bcm-vk: add Broadcom VK driver Scott Branden
2020-09-29 10:28 ` Greg Kroah-Hartman
2020-09-29 23:51 ` Scott Branden
2020-09-29 0:11 ` [PATCH v4 03/16] misc: bcm-vk: add autoload support Scott Branden
2020-09-29 0:11 ` [PATCH v4 04/16] misc: bcm-vk: add misc device to Broadcom VK driver Scott Branden
2020-09-29 0:11 ` [PATCH v4 05/16] misc: bcm-vk: add triggers when host panic or reboots to notify card Scott Branden
2020-09-29 0:11 ` [PATCH v4 06/16] misc: bcm-vk: add ttyVK support Scott Branden
2020-09-29 10:32 ` Greg Kroah-Hartman
2020-09-29 21:45 ` Scott Branden
2020-09-29 0:12 ` [PATCH v4 07/16] misc: bcm-vk: add open/release Scott Branden
2020-09-29 0:12 ` [PATCH v4 08/16] misc: bcm-vk: add ioctl load_image Scott Branden
2020-09-29 0:12 ` [PATCH v4 09/16] misc: bcm-vk: add get_card_info, peerlog_info, and proc_mon_info Scott Branden
2020-09-29 0:12 ` [PATCH v4 10/16] misc: bcm-vk: add VK messaging support Scott Branden
2020-09-29 0:12 ` [PATCH v4 11/16] misc: bcm-vk: reset_pid support Scott Branden
2020-09-29 0:12 ` [PATCH v4 12/16] misc: bcm-vk: add BCM_VK_QSTATS Scott Branden
2020-09-29 0:12 ` Scott Branden [this message]
2020-09-29 0:12 ` [PATCH v4 14/16] misc: bcm-vk: add sysfs interface Scott Branden
2020-09-29 0:12 ` [PATCH v4 15/16] misc: bcm-vk: add mmap function for exposing BAR2 Scott Branden
2020-09-29 0:12 ` [PATCH v4 16/16] MAINTAINERS: bcm-vk: add maintainer for Broadcom VK Driver Scott Branden
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=20200929001209.16393-14-scott.branden@broadcom.com \
--to=scott.branden@broadcom.com \
--cc=arnd@arndb.de \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®