From e20ffb84ab9aabc5b5450065580a370d27f2b449 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 29 Mar 2019 01:45:30 +0000 Subject: [PATCH] qla2x00t-32gbit: Backport to RHEL 6 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8108 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t-32gbit/qla_isr.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/qla2x00t-32gbit/qla_isr.c b/qla2x00t-32gbit/qla_isr.c index d95edcce1..4d0cb6c25 100644 --- a/qla2x00t-32gbit/qla_isr.c +++ b/qla2x00t-32gbit/qla_isr.c @@ -3421,6 +3421,25 @@ qla2xxx_msix_rsp_q(int irq, void *dev_id) /* Interrupt handling helpers. */ +/* */ + +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0) && \ + (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 7) +/* + * See also commit aff171641d18 ("PCI: Provide sensible IRQ vector alloc/free + * routines") # v4.8. + */ +/** + * pci_irq_vector - return Linux IRQ number of a device vector + * @dev: PCI device to operate on + * @nr: device-relative interrupt vector index (0-based). + */ +static inline int pci_irq_vector(struct pci_dev *dev, unsigned int nr) +{ + return dev->irq + nr; +} +#endif + struct qla_init_msix_entry { const char *name; irq_handler_t handler;