From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <17680.31951.464796.856782@cargo.ozlabs.ibm.com> Date: Wed, 20 Sep 2006 09:27:11 +1000 From: Paul Mackerras To: linas@austin.ibm.com (Linas Vepstas) Subject: Re: Fw: [PATCH] Remove powerpc specific parts of 3c509 driver In-Reply-To: <20060919184243.GL29167@austin.ibm.com> References: <20060919145433.8fc7d478.sfr@canb.auug.org.au> <20060919184243.GL29167@austin.ibm.com> Cc: akpm@osdl.org, Stephen Rothwell , netdev@vger.kernel.org, jgarzik@pobox.com, ppc-dev List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Linas Vepstas writes: > The rest of this patch might indeed be correct, but the above comment > bothers me. The "ns" versions of routines are supposed to be > non-byte-swapped versions of the insl/outsl routines (which would > byte-swap on big-endian archs such as powerpc.) If it were true that in/outsw and in/outsl were actually used to transfer arrays of 16-bit data items or 32-bit data items to/from an I/O device, I would agree with you, but they aren't. They are universally used to transfer arrays of bytes, with the optimization of doing so 2 or 4 bytes at a time. That is why in/outsw and in/outsl don't (and shouldn't) do byte swapping. Paul.