aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/3c501.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-09-13 13:24:59 -0400
committerJeff Garzik <jeff@garzik.org>2006-09-13 13:24:59 -0400
commit6aa20a2235535605db6d6d2bd850298b2fe7f31e (patch)
treedf0b855043407b831d57f2f2c271f8aab48444f4 /drivers/net/3c501.c
parent7a291083225af6e22ffaa46b3d91cfc1a1ccaab4 (diff)
drivers/net: Trim trailing whitespace
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/3c501.c')
-rw-r--r--drivers/net/3c501.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/drivers/net/3c501.c b/drivers/net/3c501.c
index d7b115a35962..591e7fb47b9f 100644
--- a/drivers/net/3c501.c
+++ b/drivers/net/3c501.c
@@ -30,17 +30,17 @@
30 with a TX-TX optimisation to see if we can touch 180-200K/second as seems 30 with a TX-TX optimisation to see if we can touch 180-200K/second as seems
31 theoretically maximum. 31 theoretically maximum.
32 19950402 Alan Cox <Alan.Cox@linux.org> 32 19950402 Alan Cox <Alan.Cox@linux.org>
33 33
34 Cleaned up for 2.3.x because we broke SMP now. 34 Cleaned up for 2.3.x because we broke SMP now.
35 20000208 Alan Cox <alan@redhat.com> 35 20000208 Alan Cox <alan@redhat.com>
36 36
37 Check up pass for 2.5. Nothing significant changed 37 Check up pass for 2.5. Nothing significant changed
38 20021009 Alan Cox <alan@redhat.com> 38 20021009 Alan Cox <alan@redhat.com>
39 39
40 Fixed zero fill corner case 40 Fixed zero fill corner case
41 20030104 Alan Cox <alan@redhat.com> 41 20030104 Alan Cox <alan@redhat.com>
42 42
43 43
44 For the avoidance of doubt the "preferred form" of this code is one which 44 For the avoidance of doubt the "preferred form" of this code is one which
45 is in an open non patent encumbered format. Where cryptographic key signing 45 is in an open non patent encumbered format. Where cryptographic key signing
46 forms part of the process of creating an executable the information 46 forms part of the process of creating an executable the information
@@ -58,7 +58,7 @@
58 * Some documentation is available from 3Com. Due to the boards age 58 * Some documentation is available from 3Com. Due to the boards age
59 * standard responses when you ask for this will range from 'be serious' 59 * standard responses when you ask for this will range from 'be serious'
60 * to 'give it to a museum'. The documentation is incomplete and mostly 60 * to 'give it to a museum'. The documentation is incomplete and mostly
61 * of historical interest anyway. 61 * of historical interest anyway.
62 * 62 *
63 * The basic system is a single buffer which can be used to receive or 63 * The basic system is a single buffer which can be used to receive or
64 * transmit a packet. A third command mode exists when you are setting 64 * transmit a packet. A third command mode exists when you are setting
@@ -80,7 +80,7 @@
80 * out with those too). 80 * out with those too).
81 * 81 *
82 * DOC: Problems 82 * DOC: Problems
83 * 83 *
84 * There are a wide variety of undocumented error returns from the card 84 * There are a wide variety of undocumented error returns from the card
85 * and you basically have to kick the board and pray if they turn up. Most 85 * and you basically have to kick the board and pray if they turn up. Most
86 * only occur under extreme load or if you do something the board doesn't 86 * only occur under extreme load or if you do something the board doesn't
@@ -145,7 +145,7 @@ static int mem_start;
145 145
146/** 146/**
147 * el1_probe: - probe for a 3c501 147 * el1_probe: - probe for a 3c501
148 * @dev: The device structure passed in to probe. 148 * @dev: The device structure passed in to probe.
149 * 149 *
150 * This can be called from two places. The network layer will probe using 150 * This can be called from two places. The network layer will probe using
151 * a device structure passed in with the probe information completed. For a 151 * a device structure passed in with the probe information completed. For a
@@ -155,7 +155,7 @@ static int mem_start;
155 * Returns 0 on success. ENXIO if asked not to probe and ENODEV if asked to 155 * Returns 0 on success. ENXIO if asked not to probe and ENODEV if asked to
156 * probe and failing to find anything. 156 * probe and failing to find anything.
157 */ 157 */
158 158
159struct net_device * __init el1_probe(int unit) 159struct net_device * __init el1_probe(int unit)
160{ 160{
161 struct net_device *dev = alloc_etherdev(sizeof(struct net_local)); 161 struct net_device *dev = alloc_etherdev(sizeof(struct net_local));
@@ -200,7 +200,7 @@ out:
200} 200}
201 201
202/** 202/**
203 * el1_probe1: 203 * el1_probe1:
204 * @dev: The device structure to use 204 * @dev: The device structure to use
205 * @ioaddr: An I/O address to probe at. 205 * @ioaddr: An I/O address to probe at.
206 * 206 *
@@ -307,7 +307,7 @@ static int __init el1_probe1(struct net_device *dev, int ioaddr)
307 memset(dev->priv, 0, sizeof(struct net_local)); 307 memset(dev->priv, 0, sizeof(struct net_local));
308 lp = netdev_priv(dev); 308 lp = netdev_priv(dev);
309 spin_lock_init(&lp->lock); 309 spin_lock_init(&lp->lock);
310 310
311 /* 311 /*
312 * The EL1-specific entries in the device structure. 312 * The EL1-specific entries in the device structure.
313 */ 313 */
@@ -328,7 +328,7 @@ static int __init el1_probe1(struct net_device *dev, int ioaddr)
328 * @dev: device that is being opened 328 * @dev: device that is being opened
329 * 329 *
330 * When an ifconfig is issued which changes the device flags to include 330 * When an ifconfig is issued which changes the device flags to include
331 * IFF_UP this function is called. It is only called when the change 331 * IFF_UP this function is called. It is only called when the change
332 * occurs, not when the interface remains up. #el1_close will be called 332 * occurs, not when the interface remains up. #el1_close will be called
333 * when it goes down. 333 * when it goes down.
334 * 334 *
@@ -367,12 +367,12 @@ static int el_open(struct net_device *dev)
367 * violence and prayer 367 * violence and prayer
368 * 368 *
369 */ 369 */
370 370
371static void el_timeout(struct net_device *dev) 371static void el_timeout(struct net_device *dev)
372{ 372{
373 struct net_local *lp = netdev_priv(dev); 373 struct net_local *lp = netdev_priv(dev);
374 int ioaddr = dev->base_addr; 374 int ioaddr = dev->base_addr;
375 375
376 if (el_debug) 376 if (el_debug)
377 printk (KERN_DEBUG "%s: transmit timed out, txsr %#2x axsr=%02x rxsr=%02x.\n", 377 printk (KERN_DEBUG "%s: transmit timed out, txsr %#2x axsr=%02x rxsr=%02x.\n",
378 dev->name, inb(TX_STATUS), inb(AX_STATUS), inb(RX_STATUS)); 378 dev->name, inb(TX_STATUS), inb(AX_STATUS), inb(RX_STATUS));
@@ -385,7 +385,7 @@ static void el_timeout(struct net_device *dev)
385 netif_wake_queue(dev); 385 netif_wake_queue(dev);
386} 386}
387 387
388 388
389/** 389/**
390 * el_start_xmit: 390 * el_start_xmit:
391 * @skb: The packet that is queued to be sent 391 * @skb: The packet that is queued to be sent
@@ -421,7 +421,7 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
421 */ 421 */
422 422
423 spin_lock_irqsave(&lp->lock, flags); 423 spin_lock_irqsave(&lp->lock, flags);
424 424
425 /* 425 /*
426 * Avoid timer-based retransmission conflicts. 426 * Avoid timer-based retransmission conflicts.
427 */ 427 */
@@ -434,10 +434,10 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
434 int pad = 0; 434 int pad = 0;
435 int gp_start; 435 int gp_start;
436 unsigned char *buf = skb->data; 436 unsigned char *buf = skb->data;
437 437
438 if (len < ETH_ZLEN) 438 if (len < ETH_ZLEN)
439 pad = ETH_ZLEN - len; 439 pad = ETH_ZLEN - len;
440 440
441 gp_start = 0x800 - ( len + pad ); 441 gp_start = 0x800 - ( len + pad );
442 442
443 lp->tx_pkt_start = gp_start; 443 lp->tx_pkt_start = gp_start;
@@ -463,7 +463,7 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
463 */ 463 */
464 464
465 spin_unlock_irqrestore(&lp->lock, flags); 465 spin_unlock_irqrestore(&lp->lock, flags);
466 466
467 outw(0x00, RX_BUF_CLR); /* Set rx packet area to 0. */ 467 outw(0x00, RX_BUF_CLR); /* Set rx packet area to 0. */
468 outw(gp_start, GP_LOW); /* aim - packet will be loaded into buffer start */ 468 outw(gp_start, GP_LOW); /* aim - packet will be loaded into buffer start */
469 outsb(DATAPORT,buf,len); /* load buffer (usual thing each byte increments the pointer) */ 469 outsb(DATAPORT,buf,len); /* load buffer (usual thing each byte increments the pointer) */
@@ -472,7 +472,7 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
472 outb(0, DATAPORT); 472 outb(0, DATAPORT);
473 } 473 }
474 outw(gp_start, GP_LOW); /* the board reuses the same register */ 474 outw(gp_start, GP_LOW); /* the board reuses the same register */
475 475
476 if(lp->loading != 2) 476 if(lp->loading != 2)
477 { 477 {
478 outb(AX_XMIT, AX_CMD); /* fire ... Trigger xmit. */ 478 outb(AX_XMIT, AX_CMD); /* fire ... Trigger xmit. */
@@ -498,7 +498,7 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
498 * @dev_id: The 3c501 that burped 498 * @dev_id: The 3c501 that burped
499 * @regs: Register data (surplus to our requirements) 499 * @regs: Register data (surplus to our requirements)
500 * 500 *
501 * Handle the ether interface interrupts. The 3c501 needs a lot more 501 * Handle the ether interface interrupts. The 3c501 needs a lot more
502 * hand holding than most cards. In particular we get a transmit interrupt 502 * hand holding than most cards. In particular we get a transmit interrupt
503 * with a collision error because the board firmware isnt capable of rewinding 503 * with a collision error because the board firmware isnt capable of rewinding
504 * its own transmit buffer pointers. It can however count to 16 for us. 504 * its own transmit buffer pointers. It can however count to 16 for us.
@@ -526,7 +526,7 @@ static irqreturn_t el_interrupt(int irq, void *dev_id, struct pt_regs *regs)
526 lp = netdev_priv(dev); 526 lp = netdev_priv(dev);
527 527
528 spin_lock(&lp->lock); 528 spin_lock(&lp->lock);
529 529
530 /* 530 /*
531 * What happened ? 531 * What happened ?
532 */ 532 */
@@ -794,7 +794,7 @@ static void el_reset(struct net_device *dev)
794 * of the rest will be cleaned up by #el1_open. Always returns 0 indicating 794 * of the rest will be cleaned up by #el1_open. Always returns 0 indicating
795 * a success. 795 * a success.
796 */ 796 */
797 797
798static int el1_close(struct net_device *dev) 798static int el1_close(struct net_device *dev)
799{ 799{
800 int ioaddr = dev->base_addr; 800 int ioaddr = dev->base_addr;
@@ -803,7 +803,7 @@ static int el1_close(struct net_device *dev)
803 printk(KERN_INFO "%s: Shutting down Ethernet card at %#x.\n", dev->name, ioaddr); 803 printk(KERN_INFO "%s: Shutting down Ethernet card at %#x.\n", dev->name, ioaddr);
804 804
805 netif_stop_queue(dev); 805 netif_stop_queue(dev);
806 806
807 /* 807 /*
808 * Free and disable the IRQ. 808 * Free and disable the IRQ.
809 */ 809 */
@@ -824,7 +824,7 @@ static int el1_close(struct net_device *dev)
824 * 824 *
825 * Returns the statistics for the card from the card private data 825 * Returns the statistics for the card from the card private data
826 */ 826 */
827 827
828static struct net_device_stats *el1_get_stats(struct net_device *dev) 828static struct net_device_stats *el1_get_stats(struct net_device *dev)
829{ 829{
830 struct net_local *lp = netdev_priv(dev); 830 struct net_local *lp = netdev_priv(dev);
@@ -835,7 +835,7 @@ static struct net_device_stats *el1_get_stats(struct net_device *dev)
835 * set_multicast_list: 835 * set_multicast_list:
836 * @dev: The device to adjust 836 * @dev: The device to adjust
837 * 837 *
838 * Set or clear the multicast filter for this adaptor to use the best-effort 838 * Set or clear the multicast filter for this adaptor to use the best-effort
839 * filtering supported. The 3c501 supports only three modes of filtering. 839 * filtering supported. The 3c501 supports only three modes of filtering.
840 * It always receives broadcasts and packets for itself. You can choose to 840 * It always receives broadcasts and packets for itself. You can choose to
841 * optionally receive all packets, or all multicast packets on top of this. 841 * optionally receive all packets, or all multicast packets on top of this.
@@ -907,7 +907,7 @@ MODULE_PARM_DESC(irq, "EtherLink IRQ number");
907 * Returns 0 for success or -EIO if a card is not found. Returning an error 907 * Returns 0 for success or -EIO if a card is not found. Returning an error
908 * here also causes the module to be unloaded 908 * here also causes the module to be unloaded
909 */ 909 */
910 910
911int __init init_module(void) 911int __init init_module(void)
912{ 912{
913 dev_3c501 = el1_probe(-1); 913 dev_3c501 = el1_probe(-1);
@@ -918,11 +918,11 @@ int __init init_module(void)
918 918
919/** 919/**
920 * cleanup_module: 920 * cleanup_module:
921 * 921 *
922 * The module is being unloaded. We unhook our network device from the system 922 * The module is being unloaded. We unhook our network device from the system
923 * and then free up the resources we took when the card was found. 923 * and then free up the resources we took when the card was found.
924 */ 924 */
925 925
926void cleanup_module(void) 926void cleanup_module(void)
927{ 927{
928 struct net_device *dev = dev_3c501; 928 struct net_device *dev = dev_3c501;