Re: [PATCH 1/2] target/core_cdb: accept REQUEST_SENSE with 18bytes

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

 



* Christoph Hellwig | 2012-01-25 14:49:50 [-0500]:

>On Wed, Jan 18, 2012 at 02:04:29PM +0100, Sebastian Andrzej Siewior wrote:
>> WindowsXP+BOT issues a MODE_SENSE request with page 0x1c which is not
>> suppoerted by target. Target rejects that command with
>> TCM_INVALID_CDB_FIELD, so far so good. On BOT I can't send the SENSE
>> response back, instead I can only reply that an error occured. The next
>> thing happens is a REQUEST_SENSE request with 18 bytes length. Since the
>> check here is more than 18 bytes I have to NACK that request as well.
>> This is not really required: We check for some additional room, but we
>> never use it. The additional length is set to 0xa so the total length is
>> 0xa + 8 = 18 which is fine with my 18 bytes.
>
>Do you have a trace how this REQUEST SENSE looks exactly?
>

Each 0x20 bytes are of type struct bulk_cb_wrap

|bot_submit_command()
|00000000: 55 53 42 43 b8 41 40 8a 24 00 00 00 80 00 06 12  USBC.A@.$.......
|00000010: 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 fe  ...$............
|bot_submit_command() is read 1 len: 36
If you look at the end of line you see 06 12. 0x06 is the length of the
cdb, after that the cdb starts. Here it is 0x12 aka INQUIRY. Here the
host expects to read data of exactly 36 bytes.

|bot_submit_command()
|00000000: 55 53 42 43 b8 41 40 8a fc 00 00 00 80 00 0a 23  USBC.A@........#
|00000010: 00 00 00 00 00 00 00 fc 00 00 00 00 00 00 00 fe  ................
|bot_submit_command() is read 1 len: 252 

This is something target does not understand.

|bot_submit_command()
|00000000: 55 53 42 43 b8 41 40 8a 12 00 00 00 80 00 0c 03  USBC.A@.........
|00000010: 00 00 00 12 00 00 00 00 00 00 00 00 00 00 00 fe  ................
|bot_submit_command() is read 1 len: 18

This the the REQUEST SENSE.

and here another one:
|bot_submit_command()
|00000000: 55 53 42 43 b8 41 40 8a c0 00 00 00 80 00 06 1a  USBC.A@.........
|00000010: 00 1c 00 c0 00 00 00 00 00 00 00 00 00 00 00 fe  ................
|bot_submit_command() is read 1 len: 192
|MODE SENSE: unimplemented page/subpage: 0x1c/0x00
|bot_submit_command()
|00000000: 55 53 42 43 b8 41 40 8a 12 00 00 00 80 00 0c 03  USBC.A@.........
|00000010: 00 00 00 12 00 00 00 00 00 00 00 00 00 00 00 fe  ................
|bot_submit_command() is read 1 len: 18

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux