diff options
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/82xx/ep8248e.c | 15 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/msi.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/xics.c | 9 |
3 files changed, 23 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c index 51fcae41f08a..f9aee182e6f7 100644 --- a/arch/powerpc/platforms/82xx/ep8248e.c +++ b/arch/powerpc/platforms/82xx/ep8248e.c | |||
@@ -132,12 +132,25 @@ static int __devinit ep8248e_mdio_probe(struct of_device *ofdev, | |||
132 | return -ENOMEM; | 132 | return -ENOMEM; |
133 | 133 | ||
134 | bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL); | 134 | bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL); |
135 | if (bus->irq == NULL) { | ||
136 | ret = -ENOMEM; | ||
137 | goto err_free_bus; | ||
138 | } | ||
135 | 139 | ||
136 | bus->name = "ep8248e-mdio-bitbang"; | 140 | bus->name = "ep8248e-mdio-bitbang"; |
137 | bus->parent = &ofdev->dev; | 141 | bus->parent = &ofdev->dev; |
138 | snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start); | 142 | snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start); |
139 | 143 | ||
140 | return of_mdiobus_register(bus, ofdev->node); | 144 | ret = of_mdiobus_register(bus, ofdev->node); |
145 | if (ret) | ||
146 | goto err_free_irq; | ||
147 | |||
148 | return 0; | ||
149 | err_free_irq: | ||
150 | kfree(bus->irq); | ||
151 | err_free_bus: | ||
152 | free_mdio_bitbang(bus); | ||
153 | return ret; | ||
141 | } | 154 | } |
142 | 155 | ||
143 | static int ep8248e_mdio_remove(struct of_device *ofdev) | 156 | static int ep8248e_mdio_remove(struct of_device *ofdev) |
diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c index bf2e1ac41308..1164c3430f2c 100644 --- a/arch/powerpc/platforms/pseries/msi.c +++ b/arch/powerpc/platforms/pseries/msi.c | |||
@@ -432,8 +432,6 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type) | |||
432 | /* Read config space back so we can restore after reset */ | 432 | /* Read config space back so we can restore after reset */ |
433 | read_msi_msg(virq, &msg); | 433 | read_msi_msg(virq, &msg); |
434 | entry->msg = msg; | 434 | entry->msg = msg; |
435 | |||
436 | unmask_msi_irq(virq); | ||
437 | } | 435 | } |
438 | 436 | ||
439 | return 0; | 437 | return 0; |
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index 75935ae1a941..097e8a2a3c5d 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/radix-tree.h> | 19 | #include <linux/radix-tree.h> |
20 | #include <linux/cpu.h> | 20 | #include <linux/cpu.h> |
21 | #include <linux/msi.h> | ||
21 | #include <linux/of.h> | 22 | #include <linux/of.h> |
22 | 23 | ||
23 | #include <asm/firmware.h> | 24 | #include <asm/firmware.h> |
@@ -219,6 +220,14 @@ static void xics_unmask_irq(unsigned int virq) | |||
219 | 220 | ||
220 | static unsigned int xics_startup(unsigned int virq) | 221 | static unsigned int xics_startup(unsigned int virq) |
221 | { | 222 | { |
223 | /* | ||
224 | * The generic MSI code returns with the interrupt disabled on the | ||
225 | * card, using the MSI mask bits. Firmware doesn't appear to unmask | ||
226 | * at that level, so we do it here by hand. | ||
227 | */ | ||
228 | if (irq_to_desc(virq)->msi_desc) | ||
229 | unmask_msi_irq(virq); | ||
230 | |||
222 | /* unmask it */ | 231 | /* unmask it */ |
223 | xics_unmask_irq(virq); | 232 | xics_unmask_irq(virq); |
224 | return 0; | 233 | return 0; |