Re: [PATCH 1/1] uas: leave can_queue as MAX_CMNDS if device reports larger qdepth

2016-05-23 Thread Tom Yan
I don't quite get what you mean. Are you saying that it is impossible that UAS devices would report inappropriately high qdepth, because of this? https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/storage/uas.c?h=v4.6#n908 In that case should I send another patch

Re: [PATCH 1/1] uas: leave can_queue as MAX_CMNDS if device reports larger qdepth

2016-05-23 Thread James Bottomley
On Tue, 2016-05-24 at 01:23 +0800, Tom Yan wrote: > Nothing wrong. It's just .can_queue = MAX_CMNDS in the host template > is no longer neceesary, since with his patch, uas will set can_queue > again later (to devinfo->qdepth - 2). > > Originally I thought .can_queue = MAX_CMNDS can hence be

Re: [PATCH 1/1] uas: leave can_queue as MAX_CMNDS if device reports larger qdepth

2016-05-23 Thread Tom Yan
Nothing wrong. It's just .can_queue = MAX_CMNDS in the host template is no longer neceesary, since with his patch, uas will set can_queue again later (to devinfo->qdepth - 2). Originally I thought .can_queue = MAX_CMNDS can hence be removed; but after a second thought, I think it might probably

Re: [PATCH 1/1] uas: leave can_queue as MAX_CMNDS if device reports larger qdepth

2016-05-23 Thread Greg KH
On Tue, May 24, 2016 at 12:02:43AM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > 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

[PATCH 1/1] uas: leave can_queue as MAX_CMNDS if device reports larger qdepth

2016-05-23 Thread tom . ty89
From: Tom Yan 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