Commit b4d71a31 authored by Markus Lidel's avatar Markus Lidel Committed by Linus Torvalds

[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: default avatarMarkus Lidel <Markus.Lidel@shadowconnect.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent adae0212
......@@ -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:
......
......@@ -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 */
......
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment