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

Christoph Hellwig
2014-08-21T14:43:04Z

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
> drivers/scsi/scsi.c could take heed (and not mask
> cmd->cmnd[1] with the LUN).

Fully agreed.

(except that I'd shorten the flag name to .no_scsi2lun :))