/* Tune device queuing depth, according to various limits.  */
static void sym_tune_dev_queuing(struct sym_tcb *tp, int lun, u_short reqtags)
/* Tune device queuing depth, according to various limits.  */
static void sym_tune_dev_queuing(struct sym_tcb *tp, int lun, u_short reqtags)
{
	struct sym_lcb *lp = sym_lp(tp, lun);
	u_short	oldtags;
	if (!lp)
		return;
	oldtags = lp->s.reqtags;
	if (reqtags > lp->s.scdev_depth)
		reqtags = lp->s.scdev_depth;
	lp->s.reqtags     = reqtags;
	if (reqtags != oldtags) {
		dev_info(&tp->starget->dev,
		         "tagged command queuing %s, command queue depth %d.\n",
		          lp->s.reqtags ? "enabled" : "disabled", reqtags);
	}
}