git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for...
[safe/jmp/linux-2.6]
/
include
/
linux
/
i2o.h
diff --git
a/include/linux/i2o.h
b/include/linux/i2o.h
index
4c18b77
..
c115e9e
100644
(file)
--- a/
include/linux/i2o.h
+++ b/
include/linux/i2o.h
@@
-384,7
+384,7
@@
/* defines for max_sectors and max_phys_segments */
#define I2O_MAX_SECTORS 1024
/* defines for max_sectors and max_phys_segments */
#define I2O_MAX_SECTORS 1024
-#define I2O_MAX_SECTORS_LIMITED
256
+#define I2O_MAX_SECTORS_LIMITED
128
#define I2O_MAX_PHYS_SEGMENTS MAX_PHYS_SEGMENTS
/*
#define I2O_MAX_PHYS_SEGMENTS MAX_PHYS_SEGMENTS
/*
@@
-950,9
+950,7
@@
static inline int i2o_pool_alloc(struct i2o_pool *pool, const char *name,
if (!pool->slab)
goto free_name;
if (!pool->slab)
goto free_name;
- pool->mempool =
- mempool_create(min_nr, mempool_alloc_slab, mempool_free_slab,
- pool->slab);
+ pool->mempool = mempool_create_slab_pool(min_nr, pool->slab);
if (!pool->mempool)
goto free_slab;
if (!pool->mempool)
goto free_slab;
@@
-1115,9
+1113,14
@@
static inline struct i2o_message *i2o_msg_get(struct i2o_controller *c)
return ERR_PTR(-ENOMEM);
mmsg->mfa = readl(c->in_port);
return ERR_PTR(-ENOMEM);
mmsg->mfa = readl(c->in_port);
- if (mmsg->mfa == I2O_QUEUE_EMPTY) {
+ if (unlikely(mmsg->mfa >= c->in_queue.len)) {
+ u32 mfa = mmsg->mfa;
+
mempool_free(mmsg, c->in_msg.mempool);
mempool_free(mmsg, c->in_msg.mempool);
- return ERR_PTR(-EBUSY);
+
+ if (mfa == I2O_QUEUE_EMPTY)
+ return ERR_PTR(-EBUSY);
+ return ERR_PTR(-EFAULT);
}
return &mmsg->msg;
}
return &mmsg->msg;