From owner-svn-src-all@freebsd.org Fri Aug 19 09:22:31 2016 Return-Path: Delivered-To: svn-src-all@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 645DCBBF638; Fri, 19 Aug 2016 09:22:31 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pf0-x22d.google.com (mail-pf0-x22d.google.com [IPv6:2607:f8b0:400e:c00::22d]) (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 327D5131F; Fri, 19 Aug 2016 09:22:31 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by mail-pf0-x22d.google.com with SMTP id p64so7855288pfb.1; Fri, 19 Aug 2016 02:22:31 -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=0tKUFsMP5VZ1nsYqsK9YkXZpIeXOKGbKlv7vxxzCCzo=; b=E1x9GsDmXf0QPqquGOnOwbXMJKTlbuhjWQxze7GKdxeFePtsANfdxxdJQnd+IqkRvh eBe9QyorMXNwuvi79x2shrb0Lljf3wPMgvEJMiScUYOWcmU8208Dk+bKH/AdrUeffaoO d3Cc411P9XEPPepTLvEbCluuEMoCcDSN+AdKViTfK9Y1PgEjbhyS/DxPjd7fkszBmMdZ J7tkYdngg0zHH5W1ByU2FoH62tjoPxxwqt4mAWFyM1x1etJJcldj7Jj6CL4cvfi4SNnI GjgafaSJlDBTiUShsxu06C6AkOag0+r0GOEHvcfGwJ1C6/tioA3ecoOFae+XaYrNaQ1i cbNw== 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=0tKUFsMP5VZ1nsYqsK9YkXZpIeXOKGbKlv7vxxzCCzo=; b=KKv6WRHhcUiaAkWUdpqVaR/KmX6A2HbN9fxTmS2FqzU1giTgXYXVulLsxFEzae7Lwj bWFJF9yHe/1nwvdmGO7k8vGTM4P4Gu+0zUKdF8zefJ5EgIfToAnsshxfg6RJfKY9Co5x M5vEPQWbkMh+5bWAZNTd+ym+udFTgugSCXspLOYp75uc8z5r1Ei7GlPWhdKKRc91uJUi ugkZfbvvBmtQ9H6UacqDevTPvuCV55ucMB9c1Ng25hQYUmAU8pX93x8CdQG5sTDOcT9P Nl5uVpZKk7qEpGZ15ivyYOh/6ATf/4Z0YwnTH1lBQm1eyN6PMcsq0s9tEjjc9KsYW3lq hVew== X-Gm-Message-State: AEkoousbK+tLTBptLiuhAGUT1h9i8KYoA19jqqJ8r37JbuNhYUfw/azfzNNuv4n6kYGguQ== X-Received: by 10.98.22.212 with SMTP id 203mr12477907pfw.74.1471598550845; Fri, 19 Aug 2016 02:22:30 -0700 (PDT) Received: from localhost ([106.247.248.2]) by smtp.gmail.com with ESMTPSA id y2sm9756929pan.31.2016.08.19.02.22.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Aug 2016 02:22:30 -0700 (PDT) From: YongHyeon PYUN X-Google-Original-From: "YongHyeon PYUN" Received: by localhost (sSMTP sendmail emulation); Fri, 19 Aug 2016 18:22:23 +0900 Date: Fri, 19 Aug 2016 18:22:23 +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: <20160819092223.GG1186@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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2e8143d4-eb32-693d-e5a4-49c380c100df@selasky.org> User-Agent: Mutt/1.4.2.3i X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 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: Fri, 19 Aug 2016 09:22:31 -0000 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.