diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/hpsa.c | 9 |
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) |