aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hpsa.c
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2013-09-23 14:33:30 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-12-16 13:57:52 -0500
commit702890e3b910cd14c3d0ee3b4842d7e946e66b8d (patch)
tree8cb550f64d798007eb68c59c3e8af78b1283b25b /drivers/scsi/hpsa.c
parent6627b38fd902cd31c6ad52f9be12a17a38f0faef (diff)
[SCSI] hpsa: do not attempt to flush the cache on locked up controllers
There's no point in trying since it can't work, and if you do try, it will just hang the system on shutdown. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r--drivers/scsi/hpsa.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 20a5e6ecf945..c3db9bb1c235 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -4942,6 +4942,15 @@ static void hpsa_flush_cache(struct ctlr_info *h)
4942{ 4942{
4943 char *flush_buf; 4943 char *flush_buf;
4944 struct CommandList *c; 4944 struct CommandList *c;
4945 unsigned long flags;
4946
4947 /* Don't bother trying to flush the cache if locked up */
4948 spin_lock_irqsave(&h->lock, flags);
4949 if (unlikely(h->lockup_detected)) {
4950 spin_unlock_irqrestore(&h->lock, flags);
4951 return;
4952 }
4953 spin_unlock_irqrestore(&h->lock, flags);
4945 4954
4946 flush_buf = kzalloc(4, GFP_KERNEL); 4955 flush_buf = kzalloc(4, GFP_KERNEL);
4947 if (!flush_buf) 4956 if (!flush_buf)