diff options
Diffstat (limited to 'drivers/net/lasi_82596.c')
-rw-r--r-- | drivers/net/lasi_82596.c | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/drivers/net/lasi_82596.c b/drivers/net/lasi_82596.c index f4d815bca643..ea392f2a5aa2 100644 --- a/drivers/net/lasi_82596.c +++ b/drivers/net/lasi_82596.c | |||
@@ -119,14 +119,14 @@ | |||
119 | #define DEB(x,y) if (i596_debug & (x)) { y; } | 119 | #define DEB(x,y) if (i596_debug & (x)) { y; } |
120 | 120 | ||
121 | 121 | ||
122 | #define CHECK_WBACK(addr,len) \ | 122 | #define CHECK_WBACK(priv, addr,len) \ |
123 | do { dma_cache_sync((void *)addr, len, DMA_TO_DEVICE); } while (0) | 123 | do { dma_cache_sync((priv)->dev, (void *)addr, len, DMA_TO_DEVICE); } while (0) |
124 | 124 | ||
125 | #define CHECK_INV(addr,len) \ | 125 | #define CHECK_INV(priv, addr,len) \ |
126 | do { dma_cache_sync((void *)addr, len, DMA_FROM_DEVICE); } while(0) | 126 | do { dma_cache_sync((priv)->dev, (void *)addr, len, DMA_FROM_DEVICE); } while(0) |
127 | 127 | ||
128 | #define CHECK_WBACK_INV(addr,len) \ | 128 | #define CHECK_WBACK_INV(priv, addr,len) \ |
129 | do { dma_cache_sync((void *)addr, len, DMA_BIDIRECTIONAL); } while (0) | 129 | do { dma_cache_sync((priv)->dev, (void *)addr, len, DMA_BIDIRECTIONAL); } while (0) |
130 | 130 | ||
131 | 131 | ||
132 | #define PA_I82596_RESET 0 /* Offsets relative to LASI-LAN-Addr.*/ | 132 | #define PA_I82596_RESET 0 /* Offsets relative to LASI-LAN-Addr.*/ |
@@ -449,10 +449,10 @@ static inline void MPU_PORT(struct net_device *dev, int c, dma_addr_t x) | |||
449 | 449 | ||
450 | static inline int wait_istat(struct net_device *dev, struct i596_private *lp, int delcnt, char *str) | 450 | static inline int wait_istat(struct net_device *dev, struct i596_private *lp, int delcnt, char *str) |
451 | { | 451 | { |
452 | CHECK_INV(&(lp->iscp), sizeof(struct i596_iscp)); | 452 | CHECK_INV(lp, &(lp->iscp), sizeof(struct i596_iscp)); |
453 | while (--delcnt && lp->iscp.stat) { | 453 | while (--delcnt && lp->iscp.stat) { |
454 | udelay(10); | 454 | udelay(10); |
455 | CHECK_INV(&(lp->iscp), sizeof(struct i596_iscp)); | 455 | CHECK_INV(lp, &(lp->iscp), sizeof(struct i596_iscp)); |
456 | } | 456 | } |
457 | if (!delcnt) { | 457 | if (!delcnt) { |
458 | printk("%s: %s, iscp.stat %04x, didn't clear\n", | 458 | printk("%s: %s, iscp.stat %04x, didn't clear\n", |
@@ -466,10 +466,10 @@ static inline int wait_istat(struct net_device *dev, struct i596_private *lp, in | |||
466 | 466 | ||
467 | static inline int wait_cmd(struct net_device *dev, struct i596_private *lp, int delcnt, char *str) | 467 | static inline int wait_cmd(struct net_device *dev, struct i596_private *lp, int delcnt, char *str) |
468 | { | 468 | { |
469 | CHECK_INV(&(lp->scb), sizeof(struct i596_scb)); | 469 | CHECK_INV(lp, &(lp->scb), sizeof(struct i596_scb)); |
470 | while (--delcnt && lp->scb.command) { | 470 | while (--delcnt && lp->scb.command) { |
471 | udelay(10); | 471 | udelay(10); |
472 | CHECK_INV(&(lp->scb), sizeof(struct i596_scb)); | 472 | CHECK_INV(lp, &(lp->scb), sizeof(struct i596_scb)); |
473 | } | 473 | } |
474 | if (!delcnt) { | 474 | if (!delcnt) { |
475 | printk("%s: %s, status %4.4x, cmd %4.4x.\n", | 475 | printk("%s: %s, status %4.4x, cmd %4.4x.\n", |
@@ -522,7 +522,7 @@ static void i596_display_data(struct net_device *dev) | |||
522 | rbd, rbd->count, rbd->b_next, rbd->b_data, rbd->size); | 522 | rbd, rbd->count, rbd->b_next, rbd->b_data, rbd->size); |
523 | rbd = rbd->v_next; | 523 | rbd = rbd->v_next; |
524 | } while (rbd != lp->rbd_head); | 524 | } while (rbd != lp->rbd_head); |
525 | CHECK_INV(lp, sizeof(struct i596_private)); | 525 | CHECK_INV(lp, lp, sizeof(struct i596_private)); |
526 | } | 526 | } |
527 | 527 | ||
528 | 528 | ||
@@ -592,7 +592,7 @@ static inline void init_rx_bufs(struct net_device *dev) | |||
592 | rfd->b_next = WSWAPrfd(virt_to_dma(lp,lp->rfds)); | 592 | rfd->b_next = WSWAPrfd(virt_to_dma(lp,lp->rfds)); |
593 | rfd->cmd = CMD_EOL|CMD_FLEX; | 593 | rfd->cmd = CMD_EOL|CMD_FLEX; |
594 | 594 | ||
595 | CHECK_WBACK_INV(lp, sizeof(struct i596_private)); | 595 | CHECK_WBACK_INV(lp, lp, sizeof(struct i596_private)); |
596 | } | 596 | } |
597 | 597 | ||
598 | static inline void remove_rx_bufs(struct net_device *dev) | 598 | static inline void remove_rx_bufs(struct net_device *dev) |
@@ -629,7 +629,7 @@ static void rebuild_rx_bufs(struct net_device *dev) | |||
629 | lp->rbd_head = lp->rbds; | 629 | lp->rbd_head = lp->rbds; |
630 | lp->rfds[0].rbd = WSWAPrbd(virt_to_dma(lp,lp->rbds)); | 630 | lp->rfds[0].rbd = WSWAPrbd(virt_to_dma(lp,lp->rbds)); |
631 | 631 | ||
632 | CHECK_WBACK_INV(lp, sizeof(struct i596_private)); | 632 | CHECK_WBACK_INV(lp, lp, sizeof(struct i596_private)); |
633 | } | 633 | } |
634 | 634 | ||
635 | 635 | ||
@@ -663,8 +663,8 @@ static int init_i596_mem(struct net_device *dev) | |||
663 | 663 | ||
664 | DEB(DEB_INIT, printk("%s: starting i82596.\n", dev->name)); | 664 | DEB(DEB_INIT, printk("%s: starting i82596.\n", dev->name)); |
665 | 665 | ||
666 | CHECK_WBACK(&(lp->scp), sizeof(struct i596_scp)); | 666 | CHECK_WBACK(lp, &(lp->scp), sizeof(struct i596_scp)); |
667 | CHECK_WBACK(&(lp->iscp), sizeof(struct i596_iscp)); | 667 | CHECK_WBACK(lp, &(lp->iscp), sizeof(struct i596_iscp)); |
668 | 668 | ||
669 | MPU_PORT(dev, PORT_ALTSCP, virt_to_dma(lp,&lp->scp)); | 669 | MPU_PORT(dev, PORT_ALTSCP, virt_to_dma(lp,&lp->scp)); |
670 | 670 | ||
@@ -678,25 +678,25 @@ static int init_i596_mem(struct net_device *dev) | |||
678 | rebuild_rx_bufs(dev); | 678 | rebuild_rx_bufs(dev); |
679 | 679 | ||
680 | lp->scb.command = 0; | 680 | lp->scb.command = 0; |
681 | CHECK_WBACK(&(lp->scb), sizeof(struct i596_scb)); | 681 | CHECK_WBACK(lp, &(lp->scb), sizeof(struct i596_scb)); |
682 | 682 | ||
683 | enable_irq(dev->irq); /* enable IRQs from LAN */ | 683 | enable_irq(dev->irq); /* enable IRQs from LAN */ |
684 | 684 | ||
685 | DEB(DEB_INIT, printk("%s: queuing CmdConfigure\n", dev->name)); | 685 | DEB(DEB_INIT, printk("%s: queuing CmdConfigure\n", dev->name)); |
686 | memcpy(lp->cf_cmd.i596_config, init_setup, 14); | 686 | memcpy(lp->cf_cmd.i596_config, init_setup, 14); |
687 | lp->cf_cmd.cmd.command = CmdConfigure; | 687 | lp->cf_cmd.cmd.command = CmdConfigure; |
688 | CHECK_WBACK(&(lp->cf_cmd), sizeof(struct cf_cmd)); | 688 | CHECK_WBACK(lp, &(lp->cf_cmd), sizeof(struct cf_cmd)); |
689 | i596_add_cmd(dev, &lp->cf_cmd.cmd); | 689 | i596_add_cmd(dev, &lp->cf_cmd.cmd); |
690 | 690 | ||
691 | DEB(DEB_INIT, printk("%s: queuing CmdSASetup\n", dev->name)); | 691 | DEB(DEB_INIT, printk("%s: queuing CmdSASetup\n", dev->name)); |
692 | memcpy(lp->sa_cmd.eth_addr, dev->dev_addr, 6); | 692 | memcpy(lp->sa_cmd.eth_addr, dev->dev_addr, 6); |
693 | lp->sa_cmd.cmd.command = CmdSASetup; | 693 | lp->sa_cmd.cmd.command = CmdSASetup; |
694 | CHECK_WBACK(&(lp->sa_cmd), sizeof(struct sa_cmd)); | 694 | CHECK_WBACK(lp, &(lp->sa_cmd), sizeof(struct sa_cmd)); |
695 | i596_add_cmd(dev, &lp->sa_cmd.cmd); | 695 | i596_add_cmd(dev, &lp->sa_cmd.cmd); |
696 | 696 | ||
697 | DEB(DEB_INIT, printk("%s: queuing CmdTDR\n", dev->name)); | 697 | DEB(DEB_INIT, printk("%s: queuing CmdTDR\n", dev->name)); |
698 | lp->tdr_cmd.cmd.command = CmdTDR; | 698 | lp->tdr_cmd.cmd.command = CmdTDR; |
699 | CHECK_WBACK(&(lp->tdr_cmd), sizeof(struct tdr_cmd)); | 699 | CHECK_WBACK(lp, &(lp->tdr_cmd), sizeof(struct tdr_cmd)); |
700 | i596_add_cmd(dev, &lp->tdr_cmd.cmd); | 700 | i596_add_cmd(dev, &lp->tdr_cmd.cmd); |
701 | 701 | ||
702 | spin_lock_irqsave (&lp->lock, flags); | 702 | spin_lock_irqsave (&lp->lock, flags); |
@@ -708,7 +708,7 @@ static int init_i596_mem(struct net_device *dev) | |||
708 | DEB(DEB_INIT, printk("%s: Issuing RX_START\n", dev->name)); | 708 | DEB(DEB_INIT, printk("%s: Issuing RX_START\n", dev->name)); |
709 | lp->scb.command = RX_START; | 709 | lp->scb.command = RX_START; |
710 | lp->scb.rfd = WSWAPrfd(virt_to_dma(lp,lp->rfds)); | 710 | lp->scb.rfd = WSWAPrfd(virt_to_dma(lp,lp->rfds)); |
711 | CHECK_WBACK(&(lp->scb), sizeof(struct i596_scb)); | 711 | CHECK_WBACK(lp, &(lp->scb), sizeof(struct i596_scb)); |
712 | 712 | ||
713 | CA(dev); | 713 | CA(dev); |
714 | 714 | ||
@@ -740,13 +740,13 @@ static inline int i596_rx(struct net_device *dev) | |||
740 | 740 | ||
741 | rfd = lp->rfd_head; /* Ref next frame to check */ | 741 | rfd = lp->rfd_head; /* Ref next frame to check */ |
742 | 742 | ||
743 | CHECK_INV(rfd, sizeof(struct i596_rfd)); | 743 | CHECK_INV(lp, rfd, sizeof(struct i596_rfd)); |
744 | while ((rfd->stat) & STAT_C) { /* Loop while complete frames */ | 744 | while ((rfd->stat) & STAT_C) { /* Loop while complete frames */ |
745 | if (rfd->rbd == I596_NULL) | 745 | if (rfd->rbd == I596_NULL) |
746 | rbd = NULL; | 746 | rbd = NULL; |
747 | else if (rfd->rbd == lp->rbd_head->b_addr) { | 747 | else if (rfd->rbd == lp->rbd_head->b_addr) { |
748 | rbd = lp->rbd_head; | 748 | rbd = lp->rbd_head; |
749 | CHECK_INV(rbd, sizeof(struct i596_rbd)); | 749 | CHECK_INV(lp, rbd, sizeof(struct i596_rbd)); |
750 | } | 750 | } |
751 | else { | 751 | else { |
752 | printk("%s: rbd chain broken!\n", dev->name); | 752 | printk("%s: rbd chain broken!\n", dev->name); |
@@ -790,7 +790,7 @@ static inline int i596_rx(struct net_device *dev) | |||
790 | dma_addr = dma_map_single(lp->dev, newskb->data, PKT_BUF_SZ, DMA_FROM_DEVICE); | 790 | dma_addr = dma_map_single(lp->dev, newskb->data, PKT_BUF_SZ, DMA_FROM_DEVICE); |
791 | rbd->v_data = newskb->data; | 791 | rbd->v_data = newskb->data; |
792 | rbd->b_data = WSWAPchar(dma_addr); | 792 | rbd->b_data = WSWAPchar(dma_addr); |
793 | CHECK_WBACK_INV(rbd, sizeof(struct i596_rbd)); | 793 | CHECK_WBACK_INV(lp, rbd, sizeof(struct i596_rbd)); |
794 | } | 794 | } |
795 | else | 795 | else |
796 | skb = dev_alloc_skb(pkt_len + 2); | 796 | skb = dev_alloc_skb(pkt_len + 2); |
@@ -842,7 +842,7 @@ memory_squeeze: | |||
842 | if (rbd != NULL && (rbd->count & 0x4000)) { | 842 | if (rbd != NULL && (rbd->count & 0x4000)) { |
843 | rbd->count = 0; | 843 | rbd->count = 0; |
844 | lp->rbd_head = rbd->v_next; | 844 | lp->rbd_head = rbd->v_next; |
845 | CHECK_WBACK_INV(rbd, sizeof(struct i596_rbd)); | 845 | CHECK_WBACK_INV(lp, rbd, sizeof(struct i596_rbd)); |
846 | } | 846 | } |
847 | 847 | ||
848 | /* Tidy the frame descriptor, marking it as end of list */ | 848 | /* Tidy the frame descriptor, marking it as end of list */ |
@@ -860,10 +860,10 @@ memory_squeeze: | |||
860 | 860 | ||
861 | lp->scb.rfd = rfd->b_next; | 861 | lp->scb.rfd = rfd->b_next; |
862 | lp->rfd_head = rfd->v_next; | 862 | lp->rfd_head = rfd->v_next; |
863 | CHECK_WBACK_INV(rfd->v_prev, sizeof(struct i596_rfd)); | 863 | CHECK_WBACK_INV(lp, rfd->v_prev, sizeof(struct i596_rfd)); |
864 | CHECK_WBACK_INV(rfd, sizeof(struct i596_rfd)); | 864 | CHECK_WBACK_INV(lp, rfd, sizeof(struct i596_rfd)); |
865 | rfd = lp->rfd_head; | 865 | rfd = lp->rfd_head; |
866 | CHECK_INV(rfd, sizeof(struct i596_rfd)); | 866 | CHECK_INV(lp, rfd, sizeof(struct i596_rfd)); |
867 | } | 867 | } |
868 | 868 | ||
869 | DEB(DEB_RXFRAME, printk("frames %d\n", frames)); | 869 | DEB(DEB_RXFRAME, printk("frames %d\n", frames)); |
@@ -902,12 +902,12 @@ static inline void i596_cleanup_cmd(struct net_device *dev, struct i596_private | |||
902 | ptr->v_next = NULL; | 902 | ptr->v_next = NULL; |
903 | ptr->b_next = I596_NULL; | 903 | ptr->b_next = I596_NULL; |
904 | } | 904 | } |
905 | CHECK_WBACK_INV(ptr, sizeof(struct i596_cmd)); | 905 | CHECK_WBACK_INV(lp, ptr, sizeof(struct i596_cmd)); |
906 | } | 906 | } |
907 | 907 | ||
908 | wait_cmd(dev, lp, 100, "i596_cleanup_cmd timed out"); | 908 | wait_cmd(dev, lp, 100, "i596_cleanup_cmd timed out"); |
909 | lp->scb.cmd = I596_NULL; | 909 | lp->scb.cmd = I596_NULL; |
910 | CHECK_WBACK(&(lp->scb), sizeof(struct i596_scb)); | 910 | CHECK_WBACK(lp, &(lp->scb), sizeof(struct i596_scb)); |
911 | } | 911 | } |
912 | 912 | ||
913 | 913 | ||
@@ -925,7 +925,7 @@ static inline void i596_reset(struct net_device *dev, struct i596_private *lp) | |||
925 | 925 | ||
926 | /* FIXME: this command might cause an lpmc */ | 926 | /* FIXME: this command might cause an lpmc */ |
927 | lp->scb.command = CUC_ABORT | RX_ABORT; | 927 | lp->scb.command = CUC_ABORT | RX_ABORT; |
928 | CHECK_WBACK(&(lp->scb), sizeof(struct i596_scb)); | 928 | CHECK_WBACK(lp, &(lp->scb), sizeof(struct i596_scb)); |
929 | CA(dev); | 929 | CA(dev); |
930 | 930 | ||
931 | /* wait for shutdown */ | 931 | /* wait for shutdown */ |
@@ -951,20 +951,20 @@ static void i596_add_cmd(struct net_device *dev, struct i596_cmd *cmd) | |||
951 | cmd->command |= (CMD_EOL | CMD_INTR); | 951 | cmd->command |= (CMD_EOL | CMD_INTR); |
952 | cmd->v_next = NULL; | 952 | cmd->v_next = NULL; |
953 | cmd->b_next = I596_NULL; | 953 | cmd->b_next = I596_NULL; |
954 | CHECK_WBACK(cmd, sizeof(struct i596_cmd)); | 954 | CHECK_WBACK(lp, cmd, sizeof(struct i596_cmd)); |
955 | 955 | ||
956 | spin_lock_irqsave (&lp->lock, flags); | 956 | spin_lock_irqsave (&lp->lock, flags); |
957 | 957 | ||
958 | if (lp->cmd_head != NULL) { | 958 | if (lp->cmd_head != NULL) { |
959 | lp->cmd_tail->v_next = cmd; | 959 | lp->cmd_tail->v_next = cmd; |
960 | lp->cmd_tail->b_next = WSWAPcmd(virt_to_dma(lp,&cmd->status)); | 960 | lp->cmd_tail->b_next = WSWAPcmd(virt_to_dma(lp,&cmd->status)); |
961 | CHECK_WBACK(lp->cmd_tail, sizeof(struct i596_cmd)); | 961 | CHECK_WBACK(lp, lp->cmd_tail, sizeof(struct i596_cmd)); |
962 | } else { | 962 | } else { |
963 | lp->cmd_head = cmd; | 963 | lp->cmd_head = cmd; |
964 | wait_cmd(dev, lp, 100, "i596_add_cmd timed out"); | 964 | wait_cmd(dev, lp, 100, "i596_add_cmd timed out"); |
965 | lp->scb.cmd = WSWAPcmd(virt_to_dma(lp,&cmd->status)); | 965 | lp->scb.cmd = WSWAPcmd(virt_to_dma(lp,&cmd->status)); |
966 | lp->scb.command = CUC_START; | 966 | lp->scb.command = CUC_START; |
967 | CHECK_WBACK(&(lp->scb), sizeof(struct i596_scb)); | 967 | CHECK_WBACK(lp, &(lp->scb), sizeof(struct i596_scb)); |
968 | CA(dev); | 968 | CA(dev); |
969 | } | 969 | } |
970 | lp->cmd_tail = cmd; | 970 | lp->cmd_tail = cmd; |
@@ -998,12 +998,12 @@ static int i596_test(struct net_device *dev) | |||
998 | data = virt_to_dma(lp,tint); | 998 | data = virt_to_dma(lp,tint); |
999 | 999 | ||
1000 | tint[1] = -1; | 1000 | tint[1] = -1; |
1001 | CHECK_WBACK(tint,PAGE_SIZE); | 1001 | CHECK_WBACK(lp, tint, PAGE_SIZE); |
1002 | 1002 | ||
1003 | MPU_PORT(dev, 1, data); | 1003 | MPU_PORT(dev, 1, data); |
1004 | 1004 | ||
1005 | for(data = 1000000; data; data--) { | 1005 | for(data = 1000000; data; data--) { |
1006 | CHECK_INV(tint,PAGE_SIZE); | 1006 | CHECK_INV(lp, tint, PAGE_SIZE); |
1007 | if(tint[1] != -1) | 1007 | if(tint[1] != -1) |
1008 | break; | 1008 | break; |
1009 | 1009 | ||
@@ -1061,7 +1061,7 @@ static void i596_tx_timeout (struct net_device *dev) | |||
1061 | /* Issue a channel attention signal */ | 1061 | /* Issue a channel attention signal */ |
1062 | DEB(DEB_ERRORS, printk("Kicking board.\n")); | 1062 | DEB(DEB_ERRORS, printk("Kicking board.\n")); |
1063 | lp->scb.command = CUC_START | RX_START; | 1063 | lp->scb.command = CUC_START | RX_START; |
1064 | CHECK_WBACK_INV(&(lp->scb), sizeof(struct i596_scb)); | 1064 | CHECK_WBACK_INV(lp, &(lp->scb), sizeof(struct i596_scb)); |
1065 | CA (dev); | 1065 | CA (dev); |
1066 | lp->last_restart = lp->stats.tx_packets; | 1066 | lp->last_restart = lp->stats.tx_packets; |
1067 | } | 1067 | } |
@@ -1118,8 +1118,8 @@ static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1118 | tbd->data = WSWAPchar(tx_cmd->dma_addr); | 1118 | tbd->data = WSWAPchar(tx_cmd->dma_addr); |
1119 | 1119 | ||
1120 | DEB(DEB_TXADDR,print_eth(skb->data, "tx-queued")); | 1120 | DEB(DEB_TXADDR,print_eth(skb->data, "tx-queued")); |
1121 | CHECK_WBACK_INV(tx_cmd, sizeof(struct tx_cmd)); | 1121 | CHECK_WBACK_INV(lp, tx_cmd, sizeof(struct tx_cmd)); |
1122 | CHECK_WBACK_INV(tbd, sizeof(struct i596_tbd)); | 1122 | CHECK_WBACK_INV(lp, tbd, sizeof(struct i596_tbd)); |
1123 | i596_add_cmd(dev, &tx_cmd->cmd); | 1123 | i596_add_cmd(dev, &tx_cmd->cmd); |
1124 | 1124 | ||
1125 | lp->stats.tx_packets++; | 1125 | lp->stats.tx_packets++; |
@@ -1228,7 +1228,7 @@ static int __devinit i82596_probe(struct net_device *dev, | |||
1228 | lp->dma_addr = dma_addr; | 1228 | lp->dma_addr = dma_addr; |
1229 | lp->dev = gen_dev; | 1229 | lp->dev = gen_dev; |
1230 | 1230 | ||
1231 | CHECK_WBACK_INV(dev->mem_start, sizeof(struct i596_private)); | 1231 | CHECK_WBACK_INV(lp, dev->mem_start, sizeof(struct i596_private)); |
1232 | 1232 | ||
1233 | i = register_netdev(dev); | 1233 | i = register_netdev(dev); |
1234 | if (i) { | 1234 | if (i) { |
@@ -1295,7 +1295,7 @@ static irqreturn_t i596_interrupt(int irq, void *dev_id) | |||
1295 | DEB(DEB_INTS, printk("%s: i596 interrupt command unit inactive %x.\n", dev->name, status & 0x0700)); | 1295 | DEB(DEB_INTS, printk("%s: i596 interrupt command unit inactive %x.\n", dev->name, status & 0x0700)); |
1296 | 1296 | ||
1297 | while (lp->cmd_head != NULL) { | 1297 | while (lp->cmd_head != NULL) { |
1298 | CHECK_INV(lp->cmd_head, sizeof(struct i596_cmd)); | 1298 | CHECK_INV(lp, lp->cmd_head, sizeof(struct i596_cmd)); |
1299 | if (!(lp->cmd_head->status & STAT_C)) | 1299 | if (!(lp->cmd_head->status & STAT_C)) |
1300 | break; | 1300 | break; |
1301 | 1301 | ||
@@ -1358,7 +1358,7 @@ static irqreturn_t i596_interrupt(int irq, void *dev_id) | |||
1358 | } | 1358 | } |
1359 | ptr->v_next = NULL; | 1359 | ptr->v_next = NULL; |
1360 | ptr->b_next = I596_NULL; | 1360 | ptr->b_next = I596_NULL; |
1361 | CHECK_WBACK(ptr, sizeof(struct i596_cmd)); | 1361 | CHECK_WBACK(lp, ptr, sizeof(struct i596_cmd)); |
1362 | lp->last_cmd = jiffies; | 1362 | lp->last_cmd = jiffies; |
1363 | } | 1363 | } |
1364 | 1364 | ||
@@ -1372,13 +1372,13 @@ static irqreturn_t i596_interrupt(int irq, void *dev_id) | |||
1372 | 1372 | ||
1373 | ptr->command &= 0x1fff; | 1373 | ptr->command &= 0x1fff; |
1374 | ptr = ptr->v_next; | 1374 | ptr = ptr->v_next; |
1375 | CHECK_WBACK_INV(prev, sizeof(struct i596_cmd)); | 1375 | CHECK_WBACK_INV(lp, prev, sizeof(struct i596_cmd)); |
1376 | } | 1376 | } |
1377 | 1377 | ||
1378 | if ((lp->cmd_head != NULL)) | 1378 | if ((lp->cmd_head != NULL)) |
1379 | ack_cmd |= CUC_START; | 1379 | ack_cmd |= CUC_START; |
1380 | lp->scb.cmd = WSWAPcmd(virt_to_dma(lp,&lp->cmd_head->status)); | 1380 | lp->scb.cmd = WSWAPcmd(virt_to_dma(lp,&lp->cmd_head->status)); |
1381 | CHECK_WBACK_INV(&lp->scb, sizeof(struct i596_scb)); | 1381 | CHECK_WBACK_INV(lp, &lp->scb, sizeof(struct i596_scb)); |
1382 | } | 1382 | } |
1383 | if ((status & 0x1000) || (status & 0x4000)) { | 1383 | if ((status & 0x1000) || (status & 0x4000)) { |
1384 | if ((status & 0x4000)) | 1384 | if ((status & 0x4000)) |
@@ -1397,7 +1397,7 @@ static irqreturn_t i596_interrupt(int irq, void *dev_id) | |||
1397 | } | 1397 | } |
1398 | wait_cmd(dev, lp, 100, "i596 interrupt, timeout"); | 1398 | wait_cmd(dev, lp, 100, "i596 interrupt, timeout"); |
1399 | lp->scb.command = ack_cmd; | 1399 | lp->scb.command = ack_cmd; |
1400 | CHECK_WBACK(&lp->scb, sizeof(struct i596_scb)); | 1400 | CHECK_WBACK(lp, &lp->scb, sizeof(struct i596_scb)); |
1401 | 1401 | ||
1402 | /* DANGER: I suspect that some kind of interrupt | 1402 | /* DANGER: I suspect that some kind of interrupt |
1403 | acknowledgement aside from acking the 82596 might be needed | 1403 | acknowledgement aside from acking the 82596 might be needed |
@@ -1426,7 +1426,7 @@ static int i596_close(struct net_device *dev) | |||
1426 | 1426 | ||
1427 | wait_cmd(dev, lp, 100, "close1 timed out"); | 1427 | wait_cmd(dev, lp, 100, "close1 timed out"); |
1428 | lp->scb.command = CUC_ABORT | RX_ABORT; | 1428 | lp->scb.command = CUC_ABORT | RX_ABORT; |
1429 | CHECK_WBACK(&lp->scb, sizeof(struct i596_scb)); | 1429 | CHECK_WBACK(lp, &lp->scb, sizeof(struct i596_scb)); |
1430 | 1430 | ||
1431 | CA(dev); | 1431 | CA(dev); |
1432 | 1432 | ||
@@ -1486,7 +1486,7 @@ static void set_multicast_list(struct net_device *dev) | |||
1486 | dev->name); | 1486 | dev->name); |
1487 | else { | 1487 | else { |
1488 | lp->cf_cmd.cmd.command = CmdConfigure; | 1488 | lp->cf_cmd.cmd.command = CmdConfigure; |
1489 | CHECK_WBACK_INV(&lp->cf_cmd, sizeof(struct cf_cmd)); | 1489 | CHECK_WBACK_INV(lp, &lp->cf_cmd, sizeof(struct cf_cmd)); |
1490 | i596_add_cmd(dev, &lp->cf_cmd.cmd); | 1490 | i596_add_cmd(dev, &lp->cf_cmd.cmd); |
1491 | } | 1491 | } |
1492 | } | 1492 | } |
@@ -1514,7 +1514,7 @@ static void set_multicast_list(struct net_device *dev) | |||
1514 | DEB(DEB_MULTI, printk("%s: Adding address %02x:%02x:%02x:%02x:%02x:%02x\n", | 1514 | DEB(DEB_MULTI, printk("%s: Adding address %02x:%02x:%02x:%02x:%02x:%02x\n", |
1515 | dev->name, cp[0],cp[1],cp[2],cp[3],cp[4],cp[5])); | 1515 | dev->name, cp[0],cp[1],cp[2],cp[3],cp[4],cp[5])); |
1516 | } | 1516 | } |
1517 | CHECK_WBACK_INV(&lp->mc_cmd, sizeof(struct mc_cmd)); | 1517 | CHECK_WBACK_INV(lp, &lp->mc_cmd, sizeof(struct mc_cmd)); |
1518 | i596_add_cmd(dev, &cmd->cmd); | 1518 | i596_add_cmd(dev, &cmd->cmd); |
1519 | } | 1519 | } |
1520 | } | 1520 | } |