aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/i2o/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message/i2o/pci.c')
-rw-r--r--drivers/message/i2o/pci.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c
index 964fe481849e..442e34506b90 100644
--- a/drivers/message/i2o/pci.c
+++ b/drivers/message/i2o/pci.c
@@ -30,15 +30,7 @@
30#include <linux/pci.h> 30#include <linux/pci.h>
31#include <linux/interrupt.h> 31#include <linux/interrupt.h>
32#include <linux/i2o.h> 32#include <linux/i2o.h>
33 33#include "core.h"
34/* Module internal functions from other sources */
35extern struct i2o_controller *i2o_iop_alloc(void);
36extern void i2o_iop_free(struct i2o_controller *);
37
38extern int i2o_iop_add(struct i2o_controller *);
39extern void i2o_iop_remove(struct i2o_controller *);
40
41extern int i2o_driver_dispatch(struct i2o_controller *, u32);
42 34
43/* PCI device id table for all I2O controllers */ 35/* PCI device id table for all I2O controllers */
44static struct pci_device_id __devinitdata i2o_pci_ids[] = { 36static struct pci_device_id __devinitdata i2o_pci_ids[] = {
@@ -248,9 +240,7 @@ static int i2o_pci_irq_enable(struct i2o_controller *c)
248 struct pci_dev *pdev = c->pdev; 240 struct pci_dev *pdev = c->pdev;
249 int rc; 241 int rc;
250 242
251 wmb();
252 writel(0xffffffff, c->irq_mask); 243 writel(0xffffffff, c->irq_mask);
253 wmb();
254 244
255 if (pdev->irq) { 245 if (pdev->irq) {
256 rc = request_irq(pdev->irq, i2o_pci_interrupt, SA_SHIRQ, 246 rc = request_irq(pdev->irq, i2o_pci_interrupt, SA_SHIRQ,
@@ -263,7 +253,6 @@ static int i2o_pci_irq_enable(struct i2o_controller *c)
263 } 253 }
264 254
265 writel(0x00000000, c->irq_mask); 255 writel(0x00000000, c->irq_mask);
266 wmb();
267 256
268 printk(KERN_INFO "%s: Installed at IRQ %d\n", c->name, pdev->irq); 257 printk(KERN_INFO "%s: Installed at IRQ %d\n", c->name, pdev->irq);
269 258
@@ -278,9 +267,7 @@ static int i2o_pci_irq_enable(struct i2o_controller *c)
278 */ 267 */
279static void i2o_pci_irq_disable(struct i2o_controller *c) 268static void i2o_pci_irq_disable(struct i2o_controller *c)
280{ 269{
281 wmb();
282 writel(0xffffffff, c->irq_mask); 270 writel(0xffffffff, c->irq_mask);
283 wmb();
284 271
285 if (c->pdev->irq > 0) 272 if (c->pdev->irq > 0)
286 free_irq(c->pdev->irq, c); 273 free_irq(c->pdev->irq, c);
@@ -406,11 +393,11 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev,
406 if ((rc = i2o_iop_add(c))) 393 if ((rc = i2o_iop_add(c)))
407 goto uninstall; 394 goto uninstall;
408 395
396 get_device(&c->device);
397
409 if (i960) 398 if (i960)
410 pci_write_config_word(i960, 0x42, 0x03ff); 399 pci_write_config_word(i960, 0x42, 0x03ff);
411 400
412 get_device(&c->device);
413
414 return 0; 401 return 0;
415 402
416 uninstall: 403 uninstall:
@@ -478,6 +465,4 @@ void __exit i2o_pci_exit(void)
478{ 465{
479 pci_unregister_driver(&i2o_pci_driver); 466 pci_unregister_driver(&i2o_pci_driver);
480}; 467};
481
482EXPORT_SYMBOL(i2o_dma_realloc);
483MODULE_DEVICE_TABLE(pci, i2o_pci_ids); 468MODULE_DEVICE_TABLE(pci, i2o_pci_ids);