* [RFC: 2.6 patch] net/ipv4/: possible cleanups
From: Adrian Bunk @ 2005-05-30 20:56 UTC (permalink / raw)
To: Andrew Morton; +Cc: netdev, linux-kernel
This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 the following unused global function:
- xfrm4_state.c: xfrm4_state_fini
- remove the following unneeded EXPORT_SYMBOL's:
- ip_output.c: ip_finish_output
- ip_output.c: sysctl_ip_default_ttl
- fib_frontend.c: ip_dev_find
- inetpeer.c: inet_peer_idlock
- ip_options.c: ip_options_compile
- ip_options.c: ip_options_undo
- tcp_ipv4.c: sysctl_max_syn_backlog
Please review which of these changes are correct and which might
conflict with pending patches.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 7 May 2005
include/net/ip.h | 2 --
include/net/route.h | 4 ----
include/net/tcp.h | 2 --
include/net/tcp_ecn.h | 13 -------------
include/net/xfrm.h | 1 -
net/ipv4/fib_frontend.c | 1 -
net/ipv4/inetpeer.c | 2 --
net/ipv4/ip_options.c | 3 ---
net/ipv4/ip_output.c | 7 +------
net/ipv4/multipath_drr.c | 2 +-
net/ipv4/route.c | 4 +++-
net/ipv4/tcp_input.c | 15 ++++++++++++++-
net/ipv4/tcp_ipv4.c | 1 -
net/ipv4/xfrm4_state.c | 2 ++
14 files changed, 21 insertions(+), 38 deletions(-)
--- linux-2.6.12-rc3-mm2-full/include/net/ip.h.old 2005-05-05 02:35:00.000000000 +0200
+++ linux-2.6.12-rc3-mm2-full/include/net/ip.h 2005-05-05 02:35:07.000000000 +0200
@@ -140,8 +140,6 @@
void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg,
unsigned int len);
-extern int ip_finish_output(struct sk_buff *skb);
-
struct ipv4_config
{
int log_martians;
--- linux-2.6.12-rc3-mm2-full/net/ipv4/multipath_drr.c.old 2005-05-05 02:37:58.000000000 +0200
+++ linux-2.6.12-rc3-mm2-full/net/ipv4/multipath_drr.c 2005-05-05 02:38:06.000000000 +0200
@@ -107,7 +107,7 @@
return NOTIFY_DONE;
}
-struct notifier_block drr_dev_notifier = {
+static struct notifier_block drr_dev_notifier = {
.notifier_call = drr_dev_event,
};
--- linux-2.6.12-rc3-mm3-full/net/ipv4/ip_output.c.old 2005-05-05 21:43:22.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/ipv4/ip_output.c 2005-05-05 21:44:36.000000000 +0200
@@ -216,7 +216,7 @@
return -EINVAL;
}
-int ip_finish_output(struct sk_buff *skb)
+static int ip_finish_output(struct sk_buff *skb)
{
struct net_device *dev = skb->dst->dev;
@@ -1351,12 +1351,7 @@
#endif
}
-EXPORT_SYMBOL(ip_finish_output);
EXPORT_SYMBOL(ip_fragment);
EXPORT_SYMBOL(ip_generic_getfrag);
EXPORT_SYMBOL(ip_queue_xmit);
EXPORT_SYMBOL(ip_send_check);
-
-#ifdef CONFIG_SYSCTL
-EXPORT_SYMBOL(sysctl_ip_default_ttl);
-#endif
--- linux-2.6.12-rc3-mm3-full/include/net/route.h.old 2005-05-05 21:21:09.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/include/net/route.h 2005-05-05 21:22:19.000000000 +0200
@@ -105,10 +105,6 @@
unsigned int out_hlist_search;
};
-extern struct rt_cache_stat *rt_cache_stat;
-#define RT_CACHE_STAT_INC(field) \
- (per_cpu_ptr(rt_cache_stat, _smp_processor_id())->field++)
-
extern struct ip_rt_acct *ip_rt_acct;
struct in_device;
--- linux-2.6.12-rc3-mm3-full/net/ipv4/route.c.old 2005-05-05 21:21:21.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/ipv4/route.c 2005-05-05 21:22:14.000000000 +0200
@@ -209,7 +209,9 @@
static int rt_hash_log;
static unsigned int rt_hash_rnd;
-struct rt_cache_stat *rt_cache_stat;
+static struct rt_cache_stat *rt_cache_stat;
+#define RT_CACHE_STAT_INC(field) \
+ (per_cpu_ptr(rt_cache_stat, _smp_processor_id())->field++)
static int rt_intern_hash(unsigned hash, struct rtable *rth,
struct rtable **res);
--- linux-2.6.12-rc3-mm3-full/include/net/tcp.h.old 2005-05-05 21:23:42.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/include/net/tcp.h 2005-05-05 21:23:52.000000000 +0200
@@ -825,8 +825,6 @@
}
}
-extern void tcp_enter_quickack_mode(struct tcp_sock *tp);
-
static __inline__ void tcp_delack_init(struct tcp_sock *tp)
{
memset(&tp->ack, 0, sizeof(tp->ack));
--- linux-2.6.12-rc3-mm3-full/include/net/tcp_ecn.h.old 2005-05-05 21:25:48.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/include/net/tcp_ecn.h 2005-05-05 21:25:57.000000000 +0200
@@ -78,19 +78,6 @@
tp->ecn_flags &= ~TCP_ECN_DEMAND_CWR;
}
-static inline void TCP_ECN_check_ce(struct tcp_sock *tp, struct sk_buff *skb)
-{
- if (tp->ecn_flags&TCP_ECN_OK) {
- if (INET_ECN_is_ce(TCP_SKB_CB(skb)->flags))
- tp->ecn_flags |= TCP_ECN_DEMAND_CWR;
- /* Funny extension: if ECT is not set on a segment,
- * it is surely retransmit. It is not in ECN RFC,
- * but Linux follows this rule. */
- else if (INET_ECN_is_not_ect((TCP_SKB_CB(skb)->flags)))
- tcp_enter_quickack_mode(tp);
- }
-}
-
static inline void TCP_ECN_rcv_synack(struct tcp_sock *tp, struct tcphdr *th)
{
if ((tp->ecn_flags&TCP_ECN_OK) && (!th->ece || th->cwr))
--- linux-2.6.12-rc3-mm3-full/net/ipv4/tcp_input.c.old 2005-05-05 21:24:11.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/ipv4/tcp_input.c 2005-05-05 21:25:04.000000000 +0200
@@ -183,13 +183,26 @@
tp->ack.quick = min(quickacks, TCP_MAX_QUICKACKS);
}
-void tcp_enter_quickack_mode(struct tcp_sock *tp)
+static void tcp_enter_quickack_mode(struct tcp_sock *tp)
{
tcp_incr_quickack(tp);
tp->ack.pingpong = 0;
tp->ack.ato = TCP_ATO_MIN;
}
+static inline void TCP_ECN_check_ce(struct tcp_sock *tp, struct sk_buff *skb)
+{
+ if (tp->ecn_flags&TCP_ECN_OK) {
+ if (INET_ECN_is_ce(TCP_SKB_CB(skb)->flags))
+ tp->ecn_flags |= TCP_ECN_DEMAND_CWR;
+ /* Funny extension: if ECT is not set on a segment,
+ * it is surely retransmit. It is not in ECN RFC,
+ * but Linux follows this rule. */
+ else if (INET_ECN_is_not_ect((TCP_SKB_CB(skb)->flags)))
+ tcp_enter_quickack_mode(tp);
+ }
+}
+
/* Send ACKs quickly, if "quick" count is not exhausted
* and the session is not interactive.
*/
--- linux-2.6.12-rc3-mm3-full/include/net/xfrm.h.old 2005-05-05 21:26:56.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/include/net/xfrm.h 2005-05-05 21:27:01.000000000 +0200
@@ -799,7 +799,6 @@
extern void xfrm6_fini(void);
extern void xfrm_state_init(void);
extern void xfrm4_state_init(void);
-extern void xfrm4_state_fini(void);
extern void xfrm6_state_init(void);
extern void xfrm6_state_fini(void);
--- linux-2.6.12-rc3-mm3-full/net/ipv4/xfrm4_state.c.old 2005-05-05 21:27:09.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/ipv4/xfrm4_state.c 2005-05-05 21:27:24.000000000 +0200
@@ -119,8 +119,10 @@
xfrm_state_register_afinfo(&xfrm4_state_afinfo);
}
+#if 0
void __exit xfrm4_state_fini(void)
{
xfrm_state_unregister_afinfo(&xfrm4_state_afinfo);
}
+#endif /* 0 */
--- linux-2.6.12-rc3-mm3-full/net/ipv4/fib_frontend.c.old 2005-05-05 21:38:28.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/ipv4/fib_frontend.c 2005-05-05 21:38:40.000000000 +0200
@@ -607,5 +607,4 @@
}
EXPORT_SYMBOL(inet_addr_type);
-EXPORT_SYMBOL(ip_dev_find);
EXPORT_SYMBOL(ip_rt_ioctl);
--- linux-2.6.12-rc3-mm3-full/net/ipv4/inetpeer.c.old 2005-05-05 21:41:06.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/ipv4/inetpeer.c 2005-05-05 21:41:14.000000000 +0200
@@ -456,5 +456,3 @@
peer_total / inet_peer_threshold * HZ;
add_timer(&peer_periodic_timer);
}
-
-EXPORT_SYMBOL(inet_peer_idlock);
--- linux-2.6.12-rc3-mm3-full/net/ipv4/ip_options.c.old 2005-05-05 21:42:02.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/ipv4/ip_options.c 2005-05-05 21:42:33.000000000 +0200
@@ -620,6 +620,3 @@
}
return 0;
}
-
-EXPORT_SYMBOL(ip_options_compile);
-EXPORT_SYMBOL(ip_options_undo);
--- linux-2.6.12-rc3-mm3-full/net/ipv4/tcp_ipv4.c.old 2005-05-05 21:58:55.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/ipv4/tcp_ipv4.c 2005-05-05 21:59:33.000000000 +0200
@@ -2660,7 +2660,6 @@
EXPORT_SYMBOL(tcp_proc_unregister);
#endif
EXPORT_SYMBOL(sysctl_local_port_range);
-EXPORT_SYMBOL(sysctl_max_syn_backlog);
EXPORT_SYMBOL(sysctl_tcp_low_latency);
EXPORT_SYMBOL(sysctl_tcp_tw_reuse);
^ permalink raw reply
* [RFC: 2.6 patch] net/sunrpc/: possible cleanups
From: Adrian Bunk @ 2005-05-30 20:56 UTC (permalink / raw)
To: Andrew Morton; +Cc: neilb, trond.myklebust, linux-kernel, nfs, netdev
This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 the following unused global function:
- xdr.c: xdr_decode_string
- remove the following unneeded EXPORT_SYMBOL's:
- auth_gss/gss_mech_switch.c: gss_mech_get
- auth_gss/gss_mech_switch.c: gss_mech_get_by_name
- auth_gss/gss_mech_switch.c: gss_mech_get_by_pseudoflavor
- auth_gss/gss_mech_switch.c: gss_pseudoflavor_to_service
- auth_gss/gss_mech_switch.c: gss_service_to_auth_domain_name
- auth_gss/gss_mech_switch.c: gss_mech_put
- sunrpc_syms.c: rpc_wake_up_next
- sunrpc_syms.c: rpc_new_child
- sunrpc_syms.c: rpc_run_child
- sunrpc_syms.c: rpc_new_task
- sunrpc_syms.c: rpc_release_task
- sunrpc_syms.c: rpc_release_client
- sunrpc_syms.c: xprt_udp_slot_table_entries
- sunrpc_syms.c: xprt_tcp_slot_table_entries
- sunrpc_syms.c: svc_drop
- sunrpc_syms.c: svc_authenticate
- sunrpc_syms.c: xdr_decode_string
Please review which of these patches do make sense and which conflict
with pending patches.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 7 May 2005
include/linux/sunrpc/clnt.h | 1 -
include/linux/sunrpc/gss_api.h | 3 ---
include/linux/sunrpc/xdr.h | 2 --
net/sunrpc/auth_gss/gss_mech_switch.c | 13 +------------
net/sunrpc/clnt.c | 3 ++-
net/sunrpc/sunrpc_syms.c | 11 -----------
net/sunrpc/xdr.c | 4 +++-
7 files changed, 6 insertions(+), 31 deletions(-)
--- linux-2.6.12-rc3-mm3-full/include/linux/sunrpc/gss_api.h.old 2005-05-05 23:05:01.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/include/linux/sunrpc/gss_api.h 2005-05-05 23:05:10.000000000 +0200
@@ -110,9 +110,6 @@
/* Similar, but get by pseudoflavor. */
struct gss_api_mech *gss_mech_get_by_pseudoflavor(u32);
-/* Just increments the mechanism's reference count and returns its input: */
-struct gss_api_mech * gss_mech_get(struct gss_api_mech *);
-
/* For every succesful gss_mech_get or gss_mech_get_by_* call there must be a
* corresponding call to gss_mech_put. */
void gss_mech_put(struct gss_api_mech *);
--- linux-2.6.12-rc3-mm3-full/net/sunrpc/auth_gss/gss_mech_switch.c.old 2005-05-05 23:05:17.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/sunrpc/auth_gss/gss_mech_switch.c 2005-05-05 23:19:33.000000000 +0200
@@ -133,14 +133,13 @@
EXPORT_SYMBOL(gss_mech_unregister);
-struct gss_api_mech *
+static struct gss_api_mech *
gss_mech_get(struct gss_api_mech *gm)
{
__module_get(gm->gm_owner);
return gm;
}
-EXPORT_SYMBOL(gss_mech_get);
struct gss_api_mech *
gss_mech_get_by_name(const char *name)
@@ -160,8 +159,6 @@
}
-EXPORT_SYMBOL(gss_mech_get_by_name);
-
static inline int
mech_supports_pseudoflavor(struct gss_api_mech *gm, u32 pseudoflavor)
{
@@ -193,8 +190,6 @@
return gm;
}
-EXPORT_SYMBOL(gss_mech_get_by_pseudoflavor);
-
u32
gss_pseudoflavor_to_service(struct gss_api_mech *gm, u32 pseudoflavor)
{
@@ -207,8 +202,6 @@
return 0;
}
-EXPORT_SYMBOL(gss_pseudoflavor_to_service);
-
char *
gss_service_to_auth_domain_name(struct gss_api_mech *gm, u32 service)
{
@@ -221,16 +214,12 @@
return NULL;
}
-EXPORT_SYMBOL(gss_service_to_auth_domain_name);
-
void
gss_mech_put(struct gss_api_mech * gm)
{
module_put(gm->gm_owner);
}
-EXPORT_SYMBOL(gss_mech_put);
-
/* The mech could probably be determined from the token instead, but it's just
* as easy for now to pass it in. */
int
--- linux-2.6.12-rc3-mm3-full/include/linux/sunrpc/clnt.h.old 2005-05-05 23:05:45.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/include/linux/sunrpc/clnt.h 2005-05-05 23:05:50.000000000 +0200
@@ -134,7 +134,6 @@
void rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset);
void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int);
size_t rpc_max_payload(struct rpc_clnt *);
-int rpc_ping(struct rpc_clnt *clnt, int flags);
static __inline__
int rpc_call(struct rpc_clnt *clnt, u32 proc, void *argp, void *resp, int flags)
--- linux-2.6.12-rc3-mm3-full/net/sunrpc/clnt.c.old 2005-05-05 23:05:58.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/sunrpc/clnt.c 2005-05-05 23:06:21.000000000 +0200
@@ -63,6 +63,7 @@
static u32 * call_header(struct rpc_task *task);
static u32 * call_verify(struct rpc_task *task);
+static int rpc_ping(struct rpc_clnt *clnt, int flags);
static int
rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name)
@@ -1178,7 +1179,7 @@
.p_decode = rpcproc_decode_null,
};
-int rpc_ping(struct rpc_clnt *clnt, int flags)
+static int rpc_ping(struct rpc_clnt *clnt, int flags)
{
struct rpc_message msg = {
.rpc_proc = &rpcproc_null,
--- linux-2.6.12-rc3-mm3-full/include/linux/sunrpc/xdr.h.old 2005-05-05 23:06:40.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/include/linux/sunrpc/xdr.h 2005-05-05 23:07:23.000000000 +0200
@@ -91,7 +91,6 @@
u32 * xdr_encode_opaque_fixed(u32 *p, const void *ptr, unsigned int len);
u32 * xdr_encode_opaque(u32 *p, const void *ptr, unsigned int len);
u32 * xdr_encode_string(u32 *p, const char *s);
-u32 * xdr_decode_string(u32 *p, char **sp, int *lenp, int maxlen);
u32 * xdr_decode_string_inplace(u32 *p, char **sp, int *lenp, int maxlen);
u32 * xdr_encode_netobj(u32 *p, const struct xdr_netobj *);
u32 * xdr_decode_netobj(u32 *p, struct xdr_netobj *);
@@ -147,7 +146,6 @@
extern int xdr_buf_subsegment(struct xdr_buf *, struct xdr_buf *, int, int);
extern int xdr_buf_read_netobj(struct xdr_buf *, struct xdr_netobj *, int);
extern int read_bytes_from_xdr_buf(struct xdr_buf *, int, void *, int);
-extern int write_bytes_to_xdr_buf(struct xdr_buf *, int, void *, int);
/*
* Helper structure for copying from an sk_buff.
--- linux-2.6.12-rc3-mm3-full/net/sunrpc/xdr.c.old 2005-05-05 23:06:52.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/sunrpc/xdr.c 2005-05-05 23:07:56.000000000 +0200
@@ -95,6 +95,7 @@
return xdr_encode_array(p, string, strlen(string));
}
+#if 0
u32 *
xdr_decode_string(u32 *p, char **sp, int *lenp, int maxlen)
{
@@ -115,6 +116,7 @@
*sp = string;
return p + XDR_QUADLEN(len);
}
+#endif /* 0 */
u32 *
xdr_decode_string_inplace(u32 *p, char **sp, int *lenp, int maxlen)
@@ -882,7 +884,7 @@
}
/* obj is assumed to point to allocated memory of size at least len: */
-int
+static int
write_bytes_to_xdr_buf(struct xdr_buf *buf, int base, void *obj, int len)
{
struct xdr_buf subbuf;
--- linux-2.6.12-rc3-mm3-full/net/sunrpc/sunrpc_syms.c.old 2005-05-05 23:07:30.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/sunrpc/sunrpc_syms.c 2005-05-05 23:36:43.000000000 +0200
@@ -29,15 +29,10 @@
EXPORT_SYMBOL(rpc_execute);
EXPORT_SYMBOL(rpc_init_task);
EXPORT_SYMBOL(rpc_sleep_on);
-EXPORT_SYMBOL(rpc_wake_up_next);
EXPORT_SYMBOL(rpc_wake_up_task);
-EXPORT_SYMBOL(rpc_new_child);
-EXPORT_SYMBOL(rpc_run_child);
EXPORT_SYMBOL(rpciod_down);
EXPORT_SYMBOL(rpciod_up);
-EXPORT_SYMBOL(rpc_new_task);
EXPORT_SYMBOL(rpc_wake_up_status);
-EXPORT_SYMBOL(rpc_release_task);
/* RPC client functions */
EXPORT_SYMBOL(rpc_create_client);
@@ -45,7 +40,6 @@
EXPORT_SYMBOL(rpc_bind_new_program);
EXPORT_SYMBOL(rpc_destroy_client);
EXPORT_SYMBOL(rpc_shutdown_client);
-EXPORT_SYMBOL(rpc_release_client);
EXPORT_SYMBOL(rpc_killall_tasks);
EXPORT_SYMBOL(rpc_call_sync);
EXPORT_SYMBOL(rpc_call_async);
@@ -63,8 +57,6 @@
/* Client transport */
EXPORT_SYMBOL(xprt_create_proto);
EXPORT_SYMBOL(xprt_set_timeout);
-EXPORT_SYMBOL(xprt_udp_slot_table_entries);
-EXPORT_SYMBOL(xprt_tcp_slot_table_entries);
/* Client credential cache */
EXPORT_SYMBOL(rpcauth_register);
@@ -81,7 +73,6 @@
EXPORT_SYMBOL(svc_create_thread);
EXPORT_SYMBOL(svc_exit_thread);
EXPORT_SYMBOL(svc_destroy);
-EXPORT_SYMBOL(svc_drop);
EXPORT_SYMBOL(svc_process);
EXPORT_SYMBOL(svc_recv);
EXPORT_SYMBOL(svc_wake_up);
@@ -89,7 +80,6 @@
EXPORT_SYMBOL(svc_reserve);
EXPORT_SYMBOL(svc_auth_register);
EXPORT_SYMBOL(auth_domain_lookup);
-EXPORT_SYMBOL(svc_authenticate);
EXPORT_SYMBOL(svc_set_client);
/* RPC statistics */
@@ -122,7 +112,6 @@
/* Generic XDR */
EXPORT_SYMBOL(xdr_encode_string);
-EXPORT_SYMBOL(xdr_decode_string);
EXPORT_SYMBOL(xdr_decode_string_inplace);
EXPORT_SYMBOL(xdr_decode_netobj);
EXPORT_SYMBOL(xdr_encode_netobj);
^ permalink raw reply
* [2.6 patch] net/socket.c: unexport move_addr_to_kernel
From: Adrian Bunk @ 2005-05-30 20:56 UTC (permalink / raw)
To: Andrew Morton; +Cc: netdev, linux-kernel
I didn't find any modular usage in the kernel.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 7 May 2005
--- linux-2.6.12-rc3-mm2-full/net/socket.c.old 2005-05-03 11:03:23.000000000 +0200
+++ linux-2.6.12-rc3-mm2-full/net/socket.c 2005-05-03 11:03:53.000000000 +0200
@@ -2070,8 +2070,7 @@
}
#endif /* CONFIG_PROC_FS */
-/* ABI emulation layers need these two */
-EXPORT_SYMBOL(move_addr_to_kernel);
+/* ABI emulation layers need this one */
EXPORT_SYMBOL(move_addr_to_user);
EXPORT_SYMBOL(sock_create);
EXPORT_SYMBOL(sock_create_kern);
^ permalink raw reply
* [2.6 patch] net/sctp/: make two functions static
From: Adrian Bunk @ 2005-05-30 20:56 UTC (permalink / raw)
To: Andrew Morton; +Cc: sri, lksctp-developers, netdev, linux-kernel
This patch makes two needlessly global functions static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Sridhar Samudrala <sri@us.ibm.com>
---
This patch was already sent on:
- 7 May 2005
include/net/sctp/sm.h | 3 ---
net/sctp/sm_statefuns.c | 13 +++++++++++--
2 files changed, 11 insertions(+), 5 deletions(-)
--- linux-2.6.12-rc3-mm3-full/include/net/sctp/sm.h.old 2005-05-05 22:59:54.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/include/net/sctp/sm.h 2005-05-06 00:17:40.000000000 +0200
@@ -130,7 +130,6 @@
sctp_state_fn_t sctp_sf_ootb;
sctp_state_fn_t sctp_sf_pdiscard;
sctp_state_fn_t sctp_sf_violation;
-sctp_state_fn_t sctp_sf_violation_chunklen;
sctp_state_fn_t sctp_sf_discard_chunk;
sctp_state_fn_t sctp_sf_do_5_2_1_siminit;
sctp_state_fn_t sctp_sf_do_5_2_2_dupinit;
@@ -258,8 +257,6 @@
void sctp_chunk_assign_tsn(struct sctp_chunk *);
void sctp_chunk_assign_ssn(struct sctp_chunk *);
-void sctp_stop_t1_and_abort(sctp_cmd_seq_t *commands, __u16 error);
-
/* Prototypes for statetable processing. */
int sctp_do_sm(sctp_event_t event_type, sctp_subtype_t subtype,
--- linux-2.6.12-rc3-mm3-full/net/sctp/sm_statefuns.c.old 2005-05-05 23:00:12.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/sctp/sm_statefuns.c 2005-05-06 00:19:11.000000000 +0200
@@ -92,6 +92,14 @@
sctp_cmd_seq_t *commands);
static struct sctp_sackhdr *sctp_sm_pull_sack(struct sctp_chunk *chunk);
+static void sctp_stop_t1_and_abort(sctp_cmd_seq_t *commands, __u16 error);
+
+static sctp_disposition_t sctp_sf_violation_chunklen(
+ const struct sctp_endpoint *ep,
+ const struct sctp_association *asoc,
+ const sctp_subtype_t type,
+ void *arg,
+ sctp_cmd_seq_t *commands);
/* Small helper function that checks if the chunk length
* is of the appropriate length. The 'required_length' argument
@@ -2318,7 +2326,7 @@
*
* This is common code called by several sctp_sf_*_abort() functions above.
*/
-void sctp_stop_t1_and_abort(sctp_cmd_seq_t *commands, __u16 error)
+static void sctp_stop_t1_and_abort(sctp_cmd_seq_t *commands, __u16 error)
{
sctp_add_cmd_sf(commands, SCTP_CMD_NEW_STATE,
SCTP_STATE(SCTP_STATE_CLOSED));
@@ -3672,7 +3680,8 @@
*
* Generate an ABORT chunk and terminate the association.
*/
-sctp_disposition_t sctp_sf_violation_chunklen(const struct sctp_endpoint *ep,
+static sctp_disposition_t sctp_sf_violation_chunklen(
+ const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
^ permalink raw reply
* [2.6 patch] net/irda/: passible cleanups
From: Adrian Bunk @ 2005-05-30 20:56 UTC (permalink / raw)
To: Andrew Morton; +Cc: irda-users, netdev, linux-kernel
This patch contains the following possible cleanups:
- make the following needlessly global function static:
- irnet/irnet_ppp.c: irnet_init
- remove the following unneeded EXPORT_SYMBOL's:
- irlmp.c: sysctl_discovery_timeout
- irlmp.c: irlmp_reasons
- irlmp.c: irlmp_dup
- irqueue.c: hashbin_find_next
Please review which of these changes do make sense and which conflict
with pending patches.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 7 May 2005
net/irda/irlmp.c | 3 ---
net/irda/irnet/irnet.h | 3 ---
net/irda/irnet/irnet_ppp.c | 2 +-
net/irda/irqueue.c | 1 -
4 files changed, 1 insertion(+), 8 deletions(-)
--- linux-2.6.12-rc3-mm3-full/net/irda/irnet/irnet.h.old 2005-05-05 22:38:59.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/irda/irnet/irnet.h 2005-05-05 22:39:12.000000000 +0200
@@ -517,9 +517,6 @@
irda_irnet_init(void); /* Initialise IrDA part of IrNET */
extern void
irda_irnet_cleanup(void); /* Teardown IrDA part of IrNET */
-/* ---------------------------- MODULE ---------------------------- */
-extern int
- irnet_init(void); /* Initialise IrNET module */
/**************************** VARIABLES ****************************/
--- linux-2.6.12-rc3-mm3-full/net/irda/irnet/irnet_ppp.c.old 2005-05-05 22:39:21.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/irda/irnet/irnet_ppp.c 2005-05-05 22:39:29.000000000 +0200
@@ -1107,7 +1107,7 @@
/*
* Module main entry point
*/
-int __init
+static int __init
irnet_init(void)
{
int err;
--- linux-2.6.12-rc3-mm3-full/net/irda/irlmp.c.old 2005-05-05 22:46:47.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/irda/irlmp.c 2005-05-05 22:50:52.000000000 +0200
@@ -53,7 +53,6 @@
/* These can be altered by the sysctl interface */
int sysctl_discovery = 0;
int sysctl_discovery_timeout = 3; /* 3 seconds by default */
-EXPORT_SYMBOL(sysctl_discovery_timeout);
int sysctl_discovery_slots = 6; /* 6 slots by default */
int sysctl_lap_keepalive_time = LM_IDLE_TIMEOUT * 1000 / HZ;
char sysctl_devname[65];
@@ -67,7 +66,6 @@
"LM_INIT_DISCONNECT",
"ERROR, NOT USED",
};
-EXPORT_SYMBOL(irlmp_reasons);
/*
* Function irlmp_init (void)
@@ -675,7 +673,6 @@
return new;
}
-EXPORT_SYMBOL(irlmp_dup);
/*
* Function irlmp_disconnect_request (handle, userdata)
--- linux-2.6.12-rc3-mm3-full/net/irda/irqueue.c.old 2005-05-05 22:48:55.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/irda/irqueue.c 2005-05-05 22:49:03.000000000 +0200
@@ -822,7 +822,6 @@
return entry;
}
-EXPORT_SYMBOL(hashbin_find_next);
/*
* Function hashbin_get_first (hashbin)
^ permalink raw reply
* [-mm patch] net/ieee80211/: make two functions static
From: Adrian Bunk @ 2005-05-30 20:56 UTC (permalink / raw)
To: jgarzik; +Cc: netdev, linux-kernel
This patch makes two needlessly global functions static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 6 May 2005
net/ieee80211/ieee80211_crypt_ccmp.c | 4 ++--
net/ieee80211/ieee80211_tx.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
--- linux-2.6.12-rc3-mm2-full/net/ieee80211/ieee80211_crypt_ccmp.c.old 2005-05-05 02:29:22.000000000 +0200
+++ linux-2.6.12-rc3-mm2-full/net/ieee80211/ieee80211_crypt_ccmp.c 2005-05-05 02:29:35.000000000 +0200
@@ -59,8 +59,8 @@
u8 rx_b0[AES_BLOCK_LEN], rx_b[AES_BLOCK_LEN], rx_a[AES_BLOCK_LEN];
};
-void ieee80211_ccmp_aes_encrypt(struct crypto_tfm *tfm,
- const u8 pt[16], u8 ct[16])
+static void ieee80211_ccmp_aes_encrypt(struct crypto_tfm *tfm,
+ const u8 pt[16], u8 ct[16])
{
struct scatterlist src, dst;
--- linux-2.6.12-rc3-mm2-full/net/ieee80211/ieee80211_tx.c.old 2005-05-05 02:29:51.000000000 +0200
+++ linux-2.6.12-rc3-mm2-full/net/ieee80211/ieee80211_tx.c 2005-05-05 02:29:59.000000000 +0200
@@ -211,8 +211,8 @@
kfree(txb);
}
-struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size,
- int gfp_mask)
+static struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size,
+ int gfp_mask)
{
struct ieee80211_txb *txb;
int i;
^ permalink raw reply
* [2.6 patch] drivers/net/ne3210.c: cleanups
From: Adrian Bunk @ 2005-05-30 20:56 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-kernel, netdev
This patch contains the following cleanups:
- make two needlessly global functions static
- kill an ancient version variable
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 2 May 2005
- 19 Apr 2005
drivers/net/ne3210.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
--- linux-2.6.11-rc3-mm2-full/drivers/net/ne3210.c.old 2005-02-16 16:09:39.000000000 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/ne3210.c 2005-02-21 15:10:02.000000000 +0100
@@ -26,9 +26,6 @@
Updated to EISA probing API 5/2003 by Marc Zyngier.
*/
-static const char *version =
- "ne3210.c: Driver revision v0.03, 30/09/98\n";
-
#include <linux/module.h>
#include <linux/eisa.h>
#include <linux/kernel.h>
@@ -197,7 +194,7 @@
ei_status.priv = phys_mem;
if (ei_debug > 0)
- printk(version);
+ printk("ne3210 loaded.\n");
ei_status.reset_8390 = &ne3210_reset_8390;
ei_status.block_input = &ne3210_block_input;
@@ -359,12 +356,12 @@
MODULE_DESCRIPTION("NE3210 EISA Ethernet driver");
MODULE_LICENSE("GPL");
-int ne3210_init(void)
+static int ne3210_init(void)
{
return eisa_driver_register (&ne3210_eisa_driver);
}
-void ne3210_cleanup(void)
+static void ne3210_cleanup(void)
{
eisa_driver_unregister (&ne3210_eisa_driver);
}
^ permalink raw reply
* [-mm patch] net/ieee80211/: remove pci.h #include's
From: Adrian Bunk @ 2005-05-30 20:56 UTC (permalink / raw)
To: jkmaline; +Cc: hostap, jgarzik, netdev, linux-kernel
I was wondering why editing pci.h triggered the rebuild of three files
under net/, and as far as I can see, there's no reason for these three
files to #include pci.h .
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 1 May 2005
net/ieee80211/ieee80211_module.c | 1 -
net/ieee80211/ieee80211_rx.c | 1 -
net/ieee80211/ieee80211_tx.c | 1 -
3 files changed, 3 deletions(-)
--- linux-2.6.12-rc3-mm1-full/net/ieee80211/ieee80211_module.c.old 2005-04-30 23:23:14.000000000 +0200
+++ linux-2.6.12-rc3-mm1-full/net/ieee80211/ieee80211_module.c 2005-04-30 23:23:18.000000000 +0200
@@ -40,7 +40,6 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/netdevice.h>
-#include <linux/pci.h>
#include <linux/proc_fs.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
--- linux-2.6.12-rc3-mm1-full/net/ieee80211/ieee80211_tx.c.old 2005-04-30 23:23:25.000000000 +0200
+++ linux-2.6.12-rc3-mm1-full/net/ieee80211/ieee80211_tx.c 2005-04-30 23:23:32.000000000 +0200
@@ -33,7 +33,6 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/netdevice.h>
-#include <linux/pci.h>
#include <linux/proc_fs.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
--- linux-2.6.12-rc3-mm1-full/net/ieee80211/ieee80211_rx.c.old 2005-04-30 23:23:42.000000000 +0200
+++ linux-2.6.12-rc3-mm1-full/net/ieee80211/ieee80211_rx.c 2005-04-30 23:23:46.000000000 +0200
@@ -23,7 +23,6 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/netdevice.h>
-#include <linux/pci.h>
#include <linux/proc_fs.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
^ permalink raw reply
* [PATCH 2.6] fix deadlock with ip_queue and tcp local input path
From: Harald Welte @ 2005-05-30 18:06 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Netfilter Development Mailinglist
In-Reply-To: <20050526142420.GD13114@sunbeam.de.gnumonks.org>
[-- Attachment #1.1: Type: text/plain, Size: 1232 bytes --]
On Thu, May 26, 2005 at 04:24:21PM +0200, Harald Welte wrote:
> When we have ip_queue being used from LOCAL_IN, then we end up with a
> situation where the verdicts coming back from userspace traverse the TCP
> input path from syscall context. While this seems to work most of the
> time, there's an ungly deadlock:
>
> syscall context is interrupted by the timer interrupt. When the timer
> interrupt leaves, the timer softirq get's scheduled and calls
> tcp_delack_timer() and alike. They themselves do bh_lock_sock(sk),
> which is already held from somewhere else[1] -> boom.
I've now tested the suggested solution by Patrick McHardy and Herbert Xu to
simply use local_bh_{en,dis}able().
Please apply the following patch to mainline.
btw: How do we get this into 2.6.11.x ?
Signed-off-by: Harald Welte <laforge@netfilter.org>
--
- Harald Welte <laforge@netfilter.org> http://netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
[-- Attachment #1.2: queue-local-reinject-smp-deadlock-fix-localbhdisable.patch --]
[-- Type: text/plain, Size: 1384 bytes --]
Index: linux-2.6.10/net/ipv4/netfilter/ip_queue.c
===================================================================
--- linux-2.6.10.orig/net/ipv4/netfilter/ip_queue.c 2005-05-27 09:44:32.000000000 +0200
+++ linux-2.6.10/net/ipv4/netfilter/ip_queue.c 2005-05-27 09:47:13.000000000 +0200
@@ -3,6 +3,7 @@
* communicating with userspace via netlink.
*
* (C) 2000-2002 James Morris <jmorris@intercode.com.au>
+ * (C) 2003-2005 Netfilter Core Team <coreteam@netfilter.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -14,6 +15,7 @@
* Zander).
* 2000-08-01: Added Nick Williams' MAC support.
* 2002-06-25: Code cleanup.
+ * 2005-05-26: local_bh_{disable,enable} around nf_reinject (Harald Welte)
*
*/
#include <linux/module.h>
@@ -66,7 +68,15 @@
static void
ipq_issue_verdict(struct ipq_queue_entry *entry, int verdict)
{
+ /* TCP input path (and probably other bits) assume to be called
+ * from softirq context, not from syscall, like ipq_issue_verdict is
+ * called. TCP input path deadlocks with locks taken from timer
+ * softirq, e.g. We therefore emulate this by local_bh_disable() */
+
+ local_bh_disable();
nf_reinject(entry->skb, entry->info, verdict);
+ local_bh_enable();
+
kfree(entry);
}
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH] use mmiowb in tg3_poll
From: Arthur Kepner @ 2005-05-30 16:30 UTC (permalink / raw)
To: Lennert Buytenhek; +Cc: netdev, jesse.barnes, gnb
In-Reply-To: <20050528231209.GA8456@xi.wantstofly.org>
On Sun, 29 May 2005, Lennert Buytenhek wrote:
> .....
> I'm quite curious what kind of MMIO read latency you see on your
> Altix boxen. This app is quite useful for determining those figures
> on x86{,_64} machines:
>
> http://svn.gnumonks.org/trunk/mmio_test/mmio_test.c
> ....
[cc list change: jbarnes@engr.sgi.com -> jesse.barnes@intel.com]
Haven't tried this program yet (though it looks interesting.)
In the past I've instrumented the driver with get_cycles() to
acquire the PIO read and mmiowb() latencies.
I quickly looked through the records that I have and, unfortunately,
wasn't able to locate raw data. But I found some scrawlings in my
notes which say the most recent measurements for an Altix are:
i) PIO read latency ~ 2.4 usec
ii) mmiowb() latency ~ 1.1 usec
(This data was taken when the PIOs/mmiowb()s were coming from a CPU
which was "nearest" to the NIC.)
If you have data for x86{,_64}, I'd be interested in that, too.
--
Arthur
^ permalink raw reply
* Re: [PATCH] NUMA aware allocation of transmit and receive buffers for e1000
From: Andi Kleen @ 2005-05-30 9:41 UTC (permalink / raw)
To: Christoph Lameter; +Cc: Eric Dumazet, netdev, akpm, shai
In-Reply-To: <Pine.LNX.4.62.0505271413560.25484@graphe.net>
On Fri, May 27, 2005 at 02:15:55PM -0700, Christoph Lameter wrote:
> On Wed, 18 May 2005, Eric Dumazet wrote:
>
> > Related question, is pci_alloc_consistent() already NUMA aware ?
>
> Nope. It also ultimately acquires memory via vmalloc.
x86-64 vmalloc has been NUMA aware forever.
I believe the HP BigTux patchkit for IA64 added it there too, although
it might not have hit mainline.
>
> pci_alloc_consistent will also need some rework to allocate memory
> consistent (well the name is coherent right?) with the node that the
> device is on. Second case of a need for a node aware vmalloc?
You can already have it today by temporarily changing the process
mempolicy. However for pci_alloc_consistent just using alloc_pages_node
directly seems to work fine.
-Andi
^ permalink raw reply
* Re: [PATCH 2/2] Resend: LSM-IPSec Networking Hooks
From: James Morris @ 2005-05-30 7:05 UTC (permalink / raw)
To: jaegert; +Cc: netdev, chrisw, serue, latten, sds
In-Reply-To: <1116361671.5560.125.camel@dyn9002018177.watson.ibm.com>
On Tue, 17 May 2005, jaegert wrote:
> +#define nethooks_debug(fmt, args...) {if (DEBUG) printk(KERN_NOTICE fmt,## args);}
Why isn't this debugging using KERN_DEBUG?
> +static inline struct inode_security_struct *get_sock_isec(struct sock *sk)
> +{
> + if (!sk->sk_socket) {
> + nethooks_debug("%s: no socket on this sock (!?)\n",
> + __FUNCTION__);
> + return (struct inode_security_struct *) NULL;
> + }
No need to cast NULL here.
> +int selinux_xfrm_policy_lookup(struct sock *sk, struct xfrm_selector *sel, struct flowi *fl, u8 dir)
> +{
> + int rc = 0;
> + struct inode_security_struct *isec = NULL;
> + u32 sock_sid, sel_sid = SECINITSID_UNLABELED;
> +
> + nethooks_debug("%s: authorize\n", __FUNCTION__);
> +
> + if (!sk) {
> + /* no sock to send -- e.g., icmp reply */
> + /* authorize as kernel packet */
> + if (fl && fl->proto == IPPROTO_ICMP) {
> + nethooks_debug("%s: ICMP case\n",
> + __FUNCTION__);
> + sock_sid = SECINITSID_KERNEL;
> + goto authorize;
> + }
> + /*
> + * hooks.c accepts packets with no socket unconditionally
> + */
> + nethooks_debug("%s: no sock on this skbuff: non-ICMP\n",
> + __FUNCTION__);
> + goto out;
> + }
I'm not sure that ICMP is the only protocol which might be caught here;
are there any other cases where there's no sk that also get caught here?
The debugging in any case is not all that useful, I'd suggest adding a
protocol number.
> + read_lock_bh(&sk->sk_callback_lock);
You only need this lock for (dir == FLOW_DIR_IN).
> +static inline int selinux_xfrm_selector_alloc(struct xfrm_selector *sel, struct sadb_x_sec_ctx *sec_ctx)
> +{
> + int rc = 0;
> +
> + if (!sec_ctx)
> + return -EINVAL;
Shouldn't this be a BUG_ON() ?
> + memcpy(sel->security->ctx_str,
> + sec_ctx+1,
> + sel->security->ctx_len);
Don't you need to validate that ctx_len is within bounds of the data
copied from userspace?
> + rc = security_context_to_sid(sel->security->ctx_str,
> + sel->security->ctx_len,
> + &sel->security->ctx_sid);
> + sel->security->ctx_str[sel->security->ctx_len] = 0;
Why null terminate here? security_context_to_sid() was looking for it
already, assuming we haven't crashed yet.
> +int selinux_xfrm_policy_alloc(struct xfrm_policy *xp, struct sadb_x_sec_ctx *sec_ctx)
> +{
> + int rc = 0;
> +
> + if (!xp)
> + return -EINVAL;
Another case for BUG_ON().
> + nethooks_debug(KERN_NOTICE "%s: start alloc\n", __FUNCTION__);
> +
> + rc = selinux_xfrm_selector_alloc(&xp->selector, sec_ctx);
> +
> + return rc;
> +}
How about getting rid of rc and just return the value of the last
function.
> +void selinux_xfrm_policy_free(struct xfrm_policy *xp)
> +{
> + struct xfrm_sec_ctx *xfrm_ctx = xfrm_policy_security(xp);
> +
> + if (xfrm_ctx)
> + kfree(xfrm_ctx);
> +}
Just call kfree() unconditionally.
> +int selinux_xfrm_state_alloc(struct xfrm_state *x, struct sadb_x_sec_ctx *sec_ctx)
> +{
> + int rc = 0;
> +
> + if (!x)
> + return -EINVAL;
BUG_ON()
> + rc = selinux_xfrm_selector_alloc(&x->sel, sec_ctx);
> +
> + return rc;
No need for rc again.
> +void selinux_xfrm_state_free(struct xfrm_state *x)
> +{
> + struct xfrm_sec_ctx *xfrm_ctx = xfrm_state_security(x);
> +
> + if (xfrm_ctx)
> + kfree(xfrm_ctx);
> +}
kfree() again.
(Still reviewing...)
- James
--
James Morris
<jmorris@redhat.com>
^ permalink raw reply
* Re: Q: ieee80211_txb
From: Zhu Yi @ 2005-05-30 2:34 UTC (permalink / raw)
To: Meelis Roos; +Cc: netdev
In-Reply-To: <Pine.SOC.4.61.0505291343360.4341@math.ut.ee>
On Sun, 2005-05-29 at 13:47 +0300, Meelis Roos wrote:
> I tried to understand the new 802.11 stack API and met some things I
> couldn't understand by just looking at the code.
>
> My main question is currently struct ieee80211_txb. How is it meant to
> be used? How driver-specific is it - should it fit all drivers or does
> it assume some specific DMA set-up?
The ieee80211_txb should not be driver specific. ->fragments is struct
sk_buff, indicates the packet skb or the fragmentation skb list for
software based fragmentation. And others members are self explained.
Currently it fits the ipw* drivers (you see a reserved word is used), we
should change it to be more generic and provide enough info for every
wireless driver.
Thanks,
-yi
^ permalink raw reply
* Re: non-fatal oops with EIP at skb_release_data, available for debugging
From: Andrew Morton @ 2005-05-30 1:21 UTC (permalink / raw)
To: Alessandro Suardi; +Cc: netdev
In-Reply-To: <5a4c581d0505281811a6b067d@mail.gmail.com>
Alessandro Suardi <alessandro.suardi@gmail.com> wrote:
>
> On 5/26/05, Andrew Morton <akpm@osdl.org> wrote:
> > Alessandro Suardi <alessandro.suardi@gmail.com> wrote:
> > >
> > > Quoting my post of over a month ago, hit another
> > > non-fatal oops this time with 2.6.12-rc1-bk2...
> >
> > Has this bug been sighted in more recent kernels?
>
> 2.6.12-rc2 is the last kernel I've been running on that box
> and the oops never happened once. I'm waiting for -final
> or -rc6 and then load it on that K7-800, but so far 2.6.12-rc2
> has been rock solid. I think it was reaching the 30 days
> uptime but my building had a power outage last week...
There should be a -rc6. Please be sure to test that - we don't want to let
2.6.12 out with a bug like this in it, thanks.
^ permalink raw reply
* Re: [PATCH] r8169: support restricting speed+duplex in autonegotiation
From: Francois Romieu @ 2005-05-29 22:54 UTC (permalink / raw)
To: Richard Dawe; +Cc: Ben Greear, Linux netdev
In-Reply-To: <4298D6F9.7030608@phekda.gotadsl.co.uk>
Richard Dawe <rich@phekda.gotadsl.co.uk> :
[...]
> Is the "media" part of the patch confusing?
No (it could have stored its data in link_settings[] though).
I do not understand what the "ret" variable in rtl8169_set_speed_xmii()
is supposed to do but it is not a big issue.
Style aside, Ben has imho a point. The patch adds a special case:
- is there a real need ?
- is it a 8169-specific thing or not ?
The code is added in an area where the driver is currently not pretty.
The driver should probably replace its own defines with the ones in
<linux/mii.h> then really disable autonegotiation when it is asked to
(hint, hint).
--
Ueimor
^ permalink raw reply
* \x81\x9A\x8D\x82\x89\xE6ソ\x81\x9ACATV\x83X\x83N\x83\x89\x83\x93\x83u\x83\x8B\x89\xF0\x8F\x9C\x83`\x83\x85\x81[\x83i\x81[
From: =?iso-2022-jp?B?IpFUg3aDiYOTg2qDk4NPIiA8dWNoaWRhLnNoaW55YUBsYXBvc3RlLm5ldD4N?= @ 2005-05-29 16:08 UTC (permalink / raw)
To: netdev
^ permalink raw reply
* Re: [0/10] [IPSEC] IPsec event notification
From: Herbert Xu @ 2005-05-29 11:27 UTC (permalink / raw)
To: David S. Miller; +Cc: hadi, kaber, netdev
In-Reply-To: <20050528.202356.94889774.davem@davemloft.net>
On Sat, May 28, 2005 at 08:23:56PM -0700, David S. Miller wrote:
> From: Herbert Xu <herbert@gondor.apana.org.au>
> Date: Sat, 28 May 2005 10:10:05 +1000
>
> > Any objections to asking Andrew to start pulling your
> > net-2.6.13 tree or is he doing that already?
>
> I told him last week to do so, so he should be already
> doing this.
Thanks a lot Dave. I've asked Andrew to stop pulling my tree.
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* Q: ieee80211_txb
From: Meelis Roos @ 2005-05-29 10:47 UTC (permalink / raw)
To: netdev
I tried to understand the new 802.11 stack API and met some things I
couldn't understand by just looking at the code.
My main question is currently struct ieee80211_txb. How is it meant to
be used? How driver-specific is it - should it fit all drivers or does
it assume some specific DMA set-up?
--
Meelis Roos (mroos@linux.ee)
^ permalink raw reply
* Re: [PATCH 1/2] Resend: LSM-IPSec Networking Hooks
From: James Morris @ 2005-05-29 6:07 UTC (permalink / raw)
To: jaegert; +Cc: netdev, chrisw, serue, latten, sds
In-Reply-To: <1116361510.5560.121.camel@dyn9002018177.watson.ibm.com>
A few issues:
1) The following patch is needed to ensure that the error value is
propagated back, that the err is initialized and that you don't try and
xfrm_pol_put() an uninitialized xp.
diff -purN -X dontdiff linux-2.6.12-rc4.w/net/key/af_key.c linux-2.6.12-rc4.x/net/key/af_key.c
--- linux-2.6.12-rc4.w/net/key/af_key.c 2005-05-29 01:30:08.000000000 -0400
+++ linux-2.6.12-rc4.x/net/key/af_key.c 2005-05-29 01:54:17.751327592 -0400
@@ -2098,8 +2098,9 @@ static int pfkey_spddelete(struct sock *
sec_ctx = (struct sadb_x_sec_ctx *) ext_hdrs[SADB_X_EXT_SEC_CTX-1];
memcpy(&tmp.selector, &sel, sizeof(struct xfrm_selector));
if (sec_ctx != NULL) {
- if (security_xfrm_policy_alloc(&tmp, sec_ctx))
- goto out;
+ err = security_xfrm_policy_alloc(&tmp, sec_ctx);
+ if (err)
+ return err;
}
xp = xfrm_policy_bysel(pol->sadb_x_policy_dir-1, &tmp.selector, 1);
2) Compiler warnings:
You pass a
struct xfrm_user_sec_ctx to security_xfrm_policy_alloc() instead of the
struct sadb_x_sec_ctx defined for that function:
net/xfrm/xfrm_user.c:223
net/xfrm/xfrm_user.c:651
net/xfrm/xfrm_user.c:939
This may seem to work on some systems because the structs are the same,
but one is packed and it's bad form in any case.
Not sure what the best way is to fix this. xfrm is native, so any penalty
should likely go to pfkey.
Also,
net/xfrm/xfrm_user.c:1241: warning: unused variable `ctx'
3) security/selinux/nethooks.c
The name of this file is potentially misleading, it does not contain all
of the SELinux networking hooks, just the xfrm related code. I'd suggest
calling it security/selinux/xfrm.c. It also has no author/copyright info,
or a GPL notice (look at the other files there).
(More to come).
- James
--
James Morris
<jmorris@redhat.com>
^ permalink raw reply
* Re: [0/10] [IPSEC] IPsec event notification
From: David S. Miller @ 2005-05-29 3:23 UTC (permalink / raw)
To: herbert; +Cc: hadi, kaber, netdev
In-Reply-To: <20050528001005.GA10547@gondor.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Sat, 28 May 2005 10:10:05 +1000
> Any objections to asking Andrew to start pulling your
> net-2.6.13 tree or is he doing that already?
I told him last week to do so, so he should be already
doing this.
^ permalink raw reply
* Re: non-fatal oops with EIP at skb_release_data, available for debugging
From: Alessandro Suardi @ 2005-05-29 1:11 UTC (permalink / raw)
To: Andrew Morton; +Cc: netdev
In-Reply-To: <20050525220003.5f6ab060.akpm@osdl.org>
On 5/26/05, Andrew Morton <akpm@osdl.org> wrote:
> Alessandro Suardi <alessandro.suardi@gmail.com> wrote:
> >
> > Quoting my post of over a month ago, hit another
> > non-fatal oops this time with 2.6.12-rc1-bk2...
>
> Has this bug been sighted in more recent kernels?
2.6.12-rc2 is the last kernel I've been running on that box
and the oops never happened once. I'm waiting for -final
or -rc6 and then load it on that K7-800, but so far 2.6.12-rc2
has been rock solid. I think it was reaching the 30 days
uptime but my building had a power outage last week...
> > [17330.816664] Adding 232932k swap on /dev/hdb4. Priority:-2 extents:1
> > [42120.713332] UDP: bad checksum. From 84.188.199.xxx:57483 to
> > 192.168.1.7:10600 ulen 27
> > [56984.872784] UDP: bad checksum. From 216.155.90.xxx:11417 to
> > 192.168.1.7:10600 ulen 28
> > [383152.586711] scsi: unknown opcode 0x01
> > [630539.047761] UDP: short packet: From 4.46.101.xxx:5431 58/27 to
> > 192.168.1.7:1 0600
> > [681405.777002] ------------[ cut here ]------------
> > [681405.777337] kernel BUG at include/linux/mm.h:343!
> > [681405.777642] invalid operand: 0000 [#1]
> > [681405.777885] PREEMPT
> > [681405.778041] Modules linked in: parport_pc parport 8139too floppy
> > [681405.778488] CPU: 0
> > [681405.778491] EIP: 0060:[<c02dcd23>] Not tainted VLI
> > [681405.778494] EFLAGS: 00210256 (2.6.12-rc1-bk2)
> > [681405.779293] EIP is at skb_release_data+0xa3/0xb0
> > [681405.779593] eax: 00000000 ebx: 00000002 ecx: ceb1af80 edx: c10eeb40
> > [681405.780027] esi: c30785c0 edi: c30785c0 ebp: ccd95d28 esp: ccd95d20
> > [681405.780458] ds: 007b es: 007b ss: 0068
> > [681405.780723] Process metacity (pid: 2190, threadinfo=ccd94000 task=cb501a40)
> > [681405.781164] Stack: c30785c0 00000020 ccd95d34 c02dcd3b cec7a6c0
> > ccd95d54 c02 dcdb7 ccd95f3c
> > [681405.781807] 00001620 c30785c0 506c6f85 c30785c0 506c6f85
> > ccd95da8 c03 0100a 00000000
> > [681405.782448] c02dc46f caf7d420 ccd95d80 00000001 caf7d46c
> > ccd94000 000 00001 00000000
> > [681405.783088] Call Trace:
> > [681405.783258] [<c010303a>] show_stack+0x7a/0x90
> > [681405.783574] [<c01031bd>] show_registers+0x14d/0x1c0
> > [681405.783915] [<c01033b4>] die+0xe4/0x170
> > [681405.784192] [<c01037e3>] do_invalid_op+0xa3/0xb0
> > [681405.784517] [<c0102cbf>] error_code+0x2b/0x30
> > [681405.785009] [<c02dcd3b>] kfree_skbmem+0xb/0x20
> > [681405.785494] [<c02dcdb7>] __kfree_skb+0x67/0xf0
> > [681405.785978] [<c030100a>] tcp_recvmsg+0x5fa/0x720
> > [681405.786477] [<c02dc836>] sock_common_recvmsg+0x46/0x60
> > [681405.787004] [<c02d90ed>] sock_recvmsg+0xbd/0xf0
> > [681405.787493] [<c02d9443>] sock_readv_writev+0x83/0x90
> > [681405.788009] [<c02d948b>] sock_readv+0x3b/0x50
> > [681405.788487] [<c0150cb5>] do_readv_writev+0x205/0x230
> > [681405.789004] [<c0150d1d>] vfs_readv+0x3d/0x50
> > [681405.789476] [<c0150dcd>] sys_readv+0x3d/0xa0
> > [681405.789947] [<c0102abb>] sysenter_past_esp+0x54/0x75
> > [681405.790461] Code: 8b 86 98 00 00 00 5e c9 e9 7b e9 e5 ff 89 d0 e8
> > 44 f7 e5 f f eb d6 89 f0 e8 fb fe ff ff 5b 8b 86 98 00 00 00 5e c9 e9
> > 5d e9 e5 ff <0f> 0b 5 7 01 32 ed 35 c0 eb ac 8d 76 00 55 89 e5 53 89
> > c3 e8 45
> > [681405.857278] <7>UDP: short packet: From 213.23.1.xxx:11236 2814/33
> > to 192.168. 1.7:10600
> >
> >
> > On Mar 4, 2005 10:48 PM, Alessandro Suardi <alessandro.suardi@gmail.com> wrote:
> > > This is my K7-800, 256MB RAM machine running as
> > > ed2k/bittorrent 24/7 box... metacity died, but the
> > > windows are still alive (and working) so if someone
> > > wants to get more info about it, just ping me...
> > >
> > > [root@donkey ~]# cat /proc/version
> > > Linux version 2.6.11-rc3-bk8 (asuardi@donkey) (gcc version 3.4.2
> > > 20041017 (Red Hat 3.4.2-6.fc3)) #1 Sat Feb 12 00:01:28 CET 2005
> > > [root@donkey ~]# lsmod
> > > Module Size Used by
> > > loop 15368 -
> > > nls_iso8859_1 3840 -
> > > parport_pc 29444 -
> > > parport 24704 -
> > > 8139too 24896 -
> > > floppy 57392 -
> > >
> > > From the dmesg ring:
> > >
> > > kernel BUG at include/linux/mm.h:343!
> > > invalid operand: 0000 [#1]
> > > PREEMPT
> > > Modules linked in: loop nls_iso8859_1 parport_pc parport 8139too floppy
> > > CPU: 0
> > > EIP: 0060:[<c02da6a2>] Not tainted VLI
> > > EFLAGS: 00210256 (2.6.11-rc3-bk8)
> > > EIP is at skb_release_data+0x92/0xa0
> > > eax: 00000000 ebx: 00000000 ecx: cca36f80 edx: c11a97c0
> > > esi: c4205f20 edi: c4205f20 ebp: cd149dcc esp: cd149dc4
> > > ds: 007b es: 007b ss: 0068
> > > Process metacity (pid: 2109, threadinfo=cd148000 task=ce8935d0)
> > > Stack: c4205f20 00000000 cd149dd8 c02da6bb c6e9a0c0 cd149df8 c02da737 c5134250
> > > 00000000 c4205f20 c5134250 c4205f20 c5134250 cd149e4c c02feba6 00000000
> > > 00000040 cc68c454 00000000 00000001 cc68c444 cd148000 00000001 00000000
> > > Call Trace:
> > > [<c0102b2a>] show_stack+0x7a/0x90
> > > [<c0102cad>] show_registers+0x14d/0x1c0
> > > [<c0102ea4>] die+0xe4/0x180
> > > [<c01032e3>] do_invalid_op+0xa3/0xb0
> > > [<c01027a7>] error_code+0x2b/0x30
> > > [<c02da6bb>] kfree_skbmem+0xb/0x20
> > > [<c02da737>] __kfree_skb+0x67/0xf0
> > > [<c02feba6>] tcp_recvmsg+0x5f6/0x710
> > > [<c02da1e6>] sock_common_recvmsg+0x46/0x60
> > > [<c02d6bbe>] sock_aio_read+0xee/0x100
> > > [<c014e427>] do_sync_read+0x97/0xf0
> > > [<c014e511>] vfs_read+0x91/0x120
> > > [<c014e7ed>] sys_read+0x3d/0x70
> > > [<c01025a9>] sysenter_past_esp+0x52/0x75
> > > Code: c9 e9 03 e5 e5 ff 8d 76 00 5b 5e c9 c3 89 d0 e8 c5 f2 e5 ff eb
> > > cf 89 f0 e8 0c ff ff ff 5b 8b 86 98 00 00 00 5e c9 e9 de e4 e5 ff <0f>
> > > 0b 57 01 ab c5 35 c0 eb a5 8d 74 26 00 55 89 e5 53 89 c3 e8
--alessandro
"To love is to find your own soul
Through the soul of the beloved one.
When the beloved one withdraws itself from your soul
Then you have lost your soul."
(Edgar Lee Masters, Spoon River Anthology - "Mary McNeely")
^ permalink raw reply
* [patch 1/1] Use pci_set_dma_mask() instead of direct assignment of DMA mask
From: domen @ 2005-05-28 23:16 UTC (permalink / raw)
To: jgarzik; +Cc: netdev, Tobias Klauser, domen
[-- Attachment #1: dma_mask-drivers_net_amd8111e --]
[-- Type: text/plain, Size: 1329 bytes --]
From: Tobias Klauser <tklauser@nuerscht.ch>
The amd8111e driver directly assigns the DMA mask to the dma_mask
member of the struct pci_dev instead of using pci_set_dma_mask(). This
makes the call to pci_dma_supported() redundant as pci_set_dma_mask()
does this check.
I do not own this device so I only compile-tested this patch.
Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
amd8111e.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
Index: quilt/drivers/net/amd8111e.c
===================================================================
--- quilt.orig/drivers/net/amd8111e.c
+++ quilt/drivers/net/amd8111e.c
@@ -87,6 +87,7 @@ Revision History:
#include <linux/if_vlan.h>
#include <linux/ctype.h>
#include <linux/crc32.h>
+#include <linux/dma-mapping.h>
#include <asm/system.h>
#include <asm/io.h>
@@ -2002,12 +2003,11 @@ static int __devinit amd8111e_probe_one(
}
/* Initialize DMA */
- if(!pci_dma_supported(pdev, 0xffffffff)){
+ if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) < 0) {
printk(KERN_ERR "amd8111e: DMA not supported,"
"exiting.\n");
- goto err_free_reg;
- } else
- pdev->dma_mask = 0xffffffff;
+ goto err_free_reg;
+ }
reg_addr = pci_resource_start(pdev, 0);
reg_len = pci_resource_len(pdev, 0);
--
^ permalink raw reply
* [patch 1/1] printk : drivers/net/hp100.c
From: domen @ 2005-05-28 23:16 UTC (permalink / raw)
To: perex; +Cc: jgarzik, netdev, Christophe Lucas, domen
[-- Attachment #1: printk-drivers_net_hp100 --]
[-- Type: text/plain, Size: 44168 bytes --]
From: Christophe Lucas <clucas@rotomalug.org>
printk() calls should include appropriate KERN_* constant.
Signed-off-by: Christophe Lucas <clucas@rotomalug.org>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
hp100.c | 266 ++++++++++++++++++++++++++++++++--------------------------------
1 files changed, 133 insertions(+), 133 deletions(-)
Index: quilt/drivers/net/hp100.c
===================================================================
--- quilt.orig/drivers/net/hp100.c
+++ quilt/drivers/net/hp100.c
@@ -406,7 +406,7 @@ struct net_device * __init hp100_probe(i
#ifdef HP100_DEBUG_B
hp100_outw(0x4200, TRACE);
- printk("hp100: %s: probe\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: probe\n", dev->name);
#endif
if (unit >= 0) {
@@ -447,7 +447,7 @@ static int __devinit hp100_probe1(struct
#ifdef HP100_DEBUG_B
hp100_outw(0x4201, TRACE);
- printk("hp100: %s: probe1\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: probe1\n", dev->name);
#endif
/* memory region for programmed i/o */
@@ -460,13 +460,13 @@ static int __devinit hp100_probe1(struct
chip = hp100_inw(PAGING) & HP100_CHIPID_MASK;
#ifdef HP100_DEBUG
if (chip == HP100_CHIPID_SHASTA)
- printk("hp100: %s: Shasta Chip detected. (This is a pre 802.12 chip)\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: Shasta Chip detected. (This is a pre 802.12 chip)\n", dev->name);
else if (chip == HP100_CHIPID_RAINIER)
- printk("hp100: %s: Rainier Chip detected. (This is a pre 802.12 chip)\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: Rainier Chip detected. (This is a pre 802.12 chip)\n", dev->name);
else if (chip == HP100_CHIPID_LASSEN)
- printk("hp100: %s: Lassen Chip detected.\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: Lassen Chip detected.\n", dev->name);
else
- printk("hp100: %s: Warning: Unknown CASCADE chip (id=0x%.4x).\n", dev->name, chip);
+ printk(KERN_DEBUG "hp100: %s: Warning: Unknown CASCADE chip (id=0x%.4x).\n", dev->name, chip);
#endif
dev->base_addr = ioaddr;
@@ -523,7 +523,7 @@ static int __devinit hp100_probe1(struct
if (local_mode < 1 || local_mode > 4)
local_mode = 1; /* default */
#ifdef HP100_DEBUG
- printk("hp100: %s: original LSW = 0x%x\n", dev->name,
+ printk(KERN_DEBUG "hp100: %s: original LSW = 0x%x\n", dev->name,
hp100_inw(OPTION_LSW));
#endif
@@ -531,17 +531,17 @@ static int __devinit hp100_probe1(struct
hp100_outw(HP100_MEM_EN | HP100_RESET_LB, OPTION_LSW);
hp100_outw(HP100_IO_EN | HP100_SET_LB, OPTION_LSW);
hp100_outw(HP100_BM_WRITE | HP100_BM_READ | HP100_RESET_HB, OPTION_LSW);
- printk("hp100: IO mapped mode forced.\n");
+ printk(KERN_INFO "hp100: IO mapped mode forced.\n");
} else if (local_mode == 2) {
hp100_outw(HP100_MEM_EN | HP100_SET_LB, OPTION_LSW);
hp100_outw(HP100_IO_EN | HP100_SET_LB, OPTION_LSW);
hp100_outw(HP100_BM_WRITE | HP100_BM_READ | HP100_RESET_HB, OPTION_LSW);
- printk("hp100: Shared memory mode requested.\n");
+ printk(KERN_INFO "hp100: Shared memory mode requested.\n");
} else if (local_mode == 4) {
if (chip == HP100_CHIPID_LASSEN) {
hp100_outw(HP100_BM_WRITE | HP100_BM_READ | HP100_SET_HB, OPTION_LSW);
hp100_outw(HP100_IO_EN | HP100_MEM_EN | HP100_RESET_LB, OPTION_LSW);
- printk("hp100: Busmaster mode requested.\n");
+ printk(KERN_INFO "hp100: Busmaster mode requested.\n");
}
local_mode = 1;
}
@@ -552,7 +552,7 @@ static int __devinit hp100_probe1(struct
if ((lsw & HP100_IO_EN) && (~lsw & HP100_MEM_EN) &&
(~lsw & (HP100_BM_WRITE | HP100_BM_READ))) {
#ifdef HP100_DEBUG
- printk("hp100: %s: IO_EN bit is set on card.\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: IO_EN bit is set on card.\n", dev->name);
#endif
local_mode = 3;
} else if (chip == HP100_CHIPID_LASSEN &&
@@ -567,13 +567,13 @@ static int __devinit hp100_probe1(struct
/* Gracefully fallback to shared memory */
goto busmasterfail;
}
- printk("hp100: Busmaster mode enabled.\n");
+ printk(KERN_INFO "hp100: Busmaster mode enabled.\n");
hp100_outw(HP100_MEM_EN | HP100_IO_EN | HP100_RESET_LB, OPTION_LSW);
} else {
busmasterfail:
#ifdef HP100_DEBUG
- printk("hp100: %s: Card not configured for BM or BM not supported with this card.\n", dev->name);
- printk("hp100: %s: Trying shared memory mode.\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: Card not configured for BM or BM not supported with this card.\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: Trying shared memory mode.\n", dev->name);
#endif
/* In this case, try shared memory mode */
local_mode = 2;
@@ -582,7 +582,7 @@ static int __devinit hp100_probe1(struct
}
}
#ifdef HP100_DEBUG
- printk("hp100: %s: new LSW = 0x%x\n", dev->name, hp100_inw(OPTION_LSW));
+ printk(KERN_DEBUG "hp100: %s: new LSW = 0x%x\n", dev->name, hp100_inw(OPTION_LSW));
#endif
/* Check for shared memory on the card, eventually remap it */
@@ -599,7 +599,7 @@ static int __devinit hp100_probe1(struct
mem_ptr_phys &= ~0x1fff; /* 8k alignment */
if (bus == HP100_BUS_ISA && (mem_ptr_phys & ~0xfffff) != 0) {
- printk("hp100: Can only use programmed i/o mode.\n");
+ printk(KERN_INFO "hp100: Can only use programmed i/o mode.\n");
mem_ptr_phys = 0;
mem_mapped = 0;
local_mode = 3; /* Use programmed i/o */
@@ -612,18 +612,18 @@ static int __devinit hp100_probe1(struct
for (virt_memory_size = memory_size; virt_memory_size > 16383; virt_memory_size >>= 1) {
if ((mem_ptr_virt = ioremap((u_long) mem_ptr_phys, virt_memory_size)) == NULL) {
#ifdef HP100_DEBUG
- printk("hp100: %s: ioremap for 0x%x bytes high PCI memory at 0x%lx failed\n", dev->name, virt_memory_size, mem_ptr_phys);
+ printk(KERN_DEBUG "hp100: %s: ioremap for 0x%x bytes high PCI memory at 0x%lx failed\n", dev->name, virt_memory_size, mem_ptr_phys);
#endif
} else {
#ifdef HP100_DEBUG
- printk("hp100: %s: remapped 0x%x bytes high PCI memory at 0x%lx to %p.\n", dev->name, virt_memory_size, mem_ptr_phys, mem_ptr_virt);
+ printk(KERN_DEBUG "hp100: %s: remapped 0x%x bytes high PCI memory at 0x%lx to %p.\n", dev->name, virt_memory_size, mem_ptr_phys, mem_ptr_virt);
#endif
break;
}
}
if (mem_ptr_virt == NULL) { /* all ioremap tries failed */
- printk("hp100: Failed to ioremap the PCI card memory. Will have to use i/o mapped mode.\n");
+ printk(KERN_WARNING "hp100: Failed to ioremap the PCI card memory. Will have to use i/o mapped mode.\n");
local_mode = 3;
virt_memory_size = 0;
}
@@ -634,7 +634,7 @@ static int __devinit hp100_probe1(struct
mem_mapped = 0;
mem_ptr_phys = 0;
mem_ptr_virt = NULL;
- printk("hp100: Using (slow) programmed i/o mode.\n");
+ printk(KERN_INFO "hp100: Using (slow) programmed i/o mode.\n");
}
/* Initialise the "private" data structure for this card. */
@@ -716,7 +716,7 @@ static int __devinit hp100_probe1(struct
lp->whatever_offset = ((u_long) page_baddr) - ((u_long) lp->page_vaddr_algn);
#ifdef HP100_DEBUG_BM
- printk("hp100: %s: Reserved DMA memory from 0x%x to 0x%x\n", dev->name, (u_int) lp->page_vaddr_algn, (u_int) lp->page_vaddr_algn + MAX_RINGSIZE);
+ printk(KERN_DEBUG "hp100: %s: Reserved DMA memory from 0x%x to 0x%x\n", dev->name, (u_int) lp->page_vaddr_algn, (u_int) lp->page_vaddr_algn + MAX_RINGSIZE);
#endif
lp->rxrcommit = lp->txrcommit = 0;
lp->rxrhead = lp->rxrtail = &(lp->rxring[0]);
@@ -734,7 +734,7 @@ static int __devinit hp100_probe1(struct
lp->lan_type = hp100_sense_lan(dev);
/* Print out a message what about what we think we have probed. */
- printk("hp100: at 0x%x, IRQ %d, ", ioaddr, dev->irq);
+ printk(KERN_INFO "hp100: at 0x%x, IRQ %d, ", ioaddr, dev->irq);
switch (bus) {
case HP100_BUS_EISA:
printk("EISA");
@@ -749,7 +749,7 @@ static int __devinit hp100_probe1(struct
printk(" bus, %dk SRAM (rx/tx %d%%).\n", lp->memory_size >> 10, lp->rx_ratio);
if (lp->mode == 2) { /* memory mapped */
- printk("hp100: Memory area at 0x%lx-0x%lx", mem_ptr_phys,
+ printk(KERN_INFO "hp100: Memory area at 0x%lx-0x%lx", mem_ptr_phys,
(mem_ptr_phys + (mem_ptr_phys > 0x100000 ? (u_long) lp->memory_size : 16 * 1024)) - 1);
if (mem_ptr_virt)
printk(" (virtual base %p)", mem_ptr_virt);
@@ -760,7 +760,7 @@ static int __devinit hp100_probe1(struct
dev->mem_end = mem_ptr_phys + lp->memory_size;
}
- printk("hp100: ");
+ printk(KERN_INFO "hp100: ");
if (lp->lan_type != HP100_LAN_ERR)
printk("Adapter is attached to ");
switch (lp->lan_type) {
@@ -792,7 +792,7 @@ static void hp100_hwinit(struct net_devi
#ifdef HP100_DEBUG_B
hp100_outw(0x4202, TRACE);
- printk("hp100: %s: hwinit\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: hwinit\n", dev->name);
#endif
/* Initialise the card. -------------------------------------------- */
@@ -887,12 +887,12 @@ static void hp100_mmuinit(struct net_dev
#ifdef HP100_DEBUG_B
hp100_outw(0x4203, TRACE);
- printk("hp100: %s: mmuinit\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: mmuinit\n", dev->name);
#endif
#ifdef HP100_DEBUG
if (0 != (hp100_inw(OPTION_LSW) & HP100_HW_RST)) {
- printk("hp100: %s: Not in reset when entering mmuinit. Fix me.\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: Not in reset when entering mmuinit. Fix me.\n", dev->name);
return;
}
#endif
@@ -985,7 +985,7 @@ static void hp100_mmuinit(struct net_dev
recv_stop = (xmit_stop * (lp->rx_ratio) / 100) & ~(0x03ff);
hp100_outw((pdl_stop >> 4) - 1, PDL_MEM_STOP);
#ifdef HP100_DEBUG_BM
- printk("hp100: %s: PDL_STOP = 0x%x\n", dev->name, pdl_stop);
+ printk(KERN_DEBUG "hp100: %s: PDL_STOP = 0x%x\n", dev->name, pdl_stop);
#endif
} else {
/* ETR chip (Lassen) in busmaster mode */
@@ -996,16 +996,16 @@ static void hp100_mmuinit(struct net_dev
hp100_outw(xmit_stop >> 4, TX_MEM_STOP);
hp100_outw(recv_stop >> 4, RX_MEM_STOP);
#ifdef HP100_DEBUG_BM
- printk("hp100: %s: TX_STOP = 0x%x\n", dev->name, xmit_stop >> 4);
- printk("hp100: %s: RX_STOP = 0x%x\n", dev->name, recv_stop >> 4);
+ printk(KERN_DEBUG "hp100: %s: TX_STOP = 0x%x\n", dev->name, xmit_stop >> 4);
+ printk(KERN_DEBUG "hp100: %s: RX_STOP = 0x%x\n", dev->name, recv_stop >> 4);
#endif
} else {
/* Slave modes (memory mapped and programmed io) */
hp100_outw((((lp->memory_size * lp->rx_ratio) / 100) >> 4), RX_MEM_STOP);
hp100_outw(((lp->memory_size - 1) >> 4), TX_MEM_STOP);
#ifdef HP100_DEBUG
- printk("hp100: %s: TX_MEM_STOP: 0x%x\n", dev->name, hp100_inw(TX_MEM_STOP));
- printk("hp100: %s: RX_MEM_STOP: 0x%x\n", dev->name, hp100_inw(RX_MEM_STOP));
+ printk(KERN_DEBUG "hp100: %s: TX_MEM_STOP: 0x%x\n", dev->name, hp100_inw(TX_MEM_STOP));
+ printk(KERN_DEBUG "hp100: %s: RX_MEM_STOP: 0x%x\n", dev->name, hp100_inw(RX_MEM_STOP));
#endif
}
@@ -1067,7 +1067,7 @@ static int hp100_open(struct net_device
#ifdef HP100_DEBUG_B
hp100_outw(0x4204, TRACE);
- printk("hp100: %s: open\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: open\n", dev->name);
#endif
/* New: if bus is PCI or EISA, interrupts might be shared interrupts */
@@ -1075,7 +1075,7 @@ static int hp100_open(struct net_device
lp->bus == HP100_BUS_PCI || lp->bus ==
HP100_BUS_EISA ? SA_SHIRQ : SA_INTERRUPT,
"hp100", dev)) {
- printk("hp100: %s: unable to get IRQ %d\n", dev->name, dev->irq);
+ printk(KERN_WARNING "hp100: %s: unable to get IRQ %d\n", dev->name, dev->irq);
return -EAGAIN;
}
@@ -1104,7 +1104,7 @@ static int hp100_close(struct net_device
#ifdef HP100_DEBUG_B
hp100_outw(0x4205, TRACE);
- printk("hp100: %s: close\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: close\n", dev->name);
#endif
hp100_page(PERFORMANCE);
@@ -1120,7 +1120,7 @@ static int hp100_close(struct net_device
free_irq(dev->irq, dev);
#ifdef HP100_DEBUG
- printk("hp100: %s: close LSW = 0x%x\n", dev->name,
+ printk(KERN_DEBUG "hp100: %s: close LSW = 0x%x\n", dev->name,
hp100_inw(OPTION_LSW));
#endif
@@ -1144,11 +1144,11 @@ static void hp100_init_pdls(struct net_d
#ifdef HP100_DEBUG_B
hp100_outw(0x4206, TRACE);
- printk("hp100: %s: init pdls\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: init pdls\n", dev->name);
#endif
if (0 == lp->page_vaddr_algn)
- printk("hp100: %s: Warning: lp->page_vaddr_algn not initialised!\n", dev->name);
+ printk(KERN_WARNING "hp100: %s: Warning: lp->page_vaddr_algn not initialised!\n", dev->name);
else {
/* pageptr shall point into the DMA accessible memory region */
/* we use this pointer to status the upper limit of allocated */
@@ -1188,7 +1188,7 @@ static int hp100_init_rxpdl(struct net_d
/* pdlptr is starting address for this pdl */
if (0 != (((unsigned long) pdlptr) & 0xf))
- printk("hp100: %s: Init rxpdl: Unaligned pdlptr 0x%lx.\n",
+ printk(KERN_INFO "hp100: %s: Init rxpdl: Unaligned pdlptr 0x%lx.\n",
dev->name, (unsigned long) pdlptr);
ringptr->pdl = pdlptr + 1;
@@ -1215,7 +1215,7 @@ static int hp100_init_txpdl(struct net_d
register u32 * pdlptr)
{
if (0 != (((unsigned long) pdlptr) & 0xf))
- printk("hp100: %s: Init txpdl: Unaligned pdlptr 0x%lx.\n", dev->name, (unsigned long) pdlptr);
+ printk(KERN_INFO "hp100: %s: Init txpdl: Unaligned pdlptr 0x%lx.\n", dev->name, (unsigned long) pdlptr);
ringptr->pdl = pdlptr; /* +1; */
ringptr->pdl_paddr = virt_to_whatever(dev, pdlptr); /* +1 */
@@ -1243,7 +1243,7 @@ static int hp100_build_rx_pdl(hp100_ring
#ifdef HP100_DEBUG_B
hp100_outw(0x4207, TRACE);
- printk("hp100: %s: build rx pdl\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: build rx pdl\n", dev->name);
#endif
/* Allocate skb buffer of maximum size */
@@ -1271,7 +1271,7 @@ static int hp100_build_rx_pdl(hp100_ring
* directly before the PDL.
*/
#ifdef HP100_DEBUG_BM
- printk("hp100: %s: build_rx_pdl: PDH@0x%x, skb->data (len %d) at 0x%x\n",
+ printk(KERN_DEBUG "hp100: %s: build_rx_pdl: PDH@0x%x, skb->data (len %d) at 0x%x\n",
dev->name, (u_int) ringptr->pdl,
((MAX_ETHER_SIZE + 2 + 3) / 4) * 4,
(unsigned int) ringptr->skb->data);
@@ -1286,7 +1286,7 @@ static int hp100_build_rx_pdl(hp100_ring
#ifdef HP100_DEBUG_BM
for (p = (ringptr->pdl); p < (ringptr->pdl + 5); p++)
- printk("hp100: %s: Adr 0x%.8x = 0x%.8x\n", dev->name, (u_int) p, (u_int) * p);
+ printk(KERN_DEBUG "hp100: %s: Adr 0x%.8x = 0x%.8x\n", dev->name, (u_int) p, (u_int) * p);
#endif
return (1);
}
@@ -1296,7 +1296,7 @@ static int hp100_build_rx_pdl(hp100_ring
* making the PDL only 1 fragment (i.e. the 4 byte packet status)
*/
#ifdef HP100_DEBUG_BM
- printk("hp100: %s: build_rx_pdl: PDH@0x%x, No space for skb.\n", dev->name, (u_int) ringptr->pdl);
+ printk(KERN_DEBUG "hp100: %s: build_rx_pdl: PDH@0x%x, No space for skb.\n", dev->name, (u_int) ringptr->pdl);
#endif
ringptr->pdl[0] = 0x00010000; /* PDH: Count=1 Fragment */
@@ -1323,7 +1323,7 @@ static void hp100_rxfill(struct net_devi
#ifdef HP100_DEBUG_B
hp100_outw(0x4208, TRACE);
- printk("hp100: %s: rxfill\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: rxfill\n", dev->name);
#endif
hp100_page(PERFORMANCE);
@@ -1340,7 +1340,7 @@ static void hp100_rxfill(struct net_devi
/* Hand this PDL over to the card */
/* Note: This needs performance page selected! */
#ifdef HP100_DEBUG_BM
- printk("hp100: %s: rxfill: Hand to card: pdl #%d @0x%x phys:0x%x, buffer: 0x%x\n",
+ printk(KERN_DEBUG "hp100: %s: rxfill: Hand to card: pdl #%d @0x%x phys:0x%x, buffer: 0x%x\n",
dev->name, lp->rxrcommit, (u_int) ringptr->pdl,
(u_int) ringptr->pdl_paddr, (u_int) ringptr->pdl[3]);
#endif
@@ -1364,7 +1364,7 @@ static void hp100_BM_shutdown(struct net
#ifdef HP100_DEBUG_B
hp100_outw(0x4209, TRACE);
- printk("hp100: %s: bm shutdown\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: bm shutdown\n", dev->name);
#endif
hp100_page(PERFORMANCE);
@@ -1413,7 +1413,7 @@ static void hp100_BM_shutdown(struct net
}
if (time >= 10000)
- printk("hp100: %s: BM shutdown error.\n", dev->name);
+ printk(KERN_INFO "hp100: %s: BM shutdown error.\n", dev->name);
/* To ensure all bus master outloading activity has ceased,
* wait until the Tx PDA count goes to zero or no more Tx space
@@ -1445,7 +1445,7 @@ static int hp100_check_lan(struct net_de
if (lp->lan_type < 0) { /* no LAN type detected yet? */
hp100_stop_interface(dev);
if ((lp->lan_type = hp100_sense_lan(dev)) < 0) {
- printk("hp100: %s: no connection found - check wire\n", dev->name);
+ printk(KERN_INFO "hp100: %s: no connection found - check wire\n", dev->name);
hp100_start_interface(dev); /* 10Mb/s RX packets maybe handled */
return -EIO;
}
@@ -1471,7 +1471,7 @@ static int hp100_start_xmit_bm(struct sk
#ifdef HP100_DEBUG_B
hp100_outw(0x4210, TRACE);
- printk("hp100: %s: start_xmit_bm\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: start_xmit_bm\n", dev->name);
#endif
if (skb == NULL) {
@@ -1491,7 +1491,7 @@ static int hp100_start_xmit_bm(struct sk
if (lp->txrtail->next == lp->txrhead) {
/* No memory. */
#ifdef HP100_DEBUG
- printk("hp100: %s: start_xmit_bm: No TX PDL available.\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: start_xmit_bm: No TX PDL available.\n", dev->name);
#endif
/* not waited long enough since last tx? */
if (jiffies - dev->trans_start < HZ)
@@ -1502,7 +1502,7 @@ static int hp100_start_xmit_bm(struct sk
if (lp->lan_type == HP100_LAN_100 && lp->hub_status < 0) {
/* we have a 100Mb/s adapter but it isn't connected to hub */
- printk("hp100: %s: login to 100Mb/s hub retry\n", dev->name);
+ printk(KERN_INFO "hp100: %s: login to 100Mb/s hub retry\n", dev->name);
hp100_stop_interface(dev);
lp->hub_status = hp100_login_to_vg_hub(dev, 0);
hp100_start_interface(dev);
@@ -1513,17 +1513,17 @@ static int hp100_start_xmit_bm(struct sk
hp100_ints_on();
spin_unlock_irqrestore(&lp->lock, flags);
if (i == HP100_LAN_ERR)
- printk("hp100: %s: link down detected\n", dev->name);
+ printk(KERN_INFO "hp100: %s: link down detected\n", dev->name);
else if (lp->lan_type != i) { /* cable change! */
/* it's very hard - all network settings must be changed!!! */
- printk("hp100: %s: cable change 10Mb/s <-> 100Mb/s detected\n", dev->name);
+ printk(KERN_INFO "hp100: %s: cable change 10Mb/s <-> 100Mb/s detected\n", dev->name);
lp->lan_type = i;
hp100_stop_interface(dev);
if (lp->lan_type == HP100_LAN_100)
lp->hub_status = hp100_login_to_vg_hub(dev, 0);
hp100_start_interface(dev);
} else {
- printk("hp100: %s: interface reset\n", dev->name);
+ printk(KERN_INFO "hp100: %s: interface reset\n", dev->name);
hp100_stop_interface(dev);
if (lp->lan_type == HP100_LAN_100)
lp->hub_status = hp100_login_to_vg_hub(dev, 0);
@@ -1590,7 +1590,7 @@ static void hp100_clean_txring(struct ne
#ifdef HP100_DEBUG_B
hp100_outw(0x4211, TRACE);
- printk("hp100: %s: clean txring\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: clean txring\n", dev->name);
#endif
/* How many PDLs have been transmitted? */
@@ -1598,12 +1598,12 @@ static void hp100_clean_txring(struct ne
#ifdef HP100_DEBUG
if (donecount > MAX_TX_PDL)
- printk("hp100: %s: Warning: More PDLs transmitted than commited to card???\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: Warning: More PDLs transmitted than commited to card???\n", dev->name);
#endif
for (; 0 != donecount; donecount--) {
#ifdef HP100_DEBUG_BM
- printk("hp100: %s: Free skb: data @0x%.8x txrcommit=0x%x TXPDL=0x%x, done=0x%x\n",
+ printk(KERN_DEBUG "hp100: %s: Free skb: data @0x%.8x txrcommit=0x%x TXPDL=0x%x, done=0x%x\n",
dev->name, (u_int) lp->txrhead->skb->data,
lp->txrcommit, hp100_inb(TX_PDL), donecount);
#endif
@@ -1627,7 +1627,7 @@ static int hp100_start_xmit(struct sk_bu
#ifdef HP100_DEBUG_B
hp100_outw(0x4212, TRACE);
- printk("hp100: %s: start_xmit\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: start_xmit\n", dev->name);
#endif
if (skb == NULL) {
@@ -1644,19 +1644,19 @@ static int hp100_start_xmit(struct sk_bu
i = hp100_inl(TX_MEM_FREE) & 0x7fffffff;
if (!(((i / 2) - 539) > (skb->len + 16) && (hp100_inb(TX_PKT_CNT) < 255))) {
#ifdef HP100_DEBUG
- printk("hp100: %s: start_xmit: tx free mem = 0x%x\n", dev->name, i);
+ printk(KERN_DEBUG "hp100: %s: start_xmit: tx free mem = 0x%x\n", dev->name, i);
#endif
/* not waited long enough since last failed tx try? */
if (jiffies - dev->trans_start < HZ) {
#ifdef HP100_DEBUG
- printk("hp100: %s: trans_start timing problem\n",
+ printk(KERN_DEBUG "hp100: %s: trans_start timing problem\n",
dev->name);
#endif
return -EAGAIN;
}
if (lp->lan_type == HP100_LAN_100 && lp->hub_status < 0) {
/* we have a 100Mb/s adapter but it isn't connected to hub */
- printk("hp100: %s: login to 100Mb/s hub retry\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: login to 100Mb/s hub retry\n", dev->name);
hp100_stop_interface(dev);
lp->hub_status = hp100_login_to_vg_hub(dev, 0);
hp100_start_interface(dev);
@@ -1667,17 +1667,17 @@ static int hp100_start_xmit(struct sk_bu
hp100_ints_on();
spin_unlock_irqrestore(&lp->lock, flags);
if (i == HP100_LAN_ERR)
- printk("hp100: %s: link down detected\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: link down detected\n", dev->name);
else if (lp->lan_type != i) { /* cable change! */
/* it's very hard - all network setting must be changed!!! */
- printk("hp100: %s: cable change 10Mb/s <-> 100Mb/s detected\n", dev->name);
+ printk(KERN_INFO "hp100: %s: cable change 10Mb/s <-> 100Mb/s detected\n", dev->name);
lp->lan_type = i;
hp100_stop_interface(dev);
if (lp->lan_type == HP100_LAN_100)
lp->hub_status = hp100_login_to_vg_hub(dev, 0);
hp100_start_interface(dev);
} else {
- printk("hp100: %s: interface reset\n", dev->name);
+ printk(KERN_INFO "hp100: %s: interface reset\n", dev->name);
hp100_stop_interface(dev);
if (lp->lan_type == HP100_LAN_100)
lp->hub_status = hp100_login_to_vg_hub(dev, 0);
@@ -1691,7 +1691,7 @@ static int hp100_start_xmit(struct sk_bu
for (i = 0; i < 6000 && (hp100_inb(OPTION_MSW) & HP100_TX_CMD); i++) {
#ifdef HP100_DEBUG_TX
- printk("hp100: %s: start_xmit: busy\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: start_xmit: busy\n", dev->name);
#endif
}
@@ -1702,7 +1702,7 @@ static int hp100_start_xmit(struct sk_bu
* when the current packet being transmitted on the wire is completed. */
hp100_outw(HP100_TX_COMPLETE, IRQ_STATUS);
#ifdef HP100_DEBUG_TX
- printk("hp100: %s: start_xmit: irq_status=0x%.4x, irqmask=0x%.4x, len=%d\n",
+ printk(KERN_DEBUG "hp100: %s: start_xmit: irq_status=0x%.4x, irqmask=0x%.4x, len=%d\n",
dev->name, val, hp100_inw(IRQ_MASK), (int) skb->len);
#endif
@@ -1743,7 +1743,7 @@ static int hp100_start_xmit(struct sk_bu
dev_kfree_skb_any(skb);
#ifdef HP100_DEBUG_TX
- printk("hp100: %s: start_xmit: end\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: start_xmit: end\n", dev->name);
#endif
return 0;
@@ -1769,7 +1769,7 @@ static void hp100_rx(struct net_device *
#ifdef DEBUG_B
hp100_outw(0x4213, TRACE);
- printk("hp100: %s: rx\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: rx\n", dev->name);
#endif
/* First get indication of received lan packet */
@@ -1778,7 +1778,7 @@ static void hp100_rx(struct net_device *
packets = hp100_inb(RX_PKT_CNT);
#ifdef HP100_DEBUG_RX
if (packets > 1)
- printk("hp100: %s: rx: waiting packets = %d\n", dev->name, packets);
+ printk(KERN_DEBUG "hp100: %s: rx: waiting packets = %d\n", dev->name, packets);
#endif
while (packets-- > 0) {
@@ -1786,7 +1786,7 @@ static void hp100_rx(struct net_device *
/* really advanced to the next packet. */
for (pkt_len = 0; pkt_len < 6000 && (hp100_inb(OPTION_MSW) & HP100_ADV_NXT_PKT); pkt_len++) {
#ifdef HP100_DEBUG_RX
- printk ("hp100: %s: rx: busy, remaining packets = %d\n", dev->name, packets);
+ printk (KERN_DEBUG "hp100: %s: rx: busy, remaining packets = %d\n", dev->name, packets);
#endif
}
@@ -1803,7 +1803,7 @@ static void hp100_rx(struct net_device *
pkt_len = ((header & HP100_PKT_LEN_MASK) + 3) & ~3;
#ifdef HP100_DEBUG_RX
- printk("hp100: %s: rx: new packet - length=%d, errors=0x%x, dest=0x%x\n",
+ printk(KERN_DEBUG "hp100: %s: rx: new packet - length=%d, errors=0x%x, dest=0x%x\n",
dev->name, header & HP100_PKT_LEN_MASK,
(header >> 16) & 0xfff8, (header >> 16) & 7);
#endif
@@ -1812,7 +1812,7 @@ static void hp100_rx(struct net_device *
skb = dev_alloc_skb(pkt_len+2);
if (skb == NULL) { /* Not enough memory->drop packet */
#ifdef HP100_DEBUG
- printk("hp100: %s: rx: couldn't allocate a sk_buff of size %d\n",
+ printk(KERN_DEBUG "hp100: %s: rx: couldn't allocate a sk_buff of size %d\n",
dev->name, pkt_len);
#endif
lp->stats.rx_dropped++;
@@ -1840,7 +1840,7 @@ static void hp100_rx(struct net_device *
skb->protocol = eth_type_trans(skb, dev);
#ifdef HP100_DEBUG_RX
- printk("hp100: %s: rx: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ printk(KERN_DEBUG "hp100: %s: rx: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
dev->name, ptr[0], ptr[1], ptr[2], ptr[3],
ptr[4], ptr[5], ptr[6], ptr[7], ptr[8],
ptr[9], ptr[10], ptr[11]);
@@ -1862,7 +1862,7 @@ static void hp100_rx(struct net_device *
}
} /* end of while(there are packets) loop */
#ifdef HP100_DEBUG_RX
- printk("hp100_rx: %s: end\n", dev->name);
+ printk(KERN_DEBUG "hp100_rx: %s: end\n", dev->name);
#endif
}
@@ -1879,18 +1879,18 @@ static void hp100_rx_bm(struct net_devic
#ifdef HP100_DEBUG_B
hp100_outw(0x4214, TRACE);
- printk("hp100: %s: rx_bm\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: rx_bm\n", dev->name);
#endif
#ifdef HP100_DEBUG
if (0 == lp->rxrcommit) {
- printk("hp100: %s: rx_bm called although no PDLs were committed to adapter?\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: rx_bm called although no PDLs were committed to adapter?\n", dev->name);
return;
} else
/* RX_PKT_CNT states how many PDLs are currently formatted and available to
* the cards BM engine */
if ((hp100_inw(RX_PKT_CNT) & 0x00ff) >= lp->rxrcommit) {
- printk("hp100: %s: More packets received than commited? RX_PKT_CNT=0x%x, commit=0x%x\n",
+ printk(KERN_DEBUG "hp100: %s: More packets received than commited? RX_PKT_CNT=0x%x, commit=0x%x\n",
dev->name, hp100_inw(RX_PKT_CNT) & 0x00ff,
lp->rxrcommit);
return;
@@ -1915,10 +1915,10 @@ static void hp100_rx_bm(struct net_devic
pci_unmap_single(lp->pci_dev, (dma_addr_t) ptr->pdl[3], MAX_ETHER_SIZE, PCI_DMA_FROMDEVICE);
#ifdef HP100_DEBUG_BM
- printk("hp100: %s: rx_bm: header@0x%x=0x%x length=%d, errors=0x%x, dest=0x%x\n",
+ printk(KERN_DEBUG "hp100: %s: rx_bm: header@0x%x=0x%x length=%d, errors=0x%x, dest=0x%x\n",
dev->name, (u_int) (ptr->pdl - 1), (u_int) header,
pkt_len, (header >> 16) & 0xfff8, (header >> 16) & 7);
- printk("hp100: %s: RX_PDL_COUNT:0x%x TX_PDL_COUNT:0x%x, RX_PKT_CNT=0x%x PDH=0x%x, Data@0x%x len=0x%x\n",
+ printk(KERN_DEBUG "hp100: %s: RX_PDL_COUNT:0x%x TX_PDL_COUNT:0x%x, RX_PKT_CNT=0x%x PDH=0x%x, Data@0x%x len=0x%x\n",
dev->name, hp100_inb(RX_PDL), hp100_inb(TX_PDL),
hp100_inb(RX_PKT_CNT), (u_int) * (ptr->pdl),
(u_int) * (ptr->pdl + 3), (u_int) * (ptr->pdl + 4));
@@ -1927,7 +1927,7 @@ static void hp100_rx_bm(struct net_devic
if ((pkt_len >= MIN_ETHER_SIZE) &&
(pkt_len <= MAX_ETHER_SIZE)) {
if (ptr->skb == NULL) {
- printk("hp100: %s: rx_bm: skb null\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: rx_bm: skb null\n", dev->name);
/* can happen if we only allocated room for the pdh due to memory shortage. */
lp->stats.rx_dropped++;
} else {
@@ -1950,7 +1950,7 @@ static void hp100_rx_bm(struct net_devic
}
} else {
#ifdef HP100_DEBUG
- printk("hp100: %s: rx_bm: Received bad packet (length=%d)\n", dev->name, pkt_len);
+ printk(KERN_DEBUG "hp100: %s: rx_bm: Received bad packet (length=%d)\n", dev->name, pkt_len);
#endif
if (ptr->skb != NULL)
dev_kfree_skb_any(ptr->skb);
@@ -1963,7 +1963,7 @@ static void hp100_rx_bm(struct net_devic
if (0 == hp100_build_rx_pdl(lp->rxrtail, dev)) {
/* No space for skb, header can still be received. */
#ifdef HP100_DEBUG
- printk("hp100: %s: rx_bm: No space for new PDL.\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: rx_bm: No space for new PDL.\n", dev->name);
#endif
return;
} else { /* successfully allocated new PDL - put it in ringlist at tail. */
@@ -2003,7 +2003,7 @@ static void hp100_update_stats(struct ne
#ifdef HP100_DEBUG_B
hp100_outw(0x4216, TRACE);
- printk("hp100: %s: update-stats\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: update-stats\n", dev->name);
#endif
/* Note: Statistics counters clear when read. */
@@ -2030,7 +2030,7 @@ static void hp100_misc_interrupt(struct
#ifdef HP100_DEBUG_B
int ioaddr = dev->base_addr;
hp100_outw(0x4216, TRACE);
- printk("hp100: %s: misc_interrupt\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: misc_interrupt\n", dev->name);
#endif
/* Note: Statistics counters clear when read. */
@@ -2044,7 +2044,7 @@ static void hp100_clear_stats(struct hp1
#ifdef HP100_DEBUG_B
hp100_outw(0x4217, TRACE);
- printk("hp100: %s: clear_stats\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: clear_stats\n", dev->name);
#endif
spin_lock_irqsave(&lp->lock, flags);
@@ -2073,7 +2073,7 @@ static void hp100_set_multicast_list(str
#ifdef HP100_DEBUG_B
hp100_outw(0x4218, TRACE);
- printk("hp100: %s: set_mc_list\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: set_mc_list\n", dev->name);
#endif
spin_lock_irqsave(&lp->lock, flags);
@@ -2099,13 +2099,13 @@ static void hp100_set_multicast_list(str
memset(&lp->hash_bytes, 0x00, 8);
#ifdef HP100_DEBUG
- printk("hp100: %s: computing hash filter - mc_count = %i\n", dev->name, dev->mc_count);
+ printk(KERN_DEBUG "hp100: %s: computing hash filter - mc_count = %i\n", dev->name, dev->mc_count);
#endif
for (i = 0, dmi = dev->mc_list; i < dev->mc_count; i++, dmi = dmi->next) {
addrs = dmi->dmi_addr;
if ((*addrs & 0x01) == 0x01) { /* multicast address? */
#ifdef HP100_DEBUG
- printk("hp100: %s: multicast = %02x:%02x:%02x:%02x:%02x:%02x, ",
+ printk(KERN_DEBUG "hp100: %s: multicast = %02x:%02x:%02x:%02x:%02x:%02x, ",
dev->name, addrs[0], addrs[1], addrs[2],
addrs[3], addrs[4], addrs[5]);
#endif
@@ -2114,7 +2114,7 @@ static void hp100_set_multicast_list(str
printk(":%02x:", idx);
}
#ifdef HP100_DEBUG
- printk("idx = %i\n", idx);
+ printk(KERN_DEBUG "idx = %i\n", idx);
#endif
lp->hash_bytes[idx >> 3] |= (1 << (idx & 7));
}
@@ -2141,7 +2141,7 @@ static void hp100_set_multicast_list(str
for (i = 0; i < 8; i++)
hp100_outb(lp->hash_bytes[i], HASH_BYTE0 + i);
#ifdef HP100_DEBUG
- printk("hp100: %s: mac1 = 0x%x, mac2 = 0x%x, multicast hash = %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
+ printk(KERN_DEBUG "hp100: %s: mac1 = 0x%x, mac2 = 0x%x, multicast hash = %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
dev->name, lp->mac1_mode, lp->mac2_mode,
lp->hash_bytes[0], lp->hash_bytes[1],
lp->hash_bytes[2], lp->hash_bytes[3],
@@ -2151,7 +2151,7 @@ static void hp100_set_multicast_list(str
if (lp->lan_type == HP100_LAN_100) {
#ifdef HP100_DEBUG
- printk("hp100: %s: 100VG MAC settings have changed - relogin.\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: 100VG MAC settings have changed - relogin.\n", dev->name);
#endif
lp->hub_status = hp100_login_to_vg_hub(dev, 1); /* force a relogin to the hub */
}
@@ -2166,7 +2166,7 @@ static void hp100_set_multicast_list(str
for (i = 0; i < 8; i++)
hp100_outb(lp->hash_bytes[i], HASH_BYTE0 + i);
#ifdef HP100_DEBUG
- printk("hp100: %s: multicast hash = %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
+ printk(KERN_DEBUG "hp100: %s: multicast hash = %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
dev->name, lp->hash_bytes[0],
lp->hash_bytes[1], lp->hash_bytes[2],
lp->hash_bytes[3], lp->hash_bytes[4],
@@ -2176,7 +2176,7 @@ static void hp100_set_multicast_list(str
if (lp->lan_type == HP100_LAN_100) {
#ifdef HP100_DEBUG
- printk("hp100: %s: 100VG MAC settings have changed - relogin.\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: 100VG MAC settings have changed - relogin.\n", dev->name);
#endif
lp->hub_status = hp100_login_to_vg_hub(dev, 1); /* force a relogin to the hub */
}
@@ -2219,7 +2219,7 @@ static irqreturn_t hp100_interrupt(int i
/* hp100_page( PERFORMANCE ); */
val = hp100_inw(IRQ_STATUS);
#ifdef HP100_DEBUG_IRQ
- printk("hp100: %s: mode=%x,IRQ_STAT=0x%.4x,RXPKTCNT=0x%.2x RXPDL=0x%.2x TXPKTCNT=0x%.2x TXPDL=0x%.2x\n",
+ printk(KERN_DEBUG "hp100: %s: mode=%x,IRQ_STAT=0x%.4x,RXPKTCNT=0x%.2x RXPDL=0x%.2x TXPKTCNT=0x%.2x TXPDL=0x%.2x\n",
dev->name, lp->mode, (u_int) val, hp100_inb(RX_PKT_CNT),
hp100_inb(RX_PDL), hp100_inb(TX_PKT_CNT), hp100_inb(TX_PDL));
#endif
@@ -2241,7 +2241,7 @@ static irqreturn_t hp100_interrupt(int i
if (lp->mode == 1)
hp100_rx_bm(dev);
else {
- printk("hp100: %s: rx_pdl_fill_compl interrupt although not busmaster?\n", dev->name);
+ printk(KERN_INFO "hp100: %s: rx_pdl_fill_compl interrupt although not busmaster?\n", dev->name);
}
}
@@ -2278,7 +2278,7 @@ static irqreturn_t hp100_interrupt(int i
*/
if (val & (HP100_TX_ERROR | HP100_RX_ERROR)) {
#ifdef HP100_DEBUG_IRQ
- printk("hp100: %s: TX/RX Error IRQ\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: TX/RX Error IRQ\n", dev->name);
#endif
hp100_update_stats(dev);
if (lp->mode == 1) {
@@ -2307,7 +2307,7 @@ static irqreturn_t hp100_interrupt(int i
if (val & HP100_MISC_ERROR) { /* New for J2585B */
#ifdef HP100_DEBUG_IRQ
printk
- ("hp100: %s: Misc. Error Interrupt - Check cabling.\n",
+ (KERN_DEBUG "hp100: %s: Misc. Error Interrupt - Check cabling.\n",
dev->name);
#endif
if (lp->mode == 1) {
@@ -2334,7 +2334,7 @@ static void hp100_start_interface(struct
#ifdef HP100_DEBUG_B
hp100_outw(0x4220, TRACE);
- printk("hp100: %s: hp100_start_interface\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: hp100_start_interface\n", dev->name);
#endif
spin_lock_irqsave(&lp->lock, flags);
@@ -2394,7 +2394,7 @@ static void hp100_stop_interface(struct
u_int val;
#ifdef HP100_DEBUG_B
- printk("hp100: %s: hp100_stop_interface\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: hp100_stop_interface\n", dev->name);
hp100_outw(0x4221, TRACE);
#endif
@@ -2418,7 +2418,7 @@ static void hp100_stop_interface(struct
hp100_page(PERFORMANCE);
return;
}
- printk("hp100: %s: hp100_stop_interface - timeout\n", dev->name);
+ printk(KERN_INFO "hp100: %s: hp100_stop_interface - timeout\n", dev->name);
hp100_page(PERFORMANCE);
}
}
@@ -2438,7 +2438,7 @@ static void hp100_load_eeprom(struct net
for (i = 0; i < 10000; i++)
if (!(hp100_inb(OPTION_MSW) & HP100_EE_LOAD))
return;
- printk("hp100: %s: hp100_load_eeprom - timeout\n", dev->name);
+ printk(KERN_INFO "hp100: %s: hp100_load_eeprom - timeout\n", dev->name);
}
/* Sense connection status.
@@ -2461,7 +2461,7 @@ static int hp100_sense_lan(struct net_de
val_VG = hp100_inb(VG_LAN_CFG_1);
hp100_page(PERFORMANCE);
#ifdef HP100_DEBUG
- printk("hp100: %s: sense_lan: val_VG = 0x%04x, val_10 = 0x%04x\n",
+ printk(KERN_DEBUG "hp100: %s: sense_lan: val_VG = 0x%04x, val_10 = 0x%04x\n",
dev->name, val_VG, val_10);
#endif
@@ -2503,7 +2503,7 @@ static int hp100_down_vg_link(struct net
#ifdef HP100_DEBUG_B
hp100_outw(0x4224, TRACE);
- printk("hp100: %s: down_vg_link\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: down_vg_link\n", dev->name);
#endif
hp100_page(MAC_CTRL);
@@ -2538,7 +2538,7 @@ static int hp100_down_vg_link(struct net
#ifdef HP100_DEBUG
if (time_after_eq(jiffies, time))
- printk("hp100: %s: down_vg_link: Link does not go down?\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: down_vg_link: Link does not go down?\n", dev->name);
#endif
/* To prevent condition where Rev 1 VG MAC and old hubs do not complete */
@@ -2593,7 +2593,7 @@ static int hp100_down_vg_link(struct net
if (time_before_eq(time, jiffies)) {
#ifdef HP100_DEBUG
- printk("hp100: %s: down_vg_link: timeout\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: down_vg_link: timeout\n", dev->name);
#endif
return -EIO;
}
@@ -2619,7 +2619,7 @@ static int hp100_login_to_vg_hub(struct
#ifdef HP100_DEBUG_B
hp100_outw(0x4225, TRACE);
- printk("hp100: %s: login_to_vg_hub\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: login_to_vg_hub\n", dev->name);
#endif
/* Initiate a login sequence iff VG MAC is enabled and either Load Address
@@ -2630,7 +2630,7 @@ static int hp100_login_to_vg_hub(struct
startst = hp100_inb(VG_LAN_CFG_1);
if ((force_relogin == 1) || (hp100_inb(MAC_CFG_4) & HP100_MAC_SEL_ST)) {
#ifdef HP100_DEBUG_TRAINING
- printk("hp100: %s: Start training\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: Start training\n", dev->name);
#endif
/* Ensure VG Reset bit is 1 (i.e., do not reset) */
@@ -2645,7 +2645,7 @@ static int hp100_login_to_vg_hub(struct
hp100_andb(~(HP100_LINK_CMD /* |HP100_LOAD_ADDR */ ), VG_LAN_CFG_1);
#ifdef HP100_DEBUG_TRAINING
- printk("hp100: %s: Bring down the link\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: Bring down the link\n", dev->name);
#endif
/* Wait for link to drop */
@@ -2699,12 +2699,12 @@ static int hp100_login_to_vg_hub(struct
if (time_after_eq(jiffies, time)) {
#ifdef HP100_DEBUG_TRAINING
- printk("hp100: %s: Link cable status not ok? Training aborted.\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: Link cable status not ok? Training aborted.\n", dev->name);
#endif
} else {
#ifdef HP100_DEBUG_TRAINING
printk
- ("hp100: %s: HUB tones detected. Trying to train.\n",
+ (KERN_DEBUG "hp100: %s: HUB tones detected. Trying to train.\n",
dev->name);
#endif
@@ -2713,7 +2713,7 @@ static int hp100_login_to_vg_hub(struct
val = hp100_inb(VG_LAN_CFG_1);
if ((val & (HP100_LINK_UP_ST))) {
#ifdef HP100_DEBUG_TRAINING
- printk("hp100: %s: Passed training.\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: Passed training.\n", dev->name);
#endif
break;
}
@@ -2727,30 +2727,30 @@ static int hp100_login_to_vg_hub(struct
/* If LINK_UP_ST is set, then we are logged into the hub. */
if (time_before_eq(jiffies, time) && (val & HP100_LINK_UP_ST)) {
#ifdef HP100_DEBUG_TRAINING
- printk("hp100: %s: Successfully logged into the HUB.\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: Successfully logged into the HUB.\n", dev->name);
if (lp->chip == HP100_CHIPID_LASSEN) {
val = hp100_inw(TRAIN_ALLOW);
- printk("hp100: %s: Card supports 100VG MAC Version \"%s\" ",
+ printk(KERN_DEBUG "hp100: %s: Card supports 100VG MAC Version \"%s\" ",
dev->name, (hp100_inw(TRAIN_REQUEST) & HP100_CARD_MACVER) ? "802.12" : "Pre");
printk("Driver will use MAC Version \"%s\"\n", (val & HP100_HUB_MACVER) ? "802.12" : "Pre");
- printk("hp100: %s: Frame format is %s.\n", dev->name, (val & HP100_MALLOW_FRAMEFMT) ? "802.5" : "802.3");
+ printk(KERN_DEBUG "hp100: %s: Frame format is %s.\n", dev->name, (val & HP100_MALLOW_FRAMEFMT) ? "802.5" : "802.3");
}
#endif
} else {
/* If LINK_UP_ST is not set, login was not successful */
- printk("hp100: %s: Problem logging into the HUB.\n", dev->name);
+ printk(KERN_INFO "hp100: %s: Problem logging into the HUB.\n", dev->name);
if (lp->chip == HP100_CHIPID_LASSEN) {
/* Check allowed Register to find out why there is a problem. */
val = hp100_inw(TRAIN_ALLOW); /* won't work on non-ETR card */
#ifdef HP100_DEBUG_TRAINING
- printk("hp100: %s: MAC Configuration requested: 0x%04x, HUB allowed: 0x%04x\n", dev->name, hp100_inw(TRAIN_REQUEST), val);
+ printk(KERN_DEBUG "hp100: %s: MAC Configuration requested: 0x%04x, HUB allowed: 0x%04x\n", dev->name, hp100_inw(TRAIN_REQUEST), val);
#endif
if (val & HP100_MALLOW_ACCDENIED)
- printk("hp100: %s: HUB access denied.\n", dev->name);
+ printk(KERN_INFO "hp100: %s: HUB access denied.\n", dev->name);
if (val & HP100_MALLOW_CONFIGURE)
- printk("hp100: %s: MAC Configuration is incompatible with the Network.\n", dev->name);
+ printk(KERN_INFO "hp100: %s: MAC Configuration is incompatible with the Network.\n", dev->name);
if (val & HP100_MALLOW_DUPADDR)
- printk("hp100: %s: Duplicate MAC Address on the Network.\n", dev->name);
+ printk(KERN_INFO "hp100: %s: Duplicate MAC Address on the Network.\n", dev->name);
}
}
@@ -2771,7 +2771,7 @@ static int hp100_login_to_vg_hub(struct
if (val & HP100_LINK_UP_ST)
return (0); /* login was ok */
else {
- printk("hp100: %s: Training failed.\n", dev->name);
+ printk(KERN_INFO "hp100: %s: Training failed.\n", dev->name);
hp100_down_vg_link(dev);
return -EIO;
}
@@ -2787,7 +2787,7 @@ static void hp100_cascade_reset(struct n
#ifdef HP100_DEBUG_B
hp100_outw(0x4226, TRACE);
- printk("hp100: %s: cascade_reset\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: cascade_reset\n", dev->name);
#endif
if (enable) {
@@ -2819,21 +2819,21 @@ void hp100_RegisterDump(struct net_devic
int Register;
/* Dump common registers */
- printk("hp100: %s: Cascade Register Dump\n", dev->name);
- printk("hardware id #1: 0x%.2x\n", hp100_inb(HW_ID));
- printk("hardware id #2/paging: 0x%.2x\n", hp100_inb(PAGING));
- printk("option #1: 0x%.4x\n", hp100_inw(OPTION_LSW));
- printk("option #2: 0x%.4x\n", hp100_inw(OPTION_MSW));
+ printk(KERN_INFO "hp100: %s: Cascade Register Dump\n", dev->name);
+ printk(KERN_INFO "hardware id #1: 0x%.2x\n", hp100_inb(HW_ID));
+ printk(KERN_INFO "hardware id #2/paging: 0x%.2x\n", hp100_inb(PAGING));
+ printk(KERN_INFO "option #1: 0x%.4x\n", hp100_inw(OPTION_LSW));
+ printk(KERN_INFO "option #2: 0x%.4x\n", hp100_inw(OPTION_MSW));
/* Dump paged registers */
for (Page = 0; Page < 8; Page++) {
/* Dump registers */
- printk("page: 0x%.2x\n", Page);
+ printk(KERN_INFO "page: 0x%.2x\n", Page);
outw(Page, ioaddr + 0x02);
for (Register = 0x8; Register < 0x22; Register += 2) {
/* Display Register contents except data port */
if (((Register != 0x10) && (Register != 0x12)) || (Page > 0)) {
- printk("0x%.2x = 0x%.4x\n", Register, inw(ioaddr + Register));
+ printk(KERN_INFO "0x%.2x = 0x%.4x\n", Register, inw(ioaddr + Register));
}
}
}
@@ -2881,7 +2881,7 @@ static int __init hp100_eisa_probe (stru
goto out2;
#ifdef HP100_DEBUG
- printk("hp100: %s: EISA adapter found at 0x%x\n", dev->name,
+ printk(KERN_DEBUG "hp100: %s: EISA adapter found at 0x%x\n", dev->name,
dev->base_addr);
#endif
gendev->driver_data = dev;
@@ -2934,7 +2934,7 @@ static int __devinit hp100_pci_probe (st
pci_read_config_word(pdev, PCI_COMMAND, &pci_command);
if (!(pci_command & PCI_COMMAND_IO)) {
#ifdef HP100_DEBUG
- printk("hp100: %s: PCI I/O Bit has not been set. Setting...\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: PCI I/O Bit has not been set. Setting...\n", dev->name);
#endif
pci_command |= PCI_COMMAND_IO;
pci_write_config_word(pdev, PCI_COMMAND, pci_command);
@@ -2942,7 +2942,7 @@ static int __devinit hp100_pci_probe (st
if (!(pci_command & PCI_COMMAND_MASTER)) {
#ifdef HP100_DEBUG
- printk("hp100: %s: PCI Master Bit has not been set. Setting...\n", dev->name);
+ printk(KERN_DEBUG "hp100: %s: PCI Master Bit has not been set. Setting...\n", dev->name);
#endif
pci_command |= PCI_COMMAND_MASTER;
pci_write_config_word(pdev, PCI_COMMAND, pci_command);
@@ -2957,7 +2957,7 @@ static int __devinit hp100_pci_probe (st
goto out2;
#ifdef HP100_DEBUG
- printk("hp100: %s: PCI adapter found at 0x%x\n", dev->name, ioaddr);
+ printk(KERN_DEBUG "hp100: %s: PCI adapter found at 0x%x\n", dev->name, ioaddr);
#endif
pci_set_drvdata(pdev, dev);
return 0;
--
^ permalink raw reply
* Re: [PATCH] use mmiowb in tg3_poll
From: Lennert Buytenhek @ 2005-05-28 23:12 UTC (permalink / raw)
To: akepner; +Cc: netdev, jbarnes, gnb
In-Reply-To: <Pine.LNX.4.33.0410221345400.392-100000@localhost.localdomain>
On Fri, Oct 22, 2004 at 01:51:01PM -0700, akepner@sgi.com wrote:
> Returning from tg3_poll() without flushing the PIO write which
> reenables interrupts can result in lower cpu utilization and higher
> throughput.
I'm quite curious what kind of MMIO read latency you see on your
Altix boxen. This app is quite useful for determining those figures
on x86{,_64} machines:
http://svn.gnumonks.org/trunk/mmio_test/mmio_test.c
I'm not sure if it'll run on Itanium out of the box (it currently
assumes PAGE_SIZE <= 4096, you'd probably need to tweak rdtscl(),
and if there's a weird phys:pci address correspondence you might
have to teach it about that as well), but it would be nice if you
could give an approximate indication of exactly how expensive an
MMIO read is on your platform.
cheers,
Lennert
^ permalink raw reply
* Comparison of several congestion control algorithms
From: Baruch Even @ 2005-05-28 21:19 UTC (permalink / raw)
To: netdev, Stephen Hemminger; +Cc: Doug Leith
Hello,
I wanted to point you to a comparison of congestion control algorithm
done at the Hamilton Institute. These experiments compare Scalable-TCP,
High-Speed TCP, FAST-TCP, BIC-TCP, H-TCP and Standard TCP. They compared
fairness, compatibility with TCP and link utilisation.
You can find the results and a report at http://hamilton.ie/net/eval/
Regards,
Baruch
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox