diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-04 09:45:31 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-04 09:45:31 -0700 |
commit | 59107c6525c0d325649eae807905d34772d5a664 (patch) | |
tree | 098f40e08125695a1dca3ca7a2974fc2d4f71fad /drivers/block/cciss.c | |
parent | 746a99a5af60ee676afa2ba469ccd1373493c7e7 (diff) | |
parent | ab0fd1debe730ec9998678a0c53caefbd121ed10 (diff) | |
download | blackbird-op-linux-59107c6525c0d325649eae807905d34772d5a664.tar.gz blackbird-op-linux-59107c6525c0d325649eae807905d34772d5a664.zip |
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
block: don't merge requests of different failfast settings
cciss: Ignore stale commands after reboot
Diffstat (limited to 'drivers/block/cciss.c')
-rw-r--r-- | drivers/block/cciss.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index c7a527c08a09..65a0655e7fc8 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -226,8 +226,18 @@ static inline void addQ(struct hlist_head *list, CommandList_struct *c) static inline void removeQ(CommandList_struct *c) { - if (WARN_ON(hlist_unhashed(&c->list))) + /* + * After kexec/dump some commands might still + * be in flight, which the firmware will try + * to complete. Resetting the firmware doesn't work + * with old fw revisions, so we have to mark + * them off as 'stale' to prevent the driver from + * falling over. + */ + if (WARN_ON(hlist_unhashed(&c->list))) { + c->cmd_type = CMD_MSG_STALE; return; + } hlist_del_init(&c->list); } @@ -4246,7 +4256,8 @@ static void fail_all_cmds(unsigned long ctlr) while (!hlist_empty(&h->cmpQ)) { c = hlist_entry(h->cmpQ.first, CommandList_struct, list); removeQ(c); - c->err_info->CommandStatus = CMD_HARDWARE_ERR; + if (c->cmd_type != CMD_MSG_STALE) + c->err_info->CommandStatus = CMD_HARDWARE_ERR; if (c->cmd_type == CMD_RWREQ) { complete_command(h, c, 0); } else if (c->cmd_type == CMD_IOCTL_PEND) |