Upon event that queue is full there seems the relevant time mark should be updated. Tedious check for sane depth of queue is also added before issuing the callback of LLDD. Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx> --- --- a/drivers/scsi/scsi_error.c 2010-09-13 07:07:38.000000000 +0800 +++ b/drivers/scsi/scsi_error.c 2010-11-01 20:48:26.000000000 +0800 @@ -405,6 +405,7 @@ static void scsi_handle_queue_full(struc if (!sht->change_queue_depth) return; + sdev->last_queue_full_time = jiffies; shost_for_each_device(tmp_sdev, sdev->host) { if (tmp_sdev->channel != sdev->channel || @@ -415,8 +416,10 @@ static void scsi_handle_queue_full(struc * the device when we got the queue full so we start * from the highest possible value and work our way down. */ - sht->change_queue_depth(tmp_sdev, tmp_sdev->queue_depth - 1, - SCSI_QDEPTH_QFULL); + if (tmp_sdev->queue_depth > 1) + sht->change_queue_depth(tmp_sdev, + tmp_sdev->queue_depth - 1, + SCSI_QDEPTH_QFULL); } } -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html