scsi: hpsa: reduce warning messages on device removal
authorDon Brace <don.brace@microsemi.com>
Fri, 20 Oct 2017 21:51:57 +0000 (16:51 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 25 Oct 2017 08:55:20 +0000 (04:55 -0400)
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com>
Reviewed-by: Scott Teel <scott.teel@microsemi.com>
Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hpsa.c

index 27a1aca085b37e9ab7bf54613ba779b3b19fc840..228d74465fd0f2c8c887bdf756716d8bb2b9730a 100644 (file)
@@ -1865,11 +1865,13 @@ static void hpsa_wait_for_outstanding_commands_for_dev(struct ctlr_info *h,
                        break;
                if (++waits > 20)
                        break;
+               msleep(1000);
+       }
+
+       if (waits > 20)
                dev_warn(&h->pdev->dev,
                        "%s: removing device with %d outstanding commands!\n",
                        __func__, cmds);
-               msleep(1000);
-       }
 }
 
 static void hpsa_remove_device(struct ctlr_info *h,