From owner-svn-src-all@FreeBSD.ORG Mon May 6 16:51:20 2013 Return-Path: Delivered-To: svn-src-all@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 8A964538; Mon, 6 May 2013 16:51:20 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-ee0-f49.google.com (mail-ee0-f49.google.com [74.125.83.49]) by mx1.freebsd.org (Postfix) with ESMTP id 9E244FF; Mon, 6 May 2013 16:51:19 +0000 (UTC) Received: by mail-ee0-f49.google.com with SMTP id c41so1837013eek.8 for ; Mon, 06 May 2013 09:51:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=ojjqX4Od+Nd+DxUVtfn0TEB3SJjVq58NXaMyd48shs8=; b=c3TVx770ivoF5nbFZjEX6XR8t5cF71ilNM4IIpDIDb6Tz2kdnsEk239i5xpR+Tu2SF SZQf+DPWaPU5w5+6dzcziQAsEJz/3qIW/MKBYp6WOsUW7hqJfZzCtwd9DsTiDYCyGi0R CQRxs4z0wVLynTH0TLzjggd9WO7Hdc1EtZ8pssUPqcWuCx1Q0m3w+lj6e3aa+iUaC95D TJAxchgQYclC4I/984xVZo1tWr0E5dw4FblrHuBoREdlf5f/ZA3SKBLPe0/t2SvF3EYH 5ZtOEhqh6U2vVHa8mF8db4Oj1YTrmyxvzK96jgjS130VTc3rRwX81V2GC4aEys9+XyHG pDMw== X-Received: by 10.15.23.69 with SMTP id g45mr62186111eeu.25.1367859078335; Mon, 06 May 2013 09:51:18 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPSA id bn53sm34449572eeb.7.2013.05.06.09.51.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 06 May 2013 09:51:17 -0700 (PDT) Sender: Alexander Motin Message-ID: <5187DF81.8030706@FreeBSD.org> Date: Mon, 06 May 2013 19:51:13 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130413 Thunderbird/17.0.5 MIME-Version: 1.0 To: Ian Lepore Subject: Re: svn commit: r250298 - head/sys/cam/ata References: <201305061558.r46Fws6i056327@svn.freebsd.org> <1367856966.1180.168.camel@revolution.hippie.lan> In-Reply-To: <1367856966.1180.168.camel@revolution.hippie.lan> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 May 2013 16:51:20 -0000 On 06.05.2013 19:16, Ian Lepore wrote: > On Mon, 2013-05-06 at 15:58 +0000, Alexander Motin wrote: >> 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]); >> + } >> } >> } >> > > Shouldn't this use ata_bswap()? If not that, then shouldn't it be one > of the conditional swap routines (be16dec() or similar)? You are right. Thank you. Remade. -- Alexander Motin