From owner-svn-src-head@FreeBSD.ORG Mon May 6 15:58:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7A1CE2AA; Mon, 6 May 2013 15:58:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6CE08E75; Mon, 6 May 2013 15:58:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r46FwsmZ056328; Mon, 6 May 2013 15:58:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r46Fws6i056327; Mon, 6 May 2013 15:58:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201305061558.r46Fws6i056327@svn.freebsd.org> From: Alexander Motin Date: Mon, 6 May 2013 15:58:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250298 - head/sys/cam/ata X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 May 2013 15:58:54 -0000 Author: mav Date: Mon May 6 15:58:53 2013 New Revision: 250298 URL: http://svnweb.freebsd.org/changeset/base/250298 Log: Fix byte order of ATA WWN when converting it to SCSI LUN ID. Modified: head/sys/cam/ata/ata_xpt.c Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Mon May 6 15:30:34 2013 (r250297) +++ head/sys/cam/ata/ata_xpt.c Mon May 6 15:58:53 2013 (r250298) @@ -834,6 +834,7 @@ noerror: { struct ccb_pathinq cpi; int16_t *ptr; + int i; ident_buf = &softc->ident_data; for (ptr = (int16_t *)ident_buf; @@ -913,8 +914,10 @@ noerror: 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]); + } } }