diff options
author | Boaz Harrosh <bharrosh@panasas.com> | 2009-04-19 16:17:54 (GMT) |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-04-27 16:05:49 (GMT) |
commit | e9da4d7f731dafc2b93ce7b31aa09c4d935ef978 (patch) | |
tree | 5394e6dfe88585cab608586f3cd2deb382c27f32 /drivers/scsi | |
parent | f8d3a644bec74fd55dbfb11f95af7bf98fa963dc (diff) | |
download | linux-fsl-qoriq-e9da4d7f731dafc2b93ce7b31aa09c4d935ef978.tar.xz |
[SCSI] libosd: OSD2r05: on-the-wire changes for latest OSD2 revision 5.
OSC's OSD2 target: [git clone git://git.open-osd.org/osc-osd/ master]
(Initiator code prior to this patch must use: "git checkout CDB_VER_OSD2r01"
in the target tree above)
This is a summery of the wire changes:
* OSDv2_ADDITIONAL_CDB_LENGTH == 192 => 228 (Total CDB is now 236 bytes)
* Attributes List Element Header grew, so attribute values are 8 bytes
aligned.
* Cryptographic keys and signatures are 20 => 32
* Few new definitions.
(Still missing new standard definitions attribute values, these do not change
wire format and will be added later when needed)
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/osd/osd_initiator.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c index f61ab84..1ce6b24 100644 --- a/drivers/scsi/osd/osd_initiator.c +++ b/drivers/scsi/osd/osd_initiator.c @@ -263,7 +263,12 @@ static int _osd_req_alist_elem_decode(struct osd_request *or, oa->attr_page = be32_to_cpu(attr->attr_page); oa->attr_id = be32_to_cpu(attr->attr_id); - oa->val_ptr = attr->attr_val; + /* OSD2: For convenience, on empty attributes, we return 8 bytes + * of zeros here. This keeps the same behaviour with OSD2r04, + * and is nice with null terminating ASCII fields. + * oa->val_ptr == NULL marks the end-of-list, or error. + */ + oa->val_ptr = likely(oa->len) ? attr->attr_val : attr->reserved; } return inc; } |