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/lance.c | |
parent | 7a291083225af6e22ffaa46b3d91cfc1a1ccaab4 (diff) |
drivers/net: Trim trailing whitespace
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/lance.c')
-rw-r--r-- | drivers/net/lance.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/lance.c b/drivers/net/lance.c index dc997be44ed7..f349e88e0ddf 100644 --- a/drivers/net/lance.c +++ b/drivers/net/lance.c | |||
@@ -19,7 +19,7 @@ | |||
19 | - alignment problem with 1.3.* kernel and some minor changes. | 19 | - alignment problem with 1.3.* kernel and some minor changes. |
20 | Thomas Bogendoerfer (tsbogend@bigbug.franken.de): | 20 | Thomas Bogendoerfer (tsbogend@bigbug.franken.de): |
21 | - added support for Linux/Alpha, but removed most of it, because | 21 | - added support for Linux/Alpha, but removed most of it, because |
22 | it worked only for the PCI chip. | 22 | it worked only for the PCI chip. |
23 | - added hook for the 32bit lance driver | 23 | - added hook for the 32bit lance driver |
24 | - added PCnetPCI II (79C970A) to chip table | 24 | - added PCnetPCI II (79C970A) to chip table |
25 | Paul Gortmaker (gpg109@rsphy1.anu.edu.au): | 25 | Paul Gortmaker (gpg109@rsphy1.anu.edu.au): |
@@ -31,7 +31,7 @@ | |||
31 | before unregister_netdev() which caused NULL pointer | 31 | before unregister_netdev() which caused NULL pointer |
32 | reference later in the chain (in rtnetlink_fill_ifinfo()) | 32 | reference later in the chain (in rtnetlink_fill_ifinfo()) |
33 | -- Mika Kuoppala <miku@iki.fi> | 33 | -- Mika Kuoppala <miku@iki.fi> |
34 | 34 | ||
35 | Forward ported v1.14 to 2.1.129, merged the PCI and misc changes from | 35 | Forward ported v1.14 to 2.1.129, merged the PCI and misc changes from |
36 | the 2.1 version of the old driver - Alan Cox | 36 | the 2.1 version of the old driver - Alan Cox |
37 | 37 | ||
@@ -307,7 +307,7 @@ static struct net_device_stats *lance_get_stats(struct net_device *dev); | |||
307 | static void set_multicast_list(struct net_device *dev); | 307 | static void set_multicast_list(struct net_device *dev); |
308 | static void lance_tx_timeout (struct net_device *dev); | 308 | static void lance_tx_timeout (struct net_device *dev); |
309 | 309 | ||
310 | 310 | ||
311 | 311 | ||
312 | #ifdef MODULE | 312 | #ifdef MODULE |
313 | #define MAX_CARDS 8 /* Max number of interfaces (cards) per module */ | 313 | #define MAX_CARDS 8 /* Max number of interfaces (cards) per module */ |
@@ -374,7 +374,7 @@ void cleanup_module(void) | |||
374 | for (this_dev = 0; this_dev < MAX_CARDS; this_dev++) { | 374 | for (this_dev = 0; this_dev < MAX_CARDS; this_dev++) { |
375 | struct net_device *dev = dev_lance[this_dev]; | 375 | struct net_device *dev = dev_lance[this_dev]; |
376 | if (dev) { | 376 | if (dev) { |
377 | unregister_netdev(dev); | 377 | unregister_netdev(dev); |
378 | cleanup_card(dev); | 378 | cleanup_card(dev); |
379 | free_netdev(dev); | 379 | free_netdev(dev); |
380 | } | 380 | } |
@@ -531,7 +531,7 @@ static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int | |||
531 | 531 | ||
532 | dev->base_addr = ioaddr; | 532 | dev->base_addr = ioaddr; |
533 | /* Make certain the data structures used by the LANCE are aligned and DMAble. */ | 533 | /* Make certain the data structures used by the LANCE are aligned and DMAble. */ |
534 | 534 | ||
535 | lp = kmalloc(sizeof(*lp), GFP_DMA | GFP_KERNEL); | 535 | lp = kmalloc(sizeof(*lp), GFP_DMA | GFP_KERNEL); |
536 | if(lp==NULL) | 536 | if(lp==NULL) |
537 | return -ENODEV; | 537 | return -ENODEV; |
@@ -656,7 +656,7 @@ static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int | |||
656 | outw(0x7f04, ioaddr+LANCE_DATA); /* Clear the memory error bits. */ | 656 | outw(0x7f04, ioaddr+LANCE_DATA); /* Clear the memory error bits. */ |
657 | if (request_dma(dma, chipname)) | 657 | if (request_dma(dma, chipname)) |
658 | continue; | 658 | continue; |
659 | 659 | ||
660 | flags=claim_dma_lock(); | 660 | flags=claim_dma_lock(); |
661 | set_dma_mode(dma, DMA_MODE_CASCADE); | 661 | set_dma_mode(dma, DMA_MODE_CASCADE); |
662 | enable_dma(dma); | 662 | enable_dma(dma); |
@@ -737,7 +737,7 @@ out_lp: | |||
737 | return err; | 737 | return err; |
738 | } | 738 | } |
739 | 739 | ||
740 | 740 | ||
741 | static int | 741 | static int |
742 | lance_open(struct net_device *dev) | 742 | lance_open(struct net_device *dev) |
743 | { | 743 | { |
@@ -801,7 +801,7 @@ lance_open(struct net_device *dev) | |||
801 | while (i++ < 100) | 801 | while (i++ < 100) |
802 | if (inw(ioaddr+LANCE_DATA) & 0x0100) | 802 | if (inw(ioaddr+LANCE_DATA) & 0x0100) |
803 | break; | 803 | break; |
804 | /* | 804 | /* |
805 | * We used to clear the InitDone bit, 0x0100, here but Mark Stockton | 805 | * We used to clear the InitDone bit, 0x0100, here but Mark Stockton |
806 | * reports that doing so triggers a bug in the '974. | 806 | * reports that doing so triggers a bug in the '974. |
807 | */ | 807 | */ |
@@ -826,7 +826,7 @@ lance_open(struct net_device *dev) | |||
826 | restarting the chip, but I'm too lazy to do so right now. dplatt@3do.com | 826 | restarting the chip, but I'm too lazy to do so right now. dplatt@3do.com |
827 | */ | 827 | */ |
828 | 828 | ||
829 | static void | 829 | static void |
830 | lance_purge_ring(struct net_device *dev) | 830 | lance_purge_ring(struct net_device *dev) |
831 | { | 831 | { |
832 | struct lance_private *lp = dev->priv; | 832 | struct lance_private *lp = dev->priv; |
@@ -972,7 +972,7 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
972 | goto out; | 972 | goto out; |
973 | lp->tx_ring[entry].length = -ETH_ZLEN; | 973 | lp->tx_ring[entry].length = -ETH_ZLEN; |
974 | } | 974 | } |
975 | else | 975 | else |
976 | lp->tx_ring[entry].length = -skb->len; | 976 | lp->tx_ring[entry].length = -skb->len; |
977 | } else | 977 | } else |
978 | lp->tx_ring[entry].length = -skb->len; | 978 | lp->tx_ring[entry].length = -skb->len; |
@@ -1027,7 +1027,7 @@ lance_interrupt(int irq, void *dev_id, struct pt_regs * regs) | |||
1027 | 1027 | ||
1028 | ioaddr = dev->base_addr; | 1028 | ioaddr = dev->base_addr; |
1029 | lp = dev->priv; | 1029 | lp = dev->priv; |
1030 | 1030 | ||
1031 | spin_lock (&lp->devlock); | 1031 | spin_lock (&lp->devlock); |
1032 | 1032 | ||
1033 | outw(0x00, dev->base_addr + LANCE_ADDR); | 1033 | outw(0x00, dev->base_addr + LANCE_ADDR); |
@@ -1051,7 +1051,7 @@ lance_interrupt(int irq, void *dev_id, struct pt_regs * regs) | |||
1051 | while (dirty_tx < lp->cur_tx) { | 1051 | while (dirty_tx < lp->cur_tx) { |
1052 | int entry = dirty_tx & TX_RING_MOD_MASK; | 1052 | int entry = dirty_tx & TX_RING_MOD_MASK; |
1053 | int status = lp->tx_ring[entry].base; | 1053 | int status = lp->tx_ring[entry].base; |
1054 | 1054 | ||
1055 | if (status < 0) | 1055 | if (status < 0) |
1056 | break; /* It still hasn't been Txed */ | 1056 | break; /* It still hasn't been Txed */ |
1057 | 1057 | ||
@@ -1142,7 +1142,7 @@ lance_rx(struct net_device *dev) | |||
1142 | struct lance_private *lp = dev->priv; | 1142 | struct lance_private *lp = dev->priv; |
1143 | int entry = lp->cur_rx & RX_RING_MOD_MASK; | 1143 | int entry = lp->cur_rx & RX_RING_MOD_MASK; |
1144 | int i; | 1144 | int i; |
1145 | 1145 | ||
1146 | /* If we own the next entry, it's a new packet. Send it up. */ | 1146 | /* If we own the next entry, it's a new packet. Send it up. */ |
1147 | while (lp->rx_ring[entry].base >= 0) { | 1147 | while (lp->rx_ring[entry].base >= 0) { |
1148 | int status = lp->rx_ring[entry].base >> 24; | 1148 | int status = lp->rx_ring[entry].base >> 24; |
@@ -1160,12 +1160,12 @@ lance_rx(struct net_device *dev) | |||
1160 | if (status & 0x04) lp->stats.rx_fifo_errors++; | 1160 | if (status & 0x04) lp->stats.rx_fifo_errors++; |
1161 | lp->rx_ring[entry].base &= 0x03ffffff; | 1161 | lp->rx_ring[entry].base &= 0x03ffffff; |
1162 | } | 1162 | } |
1163 | else | 1163 | else |
1164 | { | 1164 | { |
1165 | /* Malloc up new buffer, compatible with net3. */ | 1165 | /* Malloc up new buffer, compatible with net3. */ |
1166 | short pkt_len = (lp->rx_ring[entry].msg_length & 0xfff)-4; | 1166 | short pkt_len = (lp->rx_ring[entry].msg_length & 0xfff)-4; |
1167 | struct sk_buff *skb; | 1167 | struct sk_buff *skb; |
1168 | 1168 | ||
1169 | if(pkt_len<60) | 1169 | if(pkt_len<60) |
1170 | { | 1170 | { |
1171 | printk("%s: Runt packet!\n",dev->name); | 1171 | printk("%s: Runt packet!\n",dev->name); |
@@ -1174,14 +1174,14 @@ lance_rx(struct net_device *dev) | |||
1174 | else | 1174 | else |
1175 | { | 1175 | { |
1176 | skb = dev_alloc_skb(pkt_len+2); | 1176 | skb = dev_alloc_skb(pkt_len+2); |
1177 | if (skb == NULL) | 1177 | if (skb == NULL) |
1178 | { | 1178 | { |
1179 | printk("%s: Memory squeeze, deferring packet.\n", dev->name); | 1179 | printk("%s: Memory squeeze, deferring packet.\n", dev->name); |
1180 | for (i=0; i < RX_RING_SIZE; i++) | 1180 | for (i=0; i < RX_RING_SIZE; i++) |
1181 | if (lp->rx_ring[(entry+i) & RX_RING_MOD_MASK].base < 0) | 1181 | if (lp->rx_ring[(entry+i) & RX_RING_MOD_MASK].base < 0) |
1182 | break; | 1182 | break; |
1183 | 1183 | ||
1184 | if (i > RX_RING_SIZE -2) | 1184 | if (i > RX_RING_SIZE -2) |
1185 | { | 1185 | { |
1186 | lp->stats.rx_dropped++; | 1186 | lp->stats.rx_dropped++; |
1187 | lp->rx_ring[entry].base |= 0x80000000; | 1187 | lp->rx_ring[entry].base |= 0x80000000; |