aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ni52.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2008-03-19 05:43:29 -0400
committerJeff Garzik <jeff@garzik.org>2008-03-26 00:17:59 -0400
commit2d76c267e90aafef72df1318b49cb8f43a59ac94 (patch)
tree89fbfdcd64f3b7c90b0742302db69db68f984bf9 /drivers/net/ni52.c
parent9c61a9dcb26dc1db9912c11568b98f89b635adfd (diff)
ni52 trivial iomem annotations
Driver is still broken, though; partially from Alan's checkpatch-induced fun, partially from layers of ancient mess ;-) By the end of the series... hell, might be even worth trying to stick such card into old alpha or ppc with an ISA slot and see if it work - would be for the first time ever in case of alpha and for the first time since at least 2.5.3 in case of ppc... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ni52.c')
-rw-r--r--drivers/net/ni52.c141
1 files changed, 70 insertions, 71 deletions
diff --git a/drivers/net/ni52.c b/drivers/net/ni52.c
index 26aa8fe1fb2d..10beb18b630d 100644
--- a/drivers/net/ni52.c
+++ b/drivers/net/ni52.c
@@ -182,7 +182,7 @@ static int init586(struct net_device *dev);
182static int check586(struct net_device *dev, char *where, unsigned size); 182static int check586(struct net_device *dev, char *where, unsigned size);
183static void alloc586(struct net_device *dev); 183static void alloc586(struct net_device *dev);
184static void startrecv586(struct net_device *dev); 184static void startrecv586(struct net_device *dev);
185static void *alloc_rfa(struct net_device *dev, void *ptr); 185static void __iomem *alloc_rfa(struct net_device *dev, void __iomem *ptr);
186static void ni52_rcv_int(struct net_device *dev); 186static void ni52_rcv_int(struct net_device *dev);
187static void ni52_xmt_int(struct net_device *dev); 187static void ni52_xmt_int(struct net_device *dev);
188static void ni52_rnr_int(struct net_device *dev); 188static void ni52_rnr_int(struct net_device *dev);
@@ -190,23 +190,23 @@ static void ni52_rnr_int(struct net_device *dev);
190struct priv { 190struct priv {
191 struct net_device_stats stats; 191 struct net_device_stats stats;
192 unsigned long base; 192 unsigned long base;
193 char *memtop; 193 char __iomem *memtop;
194 spinlock_t spinlock; 194 spinlock_t spinlock;
195 int reset; 195 int reset;
196 struct rfd_struct *rfd_last, *rfd_top, *rfd_first; 196 struct rfd_struct __iomem *rfd_last, *rfd_top, *rfd_first;
197 struct scp_struct *scp; 197 struct scp_struct __iomem *scp;
198 struct iscp_struct *iscp; 198 struct iscp_struct __iomem *iscp;
199 struct scb_struct *scb; 199 struct scb_struct __iomem *scb;
200 struct tbd_struct *xmit_buffs[NUM_XMIT_BUFFS]; 200 struct tbd_struct __iomem *xmit_buffs[NUM_XMIT_BUFFS];
201#if (NUM_XMIT_BUFFS == 1) 201#if (NUM_XMIT_BUFFS == 1)
202 struct transmit_cmd_struct *xmit_cmds[2]; 202 struct transmit_cmd_struct __iomem *xmit_cmds[2];
203 struct nop_cmd_struct *nop_cmds[2]; 203 struct nop_cmd_struct __iomem *nop_cmds[2];
204#else 204#else
205 struct transmit_cmd_struct *xmit_cmds[NUM_XMIT_BUFFS]; 205 struct transmit_cmd_struct __iomem *xmit_cmds[NUM_XMIT_BUFFS];
206 struct nop_cmd_struct *nop_cmds[NUM_XMIT_BUFFS]; 206 struct nop_cmd_struct __iomem *nop_cmds[NUM_XMIT_BUFFS];
207#endif 207#endif
208 int nop_point, num_recv_buffs; 208 int nop_point, num_recv_buffs;
209 char *xmit_cbuffs[NUM_XMIT_BUFFS]; 209 char __iomem *xmit_cbuffs[NUM_XMIT_BUFFS];
210 int xmit_count, xmit_last; 210 int xmit_count, xmit_last;
211}; 211};
212 212
@@ -249,9 +249,9 @@ static void wait_for_scb_cmd_ruc(struct net_device *dev)
249 } 249 }
250} 250}
251 251
252static void wait_for_stat_compl(void *p) 252static void wait_for_stat_compl(void __iomem *p)
253{ 253{
254 struct nop_cmd_struct *addr = p; 254 struct nop_cmd_struct __iomem *addr = p;
255 int i; 255 int i;
256 for (i = 0; i < 32767; i++) { 256 for (i = 0; i < 32767; i++) {
257 if (readw(&((addr)->cmd_status)) & STAT_COMPL) 257 if (readw(&((addr)->cmd_status)) & STAT_COMPL)
@@ -300,28 +300,28 @@ static int check586(struct net_device *dev, char *where, unsigned size)
300{ 300{
301 struct priv pb; 301 struct priv pb;
302 struct priv *p = /* (struct priv *) dev->priv*/ &pb; 302 struct priv *p = /* (struct priv *) dev->priv*/ &pb;
303 char *iscp_addrs[2]; 303 char __iomem *iscp_addrs[2];
304 int i; 304 int i;
305 305
306 p->base = (unsigned long) isa_bus_to_virt((unsigned long)where) 306 p->base = (unsigned long) isa_bus_to_virt((unsigned long)where)
307 + size - 0x01000000; 307 + size - 0x01000000;
308 p->memtop = isa_bus_to_virt((unsigned long)where) + size; 308 p->memtop = (char __iomem *)isa_bus_to_virt((unsigned long)where) + size;
309 p->scp = (struct scp_struct *)(p->base + SCP_DEFAULT_ADDRESS); 309 p->scp = (struct scp_struct __iomem *)(p->base + SCP_DEFAULT_ADDRESS);
310 memset_io((char *)p->scp, 0, sizeof(struct scp_struct)); 310 memset_io(p->scp, 0, sizeof(struct scp_struct));
311 for (i = 0; i < sizeof(struct scp_struct); i++) 311 for (i = 0; i < sizeof(struct scp_struct); i++)
312 /* memory was writeable? */ 312 /* memory was writeable? */
313 if (readb((char *)p->scp + i)) 313 if (readb((char __iomem *)p->scp + i))
314 return 0; 314 return 0;
315 writeb(SYSBUSVAL, &p->scp->sysbus); /* 1 = 8Bit-Bus, 0 = 16 Bit */ 315 writeb(SYSBUSVAL, &p->scp->sysbus); /* 1 = 8Bit-Bus, 0 = 16 Bit */
316 if (readb(&p->scp->sysbus) != SYSBUSVAL) 316 if (readb(&p->scp->sysbus) != SYSBUSVAL)
317 return 0; 317 return 0;
318 318
319 iscp_addrs[0] = isa_bus_to_virt((unsigned long)where); 319 iscp_addrs[0] = (char __iomem *)isa_bus_to_virt((unsigned long)where);
320 iscp_addrs[1] = (char *) p->scp - sizeof(struct iscp_struct); 320 iscp_addrs[1] = (char __iomem *)p->scp - sizeof(struct iscp_struct);
321 321
322 for (i = 0; i < 2; i++) { 322 for (i = 0; i < 2; i++) {
323 p->iscp = (struct iscp_struct *) iscp_addrs[i]; 323 p->iscp = (struct iscp_struct __iomem *) iscp_addrs[i];
324 memset_io((char *)p->iscp, 0, sizeof(struct iscp_struct)); 324 memset_io(p->iscp, 0, sizeof(struct iscp_struct));
325 325
326 writel(make24(p->iscp), &p->scp->iscp); 326 writel(make24(p->iscp), &p->scp->iscp);
327 writeb(1, &p->iscp->busy); 327 writeb(1, &p->iscp->busy);
@@ -348,10 +348,10 @@ static void alloc586(struct net_device *dev)
348 348
349 spin_lock_init(&p->spinlock); 349 spin_lock_init(&p->spinlock);
350 350
351 p->scp = (struct scp_struct *) (p->base + SCP_DEFAULT_ADDRESS); 351 p->scp = (struct scp_struct __iomem *) (p->base + SCP_DEFAULT_ADDRESS);
352 p->scb = (struct scb_struct *) isa_bus_to_virt(dev->mem_start); 352 p->scb = (struct scb_struct __iomem *) isa_bus_to_virt(dev->mem_start);
353 p->iscp = (struct iscp_struct *) 353 p->iscp = (struct iscp_struct __iomem *)
354 ((char *)p->scp - sizeof(struct iscp_struct)); 354 ((char __iomem *)p->scp - sizeof(struct iscp_struct));
355 355
356 memset_io(p->iscp, 0, sizeof(struct iscp_struct)); 356 memset_io(p->iscp, 0, sizeof(struct iscp_struct));
357 memset_io(p->scp , 0, sizeof(struct scp_struct)); 357 memset_io(p->scp , 0, sizeof(struct scp_struct));
@@ -371,7 +371,7 @@ static void alloc586(struct net_device *dev)
371 371
372 p->reset = 0; 372 p->reset = 0;
373 373
374 memset_io((char *)p->scb, 0, sizeof(struct scb_struct)); 374 memset_io(p->scb, 0, sizeof(struct scb_struct));
375} 375}
376 376
377/* set: io,irq,memstart,memend or set it when calling insmod */ 377/* set: io,irq,memstart,memend or set it when calling insmod */
@@ -520,7 +520,7 @@ static int __init ni52_probe1(struct net_device *dev, int ioaddr)
520 memset((char *)dev->priv, 0, sizeof(struct priv)); 520 memset((char *)dev->priv, 0, sizeof(struct priv));
521 521
522 ((struct priv *)(dev->priv))->memtop = 522 ((struct priv *)(dev->priv))->memtop =
523 isa_bus_to_virt(dev->mem_start) + size; 523 (char __iomem *)isa_bus_to_virt(dev->mem_start) + size;
524 ((struct priv *)(dev->priv))->base = (unsigned long) 524 ((struct priv *)(dev->priv))->base = (unsigned long)
525 isa_bus_to_virt(dev->mem_start) + size - 0x01000000; 525 isa_bus_to_virt(dev->mem_start) + size - 0x01000000;
526 alloc586(dev); 526 alloc586(dev);
@@ -578,19 +578,19 @@ out:
578 578
579static int init586(struct net_device *dev) 579static int init586(struct net_device *dev)
580{ 580{
581 void *ptr; 581 void __iomem *ptr;
582 int i, result = 0; 582 int i, result = 0;
583 struct priv *p = (struct priv *)dev->priv; 583 struct priv *p = (struct priv *)dev->priv;
584 struct configure_cmd_struct *cfg_cmd; 584 struct configure_cmd_struct __iomem *cfg_cmd;
585 struct iasetup_cmd_struct *ias_cmd; 585 struct iasetup_cmd_struct __iomem *ias_cmd;
586 struct tdr_cmd_struct *tdr_cmd; 586 struct tdr_cmd_struct __iomem *tdr_cmd;
587 struct mcsetup_cmd_struct *mc_cmd; 587 struct mcsetup_cmd_struct __iomem *mc_cmd;
588 struct dev_mc_list *dmi = dev->mc_list; 588 struct dev_mc_list *dmi = dev->mc_list;
589 int num_addrs = dev->mc_count; 589 int num_addrs = dev->mc_count;
590 590
591 ptr = (void *) ((char *)p->scb + sizeof(struct scb_struct)); 591 ptr = p->scb + 1;
592 592
593 cfg_cmd = (struct configure_cmd_struct *)ptr; /* configure-command */ 593 cfg_cmd = ptr; /* configure-command */
594 writew(0, &cfg_cmd->cmd_status); 594 writew(0, &cfg_cmd->cmd_status);
595 writew(CMD_CONFIGURE | CMD_LAST, &cfg_cmd->cmd_cmd); 595 writew(CMD_CONFIGURE | CMD_LAST, &cfg_cmd->cmd_cmd);
596 writew(0xFFFF, &cfg_cmd->cmd_link); 596 writew(0xFFFF, &cfg_cmd->cmd_link);
@@ -609,7 +609,7 @@ static int init586(struct net_device *dev)
609 writeb(0xf2, &cfg_cmd->time_high); 609 writeb(0xf2, &cfg_cmd->time_high);
610 writeb(0x00, &cfg_cmd->promisc);; 610 writeb(0x00, &cfg_cmd->promisc);;
611 if (dev->flags & IFF_ALLMULTI) { 611 if (dev->flags & IFF_ALLMULTI) {
612 int len = ((char *) p->iscp - (char *) ptr - 8) / 6; 612 int len = ((char __iomem *)p->iscp - (char __iomem *)ptr - 8) / 6;
613 if (num_addrs > len) { 613 if (num_addrs > len) {
614 printk(KERN_ERR "%s: switching to promisc. mode\n", 614 printk(KERN_ERR "%s: switching to promisc. mode\n",
615 dev->name); 615 dev->name);
@@ -638,13 +638,13 @@ static int init586(struct net_device *dev)
638 * individual address setup 638 * individual address setup
639 */ 639 */
640 640
641 ias_cmd = (struct iasetup_cmd_struct *)ptr; 641 ias_cmd = ptr;
642 642
643 writew(0, &ias_cmd->cmd_status); 643 writew(0, &ias_cmd->cmd_status);
644 writew(CMD_IASETUP | CMD_LAST, &ias_cmd->cmd_cmd); 644 writew(CMD_IASETUP | CMD_LAST, &ias_cmd->cmd_cmd);
645 writew(0xffff, &ias_cmd->cmd_link); 645 writew(0xffff, &ias_cmd->cmd_link);
646 646
647 memcpy_toio((char *)&ias_cmd->iaddr, (char *)dev->dev_addr, ETH_ALEN); 647 memcpy_toio(&ias_cmd->iaddr, (char *)dev->dev_addr, ETH_ALEN);
648 648
649 writew(make16(ias_cmd), &p->scb->cbl_offset); 649 writew(make16(ias_cmd), &p->scb->cbl_offset);
650 650
@@ -663,7 +663,7 @@ static int init586(struct net_device *dev)
663 * TDR, wire check .. e.g. no resistor e.t.c 663 * TDR, wire check .. e.g. no resistor e.t.c
664 */ 664 */
665 665
666 tdr_cmd = (struct tdr_cmd_struct *)ptr; 666 tdr_cmd = ptr;
667 667
668 writew(0, &tdr_cmd->cmd_status); 668 writew(0, &tdr_cmd->cmd_status);
669 writew(CMD_TDR | CMD_LAST, &tdr_cmd->cmd_cmd); 669 writew(CMD_TDR | CMD_LAST, &tdr_cmd->cmd_cmd);
@@ -707,14 +707,14 @@ static int init586(struct net_device *dev)
707 * Multicast setup 707 * Multicast setup
708 */ 708 */
709 if (num_addrs && !(dev->flags & IFF_PROMISC)) { 709 if (num_addrs && !(dev->flags & IFF_PROMISC)) {
710 mc_cmd = (struct mcsetup_cmd_struct *) ptr; 710 mc_cmd = ptr;
711 writew(0, &mc_cmd->cmd_status); 711 writew(0, &mc_cmd->cmd_status);
712 writew(CMD_MCSETUP | CMD_LAST, &mc_cmd->cmd_cmd); 712 writew(CMD_MCSETUP | CMD_LAST, &mc_cmd->cmd_cmd);
713 writew(0xffff, &mc_cmd->cmd_link); 713 writew(0xffff, &mc_cmd->cmd_link);
714 writew(num_addrs * 6, &mc_cmd->mc_cnt); 714 writew(num_addrs * 6, &mc_cmd->mc_cnt);
715 715
716 for (i = 0; i < num_addrs; i++, dmi = dmi->next) 716 for (i = 0; i < num_addrs; i++, dmi = dmi->next)
717 memcpy_toio((char *) mc_cmd->mc_list[i], 717 memcpy_toio(mc_cmd->mc_list[i],
718 dmi->dmi_addr, 6); 718 dmi->dmi_addr, 6);
719 719
720 writew(make16(mc_cmd), &p->scb->cbl_offset); 720 writew(make16(mc_cmd), &p->scb->cbl_offset);
@@ -733,43 +733,43 @@ static int init586(struct net_device *dev)
733 */ 733 */
734#if (NUM_XMIT_BUFFS == 1) 734#if (NUM_XMIT_BUFFS == 1)
735 for (i = 0; i < 2; i++) { 735 for (i = 0; i < 2; i++) {
736 p->nop_cmds[i] = (struct nop_cmd_struct *)ptr; 736 p->nop_cmds[i] = ptr;
737 writew(CMD_NOP, &p->nop_cmds[i]->cmd_cmd); 737 writew(CMD_NOP, &p->nop_cmds[i]->cmd_cmd);
738 writew(0, &p->nop_cmds[i]->cmd_status); 738 writew(0, &p->nop_cmds[i]->cmd_status);
739 writew(make16(p->nop_cmds[i]), &p->nop_cmds[i]->cmd_link); 739 writew(make16(p->nop_cmds[i]), &p->nop_cmds[i]->cmd_link);
740 ptr = (char *) ptr + sizeof(struct nop_cmd_struct); 740 ptr = ptr + sizeof(struct nop_cmd_struct);
741 } 741 }
742#else 742#else
743 for (i = 0; i < NUM_XMIT_BUFFS; i++) { 743 for (i = 0; i < NUM_XMIT_BUFFS; i++) {
744 p->nop_cmds[i] = (struct nop_cmd_struct *)ptr; 744 p->nop_cmds[i] = ptr;
745 writew(CMD_NOP, &p->nop_cmds[i]->cmd_cmd); 745 writew(CMD_NOP, &p->nop_cmds[i]->cmd_cmd);
746 writew(0, &p->nop_cmds[i]->cmd_status); 746 writew(0, &p->nop_cmds[i]->cmd_status);
747 writew(make16(p->nop_cmds[i]), &p->nop_cmds[i]->cmd_link); 747 writew(make16(p->nop_cmds[i]), &p->nop_cmds[i]->cmd_link);
748 ptr = (char *) ptr + sizeof(struct nop_cmd_struct); 748 ptr = ptr + sizeof(struct nop_cmd_struct);
749 } 749 }
750#endif 750#endif
751 751
752 ptr = alloc_rfa(dev, (void *)ptr); /* init receive-frame-area */ 752 ptr = alloc_rfa(dev, ptr); /* init receive-frame-area */
753 753
754 /* 754 /*
755 * alloc xmit-buffs / init xmit_cmds 755 * alloc xmit-buffs / init xmit_cmds
756 */ 756 */
757 for (i = 0; i < NUM_XMIT_BUFFS; i++) { 757 for (i = 0; i < NUM_XMIT_BUFFS; i++) {
758 /* Transmit cmd/buff 0 */ 758 /* Transmit cmd/buff 0 */
759 p->xmit_cmds[i] = (struct transmit_cmd_struct *)ptr; 759 p->xmit_cmds[i] = ptr;
760 ptr = (char *) ptr + sizeof(struct transmit_cmd_struct); 760 ptr = ptr + sizeof(struct transmit_cmd_struct);
761 p->xmit_cbuffs[i] = (char *)ptr; /* char-buffs */ 761 p->xmit_cbuffs[i] = ptr; /* char-buffs */
762 ptr = (char *) ptr + XMIT_BUFF_SIZE; 762 ptr = ptr + XMIT_BUFF_SIZE;
763 p->xmit_buffs[i] = (struct tbd_struct *)ptr; /* TBD */ 763 p->xmit_buffs[i] = ptr; /* TBD */
764 ptr = (char *) ptr + sizeof(struct tbd_struct); 764 ptr = ptr + sizeof(struct tbd_struct);
765 if ((void *)ptr > (void *)p->iscp) { 765 if ((void __iomem *)ptr > (void __iomem *)p->iscp) {
766 printk(KERN_ERR "%s: not enough shared-mem for your configuration!\n", 766 printk(KERN_ERR "%s: not enough shared-mem for your configuration!\n",
767 dev->name); 767 dev->name);
768 return 1; 768 return 1;
769 } 769 }
770 memset_io((char *)(p->xmit_cmds[i]), 0, 770 memset_io(p->xmit_cmds[i], 0,
771 sizeof(struct transmit_cmd_struct)); 771 sizeof(struct transmit_cmd_struct));
772 memset_io((char *)(p->xmit_buffs[i]), 0, 772 memset_io(p->xmit_buffs[i], 0,
773 sizeof(struct tbd_struct)); 773 sizeof(struct tbd_struct));
774 writew(make16(p->nop_cmds[(i+1)%NUM_XMIT_BUFFS]), 774 writew(make16(p->nop_cmds[(i+1)%NUM_XMIT_BUFFS]),
775 &p->xmit_cmds[i]->cmd_link); 775 &p->xmit_cmds[i]->cmd_link);
@@ -816,14 +816,14 @@ static int init586(struct net_device *dev)
816 * It sets up the Receive Frame Area (RFA). 816 * It sets up the Receive Frame Area (RFA).
817 */ 817 */
818 818
819static void *alloc_rfa(struct net_device *dev, void *ptr) 819static void __iomem *alloc_rfa(struct net_device *dev, void __iomem *ptr)
820{ 820{
821 struct rfd_struct *rfd = (struct rfd_struct *)ptr; 821 struct rfd_struct __iomem *rfd = ptr;
822 struct rbd_struct *rbd; 822 struct rbd_struct __iomem *rbd;
823 int i; 823 int i;
824 struct priv *p = (struct priv *) dev->priv; 824 struct priv *p = (struct priv *) dev->priv;
825 825
826 memset_io((char *) rfd, 0, 826 memset_io(rfd, 0,
827 sizeof(struct rfd_struct) * (p->num_recv_buffs + rfdadd)); 827 sizeof(struct rfd_struct) * (p->num_recv_buffs + rfdadd));
828 p->rfd_first = rfd; 828 p->rfd_first = rfd;
829 829
@@ -835,20 +835,19 @@ static void *alloc_rfa(struct net_device *dev, void *ptr)
835 /* RU suspend */ 835 /* RU suspend */
836 writeb(RFD_SUSP, &rfd[p->num_recv_buffs-1+rfdadd].last); 836 writeb(RFD_SUSP, &rfd[p->num_recv_buffs-1+rfdadd].last);
837 837
838 ptr = (void *) (rfd + (p->num_recv_buffs + rfdadd)); 838 ptr = rfd + (p->num_recv_buffs + rfdadd);
839 839
840 rbd = (struct rbd_struct *) ptr; 840 rbd = ptr;
841 ptr = (void *) (rbd + p->num_recv_buffs); 841 ptr = rbd + p->num_recv_buffs;
842 842
843 /* clr descriptors */ 843 /* clr descriptors */
844 memset_io((char *)rbd, 0, 844 memset_io(rbd, 0, sizeof(struct rbd_struct) * (p->num_recv_buffs));
845 sizeof(struct rbd_struct) * (p->num_recv_buffs));
846 845
847 for (i = 0; i < p->num_recv_buffs; i++) { 846 for (i = 0; i < p->num_recv_buffs; i++) {
848 writew(make16(rbd + (i+1) % p->num_recv_buffs), &rbd[i].next); 847 writew(make16(rbd + (i+1) % p->num_recv_buffs), &rbd[i].next);
849 writew(RECV_BUFF_SIZE, &rbd[i].size); 848 writew(RECV_BUFF_SIZE, &rbd[i].size);
850 writel(make24(ptr), &rbd[i].buffer); 849 writel(make24(ptr), &rbd[i].buffer);
851 ptr = (char *) ptr + RECV_BUFF_SIZE; 850 ptr = ptr + RECV_BUFF_SIZE;
852 } 851 }
853 p->rfd_top = p->rfd_first; 852 p->rfd_top = p->rfd_first;
854 p->rfd_last = p->rfd_first + (p->num_recv_buffs - 1 + rfdadd); 853 p->rfd_last = p->rfd_first + (p->num_recv_buffs - 1 + rfdadd);
@@ -942,14 +941,14 @@ static void ni52_rcv_int(struct net_device *dev)
942 int status, cnt = 0; 941 int status, cnt = 0;
943 unsigned short totlen; 942 unsigned short totlen;
944 struct sk_buff *skb; 943 struct sk_buff *skb;
945 struct rbd_struct *rbd; 944 struct rbd_struct __iomem *rbd;
946 struct priv *p = (struct priv *)dev->priv; 945 struct priv *p = (struct priv *)dev->priv;
947 946
948 if (debuglevel > 0) 947 if (debuglevel > 0)
949 printk("R"); 948 printk("R");
950 949
951 for (; (status = readb(&p->rfd_top->stat_high)) & RFD_COMPL;) { 950 for (; (status = readb(&p->rfd_top->stat_high)) & RFD_COMPL;) {
952 rbd = (struct rbd_struct *) make32(p->rfd_top->rbd_offset); 951 rbd = (struct rbd_struct __iomem *) make32(p->rfd_top->rbd_offset);
953 if (status & RFD_OK) { /* frame received without error? */ 952 if (status & RFD_OK) { /* frame received without error? */
954 totlen = readw(&rbd->status); 953 totlen = readw(&rbd->status);
955 if (totlen & RBD_LAST) { 954 if (totlen & RBD_LAST) {
@@ -979,7 +978,7 @@ static void ni52_rcv_int(struct net_device *dev)
979 break; 978 break;
980 } 979 }
981 writew(0, &rbd->status); 980 writew(0, &rbd->status);
982 rbd = (struct rbd_struct *) make32(readl(&rbd->next)); 981 rbd = (struct rbd_struct __iomem *) make32(readl(&rbd->next));
983 } 982 }
984 totlen += rstat & RBD_MASK; 983 totlen += rstat & RBD_MASK;
985 writew(0, &rbd->status); 984 writew(0, &rbd->status);
@@ -997,7 +996,7 @@ static void ni52_rcv_int(struct net_device *dev)
997 writew(0xffff, &p->rfd_top->rbd_offset); 996 writew(0xffff, &p->rfd_top->rbd_offset);
998 writeb(0, &p->rfd_last->last); /* delete RFD_SUSP */ 997 writeb(0, &p->rfd_last->last); /* delete RFD_SUSP */
999 p->rfd_last = p->rfd_top; 998 p->rfd_last = p->rfd_top;
1000 p->rfd_top = (struct rfd_struct *) make32(p->rfd_top->next); /* step to next RFD */ 999 p->rfd_top = (struct rfd_struct __iomem *) make32(p->rfd_top->next); /* step to next RFD */
1001 writew(make16(p->rfd_top), &p->scb->rfa_offset); 1000 writew(make16(p->rfd_top), &p->scb->rfa_offset);
1002 1001
1003 if (debuglevel > 0) 1002 if (debuglevel > 0)
@@ -1042,7 +1041,7 @@ static void ni52_rnr_int(struct net_device *dev)
1042 ni_attn586(); 1041 ni_attn586();
1043 wait_for_scb_cmd_ruc(dev); /* wait for accept cmd. */ 1042 wait_for_scb_cmd_ruc(dev); /* wait for accept cmd. */
1044 1043
1045 alloc_rfa(dev, (char *)p->rfd_first); 1044 alloc_rfa(dev, p->rfd_first);
1046 /* maybe add a check here, before restarting the RU */ 1045 /* maybe add a check here, before restarting the RU */
1047 startrecv586(dev); /* restart RU */ 1046 startrecv586(dev); /* restart RU */
1048 1047