aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi.c')
-rw-r--r--drivers/scsi/scsi.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index dd098cad337b..a60da5555577 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -940,10 +940,16 @@ EXPORT_SYMBOL(scsi_adjust_queue_depth);
940 */ 940 */
941int scsi_track_queue_full(struct scsi_device *sdev, int depth) 941int scsi_track_queue_full(struct scsi_device *sdev, int depth)
942{ 942{
943 if ((jiffies >> 4) == sdev->last_queue_full_time) 943
944 /*
945 * Don't let QUEUE_FULLs on the same
946 * jiffies count, they could all be from
947 * same event.
948 */
949 if ((jiffies >> 4) == (sdev->last_queue_full_time >> 4))
944 return 0; 950 return 0;
945 951
946 sdev->last_queue_full_time = (jiffies >> 4); 952 sdev->last_queue_full_time = jiffies;
947 if (sdev->last_queue_full_depth != depth) { 953 if (sdev->last_queue_full_depth != depth) {
948 sdev->last_queue_full_count = 1; 954 sdev->last_queue_full_count = 1;
949 sdev->last_queue_full_depth = depth; 955 sdev->last_queue_full_depth = depth;