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 related to

[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 bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=80711 --- Comment #18 from Alan Stern st...@rowland.harvard.edu --- 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

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 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, 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 sdev is

[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 bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=80711 --- Comment #19 from Alan Stern st...@rowland.harvard.edu --- 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

[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 bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=80711 --- Comment #20 from Alan Stern st...@rowland.harvard.edu --- 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

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() managed to work

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 removed

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 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-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

[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 bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=80711 --- Comment #15 from Martin K. Petersen martin.peter...@oracle.com --- Alan == Alan Stern st...@rowland.harvard.edu writes: Alan Sending the initial INQUIRY command to LUNs larger than 0 involves Alan a chicken-and-egg problem -- we don't know

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 st...@rowland.harvard.edu 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

[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 bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=80711 --- Comment #16 from Alan Stern st...@rowland.harvard.edu --- 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

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. Sending

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 structure

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, and

[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 bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=80711 --- Comment #17 from Alan Stern st...@rowland.harvard.edu --- 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

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-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

[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 bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=80711 --- Comment #11 from d gilbert dgilb...@interlog.com --- 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

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.c could

[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 bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=80711 --- Comment #12 from Alan Stern st...@rowland.harvard.edu --- 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

[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 bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=80711 --- Comment #13 from Martin K. Petersen martin.peter...@oracle.com --- Alan == Alan Stern st...@rowland.harvard.edu writes: Alan Okay, here's a patch that implements the suggestion, except that I Alan put the flag in the Scsi_Host structure

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 st...@rowland.harvard.edu 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,

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

[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 bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=80711 --- Comment #10 from Alan Stern st...@rowland.harvard.edu --- 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

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 in the first

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 patch itself.

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 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? 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-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. Which chance?

[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 bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=80711 --- Comment #8 from Alan Stern st...@rowland.harvard.edu --- 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.

[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 bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=80711 --- Comment #9 from Tiziano Bacocco tiziano.baco...@gmail.com --- (In reply to Alan Stern from comment #8) 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

[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 bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=80711 --- Comment #4 from d gilbert dgilb...@interlog.com --- On 14-07-29 05:57 PM, bugzilla-dae...@bugzilla.kernel.org wrote: https://bugzilla.kernel.org/show_bug.cgi?id=80711 Alan a...@lxorguk.ukuu.org.uk changed: What|Removed

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 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 of them

[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 bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=80711 --- Comment #5 from Alan Stern st...@rowland.harvard.edu --- 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

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

[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 bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=80711 --- Comment #6 from Alan Stern st...@rowland.harvard.edu --- 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

[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 bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=80711 --- Comment #7 from Tiziano Bacocco tiziano.baco...@gmail.com --- Not when issuing vendor specific commands , even if the flash drive has only 1 LUN , there's the need of using these bits with LUN numbers higher than the reported number of LUNs

[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-07-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=80711 Alan a...@lxorguk.ukuu.org.uk changed: What|Removed |Added CC||a...@lxorguk.ukuu.org.uk