diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-09-13 13:24:59 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-13 13:24:59 -0400 |
commit | 6aa20a2235535605db6d6d2bd850298b2fe7f31e (patch) | |
tree | df0b855043407b831d57f2f2c271f8aab48444f4 /drivers/net/sunlance.c | |
parent | 7a291083225af6e22ffaa46b3d91cfc1a1ccaab4 (diff) |
drivers/net: Trim trailing whitespace
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/sunlance.c')
-rw-r--r-- | drivers/net/sunlance.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index ec0413609f36..e4c8576454d7 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c | |||
@@ -64,7 +64,7 @@ | |||
64 | * David S. Miller (davem@redhat.com) | 64 | * David S. Miller (davem@redhat.com) |
65 | * 2.01: | 65 | * 2.01: |
66 | * 11/08/01: Use library crc32 functions (Matt_Domsch@dell.com) | 66 | * 11/08/01: Use library crc32 functions (Matt_Domsch@dell.com) |
67 | * | 67 | * |
68 | */ | 68 | */ |
69 | 69 | ||
70 | #undef DEBUG_DRIVER | 70 | #undef DEBUG_DRIVER |
@@ -209,7 +209,7 @@ struct lance_tx_desc { | |||
209 | s16 length; /* Length is 2s complement (negative)! */ | 209 | s16 length; /* Length is 2s complement (negative)! */ |
210 | u16 misc; | 210 | u16 misc; |
211 | }; | 211 | }; |
212 | 212 | ||
213 | /* The LANCE initialization block, described in databook. */ | 213 | /* The LANCE initialization block, described in databook. */ |
214 | /* On the Sparc, this block should be on a DMA region */ | 214 | /* On the Sparc, this block should be on a DMA region */ |
215 | struct lance_init_block { | 215 | struct lance_init_block { |
@@ -222,11 +222,11 @@ struct lance_init_block { | |||
222 | u16 rx_len; /* receive len and high addr */ | 222 | u16 rx_len; /* receive len and high addr */ |
223 | u16 tx_ptr; /* transmit descriptor addr */ | 223 | u16 tx_ptr; /* transmit descriptor addr */ |
224 | u16 tx_len; /* transmit len and high addr */ | 224 | u16 tx_len; /* transmit len and high addr */ |
225 | 225 | ||
226 | /* The Tx and Rx ring entries must aligned on 8-byte boundaries. */ | 226 | /* The Tx and Rx ring entries must aligned on 8-byte boundaries. */ |
227 | struct lance_rx_desc brx_ring[RX_RING_SIZE]; | 227 | struct lance_rx_desc brx_ring[RX_RING_SIZE]; |
228 | struct lance_tx_desc btx_ring[TX_RING_SIZE]; | 228 | struct lance_tx_desc btx_ring[TX_RING_SIZE]; |
229 | 229 | ||
230 | u8 tx_buf [TX_RING_SIZE][TX_BUFF_SIZE]; | 230 | u8 tx_buf [TX_RING_SIZE][TX_BUFF_SIZE]; |
231 | u8 pad[2]; /* align rx_buf for copy_and_sum(). */ | 231 | u8 pad[2]; /* align rx_buf for copy_and_sum(). */ |
232 | u8 rx_buf [RX_RING_SIZE][RX_BUFF_SIZE]; | 232 | u8 rx_buf [RX_RING_SIZE][RX_BUFF_SIZE]; |
@@ -243,12 +243,12 @@ struct lance_private { | |||
243 | void __iomem *dregs; /* DMA controller regs. */ | 243 | void __iomem *dregs; /* DMA controller regs. */ |
244 | struct lance_init_block __iomem *init_block_iomem; | 244 | struct lance_init_block __iomem *init_block_iomem; |
245 | struct lance_init_block *init_block_mem; | 245 | struct lance_init_block *init_block_mem; |
246 | 246 | ||
247 | spinlock_t lock; | 247 | spinlock_t lock; |
248 | 248 | ||
249 | int rx_new, tx_new; | 249 | int rx_new, tx_new; |
250 | int rx_old, tx_old; | 250 | int rx_old, tx_old; |
251 | 251 | ||
252 | struct net_device_stats stats; | 252 | struct net_device_stats stats; |
253 | struct sbus_dma *ledma; /* If set this points to ledma */ | 253 | struct sbus_dma *ledma; /* If set this points to ledma */ |
254 | char tpe; /* cable-selection is TPE */ | 254 | char tpe; /* cable-selection is TPE */ |
@@ -325,7 +325,7 @@ static void lance_init_ring_dvma(struct net_device *dev) | |||
325 | dma_addr_t aib = lp->init_block_dvma; | 325 | dma_addr_t aib = lp->init_block_dvma; |
326 | __u32 leptr; | 326 | __u32 leptr; |
327 | int i; | 327 | int i; |
328 | 328 | ||
329 | /* Lock out other processes while setting up hardware */ | 329 | /* Lock out other processes while setting up hardware */ |
330 | netif_stop_queue(dev); | 330 | netif_stop_queue(dev); |
331 | lp->rx_new = lp->tx_new = 0; | 331 | lp->rx_new = lp->tx_new = 0; |
@@ -363,12 +363,12 @@ static void lance_init_ring_dvma(struct net_device *dev) | |||
363 | } | 363 | } |
364 | 364 | ||
365 | /* Setup the initialization block */ | 365 | /* Setup the initialization block */ |
366 | 366 | ||
367 | /* Setup rx descriptor pointer */ | 367 | /* Setup rx descriptor pointer */ |
368 | leptr = LANCE_ADDR(aib + libdesc_offset(brx_ring, 0)); | 368 | leptr = LANCE_ADDR(aib + libdesc_offset(brx_ring, 0)); |
369 | ib->rx_len = (LANCE_LOG_RX_BUFFERS << 13) | (leptr >> 16); | 369 | ib->rx_len = (LANCE_LOG_RX_BUFFERS << 13) | (leptr >> 16); |
370 | ib->rx_ptr = leptr; | 370 | ib->rx_ptr = leptr; |
371 | 371 | ||
372 | /* Setup tx descriptor pointer */ | 372 | /* Setup tx descriptor pointer */ |
373 | leptr = LANCE_ADDR(aib + libdesc_offset(btx_ring, 0)); | 373 | leptr = LANCE_ADDR(aib + libdesc_offset(btx_ring, 0)); |
374 | ib->tx_len = (LANCE_LOG_TX_BUFFERS << 13) | (leptr >> 16); | 374 | ib->tx_len = (LANCE_LOG_TX_BUFFERS << 13) | (leptr >> 16); |
@@ -381,7 +381,7 @@ static void lance_init_ring_pio(struct net_device *dev) | |||
381 | struct lance_init_block __iomem *ib = lp->init_block_iomem; | 381 | struct lance_init_block __iomem *ib = lp->init_block_iomem; |
382 | u32 leptr; | 382 | u32 leptr; |
383 | int i; | 383 | int i; |
384 | 384 | ||
385 | /* Lock out other processes while setting up hardware */ | 385 | /* Lock out other processes while setting up hardware */ |
386 | netif_stop_queue(dev); | 386 | netif_stop_queue(dev); |
387 | lp->rx_new = lp->tx_new = 0; | 387 | lp->rx_new = lp->tx_new = 0; |
@@ -422,13 +422,13 @@ static void lance_init_ring_pio(struct net_device *dev) | |||
422 | } | 422 | } |
423 | 423 | ||
424 | /* Setup the initialization block */ | 424 | /* Setup the initialization block */ |
425 | 425 | ||
426 | /* Setup rx descriptor pointer */ | 426 | /* Setup rx descriptor pointer */ |
427 | leptr = libdesc_offset(brx_ring, 0); | 427 | leptr = libdesc_offset(brx_ring, 0); |
428 | sbus_writew((LANCE_LOG_RX_BUFFERS << 13) | (leptr >> 16), | 428 | sbus_writew((LANCE_LOG_RX_BUFFERS << 13) | (leptr >> 16), |
429 | &ib->rx_len); | 429 | &ib->rx_len); |
430 | sbus_writew(leptr, &ib->rx_ptr); | 430 | sbus_writew(leptr, &ib->rx_ptr); |
431 | 431 | ||
432 | /* Setup tx descriptor pointer */ | 432 | /* Setup tx descriptor pointer */ |
433 | leptr = libdesc_offset(btx_ring, 0); | 433 | leptr = libdesc_offset(btx_ring, 0); |
434 | sbus_writew((LANCE_LOG_TX_BUFFERS << 13) | (leptr >> 16), | 434 | sbus_writew((LANCE_LOG_TX_BUFFERS << 13) | (leptr >> 16), |
@@ -544,7 +544,7 @@ static void lance_rx_dvma(struct net_device *dev) | |||
544 | lp->rx_new = RX_NEXT(entry); | 544 | lp->rx_new = RX_NEXT(entry); |
545 | return; | 545 | return; |
546 | } | 546 | } |
547 | 547 | ||
548 | lp->stats.rx_bytes += len; | 548 | lp->stats.rx_bytes += len; |
549 | 549 | ||
550 | skb->dev = dev; | 550 | skb->dev = dev; |
@@ -584,10 +584,10 @@ static void lance_tx_dvma(struct net_device *dev) | |||
584 | /* If we hit a packet not owned by us, stop */ | 584 | /* If we hit a packet not owned by us, stop */ |
585 | if (bits & LE_T1_OWN) | 585 | if (bits & LE_T1_OWN) |
586 | break; | 586 | break; |
587 | 587 | ||
588 | if (bits & LE_T1_ERR) { | 588 | if (bits & LE_T1_ERR) { |
589 | u16 status = td->misc; | 589 | u16 status = td->misc; |
590 | 590 | ||
591 | lp->stats.tx_errors++; | 591 | lp->stats.tx_errors++; |
592 | if (status & LE_T3_RTY) lp->stats.tx_aborted_errors++; | 592 | if (status & LE_T3_RTY) lp->stats.tx_aborted_errors++; |
593 | if (status & LE_T3_LCOL) lp->stats.tx_window_errors++; | 593 | if (status & LE_T3_LCOL) lp->stats.tx_window_errors++; |
@@ -636,7 +636,7 @@ static void lance_tx_dvma(struct net_device *dev) | |||
636 | 636 | ||
637 | lp->stats.tx_packets++; | 637 | lp->stats.tx_packets++; |
638 | } | 638 | } |
639 | 639 | ||
640 | j = TX_NEXT(j); | 640 | j = TX_NEXT(j); |
641 | } | 641 | } |
642 | lp->tx_old = j; | 642 | lp->tx_old = j; |
@@ -718,7 +718,7 @@ static void lance_rx_pio(struct net_device *dev) | |||
718 | lp->rx_new = RX_NEXT(entry); | 718 | lp->rx_new = RX_NEXT(entry); |
719 | return; | 719 | return; |
720 | } | 720 | } |
721 | 721 | ||
722 | lp->stats.rx_bytes += len; | 722 | lp->stats.rx_bytes += len; |
723 | 723 | ||
724 | skb->dev = dev; | 724 | skb->dev = dev; |
@@ -756,10 +756,10 @@ static void lance_tx_pio(struct net_device *dev) | |||
756 | /* If we hit a packet not owned by us, stop */ | 756 | /* If we hit a packet not owned by us, stop */ |
757 | if (bits & LE_T1_OWN) | 757 | if (bits & LE_T1_OWN) |
758 | break; | 758 | break; |
759 | 759 | ||
760 | if (bits & LE_T1_ERR) { | 760 | if (bits & LE_T1_ERR) { |
761 | u16 status = sbus_readw(&td->misc); | 761 | u16 status = sbus_readw(&td->misc); |
762 | 762 | ||
763 | lp->stats.tx_errors++; | 763 | lp->stats.tx_errors++; |
764 | if (status & LE_T3_RTY) lp->stats.tx_aborted_errors++; | 764 | if (status & LE_T3_RTY) lp->stats.tx_aborted_errors++; |
765 | if (status & LE_T3_LCOL) lp->stats.tx_window_errors++; | 765 | if (status & LE_T3_LCOL) lp->stats.tx_window_errors++; |
@@ -808,7 +808,7 @@ static void lance_tx_pio(struct net_device *dev) | |||
808 | 808 | ||
809 | lp->stats.tx_packets++; | 809 | lp->stats.tx_packets++; |
810 | } | 810 | } |
811 | 811 | ||
812 | j = TX_NEXT(j); | 812 | j = TX_NEXT(j); |
813 | } | 813 | } |
814 | lp->tx_old = j; | 814 | lp->tx_old = j; |
@@ -825,27 +825,27 @@ static irqreturn_t lance_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
825 | struct net_device *dev = (struct net_device *)dev_id; | 825 | struct net_device *dev = (struct net_device *)dev_id; |
826 | struct lance_private *lp = netdev_priv(dev); | 826 | struct lance_private *lp = netdev_priv(dev); |
827 | int csr0; | 827 | int csr0; |
828 | 828 | ||
829 | sbus_writew(LE_CSR0, lp->lregs + RAP); | 829 | sbus_writew(LE_CSR0, lp->lregs + RAP); |
830 | csr0 = sbus_readw(lp->lregs + RDP); | 830 | csr0 = sbus_readw(lp->lregs + RDP); |
831 | 831 | ||
832 | /* Acknowledge all the interrupt sources ASAP */ | 832 | /* Acknowledge all the interrupt sources ASAP */ |
833 | sbus_writew(csr0 & (LE_C0_INTR | LE_C0_TINT | LE_C0_RINT), | 833 | sbus_writew(csr0 & (LE_C0_INTR | LE_C0_TINT | LE_C0_RINT), |
834 | lp->lregs + RDP); | 834 | lp->lregs + RDP); |
835 | 835 | ||
836 | if ((csr0 & LE_C0_ERR) != 0) { | 836 | if ((csr0 & LE_C0_ERR) != 0) { |
837 | /* Clear the error condition */ | 837 | /* Clear the error condition */ |
838 | sbus_writew((LE_C0_BABL | LE_C0_ERR | LE_C0_MISS | | 838 | sbus_writew((LE_C0_BABL | LE_C0_ERR | LE_C0_MISS | |
839 | LE_C0_CERR | LE_C0_MERR), | 839 | LE_C0_CERR | LE_C0_MERR), |
840 | lp->lregs + RDP); | 840 | lp->lregs + RDP); |
841 | } | 841 | } |
842 | 842 | ||
843 | if (csr0 & LE_C0_RINT) | 843 | if (csr0 & LE_C0_RINT) |
844 | lp->rx(dev); | 844 | lp->rx(dev); |
845 | 845 | ||
846 | if (csr0 & LE_C0_TINT) | 846 | if (csr0 & LE_C0_TINT) |
847 | lp->tx(dev); | 847 | lp->tx(dev); |
848 | 848 | ||
849 | if (csr0 & LE_C0_BABL) | 849 | if (csr0 & LE_C0_BABL) |
850 | lp->stats.tx_errors++; | 850 | lp->stats.tx_errors++; |
851 | 851 | ||
@@ -992,7 +992,7 @@ static int lance_reset(struct net_device *dev) | |||
992 | { | 992 | { |
993 | struct lance_private *lp = netdev_priv(dev); | 993 | struct lance_private *lp = netdev_priv(dev); |
994 | int status; | 994 | int status; |
995 | 995 | ||
996 | STOP_LANCE(lp); | 996 | STOP_LANCE(lp); |
997 | 997 | ||
998 | /* On the 4m, reset the dma too */ | 998 | /* On the 4m, reset the dma too */ |
@@ -1169,7 +1169,7 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1169 | 1169 | ||
1170 | dev->trans_start = jiffies; | 1170 | dev->trans_start = jiffies; |
1171 | dev_kfree_skb(skb); | 1171 | dev_kfree_skb(skb); |
1172 | 1172 | ||
1173 | return 0; | 1173 | return 0; |
1174 | } | 1174 | } |
1175 | 1175 | ||
@@ -1189,7 +1189,7 @@ static void lance_load_multicast(struct net_device *dev) | |||
1189 | int i; | 1189 | int i; |
1190 | u32 crc; | 1190 | u32 crc; |
1191 | u32 val; | 1191 | u32 val; |
1192 | 1192 | ||
1193 | /* set all multicast bits */ | 1193 | /* set all multicast bits */ |
1194 | if (dev->flags & IFF_ALLMULTI) | 1194 | if (dev->flags & IFF_ALLMULTI) |
1195 | val = ~0; | 1195 | val = ~0; |
@@ -1208,7 +1208,7 @@ static void lance_load_multicast(struct net_device *dev) | |||
1208 | 1208 | ||
1209 | if (dev->flags & IFF_ALLMULTI) | 1209 | if (dev->flags & IFF_ALLMULTI) |
1210 | return; | 1210 | return; |
1211 | 1211 | ||
1212 | /* Add addresses */ | 1212 | /* Add addresses */ |
1213 | for (i = 0; i < dev->mc_count; i++) { | 1213 | for (i = 0; i < dev->mc_count; i++) { |
1214 | addrs = dmi->dmi_addr; | 1214 | addrs = dmi->dmi_addr; |