cciss: limit commands allocated on reset_devices
authorStephen M. Cameron <scameron@beardog.cce.hp.com>
Fri, 22 Oct 2010 19:21:17 +0000 (14:21 -0500)
committerJens Axboe <jaxboe@fusionio.com>
Sat, 23 Oct 2010 16:45:08 +0000 (18:45 +0200)
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: Jens Axboe <jaxboe@fusionio.com>
drivers/block/cciss.c

index 2e547bddc5a721f6cad14b5c3b7f1457635f96ca..9e761b994b4c0e84f6e22e687052fe2f67f9fdca 100644 (file)
@@ -4079,6 +4079,11 @@ static int __devinit cciss_find_cfgtables(ctlr_info_t *h)
 static void __devinit cciss_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. "
This page took 0.03681 seconds and 5 git commands to generate.