Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 702890e3 authored by Stephen M. Cameron's avatar Stephen M. Cameron Committed by James Bottomley
Browse files

[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: default avatarStephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 6627b38f
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -4942,6 +4942,15 @@ static void hpsa_flush_cache(struct ctlr_info *h)
{
	char *flush_buf;
	struct CommandList *c;
	unsigned long flags;

	/* Don't bother trying to flush the cache if locked up */
	spin_lock_irqsave(&h->lock, flags);
	if (unlikely(h->lockup_detected)) {
		spin_unlock_irqrestore(&h->lock, flags);
		return;
	}
	spin_unlock_irqrestore(&h->lock, flags);

	flush_buf = kzalloc(4, GFP_KERNEL);
	if (!flush_buf)