diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-04-28 01:09:25 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-04-28 01:09:25 +0000 |
commit | b9ba7aeb165cffecdffb60aec8c3fa8d590d9ca9 (patch) | |
tree | 42d07b0c7246ae2536a702e7c5de9e2732341116 /drivers/i2o/i2o_config.c | |
parent | 7406b0a326f2d70ade2671c37d1beef62249db97 (diff) |
Merge with 2.3.99-pre6.
Diffstat (limited to 'drivers/i2o/i2o_config.c')
-rw-r--r-- | drivers/i2o/i2o_config.c | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/drivers/i2o/i2o_config.c b/drivers/i2o/i2o_config.c index c89fe3b97..0202afb67 100644 --- a/drivers/i2o/i2o_config.c +++ b/drivers/i2o/i2o_config.c @@ -85,11 +85,21 @@ static void i2o_cfg_reply(struct i2o_handler *h, struct i2o_controller *c, struc { u32 *msg = (u32 *)m; - if (msg[0] & (1<<13)) + if (msg[0] & MSG_FAIL) { + u32 *preserved_msg = (u32*)(c->mem_offset + msg[7]); + printk(KERN_ERR "i2o_config: IOP failed to process the msg.\n"); - - if (msg[4] >> 24) // RegStatus != SUCCESS - i2o_report_status(KERN_INFO,"i2o_config",msg); + + /* Release the preserved msg frame by resubmitting it as a NOP */ + + preserved_msg[0] = THREE_WORD_MSG_SIZE | SGL_OFFSET_0; + preserved_msg[1] = I2O_CMD_UTIL_NOP << 24 | HOST_TID << 12 | 0; + preserved_msg[2] = 0; + i2o_post_message(c, msg[7]); + } + + if (msg[4] >> 24) // ReqStatus != SUCCESS + i2o_report_status(KERN_INFO,"i2o_config", msg); if(m->function == I2O_CMD_UTIL_EVT_REGISTER) { @@ -166,6 +176,9 @@ static void i2o_cfg_reply(struct i2o_handler *h, struct i2o_controller *c, struc struct i2o_handler cfg_handler= { i2o_cfg_reply, + NULL, + NULL, + NULL, "Configuration", 0, 0xffffffff // All classes @@ -409,14 +422,14 @@ static int ioctl_parms(unsigned long arg, unsigned int type) return -ENOMEM; } - len = i2o_issue_params(i2o_cmd, c, kcmd.tid, - ops, kcmd.oplen, res, 65536); - i2o_unlock_controller(c); + len = i2o_issue_params(i2o_cmd, c, kcmd.tid, + ops, kcmd.oplen, res, 65536); + i2o_unlock_controller(c); kfree(ops); if (len < 0) { kfree(res); - return len; /* -DetailedStatus */ + return -EAGAIN; } put_user(len, kcmd.reslen); @@ -749,7 +762,7 @@ static int ioctl_evt_reg(unsigned long arg, struct file *fp) /* Device exists? */ for(d = iop->devices; d; d = d->next) - if(d->lct_data->tid == kdesc.tid) + if(d->lct_data.tid == kdesc.tid) break; if(!d) @@ -903,7 +916,7 @@ int __init i2o_config_init(void) #endif { printk(KERN_INFO "I2O configuration manager v 0.04.\n"); - printk(KERN_INFO " (C) Copyright 1999 Red Hat Software"); + printk(KERN_INFO " (C) Copyright 1999 Red Hat Software\n"); if((page_buf = kmalloc(4096, GFP_KERNEL))==NULL) { |