diff options
Diffstat (limited to 'drivers/net/ns83820.c')
-rw-r--r-- | drivers/net/ns83820.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c index 312e0e331712..568daeb3e9d8 100644 --- a/drivers/net/ns83820.c +++ b/drivers/net/ns83820.c | |||
@@ -414,10 +414,10 @@ struct rx_info { | |||
414 | 414 | ||
415 | struct sk_buff *skbs[NR_RX_DESC]; | 415 | struct sk_buff *skbs[NR_RX_DESC]; |
416 | 416 | ||
417 | u32 *next_rx_desc; | 417 | __le32 *next_rx_desc; |
418 | u16 next_rx, next_empty; | 418 | u16 next_rx, next_empty; |
419 | 419 | ||
420 | u32 *descs; | 420 | __le32 *descs; |
421 | dma_addr_t phy_descs; | 421 | dma_addr_t phy_descs; |
422 | }; | 422 | }; |
423 | 423 | ||
@@ -460,7 +460,7 @@ struct ns83820 { | |||
460 | struct sk_buff *tx_skbs[NR_TX_DESC]; | 460 | struct sk_buff *tx_skbs[NR_TX_DESC]; |
461 | 461 | ||
462 | char pad[16] __attribute__((aligned(16))); | 462 | char pad[16] __attribute__((aligned(16))); |
463 | u32 *tx_descs; | 463 | __le32 *tx_descs; |
464 | dma_addr_t tx_phy_descs; | 464 | dma_addr_t tx_phy_descs; |
465 | 465 | ||
466 | struct timer_list tx_watchdog; | 466 | struct timer_list tx_watchdog; |
@@ -534,7 +534,7 @@ static void ns83820_vlan_rx_kill_vid(struct net_device *ndev, unsigned short vid | |||
534 | * conditions, still route realtime traffic with as low jitter as | 534 | * conditions, still route realtime traffic with as low jitter as |
535 | * possible. | 535 | * possible. |
536 | */ | 536 | */ |
537 | static inline void build_rx_desc(struct ns83820 *dev, u32 *desc, dma_addr_t link, dma_addr_t buf, u32 cmdsts, u32 extsts) | 537 | static inline void build_rx_desc(struct ns83820 *dev, __le32 *desc, dma_addr_t link, dma_addr_t buf, u32 cmdsts, u32 extsts) |
538 | { | 538 | { |
539 | desc_addr_set(desc + DESC_LINK, link); | 539 | desc_addr_set(desc + DESC_LINK, link); |
540 | desc_addr_set(desc + DESC_BUFPTR, buf); | 540 | desc_addr_set(desc + DESC_BUFPTR, buf); |
@@ -548,7 +548,7 @@ static inline int ns83820_add_rx_skb(struct ns83820 *dev, struct sk_buff *skb) | |||
548 | { | 548 | { |
549 | unsigned next_empty; | 549 | unsigned next_empty; |
550 | u32 cmdsts; | 550 | u32 cmdsts; |
551 | u32 *sg; | 551 | __le32 *sg; |
552 | dma_addr_t buf; | 552 | dma_addr_t buf; |
553 | 553 | ||
554 | next_empty = dev->rx_info.next_empty; | 554 | next_empty = dev->rx_info.next_empty; |
@@ -875,7 +875,8 @@ static void fastcall rx_irq(struct net_device *ndev) | |||
875 | struct rx_info *info = &dev->rx_info; | 875 | struct rx_info *info = &dev->rx_info; |
876 | unsigned next_rx; | 876 | unsigned next_rx; |
877 | int rx_rc, len; | 877 | int rx_rc, len; |
878 | u32 cmdsts, *desc; | 878 | u32 cmdsts; |
879 | __le32 *desc; | ||
879 | unsigned long flags; | 880 | unsigned long flags; |
880 | int nr = 0; | 881 | int nr = 0; |
881 | 882 | ||
@@ -1011,7 +1012,8 @@ static inline void kick_tx(struct ns83820 *dev) | |||
1011 | static void do_tx_done(struct net_device *ndev) | 1012 | static void do_tx_done(struct net_device *ndev) |
1012 | { | 1013 | { |
1013 | struct ns83820 *dev = PRIV(ndev); | 1014 | struct ns83820 *dev = PRIV(ndev); |
1014 | u32 cmdsts, tx_done_idx, *desc; | 1015 | u32 cmdsts, tx_done_idx; |
1016 | __le32 *desc; | ||
1015 | 1017 | ||
1016 | dprintk("do_tx_done(%p)\n", ndev); | 1018 | dprintk("do_tx_done(%p)\n", ndev); |
1017 | tx_done_idx = dev->tx_done_idx; | 1019 | tx_done_idx = dev->tx_done_idx; |
@@ -1078,7 +1080,7 @@ static void ns83820_cleanup_tx(struct ns83820 *dev) | |||
1078 | struct sk_buff *skb = dev->tx_skbs[i]; | 1080 | struct sk_buff *skb = dev->tx_skbs[i]; |
1079 | dev->tx_skbs[i] = NULL; | 1081 | dev->tx_skbs[i] = NULL; |
1080 | if (skb) { | 1082 | if (skb) { |
1081 | u32 *desc = dev->tx_descs + (i * DESC_SIZE); | 1083 | __le32 *desc = dev->tx_descs + (i * DESC_SIZE); |
1082 | pci_unmap_single(dev->pci_dev, | 1084 | pci_unmap_single(dev->pci_dev, |
1083 | desc_addr_get(desc + DESC_BUFPTR), | 1085 | desc_addr_get(desc + DESC_BUFPTR), |
1084 | le32_to_cpu(desc[DESC_CMDSTS]) & CMDSTS_LEN_MASK, | 1086 | le32_to_cpu(desc[DESC_CMDSTS]) & CMDSTS_LEN_MASK, |
@@ -1108,7 +1110,7 @@ static int ns83820_hard_start_xmit(struct sk_buff *skb, struct net_device *ndev) | |||
1108 | skb_frag_t *frag; | 1110 | skb_frag_t *frag; |
1109 | int stopped = 0; | 1111 | int stopped = 0; |
1110 | int do_intr = 0; | 1112 | int do_intr = 0; |
1111 | volatile u32 *first_desc; | 1113 | volatile __le32 *first_desc; |
1112 | 1114 | ||
1113 | dprintk("ns83820_hard_start_xmit\n"); | 1115 | dprintk("ns83820_hard_start_xmit\n"); |
1114 | 1116 | ||
@@ -1181,7 +1183,7 @@ again: | |||
1181 | first_desc = dev->tx_descs + (free_idx * DESC_SIZE); | 1183 | first_desc = dev->tx_descs + (free_idx * DESC_SIZE); |
1182 | 1184 | ||
1183 | for (;;) { | 1185 | for (;;) { |
1184 | volatile u32 *desc = dev->tx_descs + (free_idx * DESC_SIZE); | 1186 | volatile __le32 *desc = dev->tx_descs + (free_idx * DESC_SIZE); |
1185 | 1187 | ||
1186 | dprintk("frag[%3u]: %4u @ 0x%08Lx\n", free_idx, len, | 1188 | dprintk("frag[%3u]: %4u @ 0x%08Lx\n", free_idx, len, |
1187 | (unsigned long long)buf); | 1189 | (unsigned long long)buf); |
@@ -1456,7 +1458,8 @@ static int ns83820_stop(struct net_device *ndev) | |||
1456 | static void ns83820_tx_timeout(struct net_device *ndev) | 1458 | static void ns83820_tx_timeout(struct net_device *ndev) |
1457 | { | 1459 | { |
1458 | struct ns83820 *dev = PRIV(ndev); | 1460 | struct ns83820 *dev = PRIV(ndev); |
1459 | u32 tx_done_idx, *desc; | 1461 | u32 tx_done_idx; |
1462 | __le32 *desc; | ||
1460 | unsigned long flags; | 1463 | unsigned long flags; |
1461 | 1464 | ||
1462 | spin_lock_irqsave(&dev->tx_lock, flags); | 1465 | spin_lock_irqsave(&dev->tx_lock, flags); |