From: Lennert Buytenhek <buytenh@wantstofly.org>
To: Dale Farnsworth <dale@farnsworth.org>
Cc: Nicolas Pitre <nico@marvell.com>,
Tzachi Perelstein <tzachi@marvell.com>,
Manas Saksena <msaksena@marvell.com>,
netdev@vger.kernel.org
Subject: [PATCH 3/8] [MV643XX_ETH] Disable RX/TX byte swapping on little-endian systems
Date: Fri, 19 Oct 2007 04:10:28 +0200 [thread overview]
Message-ID: <20071019021028.GE16037@xi.wantstofly.org> (raw)
On little-endian systems, configure the SDMA unit with
MV643XX_ETH_BLM_RX_NO_SWAP and MV643XX_ETH_BLM_TX_NO_SWAP.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Tzachi Perelstein <tzachi@marvell.com>
Index: linux-2.6/drivers/net/mv643xx_eth.h
===================================================================
--- linux-2.6.orig/drivers/net/mv643xx_eth.h
+++ linux-2.6/drivers/net/mv643xx_eth.h
@@ -266,10 +266,21 @@
#define MV643XX_ETH_IPG_INT_RX(value) ((value & 0x3fff) << 8)
+#if defined(__BIG_ENDIAN)
#define MV643XX_ETH_PORT_SDMA_CONFIG_DEFAULT_VALUE \
MV643XX_ETH_RX_BURST_SIZE_4_64BIT | \
MV643XX_ETH_IPG_INT_RX(0) | \
MV643XX_ETH_TX_BURST_SIZE_4_64BIT
+#elif defined(__LITTLE_ENDIAN)
+#define MV643XX_ETH_PORT_SDMA_CONFIG_DEFAULT_VALUE \
+ MV643XX_ETH_RX_BURST_SIZE_4_64BIT | \
+ MV643XX_ETH_BLM_RX_NO_SWAP | \
+ MV643XX_ETH_BLM_TX_NO_SWAP | \
+ MV643XX_ETH_IPG_INT_RX(0) | \
+ MV643XX_ETH_TX_BURST_SIZE_4_64BIT
+#else
+#error One of __BIG_ENDIAN or __LITTLE_ENDIAN must be defined
+#endif
/* These macros describe Ethernet Port serial control reg (PSCR) bits */
#define MV643XX_ETH_SERIAL_PORT_DISABLE 0
reply other threads:[~2007-10-19 2:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071019021028.GE16037@xi.wantstofly.org \
--to=buytenh@wantstofly.org \
--cc=dale@farnsworth.org \
--cc=msaksena@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=nico@marvell.com \
--cc=tzachi@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox