summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2013-05-06 16:50:39 +0000
committermav <mav@FreeBSD.org>2013-05-06 16:50:39 +0000
commitbf621b2d344dbf3492e511bf686fb414cebd567f (patch)
treed9378b1acd27861155e195d3e4b40afea7c9723d /sys/cam
parentcc8c6e4d0185c640c9d03ed2804e3020ff84fed0 (diff)
downloadFreeBSD-src-bf621b2d344dbf3492e511bf686fb414cebd567f.zip
FreeBSD-src-bf621b2d344dbf3492e511bf686fb414cebd567f.tar.gz
Rework r250298 in more correct way.
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/ata/ata_xpt.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/cam/ata/ata_xpt.c b/sys/cam/ata/ata_xpt.c
index 11d2650..2d9b05d 100644
--- a/sys/cam/ata/ata_xpt.c
+++ b/sys/cam/ata/ata_xpt.c
@@ -834,7 +834,6 @@ noerror:
{
struct ccb_pathinq cpi;
int16_t *ptr;
- int i;
ident_buf = &softc->ident_data;
for (ptr = (int16_t *)ident_buf;
@@ -914,10 +913,9 @@ noerror:
path->device->device_id_len = 16;
bcopy(&fake_device_id_hdr,
path->device->device_id, 8);
- for (i = 0; i < 4; i++) {
- ptr = (int16_t *)(path->device->device_id + 8);
- ptr[i] = bswap16(ident_buf->wwn[i]);
- }
+ bcopy(ident_buf->wwn,
+ path->device->device_id + 8, 8);
+ ata_bswap(path->device->device_id + 8, 8);
}
}
OpenPOWER on IntegriCloud