All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: tom.ty89@gmail.com
Cc: kraxel@redhat.com, stern@rowland.harvard.edu,
	linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org,
	stable@vger.kernel.org, hdegoede@redhat.com
Subject: Re: [PATCH 1/1] uas: leave can_queue as MAX_CMNDS if device reports larger qdepth
Date: Mon, 23 May 2016 10:00:25 -0700	[thread overview]
Message-ID: <20160523170025.GA3309@kroah.com> (raw)
In-Reply-To: <574329ae.c726620a.60f3.ffffd14b@mx.google.com>

On Tue, May 24, 2016 at 12:02:43AM +0800, tom.ty89@gmail.com wrote:
> From: Tom Yan <tom.ty89@gmail.com>
> 
> Commit 198de51dbc34 ("USB: uas: Limit qdepth at the scsi-host level") made
> qdepth limit set in host template (`.can_queue = MAX_CMNDS`) useless.
> 
> Instead of removing the template limit, now we only change limit according
> to the qdepth reported by the device if it is smaller than MAX_CMNDS.
> 
> Signed-off-by: Tom Yan <tom.ty89@gmail.com>
> 
> diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
> index 4d49fce..d7790e6 100644
> --- a/drivers/usb/storage/uas.c
> +++ b/drivers/usb/storage/uas.c
> @@ -972,7 +972,8 @@ static int uas_probe(struct usb_interface *intf, const struct usb_device_id *id)
>  	 * 1 tag is reserved for untagged commands +
>  	 * 1 tag to avoid off by one errors in some bridge firmwares
>  	 */
> -	shost->can_queue = devinfo->qdepth - 2;
> +	if (devinfo->qdepth - 2 < MAX_CMNDS)
> +		shost->can_queue = devinfo->qdepth - 2;

What's wrong with Hans's patch for this issue instead?


  reply	other threads:[~2016-05-23 17:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-23 16:02 [PATCH 1/1] uas: leave can_queue as MAX_CMNDS if device reports larger qdepth tom.ty89-Re5JQEeQqe8AvxtiuMwx3w
2016-05-23 16:02 ` tom.ty89
2016-05-23 17:00 ` Greg KH [this message]
     [not found]   ` <20160523170025.GA3309-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2016-05-23 17:23     ` Tom Yan
2016-05-23 17:23       ` Tom Yan
2016-05-23 17:27       ` James Bottomley
     [not found]         ` <1464024457.2331.10.camel-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
2016-05-23 18:33           ` Tom Yan
2016-05-23 18:33             ` Tom Yan
2016-05-23 19:07             ` James Bottomley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160523170025.GA3309@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=tom.ty89@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.