aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hpsa.c
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2011-01-06 14:48:13 -0600
committerJames Bottomley <James.Bottomley@suse.de>2011-01-24 11:29:58 -0600
commit72ceeaecb748dff3d35b10d7518bed651b895f3e (patch)
tree20dc839743fe60bcdd19921e539d90b5e1df1472 /drivers/scsi/hpsa.c
parent270d05de2b8d82df4ed19955f6c0c7400f6ffbf5 (diff)
downloadkernel_samsung_smdk4412-72ceeaecb748dff3d35b10d7518bed651b895f3e.zip
kernel_samsung_smdk4412-72ceeaecb748dff3d35b10d7518bed651b895f3e.tar.gz
kernel_samsung_smdk4412-72ceeaecb748dff3d35b10d7518bed651b895f3e.tar.bz2
[SCSI] hpsa: limit commands allocated on reset_devices
This is to conserve memory in a memory-limited kdump scenario Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r--drivers/scsi/hpsa.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 82b94e2..688b243 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -3470,6 +3470,11 @@ static int __devinit hpsa_find_cfgtables(struct ctlr_info *h)
static void __devinit hpsa_get_max_perf_mode_cmds(struct ctlr_info *h)
{
h->max_commands = readl(&(h->cfgtable->MaxPerformantModeCommands));
+
+ /* Limit commands in memory limited kdump scenario. */
+ if (reset_devices && h->max_commands > 32)
+ h->max_commands = 32;
+
if (h->max_commands < 16) {
dev_warn(&h->pdev->dev, "Controller reports "
"max supported commands of %d, an obvious lie. "