SG_FLAG_LUN_INHIBIT broken?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Can anyone confirm that this flag actually works when doing SG_IO? (I'm
testing on a 2.6.13-rc6 kernel)

I'm attempting to do an ata-pt command on a cypress board:
http://www.cypress.com/portal/server.pt?space=CommunityPage&control=SetCommu
nity&CommunityID=209&PageID=259&fid=14&rpn=CY7C68320

It involves a 16-byte cdb with cdb[ 1 ] = 0x24 as a signature byte (Page 13
of the datasheet).  So when the scsi stack adds lun info, it kills the
signature byte.

I've tried adding SG_FLAG_LUN_INHIBIT to the SG_IO header, but neither sd or
sg seem to obey it. After looking at the source neither driver seems to make
any reference to SG_FLAG_LUN_INHIBIT.

Eventually all the commands seemed to be funneled to
scsi.c:532:scsi_dispatch_cmd which does this:
	if (cmd->device->scsi_level <= SCSI_2) {
		cmd->cmnd[1] = (cmd->cmnd[1] & 0x1f) |
			       (cmd->device->lun << 5 & 0xe0);
	}
So basically this is an unconditional "add lun info" if the scsi spec is
<=2, which is what usb-storage devices end up being.

Is SG_FLAG_LUN_INHIBIT supposed to be supported still or is it deprecated or
something?

Thanks,
Tim Thelin

-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux