mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-30 03:07:44 +08:00
Merge tag 'mvebu-irqchip-fixes-3.15' of git://git.infradead.org/linux-mvebu into irq/urgent
Bugfixes for armada-370-xp SoC from Jason Cooper: * Fix invalid cast (signed to unsigned) * Add missing ->check_device() msi_chip op * Fix releasing of MSIs
This commit is contained in:
@@ -133,8 +133,7 @@ static int armada_370_xp_setup_msi_irq(struct msi_chip *chip,
|
||||
struct msi_desc *desc)
|
||||
{
|
||||
struct msi_msg msg;
|
||||
irq_hw_number_t hwirq;
|
||||
int virq;
|
||||
int virq, hwirq;
|
||||
|
||||
hwirq = armada_370_xp_alloc_msi();
|
||||
if (hwirq < 0)
|
||||
@@ -160,8 +159,19 @@ static void armada_370_xp_teardown_msi_irq(struct msi_chip *chip,
|
||||
unsigned int irq)
|
||||
{
|
||||
struct irq_data *d = irq_get_irq_data(irq);
|
||||
unsigned long hwirq = d->hwirq;
|
||||
|
||||
irq_dispose_mapping(irq);
|
||||
armada_370_xp_free_msi(d->hwirq);
|
||||
armada_370_xp_free_msi(hwirq);
|
||||
}
|
||||
|
||||
static int armada_370_xp_check_msi_device(struct msi_chip *chip, struct pci_dev *dev,
|
||||
int nvec, int type)
|
||||
{
|
||||
/* We support MSI, but not MSI-X */
|
||||
if (type == PCI_CAP_ID_MSI)
|
||||
return 0;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static struct irq_chip armada_370_xp_msi_irq_chip = {
|
||||
@@ -202,6 +212,7 @@ static int armada_370_xp_msi_init(struct device_node *node,
|
||||
|
||||
msi_chip->setup_irq = armada_370_xp_setup_msi_irq;
|
||||
msi_chip->teardown_irq = armada_370_xp_teardown_msi_irq;
|
||||
msi_chip->check_device = armada_370_xp_check_msi_device;
|
||||
msi_chip->of_node = node;
|
||||
|
||||
armada_370_xp_msi_domain =
|
||||
|
||||
Reference in New Issue
Block a user