diff options
| author | Markus Lidel <markus.lidel@shadowconnect.com> | 2005-01-14 23:34:52 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-14 23:34:52 -0800 |
| commit | b4d71a318fbe18f5fc6982d0f0b8dc4cf1d97fe4 (patch) | |
| tree | 936242931f801fc0129070fbcf57a4b14a4a37d8 | |
| parent | adae02123364ca1caecbec65179b45d7444b3c76 (diff) | |
[PATCH] I2O: fix possible race condition and minor improvements
- I2O Block OSM contained a possible race condition (by Wolfram Joost)
- In pci.c the memory area which will be synced was wrong (original from
Wolfram Joost)
- number of OSM's which could be loaded is increased from 4 to 8
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>
| -rw-r--r-- | drivers/message/i2o/i2o_block.c | 4 | ||||
| -rw-r--r-- | drivers/message/i2o/pci.c | 2 | ||||
| -rw-r--r-- | include/linux/i2o.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c index 21d87c9f6f62..ee4451b7c1e8 100644 --- a/drivers/message/i2o/i2o_block.c +++ b/drivers/message/i2o/i2o_block.c @@ -877,11 +877,11 @@ static int i2o_block_transfer(struct request *req) (unsigned long)&msg->u.head[0]) >> 2) | SGL_OFFSET_8, &msg->u.head[0]); - i2o_msg_post(c, m); - list_add_tail(&ireq->queue, &dev->open_queue); dev->open_queue_depth++; + i2o_msg_post(c, m); + return 0; context_remove: diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c index 6107058460b6..9d0364a552d3 100644 --- a/drivers/message/i2o/pci.c +++ b/drivers/message/i2o/pci.c @@ -303,7 +303,7 @@ static irqreturn_t i2o_pci_interrupt(int irq, void *dev_id, struct pt_regs *r) * Ensure this message is seen coherently but cachably by * the processor */ - dma_sync_single_for_cpu(dev, c->out_queue.phys, MSG_FRAME_SIZE, + dma_sync_single_for_cpu(dev, mv, MSG_FRAME_SIZE * 4, PCI_DMA_FROMDEVICE); /* dispatch it */ diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 229bb91364ad..ba2e945d31f4 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h @@ -23,7 +23,7 @@ #include <linux/i2o-dev.h> /* How many different OSM's are we allowing */ -#define I2O_MAX_DRIVERS 4 +#define I2O_MAX_DRIVERS 8 #include <asm/io.h> #include <asm/semaphore.h> /* Needed for MUTEX init macros */ |
