aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sonic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sonic.c')
-rw-r--r--drivers/net/sonic.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/sonic.c b/drivers/net/sonic.c
index cab0dd958492..870cf6b07389 100644
--- a/drivers/net/sonic.c
+++ b/drivers/net/sonic.c
@@ -7,10 +7,10 @@
7 * (from the mac68k project) introduced dhd's support for 16-bit cards. 7 * (from the mac68k project) introduced dhd's support for 16-bit cards.
8 * 8 *
9 * (C) 1996,1998 by Thomas Bogendoerfer (tsbogend@alpha.franken.de) 9 * (C) 1996,1998 by Thomas Bogendoerfer (tsbogend@alpha.franken.de)
10 * 10 *
11 * This driver is based on work from Andreas Busse, but most of 11 * This driver is based on work from Andreas Busse, but most of
12 * the code is rewritten. 12 * the code is rewritten.
13 * 13 *
14 * (C) 1995 by Andreas Busse (andy@waldorf-gmbh.de) 14 * (C) 1995 by Andreas Busse (andy@waldorf-gmbh.de)
15 * 15 *
16 * Core code included by system sonic drivers 16 * Core code included by system sonic drivers
@@ -46,7 +46,7 @@ static int sonic_open(struct net_device *dev)
46{ 46{
47 struct sonic_local *lp = netdev_priv(dev); 47 struct sonic_local *lp = netdev_priv(dev);
48 int i; 48 int i;
49 49
50 if (sonic_debug > 2) 50 if (sonic_debug > 2)
51 printk("sonic_open: initializing sonic driver.\n"); 51 printk("sonic_open: initializing sonic driver.\n");
52 52
@@ -246,7 +246,7 @@ static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev)
246 dev_kfree_skb(skb); 246 dev_kfree_skb(skb);
247 return 1; 247 return 1;
248 } 248 }
249 249
250 sonic_tda_put(dev, entry, SONIC_TD_STATUS, 0); /* clear status */ 250 sonic_tda_put(dev, entry, SONIC_TD_STATUS, 0); /* clear status */
251 sonic_tda_put(dev, entry, SONIC_TD_FRAG_COUNT, 1); /* single fragment */ 251 sonic_tda_put(dev, entry, SONIC_TD_FRAG_COUNT, 1); /* single fragment */
252 sonic_tda_put(dev, entry, SONIC_TD_PKTSIZE, length); /* length of packet */ 252 sonic_tda_put(dev, entry, SONIC_TD_PKTSIZE, length); /* length of packet */
@@ -459,7 +459,7 @@ static void sonic_rx(struct net_device *dev)
459 new_skb->dev = dev; 459 new_skb->dev = dev;
460 /* provide 16 byte IP header alignment unless DMA requires otherwise */ 460 /* provide 16 byte IP header alignment unless DMA requires otherwise */
461 if(SONIC_BUS_SCALE(lp->dma_bitmode) == 2) 461 if(SONIC_BUS_SCALE(lp->dma_bitmode) == 2)
462 skb_reserve(new_skb, 2); 462 skb_reserve(new_skb, 2);
463 463
464 new_laddr = dma_map_single(lp->device, skb_put(new_skb, SONIC_RBSIZE), 464 new_laddr = dma_map_single(lp->device, skb_put(new_skb, SONIC_RBSIZE),
465 SONIC_RBSIZE, DMA_FROM_DEVICE); 465 SONIC_RBSIZE, DMA_FROM_DEVICE);
@@ -641,7 +641,7 @@ static int sonic_init(struct net_device *dev)
641 SONIC_BUS_SCALE(lp->dma_bitmode)) & 0xffff; 641 SONIC_BUS_SCALE(lp->dma_bitmode)) & 0xffff;
642 lp->cur_rwp = (lp->rra_laddr + (SONIC_NUM_RRS - 1) * SIZEOF_SONIC_RR * 642 lp->cur_rwp = (lp->rra_laddr + (SONIC_NUM_RRS - 1) * SIZEOF_SONIC_RR *
643 SONIC_BUS_SCALE(lp->dma_bitmode)) & 0xffff; 643 SONIC_BUS_SCALE(lp->dma_bitmode)) & 0xffff;
644 644
645 SONIC_WRITE(SONIC_RSA, lp->rra_laddr & 0xffff); 645 SONIC_WRITE(SONIC_RSA, lp->rra_laddr & 0xffff);
646 SONIC_WRITE(SONIC_REA, lp->rra_end); 646 SONIC_WRITE(SONIC_REA, lp->rra_end);
647 SONIC_WRITE(SONIC_RRP, lp->rra_laddr & 0xffff); 647 SONIC_WRITE(SONIC_RRP, lp->rra_laddr & 0xffff);
@@ -652,7 +652,7 @@ static int sonic_init(struct net_device *dev)
652 /* load the resource pointers */ 652 /* load the resource pointers */
653 if (sonic_debug > 3) 653 if (sonic_debug > 3)
654 printk("sonic_init: issuing RRRA command\n"); 654 printk("sonic_init: issuing RRRA command\n");
655 655
656 SONIC_WRITE(SONIC_CMD, SONIC_CR_RRRA); 656 SONIC_WRITE(SONIC_CMD, SONIC_CR_RRRA);
657 i = 0; 657 i = 0;
658 while (i++ < 100) { 658 while (i++ < 100) {
@@ -662,14 +662,14 @@ static int sonic_init(struct net_device *dev)
662 662
663 if (sonic_debug > 2) 663 if (sonic_debug > 2)
664 printk("sonic_init: status=%x i=%d\n", SONIC_READ(SONIC_CMD), i); 664 printk("sonic_init: status=%x i=%d\n", SONIC_READ(SONIC_CMD), i);
665 665
666 /* 666 /*
667 * Initialize the receive descriptors so that they 667 * Initialize the receive descriptors so that they
668 * become a circular linked list, ie. let the last 668 * become a circular linked list, ie. let the last
669 * descriptor point to the first again. 669 * descriptor point to the first again.
670 */ 670 */
671 if (sonic_debug > 2) 671 if (sonic_debug > 2)
672 printk("sonic_init: initialize receive descriptors\n"); 672 printk("sonic_init: initialize receive descriptors\n");
673 for (i=0; i<SONIC_NUM_RDS; i++) { 673 for (i=0; i<SONIC_NUM_RDS; i++) {
674 sonic_rda_put(dev, i, SONIC_RD_STATUS, 0); 674 sonic_rda_put(dev, i, SONIC_RD_STATUS, 0);
675 sonic_rda_put(dev, i, SONIC_RD_PKTLEN, 0); 675 sonic_rda_put(dev, i, SONIC_RD_PKTLEN, 0);
@@ -689,7 +689,7 @@ static int sonic_init(struct net_device *dev)
689 SONIC_WRITE(SONIC_URDA, lp->rda_laddr >> 16); 689 SONIC_WRITE(SONIC_URDA, lp->rda_laddr >> 16);
690 SONIC_WRITE(SONIC_CRDA, lp->rda_laddr & 0xffff); 690 SONIC_WRITE(SONIC_CRDA, lp->rda_laddr & 0xffff);
691 691
692 /* 692 /*
693 * initialize transmit descriptors 693 * initialize transmit descriptors
694 */ 694 */
695 if (sonic_debug > 2) 695 if (sonic_debug > 2)
@@ -712,7 +712,7 @@ static int sonic_init(struct net_device *dev)
712 SONIC_WRITE(SONIC_CTDA, lp->tda_laddr & 0xffff); 712 SONIC_WRITE(SONIC_CTDA, lp->tda_laddr & 0xffff);
713 lp->cur_tx = lp->next_tx = 0; 713 lp->cur_tx = lp->next_tx = 0;
714 lp->eol_tx = SONIC_NUM_TDS - 1; 714 lp->eol_tx = SONIC_NUM_TDS - 1;
715 715
716 /* 716 /*
717 * put our own address to CAM desc[0] 717 * put our own address to CAM desc[0]
718 */ 718 */