Fix byte order of ATA WWN when converting it to SCSI LUN ID.

This commit is contained in:
Alexander Motin 2013-05-06 15:58:53 +00:00
parent 4c8add8a96
commit 5ab64734f3

View File

@ -834,6 +834,7 @@ device_fail: if ((path->device->flags & CAM_DEV_UNCONFIGURED) == 0)
{
struct ccb_pathinq cpi;
int16_t *ptr;
int i;
ident_buf = &softc->ident_data;
for (ptr = (int16_t *)ident_buf;
@ -913,8 +914,10 @@ device_fail: if ((path->device->flags & CAM_DEV_UNCONFIGURED) == 0)
path->device->device_id_len = 16;
bcopy(&fake_device_id_hdr,
path->device->device_id, 8);
bcopy(ident_buf->wwn,
path->device->device_id + 8, 8);
for (i = 0; i < 4; i++) {
ptr = (int16_t *)(path->device->device_id + 8);
ptr[i] = bswap16(ident_buf->wwn[i]);
}
}
}