[SCSI] iscsi: extended cdb support

Support for extended CDBs in iscsi.
All we need is to check if command spills over 16 bytes then allocate
an iscsi-extended-header for the leftovers.

Signed-off-by: Boaz Harrosh <[email protected]>
Reviewed-by: Pete Wyckoff <[email protected]>
Signed-off-by: Mike Christie <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
Boaz Harrosh 2008-04-18 10:11:51 -05:00 • committed by James Bottomley
commit 38d1c069db
2 changed files with 54 additions and 7 deletions

View file

@ -112,6 +112,7 @@ struct iscsi_ahs_hdr {
#define ISCSI_AHSTYPE_CDB 1
#define ISCSI_AHSTYPE_RLENGTH 2
#define ISCSI_CDB_SIZE 16
/* iSCSI PDU Header */
struct iscsi_cmd {
@ -125,7 +126,7 @@ struct iscsi_cmd {
__be32 data_length;
__be32 cmdsn;
__be32 exp_statsn;
uint8_t cdb[16]; /* SCSI Command Block */
uint8_t cdb[ISCSI_CDB_SIZE]; /* SCSI Command Block */
/* Additional Data (Command Dependent) */
};
@ -154,7 +155,8 @@ struct iscsi_ecdb_ahdr {
__be16 ahslength; /* CDB length - 15, including reserved byte */
uint8_t ahstype;
uint8_t reserved;
uint8_t ecdb[260 - 16]; /* 4-byte aligned extended CDB spillover */
/* 4-byte aligned extended CDB spillover */
uint8_t ecdb[260 - ISCSI_CDB_SIZE];
};
/* SCSI Response Header */