Skip to content

Commit

Permalink
Merge tag 'mvebu-irqchip-fixes-3.15' of git://git.infradead.org/linux…
Browse files Browse the repository at this point in the history
…-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
  • Loading branch information
Thomas Gleixner committed Apr 29, 2014
2 parents 3894e9e + ff3c664 commit 0a1f83a
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions drivers/irqchip/irq-armada-370-xp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 = {
Expand Down Expand Up @@ -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 =
Expand Down

0 comments on commit 0a1f83a

Please sign in to comment.