Netdev List
 help / color / mirror / Atom feed
* [PATCH 20/24] tipc: Remove unnecessary OOM logging messages
From: Joe Perches @ 2011-08-29 21:17 UTC (permalink / raw)
  To: Jon Maloy, Allan Stephens
  Cc: David S. Miller, netdev, tipc-discussion, linux-kernel
In-Reply-To: <cover.1314650069.git.joe@perches.com>

Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/tipc/link.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/net/tipc/link.c b/net/tipc/link.c
index f89570c..5c96289 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -325,10 +325,8 @@ struct link *tipc_link_create(struct tipc_node *n_ptr,
 	}
 
 	l_ptr = kzalloc(sizeof(*l_ptr), GFP_ATOMIC);
-	if (!l_ptr) {
-		warn("Link creation failed, no memory\n");
+	if (!l_ptr)
 		return NULL;
-	}
 
 	l_ptr->addr = peer;
 	if_name = strchr(b_ptr->name, ':') + 1;
-- 
1.7.6.405.gc1be0

^ permalink raw reply related

* [PATCH 21/24] wanrouter: Remove unnecessary OOM logging messages
From: Joe Perches @ 2011-08-29 21:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: David S. Miller, netdev
In-Reply-To: <cover.1314650069.git.joe@perches.com>

Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/wanrouter/wanmain.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c
index 788a12c..01d0be4 100644
--- a/net/wanrouter/wanmain.c
+++ b/net/wanrouter/wanmain.c
@@ -437,11 +437,8 @@ static int wanrouter_device_setup(struct wan_device *wandev,
 	}
 
 	conf = kmalloc(sizeof(wandev_conf_t), GFP_KERNEL);
-	if (conf == NULL){
-		printk(KERN_INFO "%s: ERROR, Failed to allocate kernel memory !\n",
-				wandev->name);
+	if (conf == NULL)
 		return -ENOBUFS;
-	}
 
 	if (copy_from_user(conf, u_conf, sizeof(wandev_conf_t))) {
 		printk(KERN_INFO "%s: Failed to copy user config data to kernel space!\n",
@@ -468,9 +465,6 @@ static int wanrouter_device_setup(struct wan_device *wandev,
 
 		data = vmalloc(conf->data_size);
 		if (!data) {
-			printk(KERN_INFO
-				"%s: ERROR, Failed allocate kernel memory !\n",
-				wandev->name);
 			kfree(conf);
 			return -ENOBUFS;
 		}
-- 
1.7.6.405.gc1be0

^ permalink raw reply related

* [PATCH 22/24] wireless: Remove unnecessary OOM logging messages
From: Joe Perches @ 2011-08-29 21:17 UTC (permalink / raw)
  To: Johannes Berg, John W. Linville
  Cc: David S. Miller, linux-wireless, netdev, linux-kernel
In-Reply-To: <cover.1314650069.git.joe@perches.com>

Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/wireless/lib80211_crypt_ccmp.c |    2 --
 net/wireless/lib80211_crypt_tkip.c |    4 ----
 net/wireless/lib80211_crypt_wep.c  |    4 ----
 net/wireless/util.c                |    5 ++---
 4 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/net/wireless/lib80211_crypt_ccmp.c b/net/wireless/lib80211_crypt_ccmp.c
index dacb3b4..755738d 100644
--- a/net/wireless/lib80211_crypt_ccmp.c
+++ b/net/wireless/lib80211_crypt_ccmp.c
@@ -77,8 +77,6 @@ static void *lib80211_ccmp_init(int key_idx)
 
 	priv->tfm = crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC);
 	if (IS_ERR(priv->tfm)) {
-		printk(KERN_DEBUG "lib80211_crypt_ccmp: could not allocate "
-		       "crypto API aes\n");
 		priv->tfm = NULL;
 		goto fail;
 	}
diff --git a/net/wireless/lib80211_crypt_tkip.c b/net/wireless/lib80211_crypt_tkip.c
index 7ea4f2b..3873484 100644
--- a/net/wireless/lib80211_crypt_tkip.c
+++ b/net/wireless/lib80211_crypt_tkip.c
@@ -101,7 +101,6 @@ static void *lib80211_tkip_init(int key_idx)
 	priv->tx_tfm_arc4 = crypto_alloc_blkcipher("ecb(arc4)", 0,
 						CRYPTO_ALG_ASYNC);
 	if (IS_ERR(priv->tx_tfm_arc4)) {
-		printk(KERN_DEBUG pr_fmt("could not allocate crypto API arc4\n"));
 		priv->tx_tfm_arc4 = NULL;
 		goto fail;
 	}
@@ -109,7 +108,6 @@ static void *lib80211_tkip_init(int key_idx)
 	priv->tx_tfm_michael = crypto_alloc_hash("michael_mic", 0,
 						 CRYPTO_ALG_ASYNC);
 	if (IS_ERR(priv->tx_tfm_michael)) {
-		printk(KERN_DEBUG pr_fmt("could not allocate crypto API michael_mic\n"));
 		priv->tx_tfm_michael = NULL;
 		goto fail;
 	}
@@ -117,7 +115,6 @@ static void *lib80211_tkip_init(int key_idx)
 	priv->rx_tfm_arc4 = crypto_alloc_blkcipher("ecb(arc4)", 0,
 						CRYPTO_ALG_ASYNC);
 	if (IS_ERR(priv->rx_tfm_arc4)) {
-		printk(KERN_DEBUG pr_fmt("could not allocate crypto API arc4\n"));
 		priv->rx_tfm_arc4 = NULL;
 		goto fail;
 	}
@@ -125,7 +122,6 @@ static void *lib80211_tkip_init(int key_idx)
 	priv->rx_tfm_michael = crypto_alloc_hash("michael_mic", 0,
 						 CRYPTO_ALG_ASYNC);
 	if (IS_ERR(priv->rx_tfm_michael)) {
-		printk(KERN_DEBUG pr_fmt("could not allocate crypto API michael_mic\n"));
 		priv->rx_tfm_michael = NULL;
 		goto fail;
 	}
diff --git a/net/wireless/lib80211_crypt_wep.c b/net/wireless/lib80211_crypt_wep.c
index 2f265e0..c130401 100644
--- a/net/wireless/lib80211_crypt_wep.c
+++ b/net/wireless/lib80211_crypt_wep.c
@@ -50,16 +50,12 @@ static void *lib80211_wep_init(int keyidx)
 
 	priv->tx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC);
 	if (IS_ERR(priv->tx_tfm)) {
-		printk(KERN_DEBUG "lib80211_crypt_wep: could not allocate "
-		       "crypto API arc4\n");
 		priv->tx_tfm = NULL;
 		goto fail;
 	}
 
 	priv->rx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC);
 	if (IS_ERR(priv->rx_tfm)) {
-		printk(KERN_DEBUG "lib80211_crypt_wep: could not allocate "
-		       "crypto API arc4\n");
 		priv->rx_tfm = NULL;
 		goto fail;
 	}
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 844ddb0..4252765 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -513,10 +513,9 @@ int ieee80211_data_from_8023(struct sk_buff *skb, const u8 *addr,
 		if (head_need)
 			skb_orphan(skb);
 
-		if (pskb_expand_head(skb, head_need, 0, GFP_ATOMIC)) {
-			pr_err("failed to reallocate Tx buffer\n");
+		if (pskb_expand_head(skb, head_need, 0, GFP_ATOMIC))
 			return -ENOMEM;
-		}
+
 		skb->truesize += head_need;
 	}
 
-- 
1.7.6.405.gc1be0

^ permalink raw reply related

* [PATCH 01/24] 802: Remove unnecessary OOM logging messages
From: Joe Perches @ 2011-08-29 21:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: David S. Miller, netdev
In-Reply-To: <cover.1314650069.git.joe@perches.com>

Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/802/tr.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/net/802/tr.c b/net/802/tr.c
index 5e20cf8..94cb725 100644
--- a/net/802/tr.c
+++ b/net/802/tr.c
@@ -382,7 +382,6 @@ static void tr_add_rif_info(struct trh_hdr *trh, struct net_device *dev)
 
 		if(!entry)
 		{
-			printk(KERN_DEBUG "tr.c: Couldn't malloc rif cache entry !\n");
 			spin_unlock_irqrestore(&rif_lock, flags);
 			return;
 		}
-- 
1.7.6.405.gc1be0

^ permalink raw reply related

* [PATCH 02/24] 9p: Remove unnecessary OOM logging messages
From: Joe Perches @ 2011-08-29 21:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: David S. Miller, netdev
In-Reply-To: <cover.1314650069.git.joe@perches.com>

Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/9p/client.c       |    7 ++-----
 net/9p/trans_virtio.c |    6 +-----
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/net/9p/client.c b/net/9p/client.c
index 0505a03..85c2a10 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -222,7 +222,6 @@ static struct p9_req_t *p9_tag_alloc(struct p9_client *c, u16 tag)
 					sizeof(struct p9_req_t), GFP_ATOMIC);
 
 			if (!c->reqs[row]) {
-				printk(KERN_ERR "Couldn't grow tag array\n");
 				spin_unlock_irqrestore(&c->lock, flags);
 				return ERR_PTR(-ENOMEM);
 			}
@@ -240,10 +239,9 @@ static struct p9_req_t *p9_tag_alloc(struct p9_client *c, u16 tag)
 	req = &c->reqs[row][col];
 	if (!req->tc) {
 		req->wq = kmalloc(sizeof(wait_queue_head_t), GFP_NOFS);
-		if (!req->wq) {
-			printk(KERN_ERR "Couldn't grow tag array\n");
+		if (!req->wq)
 			return ERR_PTR(-ENOMEM);
-		}
+
 		init_waitqueue_head(req->wq);
 		if ((c->trans_mod->pref & P9_TRANS_PREF_PAYLOAD_MASK) ==
 				P9_TRANS_PREF_PAYLOAD_SEP) {
@@ -263,7 +261,6 @@ static struct p9_req_t *p9_tag_alloc(struct p9_client *c, u16 tag)
 			req->rc->capacity = c->msize;
 		}
 		if ((!req->tc) || (!req->rc)) {
-			printk(KERN_ERR "Couldn't grow tag array\n");
 			kfree(req->tc);
 			kfree(req->rc);
 			kfree(req->wq);
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
index 175b513..2ac547e 100644
--- a/net/9p/trans_virtio.c
+++ b/net/9p/trans_virtio.c
@@ -293,11 +293,8 @@ p9_virtio_request(struct p9_client *client, struct p9_req_t *req)
 			rpinfo->rp_alloc = 0;
 		} else {
 			req->tc->private = kmalloc(rpinfo_size, GFP_NOFS);
-			if (!req->tc->private) {
-				P9_DPRINTK(P9_DEBUG_TRANS, "9p debug: "
-					"private kmalloc returned NULL");
+			if (!req->tc->private)
 				return -ENOMEM;
-			}
 			rpinfo = (struct trans_rpage_info *)req->tc->private;
 			rpinfo->rp_alloc = 1;
 		}
@@ -431,7 +428,6 @@ static int p9_virtio_probe(struct virtio_device *vdev)
 
 	chan = kmalloc(sizeof(struct virtio_chan), GFP_KERNEL);
 	if (!chan) {
-		printk(KERN_ERR "9p: Failed to allocate virtio 9P channel\n");
 		err = -ENOMEM;
 		goto fail;
 	}
-- 
1.7.6.405.gc1be0

^ permalink raw reply related

* [PATCH 05/24] batman-adv: Remove unnecessary OOM logging messages
From: Joe Perches @ 2011-08-29 21:17 UTC (permalink / raw)
  To: Marek Lindner, Simon Wunderlich
  Cc: David S. Miller, b.a.t.m.a.n, netdev, linux-kernel
In-Reply-To: <cover.1314650069.git.joe@perches.com>

Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/batman-adv/hard-interface.c |    5 +----
 net/batman-adv/main.c           |    2 --
 net/batman-adv/originator.c     |   16 ++++------------
 net/batman-adv/soft-interface.c |    4 +---
 net/batman-adv/vis.c            |    4 +---
 5 files changed, 7 insertions(+), 24 deletions(-)

diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index bf91e4d..6a5312e 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -455,11 +455,8 @@ static struct hard_iface *hardif_add_interface(struct net_device *net_dev)
 	dev_hold(net_dev);
 
 	hard_iface = kmalloc(sizeof(*hard_iface), GFP_ATOMIC);
-	if (!hard_iface) {
-		pr_err("Can't add interface (%s): out of memory\n",
-		       net_dev->name);
+	if (!hard_iface)
 		goto release_dev;
-	}
 
 	ret = sysfs_add_hardif(&hard_iface->hardif_obj, net_dev);
 	if (ret)
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index 79b9ae5..fb87bdc 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -117,8 +117,6 @@ int mesh_init(struct net_device *soft_iface)
 	goto end;
 
 err:
-	pr_err("Unable to allocate memory for mesh information structures: "
-	       "out of mem ?\n");
 	mesh_free(soft_iface);
 	return -1;
 
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index d448018..6e558cd 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -493,10 +493,8 @@ static int orig_node_add_if(struct orig_node *orig_node, int max_if_num)
 
 	data_ptr = kmalloc(max_if_num * sizeof(unsigned long) * NUM_WORDS,
 			   GFP_ATOMIC);
-	if (!data_ptr) {
-		pr_err("Can't resize orig: out of memory\n");
+	if (!data_ptr)
 		return -1;
-	}
 
 	memcpy(data_ptr, orig_node->bcast_own,
 	       (max_if_num - 1) * sizeof(unsigned long) * NUM_WORDS);
@@ -504,10 +502,8 @@ static int orig_node_add_if(struct orig_node *orig_node, int max_if_num)
 	orig_node->bcast_own = data_ptr;
 
 	data_ptr = kmalloc(max_if_num * sizeof(uint8_t), GFP_ATOMIC);
-	if (!data_ptr) {
-		pr_err("Can't resize orig: out of memory\n");
+	if (!data_ptr)
 		return -1;
-	}
 
 	memcpy(data_ptr, orig_node->bcast_own_sum,
 	       (max_if_num - 1) * sizeof(uint8_t));
@@ -562,10 +558,8 @@ static int orig_node_del_if(struct orig_node *orig_node,
 
 	chunk_size = sizeof(unsigned long) * NUM_WORDS;
 	data_ptr = kmalloc(max_if_num * chunk_size, GFP_ATOMIC);
-	if (!data_ptr) {
-		pr_err("Can't resize orig: out of memory\n");
+	if (!data_ptr)
 		return -1;
-	}
 
 	/* copy first part */
 	memcpy(data_ptr, orig_node->bcast_own, del_if_num * chunk_size);
@@ -583,10 +577,8 @@ free_bcast_own:
 		goto free_own_sum;
 
 	data_ptr = kmalloc(max_if_num * sizeof(uint8_t), GFP_ATOMIC);
-	if (!data_ptr) {
-		pr_err("Can't resize orig: out of memory\n");
+	if (!data_ptr)
 		return -1;
-	}
 
 	memcpy(data_ptr, orig_node->bcast_own_sum,
 	       del_if_num * sizeof(uint8_t));
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index 402fd96..9b5e69e 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -800,10 +800,8 @@ struct net_device *softif_create(const char *name)
 
 	soft_iface = alloc_netdev(sizeof(*bat_priv), name, interface_setup);
 
-	if (!soft_iface) {
-		pr_err("Unable to allocate the batman interface: %s\n", name);
+	if (!soft_iface)
 		goto out;
-	}
 
 	ret = register_netdevice(soft_iface);
 	if (ret < 0) {
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c
index fb9b19f..f81a6b6 100644
--- a/net/batman-adv/vis.c
+++ b/net/batman-adv/vis.c
@@ -887,10 +887,8 @@ int vis_init(struct bat_priv *bat_priv)
 	}
 
 	bat_priv->my_vis_info = kmalloc(MAX_VIS_PACKET_SIZE, GFP_ATOMIC);
-	if (!bat_priv->my_vis_info) {
-		pr_err("Can't initialize vis packet\n");
+	if (!bat_priv->my_vis_info)
 		goto err;
-	}
 
 	bat_priv->my_vis_info->skb_packet = dev_alloc_skb(sizeof(*packet) +
 							  MAX_VIS_PACKET_SIZE +
-- 
1.7.6.405.gc1be0

^ permalink raw reply related

* [PATCH 17/24] sched: Remove unnecessary OOM logging messages
From: Joe Perches @ 2011-08-29 21:17 UTC (permalink / raw)
  To: Jamal Hadi Salim; +Cc: David S. Miller, netdev, linux-kernel
In-Reply-To: <cover.1314650069.git.joe@perches.com>

Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/sched/act_api.c |    6 ++----
 net/sched/sch_atm.c |    1 -
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index f2fb67e..fb98a30 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -749,10 +749,9 @@ static struct tc_action *create_a(int i)
 	struct tc_action *act;
 
 	act = kzalloc(sizeof(*act), GFP_KERNEL);
-	if (act == NULL) {
-		pr_debug("create_a: failed to alloc!\n");
+	if (act == NULL)
 		return NULL;
-	}
+
 	act->order = i;
 	return act;
 }
@@ -778,7 +777,6 @@ static int tca_action_flush(struct net *net, struct nlattr *nla,
 
 	skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
 	if (!skb) {
-		pr_debug("tca_action_flush: failed skb alloc\n");
 		kfree(a);
 		return err;
 	}
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c
index e25e490..cba66c4 100644
--- a/net/sched/sch_atm.c
+++ b/net/sched/sch_atm.c
@@ -270,7 +270,6 @@ static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent,
 	}
 	pr_debug("atm_tc_change: new id %x\n", classid);
 	flow = kzalloc(sizeof(struct atm_flow_data) + hdr_len, GFP_KERNEL);
-	pr_debug("atm_tc_change: flow %p\n", flow);
 	if (!flow) {
 		error = -ENOBUFS;
 		goto err_out;
-- 
1.7.6.405.gc1be0

^ permalink raw reply related

* [PATCH 19/24] sunrpc: Remove unnecessary OOM logging messages
From: Joe Perches @ 2011-08-29 21:17 UTC (permalink / raw)
  To: Trond Myklebust, J. Bruce Fields, Neil Brown
  Cc: David S. Miller, linux-nfs, netdev, linux-kernel
In-Reply-To: <cover.1314650069.git.joe@perches.com>

Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/sunrpc/auth_gss/gss_krb5_crypto.c |   10 ++--------
 net/sunrpc/auth_gss/gss_krb5_mech.c   |    2 --
 net/sunrpc/backchannel_rqst.c         |    9 +++------
 net/sunrpc/clnt.c                     |    3 ---
 net/sunrpc/rpc_pipe.c                 |    3 +--
 net/sunrpc/rpcb_clnt.c                |    2 --
 net/sunrpc/xprtrdma/svc_rdma.c        |    8 ++------
 net/sunrpc/xprtrdma/transport.c       |    5 +----
 net/sunrpc/xprtrdma/verbs.c           |   14 --------------
 net/sunrpc/xprtsock.c                 |    5 +----
 10 files changed, 10 insertions(+), 51 deletions(-)

diff --git a/net/sunrpc/auth_gss/gss_krb5_crypto.c b/net/sunrpc/auth_gss/gss_krb5_crypto.c
index 9576f35..911987e 100644
--- a/net/sunrpc/auth_gss/gss_krb5_crypto.c
+++ b/net/sunrpc/auth_gss/gss_krb5_crypto.c
@@ -865,11 +865,8 @@ krb5_rc4_setup_seq_key(struct krb5_ctx *kctx, struct crypto_blkcipher *cipher,
 	dprintk("%s: entered\n", __func__);
 
 	hmac = crypto_alloc_hash(kctx->gk5e->cksum_name, 0, CRYPTO_ALG_ASYNC);
-	if (IS_ERR(hmac)) {
-		dprintk("%s: error %ld, allocating hash '%s'\n",
-			__func__, PTR_ERR(hmac), kctx->gk5e->cksum_name);
+	if (IS_ERR(hmac))
 		return PTR_ERR(hmac);
-	}
 
 	desc.tfm = hmac;
 	desc.flags = 0;
@@ -932,11 +929,8 @@ krb5_rc4_setup_enc_key(struct krb5_ctx *kctx, struct crypto_blkcipher *cipher,
 	dprintk("%s: entered, seqnum %u\n", __func__, seqnum);
 
 	hmac = crypto_alloc_hash(kctx->gk5e->cksum_name, 0, CRYPTO_ALG_ASYNC);
-	if (IS_ERR(hmac)) {
-		dprintk("%s: error %ld, allocating hash '%s'\n",
-			__func__, PTR_ERR(hmac), kctx->gk5e->cksum_name);
+	if (IS_ERR(hmac))
 		return PTR_ERR(hmac);
-	}
 
 	desc.tfm = hmac;
 	desc.flags = 0;
diff --git a/net/sunrpc/auth_gss/gss_krb5_mech.c b/net/sunrpc/auth_gss/gss_krb5_mech.c
index 8c67890..61de04c 100644
--- a/net/sunrpc/auth_gss/gss_krb5_mech.c
+++ b/net/sunrpc/auth_gss/gss_krb5_mech.c
@@ -440,8 +440,6 @@ context_derive_keys_rc4(struct krb5_ctx *ctx)
 	 */
 	hmac = crypto_alloc_hash(ctx->gk5e->cksum_name, 0, CRYPTO_ALG_ASYNC);
 	if (IS_ERR(hmac)) {
-		dprintk("%s: error %ld allocating hash '%s'\n",
-			__func__, PTR_ERR(hmac), ctx->gk5e->cksum_name);
 		err = PTR_ERR(hmac);
 		goto out_err;
 	}
diff --git a/net/sunrpc/backchannel_rqst.c b/net/sunrpc/backchannel_rqst.c
index 91eaa26..1074d8e 100644
--- a/net/sunrpc/backchannel_rqst.c
+++ b/net/sunrpc/backchannel_rqst.c
@@ -106,10 +106,8 @@ int xprt_setup_backchannel(struct rpc_xprt *xprt, unsigned int min_reqs)
 	for (i = 0; i < min_reqs; i++) {
 		/* Pre-allocate one backchannel rpc_rqst */
 		req = kzalloc(sizeof(struct rpc_rqst), GFP_KERNEL);
-		if (req == NULL) {
-			printk(KERN_ERR "Failed to create bc rpc_rqst\n");
+		if (req == NULL)
 			goto out_free;
-		}
 
 		/* Add the allocated buffer to the tmp list */
 		dprintk("RPC:       adding req= %p\n", req);
@@ -121,10 +119,9 @@ int xprt_setup_backchannel(struct rpc_xprt *xprt, unsigned int min_reqs)
 
 		/* Preallocate one XDR receive buffer */
 		page_rcv = alloc_page(GFP_KERNEL);
-		if (page_rcv == NULL) {
-			printk(KERN_ERR "Failed to create bc receive xbuf\n");
+		if (page_rcv == NULL)
 			goto out_free;
-		}
+
 		xbufp = &req->rq_rcv_buf;
 		xbufp->head[0].iov_base = page_address(page_rcv);
 		xbufp->head[0].iov_len = PAGE_SIZE;
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index c5347d2..e10709a 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1058,8 +1058,6 @@ call_allocate(struct rpc_task *task)
 	if (req->rq_buffer != NULL)
 		return;
 
-	dprintk("RPC: %5u rpc_buffer allocation failed\n", task->tk_pid);
-
 	if (RPC_IS_ASYNC(task) || !fatal_signal_pending(current)) {
 		task->tk_action = call_allocate;
 		rpc_delay(task, HZ>>4);
@@ -1163,7 +1161,6 @@ call_bind_status(struct rpc_task *task)
 
 	switch (task->tk_status) {
 	case -ENOMEM:
-		dprintk("RPC: %5u rpcbind out of memory\n", task->tk_pid);
 		rpc_delay(task, HZ >> 2);
 		goto retry_timeout;
 	case -EACCES:
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index b181e34..0395311 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -485,9 +485,8 @@ static int __rpc_create_common(struct inode *dir, struct dentry *dentry,
 		rpc_inode_setowner(inode, private);
 	d_add(dentry, inode);
 	return 0;
+
 out_err:
-	printk(KERN_WARNING "%s: %s failed to allocate inode for dentry %s\n",
-			__FILE__, __func__, dentry->d_name.name);
 	dput(dentry);
 	return -ENOMEM;
 }
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
index e45d2fb..4d8be9a 100644
--- a/net/sunrpc/rpcb_clnt.c
+++ b/net/sunrpc/rpcb_clnt.c
@@ -671,8 +671,6 @@ void rpcb_getport_async(struct rpc_task *task)
 	map = kzalloc(sizeof(struct rpcbind_args), GFP_ATOMIC);
 	if (!map) {
 		status = -ENOMEM;
-		dprintk("RPC: %5u %s: no memory available\n",
-			task->tk_pid, __func__);
 		goto bailout_release_client;
 	}
 	map->r_prog = clnt->cl_prog;
diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c
index 09af4fa..18fe984 100644
--- a/net/sunrpc/xprtrdma/svc_rdma.c
+++ b/net/sunrpc/xprtrdma/svc_rdma.c
@@ -267,10 +267,8 @@ int svc_rdma_init(void)
 						0,
 						SLAB_HWCACHE_ALIGN,
 						NULL);
-	if (!svc_rdma_map_cachep) {
-		printk(KERN_INFO "Could not allocate map cache.\n");
+	if (!svc_rdma_map_cachep)
 		goto err0;
-	}
 
 	/* Create the temporary context cache */
 	svc_rdma_ctxt_cachep =
@@ -279,10 +277,8 @@ int svc_rdma_init(void)
 				  0,
 				  SLAB_HWCACHE_ALIGN,
 				  NULL);
-	if (!svc_rdma_ctxt_cachep) {
-		printk(KERN_INFO "Could not allocate WR ctxt cache.\n");
+	if (!svc_rdma_ctxt_cachep)
 		goto err1;
-	}
 
 	/* Register RDMA with the SVC transport switch */
 	svc_reg_xprt_class(&svc_rdma_class);
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
index b446e10..772a481 100644
--- a/net/sunrpc/xprtrdma/transport.c
+++ b/net/sunrpc/xprtrdma/transport.c
@@ -285,11 +285,8 @@ xprt_setup_rdma(struct xprt_create *args)
 	xprt = xprt_alloc(args->net, sizeof(struct rpcrdma_xprt),
 			xprt_rdma_slot_table_entries,
 			xprt_rdma_slot_table_entries);
-	if (xprt == NULL) {
-		dprintk("RPC:       %s: couldn't allocate rpcrdma_xprt\n",
-			__func__);
+	if (xprt == NULL)
 		return ERR_PTR(-ENOMEM);
-	}
 
 	/* 60 second timeout, no retries */
 	xprt->timeout = &xprt_rdma_default_timeout;
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
index 28236ba..937b51d 100644
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -471,8 +471,6 @@ rpcrdma_ia_open(struct rpcrdma_xprt *xprt, struct sockaddr *addr, int memreg)
 	ia->ri_pd = ib_alloc_pd(ia->ri_id->device);
 	if (IS_ERR(ia->ri_pd)) {
 		rc = PTR_ERR(ia->ri_pd);
-		dprintk("RPC:       %s: ib_alloc_pd() failed %i\n",
-			__func__, rc);
 		goto out2;
 	}
 
@@ -1009,8 +1007,6 @@ rpcrdma_buffer_create(struct rpcrdma_buffer *buf, struct rpcrdma_ep *ep,
 	/* allocate 1, 4 and 5 in one shot */
 	p = kzalloc(len, GFP_KERNEL);
 	if (p == NULL) {
-		dprintk("RPC:       %s: req_t/rep_t/pad kzalloc(%zd) failed\n",
-			__func__, len);
 		rc = -ENOMEM;
 		goto out;
 	}
@@ -1046,8 +1042,6 @@ rpcrdma_buffer_create(struct rpcrdma_buffer *buf, struct rpcrdma_ep *ep,
 							 RPCRDMA_MAX_SEGS);
 			if (IS_ERR(r->r.frmr.fr_mr)) {
 				rc = PTR_ERR(r->r.frmr.fr_mr);
-				dprintk("RPC:       %s: ib_alloc_fast_reg_mr"
-					" failed %i\n", __func__, rc);
 				goto out;
 			}
 			r->r.frmr.fr_pgl =
@@ -1074,8 +1068,6 @@ rpcrdma_buffer_create(struct rpcrdma_buffer *buf, struct rpcrdma_ep *ep,
 				&fa);
 			if (IS_ERR(r->r.fmr)) {
 				rc = PTR_ERR(r->r.fmr);
-				dprintk("RPC:       %s: ib_alloc_fmr"
-					" failed %i\n", __func__, rc);
 				goto out;
 			}
 			list_add(&r->mw_list, &buf->rb_mws);
@@ -1089,8 +1081,6 @@ rpcrdma_buffer_create(struct rpcrdma_buffer *buf, struct rpcrdma_ep *ep,
 			r->r.mw = ib_alloc_mw(ia->ri_pd);
 			if (IS_ERR(r->r.mw)) {
 				rc = PTR_ERR(r->r.mw);
-				dprintk("RPC:       %s: ib_alloc_mw"
-					" failed %i\n", __func__, rc);
 				goto out;
 			}
 			list_add(&r->mw_list, &buf->rb_mws);
@@ -1116,8 +1106,6 @@ rpcrdma_buffer_create(struct rpcrdma_buffer *buf, struct rpcrdma_ep *ep,
 			len = 4096;
 		req = kmalloc(len, GFP_KERNEL);
 		if (req == NULL) {
-			dprintk("RPC:       %s: request buffer %d alloc"
-				" failed\n", __func__, i);
 			rc = -ENOMEM;
 			goto out;
 		}
@@ -1137,8 +1125,6 @@ rpcrdma_buffer_create(struct rpcrdma_buffer *buf, struct rpcrdma_ep *ep,
 		len = cdata->inline_rsize + sizeof(struct rpcrdma_rep);
 		rep = kmalloc(len, GFP_KERNEL);
 		if (rep == NULL) {
-			dprintk("RPC:       %s: reply buffer %d alloc failed\n",
-				__func__, i);
 			rc = -ENOMEM;
 			goto out;
 		}
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index d7f97ef..911494a 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -2515,11 +2515,8 @@ static struct rpc_xprt *xs_setup_xprt(struct xprt_create *args,
 
 	xprt = xprt_alloc(args->net, sizeof(*new), slot_table_size,
 			max_slot_table_size);
-	if (xprt == NULL) {
-		dprintk("RPC:       xs_setup_xprt: couldn't allocate "
-				"rpc_xprt\n");
+	if (xprt == NULL)
 		return ERR_PTR(-ENOMEM);
-	}
 
 	new = container_of(xprt, struct sock_xprt, xprt);
 	memcpy(&xprt->addr, args->dstaddr, args->addrlen);
-- 
1.7.6.405.gc1be0

^ permalink raw reply related

* [PATCH 23/24] x25: Remove unnecessary OOM logging messages
From: Joe Perches @ 2011-08-29 21:17 UTC (permalink / raw)
  To: Andrew Hendry; +Cc: David S. Miller, linux-x25, netdev, linux-kernel
In-Reply-To: <cover.1314650069.git.joe@perches.com>

Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/x25/x25_dev.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/net/x25/x25_dev.c b/net/x25/x25_dev.c
index e547ca1..b77852f 100644
--- a/net/x25/x25_dev.c
+++ b/net/x25/x25_dev.c
@@ -147,10 +147,10 @@ void x25_establish_link(struct x25_neigh *nb)
 
 	switch (nb->dev->type) {
 	case ARPHRD_X25:
-		if ((skb = alloc_skb(1, GFP_ATOMIC)) == NULL) {
-			printk(KERN_ERR "x25_dev: out of memory\n");
+		skb = alloc_skb(1, GFP_ATOMIC);
+		if (skb == NULL)
 			return;
-		}
+
 		ptr  = skb_put(skb, 1);
 		*ptr = X25_IFACE_CONNECT;
 		break;
@@ -182,10 +182,8 @@ void x25_terminate_link(struct x25_neigh *nb)
 		return;
 
 	skb = alloc_skb(1, GFP_ATOMIC);
-	if (!skb) {
-		printk(KERN_ERR "x25_dev: out of memory\n");
+	if (!skb)
 		return;
-	}
 
 	ptr  = skb_put(skb, 1);
 	*ptr = X25_IFACE_DISCONNECT;
-- 
1.7.6.405.gc1be0

^ permalink raw reply related

* [PATCH 24/24] net: Remove unnecessary OOM logging messages
From: Joe Perches @ 2011-08-29 21:17 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, linux-kernel
In-Reply-To: <cover.1314650069.git.joe@perches.com>

Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/core/dev.c    |   25 +++++++------------------
 net/core/flow.c   |    4 +---
 net/core/pktgen.c |    5 +----
 net/socket.c      |    5 +----
 4 files changed, 10 insertions(+), 29 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index b2e262e..67018d8 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5424,10 +5424,9 @@ static int netif_alloc_rx_queues(struct net_device *dev)
 	BUG_ON(count < 1);
 
 	rx = kcalloc(count, sizeof(struct netdev_rx_queue), GFP_KERNEL);
-	if (!rx) {
-		pr_err("netdev: Unable to allocate %u rx queues.\n", count);
+	if (!rx)
 		return -ENOMEM;
-	}
+
 	dev->_rx = rx;
 
 	for (i = 0; i < count; i++)
@@ -5455,11 +5454,9 @@ static int netif_alloc_netdev_queues(struct net_device *dev)
 	BUG_ON(count < 1);
 
 	tx = kcalloc(count, sizeof(struct netdev_queue), GFP_KERNEL);
-	if (!tx) {
-		pr_err("netdev: Unable to allocate %u tx queues.\n",
-		       count);
+	if (!tx)
 		return -ENOMEM;
-	}
+
 	dev->_tx = tx;
 
 	netdev_for_each_tx_queue(dev, netdev_init_one_queue, NULL);
@@ -5878,18 +5875,12 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
 
 	BUG_ON(strlen(name) >= sizeof(dev->name));
 
-	if (txqs < 1) {
-		pr_err("alloc_netdev: Unable to allocate device "
-		       "with zero queues.\n");
+	if (txqs < 1)
 		return NULL;
-	}
 
 #ifdef CONFIG_RPS
-	if (rxqs < 1) {
-		pr_err("alloc_netdev: Unable to allocate device "
-		       "with zero RX queues.\n");
+	if (rxqs < 1)
 		return NULL;
-	}
 #endif
 
 	alloc_size = sizeof(struct net_device);
@@ -5902,10 +5893,8 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
 	alloc_size += NETDEV_ALIGN - 1;
 
 	p = kzalloc(alloc_size, GFP_KERNEL);
-	if (!p) {
-		printk(KERN_ERR "alloc_netdev: Unable to allocate device.\n");
+	if (!p)
 		return NULL;
-	}
 
 	dev = PTR_ALIGN(p, NETDEV_ALIGN);
 	dev->padded = (char *)dev - (char *)p;
diff --git a/net/core/flow.c b/net/core/flow.c
index bf32c33..7e33612 100644
--- a/net/core/flow.c
+++ b/net/core/flow.c
@@ -359,10 +359,8 @@ static int __cpuinit flow_cache_cpu_prepare(struct flow_cache *fc, int cpu)
 
 	if (!fcp->hash_table) {
 		fcp->hash_table = kzalloc_node(sz, GFP_KERNEL, cpu_to_node(cpu));
-		if (!fcp->hash_table) {
-			pr_err("NET: failed to allocate flow cache sz %zu\n", sz);
+		if (!fcp->hash_table)
 			return -ENOMEM;
-		}
 		fcp->hash_rnd_recalc = 1;
 		fcp->hash_count = 0;
 		tasklet_init(&fcp->flush_tasklet, flow_cache_flush_tasklet, 0);
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 796044a..3769f16 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -3323,7 +3323,6 @@ static void pktgen_xmit(struct pktgen_dev *pkt_dev)
 
 		pkt_dev->skb = fill_packet(odev, pkt_dev);
 		if (pkt_dev->skb == NULL) {
-			pr_err("ERROR: couldn't allocate skb in fill_packet\n");
 			schedule();
 			pkt_dev->clone_count--;	/* back out increment, OOM */
 			return;
@@ -3610,10 +3609,8 @@ static int __init pktgen_create_thread(int cpu)
 
 	t = kzalloc_node(sizeof(struct pktgen_thread), GFP_KERNEL,
 			 cpu_to_node(cpu));
-	if (!t) {
-		pr_err("ERROR: out of memory, can't create new thread\n");
+	if (!t)
 		return -ENOMEM;
-	}
 
 	spin_lock_init(&t->if_lock);
 	t->cpu = cpu;
diff --git a/net/socket.c b/net/socket.c
index 2517e11..51fa300 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -1213,12 +1213,9 @@ int __sock_create(struct net *net, int family, int type, int protocol,
 	 *	default.
 	 */
 	sock = sock_alloc();
-	if (!sock) {
-		if (net_ratelimit())
-			printk(KERN_WARNING "socket: no more sockets\n");
+	if (!sock)
 		return -ENFILE;	/* Not exactly a match, but its the
 				   closest posix thing */
-	}
 
 	sock->type = type;
 
-- 
1.7.6.405.gc1be0

^ permalink raw reply related

* Re: linux-next: Tree for Aug 29 (bnx2x)
From: Dmitry Kravkov @ 2011-08-29 21:35 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Stephen Rothwell, netdev, linux-next@vger.kernel.org, LKML,
	Eilon Greenstein
In-Reply-To: <20110829132800.f7174f2e.rdunlap@xenotime.net>

On Mon, 2011-08-29 at 13:28 -0700, Randy Dunlap wrote:
> On Mon, 29 Aug 2011 16:19:07 +1000 Stephen Rothwell wrote:
> 
> > Hi all,
> 
> (on i386 or x86_64)
> 
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:10148: error: 'bnx2x_fcoe_get_wwn' undeclared here (not in a function)
> 
> 
> Full randconfig file is attached.
> 
> ---
> ~Randy
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
This should sync #define structures between definition and declaration
---

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
index f290b23..5b1f9b5 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
@@ -522,7 +522,7 @@ void bnx2x_free_mem_bp(struct bnx2x *bp);
  */
 int bnx2x_change_mtu(struct net_device *dev, int new_mtu);
 
-#if defined(BCM_CNIC) && (defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE))
+#if defined(NETDEV_FCOE_WWNN) && defined(BCM_CNIC)
 /**
  * bnx2x_fcoe_get_wwn - return the requested WWN value for this port
  *
-- 
1.7.2.2

^ permalink raw reply related

* RE: [PATCH 19/24] sunrpc: Remove unnecessary OOM logging messages
From: Myklebust, Trond @ 2011-08-29 21:36 UTC (permalink / raw)
  To: Joe Perches, J. Bruce Fields, Neil Brown
  Cc: David S. Miller, linux-nfs, netdev, linux-kernel
In-Reply-To: <8a6378b3fef105983db001fb720c84b669491439.1314650069.git.joe@perches.com>

> -----Original Message-----
> From: Joe Perches [mailto:joe@perches.com]
> Sent: Monday, August 29, 2011 5:18 PM
> To: Myklebust, Trond; J. Bruce Fields; Neil Brown
> Cc: David S. Miller; linux-nfs@vger.kernel.org;
netdev@vger.kernel.org;
> linux-kernel@vger.kernel.org
> Subject: [PATCH 19/24] sunrpc: Remove unnecessary OOM logging messages
> 
> Removing unnecessary messages saves code and text.
> 
> Site specific OOM messages are duplications of a generic MM
> out of memory message and aren't really useful, so just
> delete them.
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  net/sunrpc/auth_gss/gss_krb5_crypto.c |   10 ++--------
>  net/sunrpc/auth_gss/gss_krb5_mech.c   |    2 --
>  net/sunrpc/backchannel_rqst.c         |    9 +++------
>  net/sunrpc/clnt.c                     |    3 ---
>  net/sunrpc/rpc_pipe.c                 |    3 +--
>  net/sunrpc/rpcb_clnt.c                |    2 --
>  net/sunrpc/xprtrdma/svc_rdma.c        |    8 ++------
>  net/sunrpc/xprtrdma/transport.c       |    5 +----
>  net/sunrpc/xprtrdma/verbs.c           |   14 --------------
>  net/sunrpc/xprtsock.c                 |    5 +----
>  10 files changed, 10 insertions(+), 51 deletions(-)
> 

Big NACK...

By whose standard are those "not useful"?

Trond

^ permalink raw reply

* Re: [PATCH 18/24] sctp: Remove unnecessary OOM logging messages
From: Vladislav Yasevich @ 2011-08-29 21:29 UTC (permalink / raw)
  To: Joe Perches
  Cc: Sridhar Samudrala, David S. Miller, linux-sctp, netdev,
	linux-kernel
In-Reply-To: <21b4d996c8861373ac77d427914ec7882fe0c83e.1314650069.git.joe@perches.com>

On 08/29/2011 05:17 PM, Joe Perches wrote:
> Removing unnecessary messages saves code and text.
> 
> Site specific OOM messages are duplications of a generic MM
> out of memory message and aren't really useful, so just
> delete them.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>

-vlad

> ---
>  net/sctp/protocol.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
> 
> diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
> index 91784f4..0801444 100644
> --- a/net/sctp/protocol.c
> +++ b/net/sctp/protocol.c
> @@ -1326,7 +1326,6 @@ SCTP_STATIC __init int sctp_init(void)
>  			__get_free_pages(GFP_ATOMIC|__GFP_NOWARN, order);
>  	} while (!sctp_assoc_hashtable && --order > 0);
>  	if (!sctp_assoc_hashtable) {
> -		pr_err("Failed association hash alloc\n");
>  		status = -ENOMEM;
>  		goto err_ahash_alloc;
>  	}
> @@ -1340,7 +1339,6 @@ SCTP_STATIC __init int sctp_init(void)
>  	sctp_ep_hashtable = (struct sctp_hashbucket *)
>  		kmalloc(64 * sizeof(struct sctp_hashbucket), GFP_KERNEL);
>  	if (!sctp_ep_hashtable) {
> -		pr_err("Failed endpoint_hash alloc\n");
>  		status = -ENOMEM;
>  		goto err_ehash_alloc;
>  	}
> @@ -1359,7 +1357,6 @@ SCTP_STATIC __init int sctp_init(void)
>  			__get_free_pages(GFP_ATOMIC|__GFP_NOWARN, order);
>  	} while (!sctp_port_hashtable && --order > 0);
>  	if (!sctp_port_hashtable) {
> -		pr_err("Failed bind hash alloc\n");
>  		status = -ENOMEM;
>  		goto err_bhash_alloc;
>  	}

^ permalink raw reply

* Re: [PATCH 19/24] sunrpc: Remove unnecessary OOM logging messages
From: David Miller @ 2011-08-29 21:37 UTC (permalink / raw)
  To: Trond.Myklebust; +Cc: joe, bfields, neilb, linux-nfs, netdev, linux-kernel
In-Reply-To: <2E1EB2CF9ED1CB4AA966F0EB76EAB4430AEB4EE9@SACMVEXC2-PRD.hq.netapp.com>

From: "Myklebust, Trond" <Trond.Myklebust@netapp.com>
Date: Mon, 29 Aug 2011 14:36:17 -0700

> Big NACK...
> 
> By whose standard are those "not useful"?

By mine, that's for sure.  It's duplicating something that the allocation
layers are already going to print.

^ permalink raw reply

* Re: [PATCH 18/24] sctp: Remove unnecessary OOM logging messages
From: Eric Dumazet @ 2011-08-29 21:43 UTC (permalink / raw)
  To: Joe Perches
  Cc: Vlad Yasevich, Sridhar Samudrala, David S. Miller, linux-sctp,
	netdev, linux-kernel
In-Reply-To: <21b4d996c8861373ac77d427914ec7882fe0c83e.1314650069.git.joe@perches.com>

Le lundi 29 août 2011 à 14:17 -0700, Joe Perches a écrit :
> Removing unnecessary messages saves code and text.
> 
> Site specific OOM messages are duplications of a generic MM
> out of memory message and aren't really useful, so just
> delete them.
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  net/sctp/protocol.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
> 
> diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
> index 91784f4..0801444 100644
> --- a/net/sctp/protocol.c
> +++ b/net/sctp/protocol.c
> @@ -1326,7 +1326,6 @@ SCTP_STATIC __init int sctp_init(void)
>  			__get_free_pages(GFP_ATOMIC|__GFP_NOWARN, order);
>  	} while (!sctp_assoc_hashtable && --order > 0);
>  	if (!sctp_assoc_hashtable) {
> -		pr_err("Failed association hash alloc\n");
>  		status = -ENOMEM;
>  		goto err_ahash_alloc;
>  	}
> @@ -1340,7 +1339,6 @@ SCTP_STATIC __init int sctp_init(void)
>  	sctp_ep_hashtable = (struct sctp_hashbucket *)
>  		kmalloc(64 * sizeof(struct sctp_hashbucket), GFP_KERNEL);
>  	if (!sctp_ep_hashtable) {
> -		pr_err("Failed endpoint_hash alloc\n");
>  		status = -ENOMEM;
>  		goto err_ehash_alloc;
>  	}
> @@ -1359,7 +1357,6 @@ SCTP_STATIC __init int sctp_init(void)
>  			__get_free_pages(GFP_ATOMIC|__GFP_NOWARN, order);
>  	} while (!sctp_port_hashtable && --order > 0);
>  	if (!sctp_port_hashtable) {
> -		pr_err("Failed bind hash alloc\n");
>  		status = -ENOMEM;
>  		goto err_bhash_alloc;
>  	}


It would be nice if you could avoid all these patches, that you dont
even read.

As I already told you in the past, __GFP_NOWARN dont print generic OOM
messages.

Its not because I told Wang Shaoyan not adding a useless "pr_err("Out of
memory\n");" in last gianfar patch, that you have to remove all
messages, with one hundred or more patches.

If I remember well, you even disagreed at that time.

Furthermore, a failed vmalloc() is not guaranteed to emit an OOM
message, is it ?

^ permalink raw reply

* Re: [PATCH 18/24] sctp: Remove unnecessary OOM logging messages
From: Eric Dumazet @ 2011-08-29 21:51 UTC (permalink / raw)
  To: Joe Perches
  Cc: Vlad Yasevich, Sridhar Samudrala, David S. Miller, linux-sctp,
	netdev, linux-kernel
In-Reply-To: <1314654209.2563.7.camel@edumazet-laptop>

Le lundi 29 août 2011 à 23:43 +0200, Eric Dumazet a écrit :

> Furthermore, a failed vmalloc() is not guaranteed to emit an OOM
> message, is it ?

It currently displays a message without context :

vmap allocation for size XXXXXX failed: use vmalloc=<size> to increase
size.

So we dont know which part of the kernel asked this allocation.

Please dont remove existing error messages after failed vmalloc() calls.

^ permalink raw reply

* Re: [PATCH 19/24] sunrpc: Remove unnecessary OOM logging messages
From: Boaz Harrosh @ 2011-08-29 21:54 UTC (permalink / raw)
  To: David Miller
  Cc: Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA,
	joe-6d6DIl74uiNBDgjK7y7TUQ, bfields-uC3wQj2KruNg9hUCZPvPmw,
	neilb-l3A5Bk7waGM, linux-nfs-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20110829.143751.1153162956919885670.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

On 08/29/2011 02:37 PM, David Miller wrote:
> From: "Myklebust, Trond" <Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>
> Date: Mon, 29 Aug 2011 14:36:17 -0700
> 
>> Big NACK...
>>
>> By whose standard are those "not useful"?
> 
> By mine, that's for sure.  It's duplicating something that the allocation
> layers are already going to print.

I have a question about that. Are the dprints going to show the stack backtrace?
Otherwise how can I see which exact allocation failed and was not properly handled?

If yes above? then I'm not sure I like it either, because am I'll be getting a full
stack backtrace for every failed allocation?

But I might like it if I try. How do I turn on allocation failures prints?
Can I filter out to print only GFP_KERNEL failures and or other GFP combinations?

Thanks 
Boaz
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH 19/24] sunrpc: Remove unnecessary OOM logging messages
From: David Miller @ 2011-08-29 22:03 UTC (permalink / raw)
  To: bharrosh-C4P08NqkoRlBDgjK7y7TUQ
  Cc: Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA,
	joe-6d6DIl74uiNBDgjK7y7TUQ, bfields-uC3wQj2KruNg9hUCZPvPmw,
	neilb-l3A5Bk7waGM, linux-nfs-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <4E5C0AB3.90401-C4P08NqkoRlBDgjK7y7TUQ@public.gmane.org>

From: Boaz Harrosh <bharrosh-C4P08NqkoRlBDgjK7y7TUQ@public.gmane.org>
Date: Mon, 29 Aug 2011 14:54:59 -0700

> I have a question about that. Are the dprints going to show the stack backtrace?

Yes, OOMs give full stack backtraces.

> If yes above? then I'm not sure I like it either, because am I'll be getting a full
> stack backtrace for every failed allocation?

They've been doing this for years, so obviously they haven't bothered you
enough to care up to this point.

All of this pushback is pure uneducated noise, please stop blocking progress
with poorly informed objections.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* RE: [PATCH 19/24] sunrpc: Remove unnecessary OOM logging messages
From: Myklebust, Trond @ 2011-08-29 22:08 UTC (permalink / raw)
  To: Boaz Harrosh, David Miller
  Cc: joe-6d6DIl74uiNBDgjK7y7TUQ, bfields-uC3wQj2KruNg9hUCZPvPmw,
	neilb-l3A5Bk7waGM, linux-nfs-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <4E5C0AB3.90401-C4P08NqkoRlBDgjK7y7TUQ@public.gmane.org>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1665 bytes --]

> -----Original Message-----
> From: Boaz Harrosh [mailto:bharrosh@panasas.com]
> Sent: Monday, August 29, 2011 5:55 PM
> To: David Miller
> Cc: Myklebust, Trond; joe@perches.com; bfields@fieldses.org;
> neilb@suse.de; linux-nfs@vger.kernel.org; netdev@vger.kernel.org;
> linux-kernel@vger.kernel.org
> Subject: Re: [PATCH 19/24] sunrpc: Remove unnecessary OOM logging
> messages
> 
> On 08/29/2011 02:37 PM, David Miller wrote:
> > From: "Myklebust, Trond" <Trond.Myklebust@netapp.com>
> > Date: Mon, 29 Aug 2011 14:36:17 -0700
> >
> >> Big NACK...
> >>
> >> By whose standard are those "not useful"?
> >
> > By mine, that's for sure.  It's duplicating something that the
> allocation
> > layers are already going to print.
> 
> I have a question about that. Are the dprints going to show the stack
> backtrace?
> Otherwise how can I see which exact allocation failed and was not
> properly handled?
> 
> If yes above? then I'm not sure I like it either, because am I'll be
> getting a full
> stack backtrace for every failed allocation?
> 
> But I might like it if I try. How do I turn on allocation failures
> prints?
> Can I filter out to print only GFP_KERNEL failures and or other GFP
> combinations?

Right. If every GFP_ATOMIC or GFP_NOWAIT is going to print out stack traces, then we're heading for absolute insanity. If not, then the existing dprintk()s make a lot more sense, 'cos they are turned on only when the administrator notices a problem, and is trying to debug it.

Trond

N‹§²æìr¸›yúèšØb²X¬¶Ç§vØ^–)Þº{.nÇ+‰·¥Š{±û"žØ^n‡r¡ö¦zË\x1aëh™¨è­Ú&¢îý»\x05ËÛÔØï¦v¬Îf\x1dp)¹¹br	šê+€Ê+zf£¢·hšˆ§~†­†Ûiÿûàz¹\x1e®w¥¢¸?™¨è­Ú&¢)ߢ^[f

^ permalink raw reply

* Re: [PATCH 18/24] sctp: Remove unnecessary OOM logging messages
From: David Miller @ 2011-08-29 22:15 UTC (permalink / raw)
  To: eric.dumazet
  Cc: joe, vladislav.yasevich, sri, linux-sctp, netdev, linux-kernel
In-Reply-To: <1314654681.2563.10.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 29 Aug 2011 23:51:21 +0200

> Le lundi 29 août 2011 à 23:43 +0200, Eric Dumazet a écrit :
> 
>> Furthermore, a failed vmalloc() is not guaranteed to emit an OOM
>> message, is it ?
> 
> It currently displays a message without context :
> 
> vmap allocation for size XXXXXX failed: use vmalloc=<size> to increase
> size.
> 
> So we dont know which part of the kernel asked this allocation.
> 
> Please dont remove existing error messages after failed vmalloc() calls.

Indeed.

Joe, these vmalloc() and also the __GFP_NOWARN cases will need to be
attended to and this series resubmitted as such.

Thanks.

^ permalink raw reply

* Re: [PATCH 04/24] ax25: Remove unnecessary OOM logging messages
From: Joerg Reuter @ 2011-08-29 22:42 UTC (permalink / raw)
  To: Joe Perches
  Cc: Ralf Baechle, David S. Miller, linux-hams, netdev, linux-kernel
In-Reply-To: <a426e678426cf2be1552edfbbb0de7ce08e9a7ef.1314650069.git.joe@perches.com>

On Mon, Aug 29, 2011 at 02:17:23PM -0700, Joe Perches wrote:

> Removing unnecessary messages saves code and text.

Not really that much of an impact, but yes, I agree it just swamps
syslog with duplicate messages... It was more debug code than
anything else originally. Beats me why it is logged as KERN_ERR or
KERN_CRIT, being out of buffers is not really fatal or even
unusual.

Still alive with just not enough time for hamradio stuff nowadays,
	Joerg DL1BKE

-- 
Joerg Reuter                                    http://yaina.de/jreuter
And I make my way to where the warm scent of soil fills the evening air. 
Everything is waiting quietly out there....                 (Anne Clark)


^ permalink raw reply

* Re: BQL crap and wireless
From: Dave Taht @ 2011-08-29 22:45 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: Tom Herbert, linux-wireless, Andrew McGregor, Matt Smith,
	Kevin Hayes, Derek Smithies, netdev
In-Reply-To: <CAB=NE6XrkdiZcGEDGuYe=SwLBhTm=Mt4NaPzjV9j_W-8sVosOA@mail.gmail.com>

I have a few other things to correct and comment on from the earlier
postings on this topic, but I'll start here, and work backwards.

On Mon, Aug 29, 2011 at 2:10 PM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
> On Mon, Aug 29, 2011 at 2:02 PM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
>> Hope this helps sum up the issue for 802.11 and what we are faced with.
>
> I should elaborate a bit more here on ensuring people understand that
> the "bufferbloat" issue assumes simply not retrying frames is a good
> thing. This is incorrect.

No, we don't assume that "simply not retrying frames is a good thing".
The particular patch to which you are referring is part of a series of
patches still under development and test and is already obsolete.

In particular, the bug we were stomping in that thread involved
excessive retries in the packet aggregation queue on the ath9k driver,
where a ping at distance, was taking 1.6 seconds to get there.

http://www.bufferbloat.net/issues/216 - I note there was a lot of
confusing activity around this bug as this was the final piece of a
solution to why my mesh network in Nica went to h*ll in rain, and I
was trapped in a hotel at the time.

Far worse ping times have been observed in the field - 20+ seconds, or
more - and as most internet protocols were designed with a little over
a lunar diameter in mind at most (~2 seconds of latency) - induced
latency of over a certain point is a very bad thing as it introduces
major problems/timeouts in what we now call the 'ANT' protocols -
DHCP, DNS, ARP, ND, etc - as well as begin to serious muck with the
servo mechanisms within TCP itself.

Please note that ping is merely a diagnostic - all sorts of packets
are exhibiting unbounded latency across most wireless standards.

Retrying wireless frames with bounded latency is a good thing.
Dropping packets to signal congestion is a good thing, also. Knowing
when to drop a packet is a very good thing. Preserving all packets, no
matter the cost, leads to RFC970.

> TCP's congestion algorithm is designed to
> help with the network conditions, not the dynamic PHY conditions.

Agreed, although things like TCP westwood and the earlier vegas,
attempt to also measure latencies more dynamically.

Also, I have always been an advocate of using "split tcp" when making
the jump to from wired to wireless.

>The
> dyanmic PHY conditions are handled through a slew of different means:
>
>  * Rate control
>  * Adaptive Noise Immunity effort
>
> Rate control is addressed either in firmware or by the driver.
> Typically rate control algorithms use some sort of metrics to do best
> guess at what rate a frame should be transmitted at. Minstrel was the
> first to say -- ahhh the hell with it, I give up and simply do trial
> and error and keep using the most reliable one but keep testing
> different rates as you go on. You fixate on the best one by using
> EWMA.

Which I like, very much.

I note that the gargoyle traffic shaper attempts to use the number of
packets in a conntracked connection as a measure of the TCP
mice/elephant transition to determine what traffic class the stream
should be in.

It cannot, however, detect a elephant/mouse transition, and perhaps
if there was also EWMA in conntrack, it may help the shaping problem
somewhat.

The concepts of "TCP mice and elephants" are well established in the
literature (see google), however the concept of an 'Ant' is not, it's
a new usage we have tried to establish to raise the importance of
lower latency needed, system critical packets on local wireless lans.

> What I was arguing early was that perhaps the same approach can be
> taken for the latency issues under the assumption the resolution is
> queue size and software retries. In fact this same principle might be
> able to be applicable to the aggregation segment size as well.

EWMA time and feedback to higher layers, of how long it takes packets
to make a given next-hop destination

Also somehow passing up the stack that 'this (wireless-n) destination
can handle an aggregate of 32 packets or XX bytes', and this
destination (g or b), can't, would make
applying higher level traffic shaping and fairness algorithms such as
SFB, RED, SFQ, HSFC, actually somewhat useful.

There is also the huge weight of wireless multicast packets on
wireless-n, which can be well over 300x1 vs normal packets at present,
to somehow account for throughout the stack. It only takes a little
multicast to mess up your whole day.

> Now, ANI is specific to hardware and does adjustments on hardware
> based on some known metrics. Today we have fixed thresholds for these
> but I wouldn't be surprised if taking minstrel-like guesses and doing
> trial and error and EWMA based fixation would help here as well.

In this 80 minute discussion of the interaction of wireless stack
between myself and felix feitkau, we attempt to summarize all the work
re bufferbloat and wireless specific to the ath9k done to date, and in
the last 10 minutes or so, speculate as to further solutions,based on
and expanding on andrew's input from the previous week.

http://huchra.bufferbloat.net/~d/talks/felix/

There will be a transcript available soon.

Felix has (as of this morning) already implemented pieces of what we discussed.

There is an earlier discussion with Andrew McGregor, as well as
transcript, here:

http://huchra.bufferbloat.net/~d/talks/andrew/

The transcriptionist struggles mightily with the acronyms and I
haven't got around to trying to fix it yet. I'd like very much to
capture andrew's descriptions of how minstrel actually works and one
day fold all this stuff together, along with how power management
actually works on wireless, etc, so more people internalize how
wireless really works.





--
Dave Täht
http://www.bufferbloat.net

^ permalink raw reply

* Re: BQL crap and wireless
From: Luis R. Rodriguez @ 2011-08-29 22:54 UTC (permalink / raw)
  To: Dave Taht
  Cc: Tom Herbert, linux-wireless, Andrew McGregor, Matt Smith,
	Kevin Hayes, Derek Smithies, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <CAA93jw5pTHpUOX=iUnck8Eun2iNqkuKwG-Jd0X1oNxD_s9_prA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Mon, Aug 29, 2011 at 3:45 PM, Dave Taht <dave.taht-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> http://huchra.bufferbloat.net/~d/talks/felix/
> http://huchra.bufferbloat.net/~d/talks/andrew/

I had already listened to Andrew's audio, and got up to 1 hour with
your session with Felix but seriously considered that entire 1 hour a
waste of my life. I think you digressed completely and rambled on
about random crap instead of focusing on the core of the matter, I
gave up after 1 hour.

  Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: linux-next: Tree for Aug 29 (bnx2x)
From: Randy Dunlap @ 2011-08-29 22:56 UTC (permalink / raw)
  To: dmitry
  Cc: Stephen Rothwell, netdev, linux-next@vger.kernel.org, LKML,
	Eilon Greenstein
In-Reply-To: <1314653744.3085.2.camel@lb-tlvb-dmitry>

On Tue, 30 Aug 2011 00:35:44 +0300 Dmitry Kravkov wrote:

> On Mon, 2011-08-29 at 13:28 -0700, Randy Dunlap wrote:
> > On Mon, 29 Aug 2011 16:19:07 +1000 Stephen Rothwell wrote:
> > 
> > > Hi all,
> > 
> > (on i386 or x86_64)
> > 
> > drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:10148: error: 'bnx2x_fcoe_get_wwn' undeclared here (not in a function)
> > 
> > 
> > Full randconfig file is attached.
> > 
> > ---
> > ~Randy
> > *** Remember to use Documentation/SubmitChecklist when testing your code ***
> This should sync #define structures between definition and declaration
> ---
> 
> Reported-by: Randy Dunlap <rdunlap@xenotime.net>
> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>

Acked-by: Randy Dunlap <rdunlap@xenotime.net>

Thanks.

> ---
>  drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
> index f290b23..5b1f9b5 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
> @@ -522,7 +522,7 @@ void bnx2x_free_mem_bp(struct bnx2x *bp);
>   */
>  int bnx2x_change_mtu(struct net_device *dev, int new_mtu);
>  
> -#if defined(BCM_CNIC) && (defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE))
> +#if defined(NETDEV_FCOE_WWNN) && defined(BCM_CNIC)
>  /**
>   * bnx2x_fcoe_get_wwn - return the requested WWN value for this port
>   *
> -- 


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply

* [PATCH net-next 1/5] qlcnic: detect fan failure
From: Sony Chacko @ 2011-08-29 22:50 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Dept_NX_Linux_NIC_Driver, Sony Chacko

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
---
 .../net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c    |    1 -
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_hdr.h    |    4 ++-
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c   |   29 ++++++++++++++++---
 3 files changed, 27 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
index 7c64f2f..59d73f2 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
@@ -832,7 +832,6 @@ qlcnic_diag_test(struct net_device *dev, struct ethtool_test *eth_test,
 		data[3] = qlcnic_loopback_test(dev, QLCNIC_ILB_MODE);
 		if (data[3])
 			eth_test->flags |= ETH_TEST_FL_FAILED;
-
 		if (eth_test->flags & ETH_TEST_FL_EXTERNAL_LB) {
 			data[4] = qlcnic_loopback_test(dev, QLCNIC_ELB_MODE);
 			if (data[4])
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hdr.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hdr.h
index d14506f..92bc8ce 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hdr.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hdr.h
@@ -609,6 +609,7 @@ enum {
 	QLCNIC_TEMP_PANIC	/* Fatal error, hardware has shut down. */
 };
 
+
 /* Lock IDs for PHY lock */
 #define PHY_LOCK_DRIVER		0x44524956
 
@@ -723,7 +724,8 @@ enum {
 #define QLCNIC_RCODE_DRIVER_CAN_RELOAD		BIT_30
 #define QLCNIC_RCODE_FATAL_ERROR		BIT_31
 #define QLCNIC_FWERROR_PEGNUM(code)		((code) & 0xff)
-#define QLCNIC_FWERROR_CODE(code)		((code >> 8) & 0xfffff)
+#define QLCNIC_FWERROR_CODE(code)		((code >> 8) & 0x1fffff)
+#define QLCNIC_FWERROR_FAN_FAILURE		0x16
 
 #define FW_POLL_DELAY		(1 * HZ)
 #define FW_FAIL_THRESH		2
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index b447cc5..998bb1d 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -2928,15 +2928,36 @@ qlcnic_detach_work(struct work_struct *work)
 
 	status = QLCRD32(adapter, QLCNIC_PEG_HALT_STATUS1);
 
-	if (status & QLCNIC_RCODE_FATAL_ERROR)
+	if (status & QLCNIC_RCODE_FATAL_ERROR) {
+		dev_err(&adapter->pdev->dev,
+			"Detaching the device: peg halt status1=0x%x\n",
+					status);
+
+		if (QLCNIC_FWERROR_CODE(status) == QLCNIC_FWERROR_FAN_FAILURE) {
+			dev_err(&adapter->pdev->dev,
+			"On board active cooling fan failed. "
+				"Device has been halted.\n");
+			dev_err(&adapter->pdev->dev,
+				"Replace the adapter.\n");
+		}
+
 		goto err_ret;
+	}
 
-	if (adapter->temp == QLCNIC_TEMP_PANIC)
+	if (adapter->temp == QLCNIC_TEMP_PANIC) {
+		dev_err(&adapter->pdev->dev, "Detaching the device: temp=%d\n",
+			adapter->temp);
 		goto err_ret;
+	}
+
 	/* Dont ack if this instance is the reset owner */
 	if (!(adapter->flags & QLCNIC_FW_RESET_OWNER)) {
-		if (qlcnic_set_drv_state(adapter, adapter->dev_state))
+		if (qlcnic_set_drv_state(adapter, adapter->dev_state)) {
+			dev_err(&adapter->pdev->dev,
+				"Failed to set driver state,"
+					"detaching the device.\n");
 			goto err_ret;
+		}
 	}
 
 	adapter->fw_wait_cnt = 0;
@@ -2946,8 +2967,6 @@ qlcnic_detach_work(struct work_struct *work)
 	return;
 
 err_ret:
-	dev_err(&adapter->pdev->dev, "detach failed; status=%d temp=%d\n",
-			status, adapter->temp);
 	netif_device_attach(netdev);
 	qlcnic_clr_all_drv_state(adapter, 1);
 }
-- 
1.6.0.2

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox