diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2009-01-07 21:09:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-08 11:31:14 -0500 |
commit | b67445fc17489fff5c8052147184e366abdb3d80 (patch) | |
tree | 282becc8eabef87c42d3e7440c31ff3195f633bd /drivers/atm/iphase.c | |
parent | 1a8a27c974d0f09c61874b81bf9670f1478b649a (diff) |
generic swap(): iphase: rename swap() to swap_byte_order()
In preparation for the introduction of a generic swap() macro.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/atm/iphase.c')
-rw-r--r-- | drivers/atm/iphase.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index 088885ed51b..e1c7611e914 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c | |||
@@ -64,7 +64,7 @@ | |||
64 | #include <linux/jiffies.h> | 64 | #include <linux/jiffies.h> |
65 | #include "iphase.h" | 65 | #include "iphase.h" |
66 | #include "suni.h" | 66 | #include "suni.h" |
67 | #define swap(x) (((x & 0xff) << 8) | ((x & 0xff00) >> 8)) | 67 | #define swap_byte_order(x) (((x & 0xff) << 8) | ((x & 0xff00) >> 8)) |
68 | 68 | ||
69 | #define PRIV(dev) ((struct suni_priv *) dev->phy_data) | 69 | #define PRIV(dev) ((struct suni_priv *) dev->phy_data) |
70 | 70 | ||
@@ -1306,7 +1306,7 @@ static void rx_dle_intr(struct atm_dev *dev) | |||
1306 | // get real pkt length pwang_test | 1306 | // get real pkt length pwang_test |
1307 | trailer = (struct cpcs_trailer*)((u_char *)skb->data + | 1307 | trailer = (struct cpcs_trailer*)((u_char *)skb->data + |
1308 | skb->len - sizeof(*trailer)); | 1308 | skb->len - sizeof(*trailer)); |
1309 | length = swap(trailer->length); | 1309 | length = swap_byte_order(trailer->length); |
1310 | if ((length > iadev->rx_buf_sz) || (length > | 1310 | if ((length > iadev->rx_buf_sz) || (length > |
1311 | (skb->len - sizeof(struct cpcs_trailer)))) | 1311 | (skb->len - sizeof(struct cpcs_trailer)))) |
1312 | { | 1312 | { |
@@ -2995,7 +2995,7 @@ static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb) { | |||
2995 | skb->len, PCI_DMA_TODEVICE); | 2995 | skb->len, PCI_DMA_TODEVICE); |
2996 | wr_ptr->local_pkt_addr = (buf_desc_ptr->buf_start_hi << 16) | | 2996 | wr_ptr->local_pkt_addr = (buf_desc_ptr->buf_start_hi << 16) | |
2997 | buf_desc_ptr->buf_start_lo; | 2997 | buf_desc_ptr->buf_start_lo; |
2998 | /* wr_ptr->bytes = swap(total_len); didn't seem to affect ?? */ | 2998 | /* wr_ptr->bytes = swap_byte_order(total_len); didn't seem to affect?? */ |
2999 | wr_ptr->bytes = skb->len; | 2999 | wr_ptr->bytes = skb->len; |
3000 | 3000 | ||
3001 | /* hw bug - DLEs of 0x2d, 0x2e, 0x2f cause DMA lockup */ | 3001 | /* hw bug - DLEs of 0x2d, 0x2e, 0x2f cause DMA lockup */ |