diff options
author | David S. Miller <davem@davemloft.net> | 2009-08-10 00:29:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-10 00:29:47 -0400 |
commit | f222e8b40f2177b1c4cac015b117744c1d3fa3e9 (patch) | |
tree | 7c5fc22c08da900e21b0e7ab2376e8e8e44a63c0 /drivers/block/cciss.c | |
parent | 819ae6a389d4acfab9a7bb874fa1977aa464d14b (diff) | |
parent | f4b9a988685da6386d7f9a72df3098bcc3270526 (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.c | 16 |
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 | ||
227 | static inline void removeQ(CommandList_struct *c) | 228 | static 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) |