diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-21 12:08:21 -0500 |
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-21 12:08:21 -0500 |
| commit | ac58c9059da8886b5e8cde012a80266b18ca146e (patch) | |
| tree | 40bf486843a2cace6c3a959d73423e50e6aa0c00 /drivers/net/arcnet/arcnet.c | |
| parent | df6db302cb236ac3a683d535a3e2073d9f4b2833 (diff) | |
| parent | c4a1745aa09fc110afdefea0e5d025043e348bae (diff) | |
Merge branch 'linus'
Diffstat (limited to 'drivers/net/arcnet/arcnet.c')
| -rw-r--r-- | drivers/net/arcnet/arcnet.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c index 12ef52c193a3..64e2caf3083d 100644 --- a/drivers/net/arcnet/arcnet.c +++ b/drivers/net/arcnet/arcnet.c | |||
| @@ -52,6 +52,7 @@ | |||
| 52 | #include <net/arp.h> | 52 | #include <net/arp.h> |
| 53 | #include <linux/init.h> | 53 | #include <linux/init.h> |
| 54 | #include <linux/arcdevice.h> | 54 | #include <linux/arcdevice.h> |
| 55 | #include <linux/jiffies.h> | ||
| 55 | 56 | ||
| 56 | /* "do nothing" functions for protocol drivers */ | 57 | /* "do nothing" functions for protocol drivers */ |
| 57 | static void null_rx(struct net_device *dev, int bufnum, | 58 | static void null_rx(struct net_device *dev, int bufnum, |
| @@ -61,6 +62,7 @@ static int null_build_header(struct sk_buff *skb, struct net_device *dev, | |||
| 61 | static int null_prepare_tx(struct net_device *dev, struct archdr *pkt, | 62 | static int null_prepare_tx(struct net_device *dev, struct archdr *pkt, |
| 62 | int length, int bufnum); | 63 | int length, int bufnum); |
| 63 | 64 | ||
| 65 | static void arcnet_rx(struct net_device *dev, int bufnum); | ||
| 64 | 66 | ||
| 65 | /* | 67 | /* |
| 66 | * one ArcProto per possible proto ID. None of the elements of | 68 | * one ArcProto per possible proto ID. None of the elements of |
| @@ -71,7 +73,7 @@ static int null_prepare_tx(struct net_device *dev, struct archdr *pkt, | |||
| 71 | struct ArcProto *arc_proto_map[256], *arc_proto_default, | 73 | struct ArcProto *arc_proto_map[256], *arc_proto_default, |
| 72 | *arc_bcast_proto, *arc_raw_proto; | 74 | *arc_bcast_proto, *arc_raw_proto; |
| 73 | 75 | ||
| 74 | struct ArcProto arc_proto_null = | 76 | static struct ArcProto arc_proto_null = |
| 75 | { | 77 | { |
| 76 | .suffix = '?', | 78 | .suffix = '?', |
| 77 | .mtu = XMTU, | 79 | .mtu = XMTU, |
| @@ -90,7 +92,6 @@ EXPORT_SYMBOL(arc_proto_map); | |||
| 90 | EXPORT_SYMBOL(arc_proto_default); | 92 | EXPORT_SYMBOL(arc_proto_default); |
| 91 | EXPORT_SYMBOL(arc_bcast_proto); | 93 | EXPORT_SYMBOL(arc_bcast_proto); |
| 92 | EXPORT_SYMBOL(arc_raw_proto); | 94 | EXPORT_SYMBOL(arc_raw_proto); |
| 93 | EXPORT_SYMBOL(arc_proto_null); | ||
| 94 | EXPORT_SYMBOL(arcnet_unregister_proto); | 95 | EXPORT_SYMBOL(arcnet_unregister_proto); |
| 95 | EXPORT_SYMBOL(arcnet_debug); | 96 | EXPORT_SYMBOL(arcnet_debug); |
| 96 | EXPORT_SYMBOL(alloc_arcdev); | 97 | EXPORT_SYMBOL(alloc_arcdev); |
| @@ -118,7 +119,7 @@ static int __init arcnet_init(void) | |||
| 118 | 119 | ||
| 119 | arcnet_debug = debug; | 120 | arcnet_debug = debug; |
| 120 | 121 | ||
| 121 | printk(VERSION); | 122 | printk("arcnet loaded.\n"); |
| 122 | 123 | ||
| 123 | #ifdef ALPHA_WARNING | 124 | #ifdef ALPHA_WARNING |
| 124 | BUGLVL(D_EXTRA) { | 125 | BUGLVL(D_EXTRA) { |
| @@ -178,8 +179,8 @@ EXPORT_SYMBOL(arcnet_dump_skb); | |||
| 178 | * Dump the contents of an ARCnet buffer | 179 | * Dump the contents of an ARCnet buffer |
| 179 | */ | 180 | */ |
| 180 | #if (ARCNET_DEBUG_MAX & (D_RX | D_TX)) | 181 | #if (ARCNET_DEBUG_MAX & (D_RX | D_TX)) |
| 181 | void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc, | 182 | static void arcnet_dump_packet(struct net_device *dev, int bufnum, |
| 182 | int take_arcnet_lock) | 183 | char *desc, int take_arcnet_lock) |
| 183 | { | 184 | { |
| 184 | struct arcnet_local *lp = dev->priv; | 185 | struct arcnet_local *lp = dev->priv; |
| 185 | int i, length; | 186 | int i, length; |
| @@ -208,7 +209,10 @@ void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc, | |||
| 208 | 209 | ||
| 209 | } | 210 | } |
| 210 | 211 | ||
| 211 | EXPORT_SYMBOL(arcnet_dump_packet); | 212 | #else |
| 213 | |||
| 214 | #define arcnet_dump_packet(dev, bufnum, desc,take_arcnet_lock) do { } while (0) | ||
| 215 | |||
| 212 | #endif | 216 | #endif |
| 213 | 217 | ||
| 214 | 218 | ||
| @@ -733,7 +737,7 @@ static void arcnet_timeout(struct net_device *dev) | |||
| 733 | 737 | ||
| 734 | spin_unlock_irqrestore(&lp->lock, flags); | 738 | spin_unlock_irqrestore(&lp->lock, flags); |
| 735 | 739 | ||
| 736 | if (jiffies - lp->last_timeout > 10*HZ) { | 740 | if (time_after(jiffies, lp->last_timeout + 10*HZ)) { |
| 737 | BUGMSG(D_EXTRA, "tx timed out%s (status=%Xh, intmask=%Xh, dest=%02Xh)\n", | 741 | BUGMSG(D_EXTRA, "tx timed out%s (status=%Xh, intmask=%Xh, dest=%02Xh)\n", |
| 738 | msg, status, lp->intmask, lp->lasttrans_dest); | 742 | msg, status, lp->intmask, lp->lasttrans_dest); |
| 739 | lp->last_timeout = jiffies; | 743 | lp->last_timeout = jiffies; |
| @@ -996,7 +1000,7 @@ irqreturn_t arcnet_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
| 996 | * This is a generic packet receiver that calls arcnet??_rx depending on the | 1000 | * This is a generic packet receiver that calls arcnet??_rx depending on the |
| 997 | * protocol ID found. | 1001 | * protocol ID found. |
| 998 | */ | 1002 | */ |
| 999 | void arcnet_rx(struct net_device *dev, int bufnum) | 1003 | static void arcnet_rx(struct net_device *dev, int bufnum) |
| 1000 | { | 1004 | { |
| 1001 | struct arcnet_local *lp = dev->priv; | 1005 | struct arcnet_local *lp = dev->priv; |
| 1002 | struct archdr pkt; | 1006 | struct archdr pkt; |
