need to check if the device is already disabled first

Reviewed-by: Scott Benesh <[email protected]>
Reviewed-by: Scott Teel <[email protected]>
Signed-off-by: Don Brace <[email protected]>
---
 drivers/scsi/hpsa.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index d007ec1..798fb20 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -8456,7 +8456,8 @@ static void controller_lockup_detected(struct ctlr_info 
*h)
        spin_unlock_irqrestore(&h->lock, flags);
        dev_warn(&h->pdev->dev, "Controller lockup detected: 0x%08x after %d\n",
                        lockup_detected, h->heartbeat_sample_interval / HZ);
-       pci_disable_device(h->pdev);
+       if (pci_is_enabled(h->pdev))
+               pci_disable_device(h->pdev);
        fail_all_outstanding_cmds(h);
 }
 

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to