diff options
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 f61ab84ad20b..1ce6b24abab2 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, | |||
263 | oa->attr_page = be32_to_cpu(attr->attr_page); | 263 | oa->attr_page = be32_to_cpu(attr->attr_page); |
264 | oa->attr_id = be32_to_cpu(attr->attr_id); | 264 | oa->attr_id = be32_to_cpu(attr->attr_id); |
265 | 265 | ||
266 | oa->val_ptr = attr->attr_val; | 266 | /* OSD2: For convenience, on empty attributes, we return 8 bytes |
267 | * of zeros here. This keeps the same behaviour with OSD2r04, | ||
268 | * and is nice with null terminating ASCII fields. | ||
269 | * oa->val_ptr == NULL marks the end-of-list, or error. | ||
270 | */ | ||
271 | oa->val_ptr = likely(oa->len) ? attr->attr_val : attr->reserved; | ||
267 | } | 272 | } |
268 | return inc; | 273 | return inc; |
269 | } | 274 | } |