cciss: add small delay when using PCI Power Management to reset for kump
authorMike Miller <mike.miller@hp.com>
Thu, 20 Oct 2011 20:19:17 +0000 (22:19 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 20 Oct 2011 20:21:52 +0000 (22:21 +0200)
The P600 requires a small delay when changing states. Otherwise we may think
the board did not reset and we bail. This for kdump only and is particular
to the P600.

Cc: stable@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/cciss.c

index 6da7ede..486f94e 100644 (file)
@@ -4557,6 +4557,13 @@ static int cciss_controller_hard_reset(struct pci_dev *pdev,
                pmcsr &= ~PCI_PM_CTRL_STATE_MASK;
                pmcsr |= PCI_D0;
                pci_write_config_word(pdev, pos + PCI_PM_CTRL, pmcsr);
+
+               /*
+                * The P600 requires a small delay when changing states.
+                * Otherwise we may think the board did not reset and we bail.
+                * This for kdump only and is particular to the P600.
+                */
+               msleep(500);
        }
        return 0;
 }