From owner-svn-src-head@freebsd.org Fri Aug 19 10:53:57 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D86FCBBF1B5; Fri, 19 Aug 2016 10:53:57 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pf0-x231.google.com (mail-pf0-x231.google.com [IPv6:2607:f8b0:400e:c00::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A5AE51396; Fri, 19 Aug 2016 10:53:57 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by mail-pf0-x231.google.com with SMTP id p64so8584373pfb.1; Fri, 19 Aug 2016 03:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-disposition:in-reply-to:user-agent; bh=DUsprsfJ5orhssKgeIBNIS2lU+o4fO28+dew68RxHd0=; b=hkIlqssN8HDDCi7Pien8rfTJNIcYZgG+Fk+ZQGwxtTY+0NonckkAHxFM2jmp3ehNii llid1p01u9ZcF+O1Jvif4m+YEHNK5RoHIF/87rlwtUeUeXlE+ZXyI7K3oWRgGpjNZeOw BculfPDLWlugNssPrCvl8ASqAMFy7Q976sruJxum7PRfvSQZmapwQjoNZcqSbULlo89m JaCW5mSJLo8BiQibBK5wayfVddlsraGyImKxl/iIUWlUcmt33T0Uj3AgyciD2nu5HPeb L79S3pLEi8wH2ZMbQP1N043vM5O/XDrTp8Zz3G/G9PptpMgsZmtpXoeEtcZ1s1MFeqgu oNSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:cc:subject:message-id:reply-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=DUsprsfJ5orhssKgeIBNIS2lU+o4fO28+dew68RxHd0=; b=FiXD1V526YFo7ghfULyhQBdZswt8lrZC5iQ7mhpqG88EeRn57zeodenyWtoxXdGQ6U JAMyINMqQ0QAiQfy34CDYexFJOY0gN9yJ7J8gHtx/etuc5W0hr6Pqpogj05Pl8g3FmFn 8UFIlJ1+WbSRnC85rDigfi0TZfVtS/RTIXMm5OTJsZNO9FQu9gBG+k3SH3xQkJQ6t4AL BWJVGMntEwiprvNkcpaUkz7Qq45HWNiIOC6wuvWu77oFOx1BULcr4eeOGSKBhLdYMFOA kF8LUGG/ADEKTu0NvEfxahbvMEJ7VSjPnSU+jv9vOb3GU5Gq2iP+US5bkc7Z/BLng2lo nDSA== X-Gm-Message-State: AEkoousMYTmmj+PUGWktrlotMOQJbgmVMbRMyB0RcdG7K832UJZnAl8W7YKAogVbgBs8bg== X-Received: by 10.98.131.8 with SMTP id h8mr13181633pfe.124.1471604037307; Fri, 19 Aug 2016 03:53:57 -0700 (PDT) Received: from localhost ([106.247.248.2]) by smtp.gmail.com with ESMTPSA id g21sm5554805pfj.88.2016.08.19.03.53.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Aug 2016 03:53:56 -0700 (PDT) From: YongHyeon PYUN X-Google-Original-From: "YongHyeon PYUN" Received: by localhost (sSMTP sendmail emulation); Fri, 19 Aug 2016 19:53:49 +0900 Date: Fri, 19 Aug 2016 19:53:49 +0900 To: Hans Petter Selasky Cc: Pyun YongHyeon , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r304439 - head/sys/dev/usb/net Message-ID: <20160819105349.GJ1186@michelle.fasterthan.co.kr> Reply-To: pyunyh@gmail.com References: <201608190050.u7J0oWkW043171@repo.freebsd.org> <464a63e6-e96c-a2d5-099d-ae9059fa0877@selasky.org> <20160819085511.GF1186@michelle.fasterthan.co.kr> <2e8143d4-eb32-693d-e5a4-49c380c100df@selasky.org> <20160819092223.GG1186@michelle.fasterthan.co.kr> <63a25b6b-4503-b136-7765-7744108db1a1@selasky.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <63a25b6b-4503-b136-7765-7744108db1a1@selasky.org> User-Agent: Mutt/1.4.2.3i X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 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: Fri, 19 Aug 2016 10:53:57 -0000 On Fri, Aug 19, 2016 at 12:39:58PM +0200, Hans Petter Selasky wrote: > On 08/19/16 11:22, YongHyeon PYUN wrote: > >On Fri, Aug 19, 2016 at 11:11:56AM +0200, Hans Petter Selasky wrote: > >>On 08/19/16 10:55, YongHyeon PYUN wrote: > >>>I think the order is right but it was not tested on big-endian > >>>systems. > >> > >>Hi, > >> > >>I'm pretty sure the ifdef is wrong, because you write the fields one at > >>a time, using htole32(): > >> > >> txhdr.mss = 0; > >> txhdr.len = > >> htole32(AXGE_TXBYTES(m->m_pkthdr.len)); > >> > >>Big endian machines don't re-order variables like this. > >> > >>You should remove the #else part. > > > >Wouldn't USB stack pass txhdr structure without any > >modification? And controller want to see len (low 32bits address) > >first and then mss (high 32bits address). On big endian systems I > >guess this should be reversed in host memory layout. This is so > >confusing so I could be wrong. > > The USB stack passes TXHDR as-is and the host controller is byte > oriented, not 64-bit word oriented. That's why the layout is the same as > long as you assign per 32-bit field. > Ok, fixed in r304458. Thanks for pointing it out!