Skip to content

Commit

Permalink
drivers/net: Trim trailing whitespace
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Jeff Garzik committed Sep 13, 2006
1 parent 7a29108 commit 6aa20a2
Show file tree
Hide file tree
Showing 178 changed files with 22,399 additions and 22,399 deletions.
58 changes: 29 additions & 29 deletions drivers/net/3c501.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@
with a TX-TX optimisation to see if we can touch 180-200K/second as seems
theoretically maximum.
19950402 Alan Cox <Alan.Cox@linux.org>
Cleaned up for 2.3.x because we broke SMP now.
Cleaned up for 2.3.x because we broke SMP now.
20000208 Alan Cox <alan@redhat.com>
Check up pass for 2.5. Nothing significant changed
20021009 Alan Cox <alan@redhat.com>
Fixed zero fill corner case
Fixed zero fill corner case
20030104 Alan Cox <alan@redhat.com>
For the avoidance of doubt the "preferred form" of this code is one which
is in an open non patent encumbered format. Where cryptographic key signing
forms part of the process of creating an executable the information
Expand All @@ -58,7 +58,7 @@
* Some documentation is available from 3Com. Due to the boards age
* standard responses when you ask for this will range from 'be serious'
* to 'give it to a museum'. The documentation is incomplete and mostly
* of historical interest anyway.
* of historical interest anyway.
*
* The basic system is a single buffer which can be used to receive or
* transmit a packet. A third command mode exists when you are setting
Expand All @@ -80,7 +80,7 @@
* out with those too).
*
* DOC: Problems
*
*
* There are a wide variety of undocumented error returns from the card
* and you basically have to kick the board and pray if they turn up. Most
* only occur under extreme load or if you do something the board doesn't
Expand Down Expand Up @@ -145,7 +145,7 @@ static int mem_start;

/**
* el1_probe: - probe for a 3c501
* @dev: The device structure passed in to probe.
* @dev: The device structure passed in to probe.
*
* This can be called from two places. The network layer will probe using
* a device structure passed in with the probe information completed. For a
Expand All @@ -155,7 +155,7 @@ static int mem_start;
* Returns 0 on success. ENXIO if asked not to probe and ENODEV if asked to
* probe and failing to find anything.
*/

struct net_device * __init el1_probe(int unit)
{
struct net_device *dev = alloc_etherdev(sizeof(struct net_local));
Expand Down Expand Up @@ -200,7 +200,7 @@ struct net_device * __init el1_probe(int unit)
}

/**
* el1_probe1:
* el1_probe1:
* @dev: The device structure to use
* @ioaddr: An I/O address to probe at.
*
Expand Down Expand Up @@ -307,7 +307,7 @@ static int __init el1_probe1(struct net_device *dev, int ioaddr)
memset(dev->priv, 0, sizeof(struct net_local));
lp = netdev_priv(dev);
spin_lock_init(&lp->lock);

/*
* The EL1-specific entries in the device structure.
*/
Expand All @@ -328,7 +328,7 @@ static int __init el1_probe1(struct net_device *dev, int ioaddr)
* @dev: device that is being opened
*
* When an ifconfig is issued which changes the device flags to include
* IFF_UP this function is called. It is only called when the change
* IFF_UP this function is called. It is only called when the change
* occurs, not when the interface remains up. #el1_close will be called
* when it goes down.
*
Expand Down Expand Up @@ -367,12 +367,12 @@ static int el_open(struct net_device *dev)
* violence and prayer
*
*/

static void el_timeout(struct net_device *dev)
{
struct net_local *lp = netdev_priv(dev);
int ioaddr = dev->base_addr;

if (el_debug)
printk (KERN_DEBUG "%s: transmit timed out, txsr %#2x axsr=%02x rxsr=%02x.\n",
dev->name, inb(TX_STATUS), inb(AX_STATUS), inb(RX_STATUS));
Expand All @@ -385,7 +385,7 @@ static void el_timeout(struct net_device *dev)
netif_wake_queue(dev);
}


/**
* el_start_xmit:
* @skb: The packet that is queued to be sent
Expand Down Expand Up @@ -421,7 +421,7 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
*/

spin_lock_irqsave(&lp->lock, flags);

/*
* Avoid timer-based retransmission conflicts.
*/
Expand All @@ -434,10 +434,10 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
int pad = 0;
int gp_start;
unsigned char *buf = skb->data;

if (len < ETH_ZLEN)
pad = ETH_ZLEN - len;

gp_start = 0x800 - ( len + pad );

lp->tx_pkt_start = gp_start;
Expand All @@ -463,7 +463,7 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
*/

spin_unlock_irqrestore(&lp->lock, flags);

outw(0x00, RX_BUF_CLR); /* Set rx packet area to 0. */
outw(gp_start, GP_LOW); /* aim - packet will be loaded into buffer start */
outsb(DATAPORT,buf,len); /* load buffer (usual thing each byte increments the pointer) */
Expand All @@ -472,7 +472,7 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
outb(0, DATAPORT);
}
outw(gp_start, GP_LOW); /* the board reuses the same register */

if(lp->loading != 2)
{
outb(AX_XMIT, AX_CMD); /* fire ... Trigger xmit. */
Expand All @@ -498,7 +498,7 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
* @dev_id: The 3c501 that burped
* @regs: Register data (surplus to our requirements)
*
* Handle the ether interface interrupts. The 3c501 needs a lot more
* Handle the ether interface interrupts. The 3c501 needs a lot more
* hand holding than most cards. In particular we get a transmit interrupt
* with a collision error because the board firmware isnt capable of rewinding
* its own transmit buffer pointers. It can however count to 16 for us.
Expand Down Expand Up @@ -526,7 +526,7 @@ static irqreturn_t el_interrupt(int irq, void *dev_id, struct pt_regs *regs)
lp = netdev_priv(dev);

spin_lock(&lp->lock);

/*
* What happened ?
*/
Expand Down Expand Up @@ -794,7 +794,7 @@ static void el_reset(struct net_device *dev)
* of the rest will be cleaned up by #el1_open. Always returns 0 indicating
* a success.
*/

static int el1_close(struct net_device *dev)
{
int ioaddr = dev->base_addr;
Expand All @@ -803,7 +803,7 @@ static int el1_close(struct net_device *dev)
printk(KERN_INFO "%s: Shutting down Ethernet card at %#x.\n", dev->name, ioaddr);

netif_stop_queue(dev);

/*
* Free and disable the IRQ.
*/
Expand All @@ -824,7 +824,7 @@ static int el1_close(struct net_device *dev)
*
* Returns the statistics for the card from the card private data
*/

static struct net_device_stats *el1_get_stats(struct net_device *dev)
{
struct net_local *lp = netdev_priv(dev);
Expand All @@ -835,7 +835,7 @@ static struct net_device_stats *el1_get_stats(struct net_device *dev)
* set_multicast_list:
* @dev: The device to adjust
*
* Set or clear the multicast filter for this adaptor to use the best-effort
* Set or clear the multicast filter for this adaptor to use the best-effort
* filtering supported. The 3c501 supports only three modes of filtering.
* It always receives broadcasts and packets for itself. You can choose to
* optionally receive all packets, or all multicast packets on top of this.
Expand Down Expand Up @@ -907,7 +907,7 @@ MODULE_PARM_DESC(irq, "EtherLink IRQ number");
* Returns 0 for success or -EIO if a card is not found. Returning an error
* here also causes the module to be unloaded
*/

int __init init_module(void)
{
dev_3c501 = el1_probe(-1);
Expand All @@ -918,11 +918,11 @@ int __init init_module(void)

/**
* cleanup_module:
*
*
* The module is being unloaded. We unhook our network device from the system
* and then free up the resources we took when the card was found.
*/

void cleanup_module(void)
{
struct net_device *dev = dev_3c501;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/3c501.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct net_local
spinlock_t lock; /* Serializing lock */
};



#define RX_STATUS (ioaddr + 0x06)
#define RX_CMD RX_STATUS
#define TX_STATUS (ioaddr + 0x07)
Expand Down
12 changes: 6 additions & 6 deletions drivers/net/3c503.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static void el2_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr,
int ring_page);
static struct ethtool_ops netdev_ethtool_ops;



/* This routine probes for a memory-mapped 3c503 board by looking for
the "location register" at the end of the jumpered boot PROM space.
This works even if a PROM isn't there.
Expand All @@ -96,7 +96,7 @@ static int __init do_el2_probe(struct net_device *dev)
int irq = dev->irq;

SET_MODULE_OWNER(dev);

if (base_addr > 0x1ff) /* Check a single specified location. */
return el2_probe1(dev, base_addr);
else if (base_addr != 0) /* Don't probe at all. */
Expand Down Expand Up @@ -127,7 +127,7 @@ static int __init do_el2_probe(struct net_device *dev)

/* Try all of the locations that aren't obviously empty. This touches
a lot of locations, and is much riskier than the code above. */
static int __init
static int __init
el2_pio_probe(struct net_device *dev)
{
int i;
Expand Down Expand Up @@ -173,7 +173,7 @@ struct net_device * __init el2_probe(int unit)
/* Probe for the Etherlink II card at I/O port base IOADDR,
returning non-zero on success. If found, set the station
address and memory parameters in DEVICE. */
static int __init
static int __init
el2_probe1(struct net_device *dev, int ioaddr)
{
int i, iobase_reg, membase_reg, saved_406, wordlength, retval;
Expand Down Expand Up @@ -367,7 +367,7 @@ el2_probe1(struct net_device *dev, int ioaddr)
release_region(ioaddr, EL2_IO_EXTENT);
return retval;
}


static int
el2_open(struct net_device *dev)
{
Expand All @@ -385,7 +385,7 @@ el2_open(struct net_device *dev)
outb_p(0x04 << ((*irqp == 9) ? 2 : *irqp), E33G_IDCFR);
outb_p(0x00, E33G_IDCFR);
if (*irqp == probe_irq_off(cookie) /* It's a good IRQ line! */
&& ((retval = request_irq(dev->irq = *irqp,
&& ((retval = request_irq(dev->irq = *irqp,
ei_interrupt, 0, dev->name, dev)) == 0))
break;
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/3c503.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

/* Shared memory management parameters. NB: The 8 bit cards have only
one bank (MB1) which serves both Tx and Rx packet space. The 16bit
cards have 2 banks, MB0 for Tx packets, and MB1 for Rx packets.
cards have 2 banks, MB0 for Tx packets, and MB1 for Rx packets.
You choose which bank appears in the sh. mem window with EGACFR_MBSn */

#define EL2_MB0_START_PG (0x00) /* EL2/16 Tx packets go in bank 0 */
Expand Down Expand Up @@ -82,7 +82,7 @@
0 1 0 0x4000 -- bank 2, not used
0 1 1 0x6000 -- bank 3, not used
There was going to be a 32k card that used bank 2 and 3, but it
There was going to be a 32k card that used bank 2 and 3, but it
never got produced.
*/
Expand Down
Loading

0 comments on commit 6aa20a2

Please sign in to comment.