aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 14:12:54 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2006-12-04 16:07:25 -0500
commitc69fda4e181fe448c43c2e1cc7b3fa67263d88ca (patch)
treecd8399af81de567f8dcc30fa50477fbc9032338b /drivers/net
parent40f6cff5c47efac2df361fbfc2eb2816729986c8 (diff)
[PATCH] ns83820 annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ns83820.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index b0127c71a5b6..eb0e119bc0d6 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
@@ -459,7 +459,7 @@ struct ns83820 {
459 struct sk_buff *tx_skbs[NR_TX_DESC]; 459 struct sk_buff *tx_skbs[NR_TX_DESC];
460 460
461 char pad[16] __attribute__((aligned(16))); 461 char pad[16] __attribute__((aligned(16)));
462 u32 *tx_descs; 462 __le32 *tx_descs;
463 dma_addr_t tx_phy_descs; 463 dma_addr_t tx_phy_descs;
464 464
465 struct timer_list tx_watchdog; 465 struct timer_list tx_watchdog;
@@ -533,7 +533,7 @@ static void ns83820_vlan_rx_kill_vid(struct net_device *ndev, unsigned short vid
533 * conditions, still route realtime traffic with as low jitter as 533 * conditions, still route realtime traffic with as low jitter as
534 * possible. 534 * possible.
535 */ 535 */
536static inline void build_rx_desc(struct ns83820 *dev, u32 *desc, dma_addr_t link, dma_addr_t buf, u32 cmdsts, u32 extsts) 536static inline void build_rx_desc(struct ns83820 *dev, __le32 *desc, dma_addr_t link, dma_addr_t buf, u32 cmdsts, u32 extsts)
537{ 537{
538 desc_addr_set(desc + DESC_LINK, link); 538 desc_addr_set(desc + DESC_LINK, link);
539 desc_addr_set(desc + DESC_BUFPTR, buf); 539 desc_addr_set(desc + DESC_BUFPTR, buf);
@@ -547,7 +547,7 @@ static inline int ns83820_add_rx_skb(struct ns83820 *dev, struct sk_buff *skb)
547{ 547{
548 unsigned next_empty; 548 unsigned next_empty;
549 u32 cmdsts; 549 u32 cmdsts;
550 u32 *sg; 550 __le32 *sg;
551 dma_addr_t buf; 551 dma_addr_t buf;
552 552
553 next_empty = dev->rx_info.next_empty; 553 next_empty = dev->rx_info.next_empty;
@@ -874,7 +874,8 @@ static void fastcall rx_irq(struct net_device *ndev)
874 struct rx_info *info = &dev->rx_info; 874 struct rx_info *info = &dev->rx_info;
875 unsigned next_rx; 875 unsigned next_rx;
876 int rx_rc, len; 876 int rx_rc, len;
877 u32 cmdsts, *desc; 877 u32 cmdsts;
878 __le32 *desc;
878 unsigned long flags; 879 unsigned long flags;
879 int nr = 0; 880 int nr = 0;
880 881
@@ -1010,7 +1011,8 @@ static inline void kick_tx(struct ns83820 *dev)
1010static void do_tx_done(struct net_device *ndev) 1011static void do_tx_done(struct net_device *ndev)
1011{ 1012{
1012 struct ns83820 *dev = PRIV(ndev); 1013 struct ns83820 *dev = PRIV(ndev);
1013 u32 cmdsts, tx_done_idx, *desc; 1014 u32 cmdsts, tx_done_idx;
1015 __le32 *desc;
1014 1016
1015 dprintk("do_tx_done(%p)\n", ndev); 1017 dprintk("do_tx_done(%p)\n", ndev);
1016 tx_done_idx = dev->tx_done_idx; 1018 tx_done_idx = dev->tx_done_idx;
@@ -1077,7 +1079,7 @@ static void ns83820_cleanup_tx(struct ns83820 *dev)
1077 struct sk_buff *skb = dev->tx_skbs[i]; 1079 struct sk_buff *skb = dev->tx_skbs[i];
1078 dev->tx_skbs[i] = NULL; 1080 dev->tx_skbs[i] = NULL;
1079 if (skb) { 1081 if (skb) {
1080 u32 *desc = dev->tx_descs + (i * DESC_SIZE); 1082 __le32 *desc = dev->tx_descs + (i * DESC_SIZE);
1081 pci_unmap_single(dev->pci_dev, 1083 pci_unmap_single(dev->pci_dev,
1082 desc_addr_get(desc + DESC_BUFPTR), 1084 desc_addr_get(desc + DESC_BUFPTR),
1083 le32_to_cpu(desc[DESC_CMDSTS]) & CMDSTS_LEN_MASK, 1085 le32_to_cpu(desc[DESC_CMDSTS]) & CMDSTS_LEN_MASK,
@@ -1107,7 +1109,7 @@ static int ns83820_hard_start_xmit(struct sk_buff *skb, struct net_device *ndev)
1107 skb_frag_t *frag; 1109 skb_frag_t *frag;
1108 int stopped = 0; 1110 int stopped = 0;
1109 int do_intr = 0; 1111 int do_intr = 0;
1110 volatile u32 *first_desc; 1112 volatile __le32 *first_desc;
1111 1113
1112 dprintk("ns83820_hard_start_xmit\n"); 1114 dprintk("ns83820_hard_start_xmit\n");
1113 1115
@@ -1180,7 +1182,7 @@ again:
1180 first_desc = dev->tx_descs + (free_idx * DESC_SIZE); 1182 first_desc = dev->tx_descs + (free_idx * DESC_SIZE);
1181 1183
1182 for (;;) { 1184 for (;;) {
1183 volatile u32 *desc = dev->tx_descs + (free_idx * DESC_SIZE); 1185 volatile __le32 *desc = dev->tx_descs + (free_idx * DESC_SIZE);
1184 1186
1185 dprintk("frag[%3u]: %4u @ 0x%08Lx\n", free_idx, len, 1187 dprintk("frag[%3u]: %4u @ 0x%08Lx\n", free_idx, len,
1186 (unsigned long long)buf); 1188 (unsigned long long)buf);
@@ -1455,7 +1457,8 @@ static int ns83820_stop(struct net_device *ndev)
1455static void ns83820_tx_timeout(struct net_device *ndev) 1457static void ns83820_tx_timeout(struct net_device *ndev)
1456{ 1458{
1457 struct ns83820 *dev = PRIV(ndev); 1459 struct ns83820 *dev = PRIV(ndev);
1458 u32 tx_done_idx, *desc; 1460 u32 tx_done_idx;
1461 __le32 *desc;
1459 unsigned long flags; 1462 unsigned long flags;
1460 1463
1461 spin_lock_irqsave(&dev->tx_lock, flags); 1464 spin_lock_irqsave(&dev->tx_lock, flags);