diff options
| author | Michael Brown | 2011-02-24 14:22:20 +0100 |
|---|---|---|
| committer | Michael Brown | 2011-02-24 14:25:32 +0100 |
| commit | 711df439dfdc4abf88d335bc11d39adbf2bf67d4 (patch) | |
| tree | cfcf832404bc337ae7f7e97f1490629afec45310 /src/include | |
| parent | [build] Use unique entry symbols for each prefix (diff) | |
| download | ipxe-711df439dfdc4abf88d335bc11d39adbf2bf67d4.tar.gz ipxe-711df439dfdc4abf88d335bc11d39adbf2bf67d4.tar.xz ipxe-711df439dfdc4abf88d335bc11d39adbf2bf67d4.zip | |
[iscsi] Accept NOP-In PDUs sent by the target
Some iSCSI targets (observed with a Synology DS207+ NAS) send
unsolicited NOP-Ins to the initiator. RFC 3720 is remarkably unclear
and possibly self-contradictory on how NOPs are supposed to work, but
it seems as though we can legitimately just ignore any unsolicited
NOP-In PDU.
Reported-by: Marc Lecuyer <marc@maxiscreen.com>
Originally-implemented-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/ipxe/iscsi.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/include/ipxe/iscsi.h b/src/include/ipxe/iscsi.h index f336c7cc0..2202a9d87 100644 --- a/src/include/ipxe/iscsi.h +++ b/src/include/ipxe/iscsi.h @@ -93,6 +93,9 @@ struct iscsi_bhs_common { /** iSCSI tag magic marker */ #define ISCSI_TAG_MAGIC 0x18ae0000 +/** iSCSI reserved tag value */ +#define ISCSI_TAG_RESERVED 0xffffffff + /** * iSCSI basic header segment common request fields * @@ -456,6 +459,36 @@ struct iscsi_bhs_r2t { #define ISCSI_OPCODE_R2T 0x31 /** + * iSCSI NOP-In basic header segment + * + */ +struct iscsi_nop_in { + /** Opcode */ + uint8_t opcode; + /** Reserved */ + uint8_t reserved_a[3]; + /** Segment lengths */ + union iscsi_segment_lengths lengths; + /** Logical Unit Number */ + struct scsi_lun lun; + /** Initiator Task Tag */ + uint32_t itt; + /** Target Transfer Tag */ + uint32_t ttt; + /** Status sequence number */ + uint32_t statsn; + /** Expected command sequence number */ + uint32_t expcmdsn; + /** Maximum command sequence number */ + uint32_t maxcmdsn; + /** Reserved */ + uint8_t reserved_b[12]; +}; + +/** NOP-In opcode */ +#define ISCSI_OPCODE_NOP_IN 0x20 + +/** * An iSCSI basic header segment */ union iscsi_bhs { @@ -468,6 +501,7 @@ union iscsi_bhs { struct iscsi_bhs_data_in data_in; struct iscsi_bhs_data_out data_out; struct iscsi_bhs_r2t r2t; + struct iscsi_nop_in nop_in; unsigned char bytes[ sizeof ( struct iscsi_bhs_common ) ]; }; |
