diff options
author | Joe Perches <joe@perches.com> | 2015-05-05 19:05:48 +0200 |
---|---|---|
committer | Michael Grzeschik <m.grzeschik@pengutronix.de> | 2015-09-23 08:44:22 +0200 |
commit | 01a1d5ac4e1a5890fd6c0d0ae900e1b6e4f851d6 (patch) | |
tree | 9901ed198d8af0bf30f79520248fa2dbc29be327 /drivers/net/arcnet/arcnet.c | |
parent | arcnet: Use normal kernel spacing style (diff) | |
download | linux-01a1d5ac4e1a5890fd6c0d0ae900e1b6e4f851d6.tar.xz linux-01a1d5ac4e1a5890fd6c0d0ae900e1b6e4f851d6.zip |
arcnet: Add and remove blank lines
Use a more current kernel line style.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Diffstat (limited to 'drivers/net/arcnet/arcnet.c')
-rw-r--r-- | drivers/net/arcnet/arcnet.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c index 2a594d1c4b55..bb49753f8203 100644 --- a/drivers/net/arcnet/arcnet.c +++ b/drivers/net/arcnet/arcnet.c @@ -168,7 +168,6 @@ void arcnet_dump_skb(struct net_device *dev, EXPORT_SYMBOL(arcnet_dump_skb); #endif - /* * Dump the contents of an ARCnet buffer */ @@ -206,7 +205,6 @@ static void arcnet_dump_packet(struct net_device *dev, int bufnum, #endif - /* * Unregister a protocol driver from the arc_proto_map. Protocol drivers * are responsible for registering themselves, but the unregister routine @@ -229,7 +227,6 @@ void arcnet_unregister_proto(struct ArcProto *proto) } } - /* * Add a buffer to the queue. Only the interrupt handler is allowed to do * this, unless interrupts are disabled. @@ -254,7 +251,6 @@ static void release_arcbuf(struct net_device *dev, int bufnum) } } - /* * Get a buffer from the queue. If this returns -1, there are no buffers * available. @@ -281,7 +277,6 @@ static int get_arcbuf(struct net_device *dev) } } - BUGLVL(D_DURING) { BUGMSG(D_DURING, "get_arcbuf: got #%d; buffer queue is now: ", buf); for (i = lp->next_buf; i != lp->first_free_buf; i = (i + 1) % 5) @@ -293,7 +288,6 @@ static int get_arcbuf(struct net_device *dev) return buf; } - static int choose_mtu(void) { int count, mtu = 65535; @@ -348,6 +342,7 @@ struct net_device *alloc_arcdev(const char *name) arcdev_setup); if (dev) { struct arcnet_local *lp = netdev_priv(dev); + spin_lock_init(&lp->lock); } @@ -380,7 +375,6 @@ int arcnet_open(struct net_device *dev) BUGMSG2(D_PROTO, "\n"); } - BUGMSG(D_INIT, "arcnet_open: resetting card.\n"); /* try to put the card in a defined state - if it fails the first @@ -437,7 +431,6 @@ int arcnet_open(struct net_device *dev) ACOMMAND(CFLAGScmd | RESETclear); } - BUGMSG(D_DEBUG, "%s: %d: %s\n", __FILE__, __LINE__, __func__); /* make sure we're ready to receive IRQ's. */ AINTMASK(0); @@ -459,7 +452,6 @@ int arcnet_open(struct net_device *dev) return error; } - /* The inverse routine to arcnet_open - shuts down the card. */ int arcnet_close(struct net_device *dev) { @@ -479,7 +471,6 @@ int arcnet_close(struct net_device *dev) return 0; } - static int arcnet_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, const void *daddr, const void *saddr, unsigned len) @@ -498,7 +489,6 @@ static int arcnet_header(struct sk_buff *skb, struct net_device *dev, BUGMSG(D_NORMAL, "arcnet_header: Yikes! skb->len(%d) != len(%d)!\n", skb->len, len); - /* Type is host order - ? */ if (type == ETH_P_ARCNET) { proto = arc_raw_proto; @@ -622,7 +612,6 @@ netdev_tx_t arcnet_send_packet(struct sk_buff *skb, return retval; /* no need to try again */ } - /* * Actually start transmitting a packet that was loaded into a buffer * by prepare_tx. This should _only_ be called by the interrupt handler. @@ -654,7 +643,6 @@ static int go_tx(struct net_device *dev) return 1; } - /* Called by the kernel when transmit times out */ void arcnet_timeout(struct net_device *dev) { @@ -691,7 +679,6 @@ void arcnet_timeout(struct net_device *dev) netif_wake_queue(dev); } - /* * The typical workload of the driver: Handle the network interface * interrupts. Establish which device needs attention, and call the correct @@ -787,7 +774,6 @@ irqreturn_t arcnet_interrupt(int irq, void *dev_id) didsomething++; } - /* a transmit finished, and we're interested in it. */ if ((status & lp->intmask & TXFREEflag) || lp->timed_out) { lp->intmask &= ~(TXFREEflag | EXCNAKflag); @@ -814,6 +800,7 @@ irqreturn_t arcnet_interrupt(int irq, void *dev_id) if (lp->outgoing.proto && lp->outgoing.proto->ack_tx) { int ackstatus; + if (status & TXACKflag) ackstatus = 2; else if (lp->excnak_pending) @@ -838,6 +825,7 @@ irqreturn_t arcnet_interrupt(int irq, void *dev_id) /* continue a split packet, if any */ if (lp->outgoing.proto && lp->outgoing.proto->continue_tx) { int txbuf = get_arcbuf(dev); + if (txbuf != -1) { if (lp->outgoing.proto->continue_tx(dev, txbuf)) { /* that was the last segment */ @@ -930,7 +918,6 @@ irqreturn_t arcnet_interrupt(int irq, void *dev_id) ASTATUS(), boguscount); BUGMSG(D_DURING, "\n"); - AINTMASK(0); udelay(1); AINTMASK(lp->intmask); @@ -939,7 +926,6 @@ irqreturn_t arcnet_interrupt(int irq, void *dev_id) return retval; } - /* * This is a generic packet receiver that calls arcnet??_rx depending on the * protocol ID found. @@ -1002,7 +988,6 @@ static void arcnet_rx(struct net_device *dev, int bufnum) arc_proto_map[soft->proto]->rx(dev, bufnum, &pkt, length); } - static void null_rx(struct net_device *dev, int bufnum, struct archdr *pkthdr, int length) { @@ -1011,7 +996,6 @@ static void null_rx(struct net_device *dev, int bufnum, pkthdr->soft.rfc1201.proto, pkthdr->hard.source); } - static int null_build_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, uint8_t daddr) { @@ -1025,7 +1009,6 @@ static int null_build_header(struct sk_buff *skb, struct net_device *dev, return 0; } - /* the "do nothing" prepare_tx function warns that there's nothing to do. */ static int null_prepare_tx(struct net_device *dev, struct archdr *pkt, int length, int bufnum) |