Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-25 Thread James Bottomley
On Mon, 2014-08-25 at 17:19 -0400, Alan Stern wrote: > On Mon, 25 Aug 2014, Alan Stern wrote: > > > On Mon, 25 Aug 2014, James Bottomley wrote: > > > > > On Mon, 2014-08-25 at 10:44 -0400, Alan Stern wrote: > > > > > > > James, can you explain how the INQUIRY command in scsi_probe_lun() > > >

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-25 Thread Alan Stern
On Mon, 25 Aug 2014, Alan Stern wrote: > On Mon, 25 Aug 2014, James Bottomley wrote: > > > On Mon, 2014-08-25 at 10:44 -0400, Alan Stern wrote: > > > > > James, can you explain how the INQUIRY command in scsi_probe_lun() > > > managed to work back in the days when multi-lun SCSI-2 devices were

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-25 Thread Alan Stern
On Mon, 25 Aug 2014, James Bottomley wrote: > On Mon, 2014-08-25 at 10:44 -0400, Alan Stern wrote: > > > James, can you explain how the INQUIRY command in scsi_probe_lun() > > managed to work back in the days when multi-lun SCSI-2 devices were > > common? sdev->scsi_level doesn't get set when

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-25 Thread James Bottomley
On Mon, 2014-08-25 at 10:44 -0400, Alan Stern wrote: > James, can you explain how the INQUIRY command in scsi_probe_lun() > managed to work back in the days when multi-lun SCSI-2 devices were > common? sdev->scsi_level doesn't get set when sdev is allocated, so it > initially contains 0, so the

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-25 Thread Alan Stern
On Sun, 24 Aug 2014, Christoph Hellwig wrote: > On Fri, Aug 22, 2014 at 01:29:32PM -0400, Alan Stern wrote: > > > Other than this, I'm fine with the code ... you can add the acked by > > > from me when we resolve the above question. > > > > Okay. It's true that this issue is only tangentially re

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-24 Thread Christoph Hellwig
On Fri, Aug 22, 2014 at 01:29:32PM -0400, Alan Stern wrote: > > Other than this, I'm fine with the code ... you can add the acked by > > from me when we resolve the above question. > > Okay. It's true that this issue is only tangentially related to the > main point of the patch. It could be rem

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-22 Thread Alan Stern
On Fri, 22 Aug 2014, James Bottomley wrote: > On Fri, 2014-08-22 at 10:53 -0400, Alan Stern wrote: > > Sending the initial INQUIRY command to LUNs larger than 0 involves a > > chicken-and-egg problem -- we don't know whether to fill in the LUN > > bits in the command until we know the SCSI level,

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-22 Thread James Bottomley
On Fri, 2014-08-22 at 10:53 -0400, Alan Stern wrote: > On Thu, 21 Aug 2014, Christoph Hellwig wrote: > > > On Thu, Aug 21, 2014 at 05:43:41PM -0400, Martin K. Petersen wrote: > > > Alan> Okay, here's a patch that implements the suggestion, except that I > > > Alan> put the flag in the Scsi_Host s

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-22 Thread Alan Stern
On Fri, 22 Aug 2014, Christoph Hellwig wrote: > On Fri, Aug 22, 2014 at 10:53:42AM -0400, Alan Stern wrote: > > Good idea. An enhanced patch is below. If I can get a Tested-By: from > > Tiziano and one or two Acked-By: responses, I'll submit this for the > > current and stable kernels. > > > >

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-22 Thread Martin K. Petersen
> "Alan" == Alan Stern writes: Alan> Sending the initial INQUIRY command to LUNs larger than 0 involves Alan> a chicken-and-egg problem -- we don't know whether to fill in the Alan> LUN bits in the command until we know the SCSI level, and we don't Alan> know the SCSI level until the INQUIRY

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-22 Thread Christoph Hellwig
On Fri, Aug 22, 2014 at 10:53:42AM -0400, Alan Stern wrote: > Good idea. An enhanced patch is below. If I can get a Tested-By: from > Tiziano and one or two Acked-By: responses, I'll submit this for the > current and stable kernels. > > Sending the initial INQUIRY command to LUNs larger than 0 i

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-22 Thread Alan Stern
On Thu, 21 Aug 2014, Christoph Hellwig wrote: > On Thu, Aug 21, 2014 at 05:43:41PM -0400, Martin K. Petersen wrote: > > Alan> Okay, here's a patch that implements the suggestion, except that I > > Alan> put the flag in the Scsi_Host structure instead of the template. > > Alan> This was to minimize

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-21 Thread Christoph Hellwig
On Thu, Aug 21, 2014 at 05:43:41PM -0400, Martin K. Petersen wrote: > Alan> Okay, here's a patch that implements the suggestion, except that I > Alan> put the flag in the Scsi_Host structure instead of the template. > Alan> This was to minimize the impact of the change. Among the various > Alan> S

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-21 Thread Martin K. Petersen
> "Alan" == Alan Stern writes: Alan> Okay, here's a patch that implements the suggestion, except that I Alan> put the flag in the Scsi_Host structure instead of the template. Alan> This was to minimize the impact of the change. Among the various Alan> SCSI-over-USB transports, only the Bulk-

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-21 Thread Alan Stern
On Thu, 21 Aug 2014, Christoph Hellwig wrote: > On Thu, Aug 21, 2014 at 10:41:02AM -0400, Douglas Gilbert wrote: > > Perhaps we could add another bit flag in struct > > scsi_host_template such as: > > unsigned int transport_says_dont_scsi2_lun_cmd:1; > > > > then drivers/usb/storage/scsiglue.

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-21 Thread Douglas Gilbert
On 14-08-20 03:15 PM, Alan Stern wrote: On Tue, 19 Aug 2014, Christoph Hellwig wrote: On Thu, Aug 07, 2014 at 11:58:37AM -0400, Alan Stern wrote: On Wed, Aug 06, 2014 at 04:02:22PM -0400, Alan Stern wrote: I doubt either of them forces users to hack up flags for these cases. Why was this ch

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-21 Thread Christoph Hellwig
On Thu, Aug 21, 2014 at 10:41:02AM -0400, Douglas Gilbert wrote: > Perhaps we could add another bit flag in struct > scsi_host_template such as: > unsigned int transport_says_dont_scsi2_lun_cmd:1; > > then drivers/usb/storage/scsiglue.c could set that > bit in its usb_stor_host_template and >

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-20 Thread Alan Stern
On Tue, 19 Aug 2014, Christoph Hellwig wrote: > On Thu, Aug 07, 2014 at 11:58:37AM -0400, Alan Stern wrote: > > > On Wed, Aug 06, 2014 at 04:02:22PM -0400, Alan Stern wrote: > > > > > I doubt either of them forces users to hack up flags for these cases. > > > > > > > > Why was this change needed

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-19 Thread Christoph Hellwig
On Thu, Aug 07, 2014 at 11:58:37AM -0400, Alan Stern wrote: > > On Wed, Aug 06, 2014 at 04:02:22PM -0400, Alan Stern wrote: > > > > I doubt either of them forces users to hack up flags for these cases. > > > > > > Why was this change needed in the first place? There's no explanation > > > in the

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-07 Thread Alan Stern
On Wed, 6 Aug 2014, Christoph Hellwig wrote: > On Wed, Aug 06, 2014 at 04:02:22PM -0400, Alan Stern wrote: > > > I doubt either of them forces users to hack up flags for these cases. > > > > Why was this change needed in the first place? There's no explanation > > in the patch itself. > > Whic

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-06 Thread Christoph Hellwig
On Wed, Aug 06, 2014 at 04:02:22PM -0400, Alan Stern wrote: > > I doubt either of them forces users to hack up flags for these cases. > > Why was this change needed in the first place? There's no explanation > in the patch itself. Which chance? The one to not support SG_FLAG_LUN_INHIBIT? > >

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-06 Thread Alan Stern
Please don't remove names from the CC: list; use Reply-To-All. I had to go back and add all the names back in. On Wed, 6 Aug 2014, Tiziano Bacocco wrote: > Test with alcor based USB flash drives, linux 3.16 will remove the 3 msb of > the CDB byte when using SG raw Sure, but isn't that what you

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-06 Thread Alan Stern
On Wed, 6 Aug 2014, Christoph Hellwig wrote: > On Wed, Aug 06, 2014 at 03:29:47PM +0200, Douglas Gilbert wrote: > > If not and since I'm told black lists and the like won't > > work, my advice for the record is to use FreeBSD or Windows > > for tools that need this capability. > > I doubt either

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-06 Thread Christoph Hellwig
On Wed, Aug 06, 2014 at 03:29:47PM +0200, Douglas Gilbert wrote: > If not and since I'm told black lists and the like won't > work, my advice for the record is to use FreeBSD or Windows > for tools that need this capability. I doubt either of them forces users to hack up flags for these cases. At

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-06 Thread Douglas Gilbert
On 14-07-29 05:57 PM, bugzilla-dae...@bugzilla.kernel.org wrote: https://bugzilla.kernel.org/show_bug.cgi?id=80711 Alan changed: What|Removed |Added CC|