aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-09-01 07:50:28 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-09-24 18:54:42 -0400
commit13e9ab11430c4bdc4b6bb97e3d3821ebdc043712 (patch)
tree37f7eb6aa4ae941cde2c4fdf7f0040c2ea1ab7c2 /drivers/net/sfc
parent951f46a1a2c891479565f2c2c950a951f65fd59f (diff)
sfc: Use CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS where appropriate
For some buffers we use a starting offset of either NET_IP_ALIGN or 0 depending on whether we believe the architecture supports efficient access to unaligned words. There is now a config macro specifying whether this is the case, so check that rather than checking for specific architectures. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc')
-rw-r--r--drivers/net/sfc/net_driver.h2
-rw-r--r--drivers/net/sfc/tx.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index 868ad1e703f1..cdb11fad6050 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -474,7 +474,7 @@ enum nic_state {
474 * This is the equivalent of NET_IP_ALIGN [which controls the alignment 474 * This is the equivalent of NET_IP_ALIGN [which controls the alignment
475 * of the skb->head for hardware DMA]. 475 * of the skb->head for hardware DMA].
476 */ 476 */
477#if defined(__i386__) || defined(__x86_64__) 477#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
478#define EFX_PAGE_IP_ALIGN 0 478#define EFX_PAGE_IP_ALIGN 0
479#else 479#else
480#define EFX_PAGE_IP_ALIGN NET_IP_ALIGN 480#define EFX_PAGE_IP_ALIGN NET_IP_ALIGN
diff --git a/drivers/net/sfc/tx.c b/drivers/net/sfc/tx.c
index cdee7c200d63..da3e9ff339f5 100644
--- a/drivers/net/sfc/tx.c
+++ b/drivers/net/sfc/tx.c
@@ -516,7 +516,7 @@ void efx_remove_tx_queue(struct efx_tx_queue *tx_queue)
516/* Number of bytes inserted at the start of a TSO header buffer, 516/* Number of bytes inserted at the start of a TSO header buffer,
517 * similar to NET_IP_ALIGN. 517 * similar to NET_IP_ALIGN.
518 */ 518 */
519#if defined(__i386__) || defined(__x86_64__) 519#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
520#define TSOH_OFFSET 0 520#define TSOH_OFFSET 0
521#else 521#else
522#define TSOH_OFFSET NET_IP_ALIGN 522#define TSOH_OFFSET NET_IP_ALIGN