diff options
author | Markus Lidel <Markus.Lidel@shadowconnect.com> | 2005-06-24 01:02:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-24 03:05:29 -0400 |
commit | 9e87545f06930c1d294423a8091d1077e7444a47 (patch) | |
tree | ef05fca1becfa0e1584f234ddf9b1a430b7d018e /drivers/message/i2o/pci.c | |
parent | b2aaee33fbb354a2f08121aa1c1be55841102761 (diff) |
[PATCH] I2O: second code cleanup of sparse warnings and unneeded syncronization
Changes:
- Added header "core.h" for i2o_core.ko internal definitions
- More sparse fixes
- Changed display of TID's in sysfs attributes from XXX to 0xXXX
- Use the right functions for accessing I/O and normal memory
- Removed error handling of SCSI device errors and let the SCSI layer
take care of it
- Added new device / removed device handling to SCSI-OSM
- Make status access volatile
- Cleaned up activation of I2O controller
- Removed unnecessary wmb() and rmb() calls
- Use own struct i2o_io for I/O memory instead of struct i2o_dma
Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/message/i2o/pci.c')
-rw-r--r-- | drivers/message/i2o/pci.c | 21 |
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 */ | ||
35 | extern struct i2o_controller *i2o_iop_alloc(void); | ||
36 | extern void i2o_iop_free(struct i2o_controller *); | ||
37 | |||
38 | extern int i2o_iop_add(struct i2o_controller *); | ||
39 | extern void i2o_iop_remove(struct i2o_controller *); | ||
40 | |||
41 | extern 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 */ |
44 | static struct pci_device_id __devinitdata i2o_pci_ids[] = { | 36 | static 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 | */ |
279 | static void i2o_pci_irq_disable(struct i2o_controller *c) | 268 | static 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 | |||
482 | EXPORT_SYMBOL(i2o_dma_realloc); | ||
483 | MODULE_DEVICE_TABLE(pci, i2o_pci_ids); | 468 | MODULE_DEVICE_TABLE(pci, i2o_pci_ids); |