aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/cciss.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-08-10 00:29:47 -0400
committerDavid S. Miller <davem@davemloft.net>2009-08-10 00:29:47 -0400
commitf222e8b40f2177b1c4cac015b117744c1d3fa3e9 (patch)
tree7c5fc22c08da900e21b0e7ab2376e8e8e44a63c0 /drivers/block/cciss.c
parent819ae6a389d4acfab9a7bb874fa1977aa464d14b (diff)
parentf4b9a988685da6386d7f9a72df3098bcc3270526 (diff)
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'drivers/block/cciss.c')
-rw-r--r--drivers/block/cciss.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index c7a527c08a09..a52cc7fe45ea 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -26,6 +26,7 @@
26#include <linux/pci.h> 26#include <linux/pci.h>
27#include <linux/kernel.h> 27#include <linux/kernel.h>
28#include <linux/slab.h> 28#include <linux/slab.h>
29#include <linux/smp_lock.h>
29#include <linux/delay.h> 30#include <linux/delay.h>
30#include <linux/major.h> 31#include <linux/major.h>
31#include <linux/fs.h> 32#include <linux/fs.h>
@@ -226,8 +227,18 @@ static inline void addQ(struct hlist_head *list, CommandList_struct *c)
226 227
227static inline void removeQ(CommandList_struct *c) 228static inline void removeQ(CommandList_struct *c)
228{ 229{
229 if (WARN_ON(hlist_unhashed(&c->list))) 230 /*
231 * After kexec/dump some commands might still
232 * be in flight, which the firmware will try
233 * to complete. Resetting the firmware doesn't work
234 * with old fw revisions, so we have to mark
235 * them off as 'stale' to prevent the driver from
236 * falling over.
237 */
238 if (WARN_ON(hlist_unhashed(&c->list))) {
239 c->cmd_type = CMD_MSG_STALE;
230 return; 240 return;
241 }
231 242
232 hlist_del_init(&c->list); 243 hlist_del_init(&c->list);
233} 244}
@@ -4246,7 +4257,8 @@ static void fail_all_cmds(unsigned long ctlr)
4246 while (!hlist_empty(&h->cmpQ)) { 4257 while (!hlist_empty(&h->cmpQ)) {
4247 c = hlist_entry(h->cmpQ.first, CommandList_struct, list); 4258 c = hlist_entry(h->cmpQ.first, CommandList_struct, list);
4248 removeQ(c); 4259 removeQ(c);
4249 c->err_info->CommandStatus = CMD_HARDWARE_ERR; 4260 if (c->cmd_type != CMD_MSG_STALE)
4261 c->err_info->CommandStatus = CMD_HARDWARE_ERR;
4250 if (c->cmd_type == CMD_RWREQ) { 4262 if (c->cmd_type == CMD_RWREQ) {
4251 complete_command(h, c, 0); 4263 complete_command(h, c, 0);
4252 } else if (c->cmd_type == CMD_IOCTL_PEND) 4264 } else if (c->cmd_type == CMD_IOCTL_PEND)