Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next-2.6] ipv4: Make sure flowi4->{saddr,daddr} are always set.
From: David Miller @ 2011-05-02 21:38 UTC (permalink / raw)
  To: netdev


Slow path output route resolution always makes sure that
->{saddr,daddr} are set, and also if we trigger into IPSEC resolution
we initialize them as well, because xfrm_lookup() expects them to be
fully resolved.

But if we hit the fast path and flowi4->flowi4_proto is zero, we won't
do this initialization.

Therefore, move the IPSEC path initialization to the route cache
lookup fast path to make sure these are always set.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/ipv4/route.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 93f71be..64f360d 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2675,6 +2675,10 @@ struct rtable *__ip_route_output_key(struct net *net, struct flowi4 *flp4)
 			dst_use(&rth->dst, jiffies);
 			RT_CACHE_STAT_INC(out_hit);
 			rcu_read_unlock_bh();
+			if (!flp4->saddr)
+				flp4->saddr = rth->rt_src;
+			if (!flp4->daddr)
+				flp4->daddr = rth->rt_dst;
 			return rth;
 		}
 		RT_CACHE_STAT_INC(out_hlist_search);
@@ -2772,15 +2776,10 @@ struct rtable *ip_route_output_flow(struct net *net, struct flowi4 *flp4,
 	if (IS_ERR(rt))
 		return rt;
 
-	if (flp4->flowi4_proto) {
-		if (!flp4->saddr)
-			flp4->saddr = rt->rt_src;
-		if (!flp4->daddr)
-			flp4->daddr = rt->rt_dst;
+	if (flp4->flowi4_proto)
 		rt = (struct rtable *) xfrm_lookup(net, &rt->dst,
 						   flowi4_to_flowi(flp4),
 						   sk, 0);
-	}
 
 	return rt;
 }
-- 
1.7.4.5


^ permalink raw reply related

* Re: [PATCH] amd8111e: trivial typo spelling: Negotitate -> Negotiate
From: David Miller @ 2011-05-02 21:47 UTC (permalink / raw)
  To: joe; +Cc: netdev
In-Reply-To: <1304366369.7792.45.camel@Joe-Laptop>

From: Joe Perches <joe@perches.com>
Date: Mon, 02 May 2011 12:59:29 -0700

> Signed-off-by: Joe Perches <joe@perches.com>

Applied, thanks Joe.

^ permalink raw reply

* Re: [PATCH] linux/stmmac.h: include <linux/platform_device.h> to remove compilation warning.
From: David Miller @ 2011-05-02 22:01 UTC (permalink / raw)
  To: viresh.kumar
  Cc: peppe.cavallaro, netdev, shiraz.hashim, armando.visconti,
	deepak.sikri, viresh.linux
In-Reply-To: <2239eca1d15014be7b6d94f883f9492dc1fbc60a.1304317552.git.viresh.kumar@st.com>

From: Viresh Kumar <viresh.kumar@st.com>
Date: Mon, 2 May 2011 12:00:37 +0530

> stmmac.h uses struct platform_device and doesn't include
> <linux/platform_device.h>. And so we get following compilation warning while
> using this file:
> 	warning: ‘struct platform_device’ declared inside parameter list
> 
> This patch includes <linux/platform_device.h> in stmmac.h to remove this warning
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@st.com>

This patch applies to neither net-2.6, nor net-next-2.6

The context around your change in all current trees looks a lot
different than what's in your patch.

In fact, even if I go through the entire history in GIT of this
header file, those STMAC_TYPE_0 defines are never there.

The string "STMAC_TYPE_0" doesn't even show up in a query to google
code search.

What tree are you even patching against?

^ permalink raw reply

* RE: [E1000-devel] WoL stopped working after power off with 2.6.38 (e1000e specific?)
From: Allan, Bruce W @ 2011-05-02 22:02 UTC (permalink / raw)
  To: Kamil Iskra, netdev@vger.kernel.org,
	e1000-devel@lists.sourceforge.net
  Cc: linux-pm@lists.linux-foundation.org
In-Reply-To: <20110430054519.GA9826@scooby.iskra.name>

>-----Original Message-----
>From: Kamil Iskra [mailto:kamil@iskra.name]
>Sent: Friday, April 29, 2011 10:45 PM
>To: netdev@vger.kernel.org; e1000-devel@lists.sourceforge.net
>Subject: [E1000-devel] WoL stopped working after power off with 2.6.38 (e1000e
>specific?)
>
>[ Note: I'm not on these mailing lists, so be sure to Cc: me if you want
>more info from me ]
>
>After upgrading from kernel 2.6.37 to 2.6.38, Wake on LAN after shutdown
>stopped working for me on both of my Thinkpad laptops.  Both systems use
>the e1000e driver.  One (a T61) has an 82566MM NIC, the other (an X201) an
>82577LM.  I'm running 64-bit Gentoo Linux with a custom compiled kernel.
>The network driver is built into the kernel.
>
>Wake on LAN still works after suspend (S3), but not after a complete
>shutdown (with power supply connected).
>
>I figured the updated e1000e driver in 2.6.38 was probably to blame,
>however, after I copied the whole drivers/net/e1000e directory from the
>2.6.37 over to the 2.6.38 tree and recompiled, the problem persisted, so I
>don't know anymore.
>
>I modified the system shutdown sequence to invoke ifconfig and ethtool
>right before the final halt.  According to ifconfig, eth0 is down at that
>point.  According to ethtool, WoL is configured correctly ("Wake-on: g").
>There is, however, a difference in the output of ethtool between the two
>kernel versions.  "Link detected:" shows "yes" with 2.6.37, but "no" with
>2.6.38.
>
>A workaround that I found to work was to invoke "ifconfig eth0 up" right
>before the halt.
>
>Any suggestions?  Is this new behavior expected or is it a bug?

WoL from S5 "works for me"(TM) using the e1000e driver on RHEL6 and 2.6.38.
Could you provide your customer kernel configuration?

Cc: linux-pm@lists.linux-foundation.org

Thanks,
Bruce.

^ permalink raw reply

* Re: pull request: batman-adv 2011-05-01
From: David Miller @ 2011-05-02 22:06 UTC (permalink / raw)
  To: sven-KaDOiPu9UxWEi8DpZVb4nw
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
In-Reply-To: <1304284234-27338-1-git-send-email-sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>

From: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
Date: Sun,  1 May 2011 23:10:30 +0200

> I would like to propose following patches for net-next-2.6/2.6.40. Marek
> Lindner continued to convert different datastructures to use RCU. Antonio
> Quartulli fixed an important bug introduced in the last patchset related to the
> update of the current gateway. He also did some minor cleanup work.
> 
> I've removed the patch "net: batman-adv: remove rx_csum ethtool_ops" again
> because you already applied it in your branch.

I'll pull this, but I really want you to resolve atomic_dec_not_zero()
properly.

It does not belong in any batman-adv header file.

Instead it belongs in all of arch/${ARCH}/include/asm/atomic.h and
include/asm-generic/atomic.h

Please submit a patch which puts it in the proper place to linux-kernel

Don't worry about build problems resulting from this, I'll make sure
to deal with it properly when the change shows up in Linus's tree.

Thanks.

^ permalink raw reply

* RE: [E1000-devel] WoL stopped working after power off with 2.6.38 (e1000e specific?)
From: Allan, Bruce W @ 2011-05-02 22:07 UTC (permalink / raw)
  To: Allan, Bruce W, Kamil Iskra, netdev@vger.kernel.org,
	e1000-devel@lists.sourceforge.net
  Cc: linux-pm@lists.linux-foundation.org
In-Reply-To: <8DD2590731AB5D4C9DBF71A877482A9001B54CE017@orsmsx509.amr.corp.intel.com>

>-----Original Message-----
>From: Allan, Bruce W [mailto:bruce.w.allan@intel.com]
>Sent: Monday, May 02, 2011 3:02 PM
>To: Kamil Iskra; netdev@vger.kernel.org; e1000-devel@lists.sourceforge.net
>Cc: linux-pm@lists.linux-foundation.org
>Subject: Re: [E1000-devel] WoL stopped working after power off with 2.6.38
>(e1000e specific?)
>
>>-----Original Message-----
>>From: Kamil Iskra [mailto:kamil@iskra.name]
>>Sent: Friday, April 29, 2011 10:45 PM
>>To: netdev@vger.kernel.org; e1000-devel@lists.sourceforge.net
>>Subject: [E1000-devel] WoL stopped working after power off with 2.6.38 (e1000e
>>specific?)
>>
>>[ Note: I'm not on these mailing lists, so be sure to Cc: me if you want
>>more info from me ]
>>
>>After upgrading from kernel 2.6.37 to 2.6.38, Wake on LAN after shutdown
>>stopped working for me on both of my Thinkpad laptops.  Both systems use
>>the e1000e driver.  One (a T61) has an 82566MM NIC, the other (an X201) an
>>82577LM.  I'm running 64-bit Gentoo Linux with a custom compiled kernel.
>>The network driver is built into the kernel.
>>
>>Wake on LAN still works after suspend (S3), but not after a complete
>>shutdown (with power supply connected).
>>
>>I figured the updated e1000e driver in 2.6.38 was probably to blame,
>>however, after I copied the whole drivers/net/e1000e directory from the
>>2.6.37 over to the 2.6.38 tree and recompiled, the problem persisted, so I
>>don't know anymore.
>>
>>I modified the system shutdown sequence to invoke ifconfig and ethtool
>>right before the final halt.  According to ifconfig, eth0 is down at that
>>point.  According to ethtool, WoL is configured correctly ("Wake-on: g").
>>There is, however, a difference in the output of ethtool between the two
>>kernel versions.  "Link detected:" shows "yes" with 2.6.37, but "no" with
>>2.6.38.
>>
>>A workaround that I found to work was to invoke "ifconfig eth0 up" right
>>before the halt.
>>
>>Any suggestions?  Is this new behavior expected or is it a bug?
>
>WoL from S5 "works for me"(TM) using the e1000e driver on RHEL6 and 2.6.38.
>Could you provide your customer kernel configuration?
>
>Cc: linux-pm@lists.linux-foundation.org
>
>Thanks,
>Bruce.

:s/customer/custom/


^ permalink raw reply

* net-2.6 state...
From: David Miller @ 2011-05-02 22:20 UTC (permalink / raw)
  To: netdev


Right now I'm sorting through patchwork to make sure anything that
belongs in net-2.6, is there.

Then I'm going to push things out to Linus.

We will be in a more serious lock down mode after that.  So I really
only want to see obvious critical fixes going into net-2.6.  Even
comment typos will be put into net-next-2.6.

Please cooperate with this policy and everything will go smoothly.

There is nothing I like more than seeing people work on bug fixes at
this point in the -rc* series, so if you want to make me (as well as
the users reporting these things) really happy, fix some bugs. :-)

Thanks!

^ permalink raw reply

* Re: [PATCH net-next 1/3] net:use help function of skb_checksum_start_offset to calculate offset
From: David Miller @ 2011-05-02 22:21 UTC (permalink / raw)
  To: cmetcalf; +Cc: shanwei, netdev
In-Reply-To: <4DBF2E11.3010904@tilera.com>

From: Chris Metcalf <cmetcalf@tilera.com>
Date: Mon, 2 May 2011 18:20:01 -0400

> I took the drivers/net/tile/ change into my tree, but I'll defer to David
> or some other net person to take the net/ipv6/udp.c change.  Thanks!

I took them both into my tree.  Didn't you see my reply?

^ permalink raw reply

* Re: [PATCH net-next 1/3] net:use help function of skb_checksum_start_offset to calculate offset
From: Chris Metcalf @ 2011-05-02 22:20 UTC (permalink / raw)
  To: Shan Wei; +Cc: David Miller, netdev
In-Reply-To: <4DB1617D.30600@cn.fujitsu.com>

On 4/22/2011 7:07 AM, Shan Wei wrote:
> Although these are equivalent, but the skb_checksum_start_offset() is more readable.
>
>
> Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
> ---
>  drivers/net/tile/tilepro.c |    2 +-
>  net/ipv6/udp.c             |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/tile/tilepro.c b/drivers/net/tile/tilepro.c
> index 0825db6..1e980fd 100644
> --- a/drivers/net/tile/tilepro.c
> +++ b/drivers/net/tile/tilepro.c
> @@ -1930,7 +1930,7 @@ static int tile_net_tx(struct sk_buff *skb, struct net_device *dev)
>  	unsigned int len = skb->len;
>  	unsigned char *data = skb->data;
>  
> -	unsigned int csum_start = skb->csum_start - skb_headroom(skb);
> +	unsigned int csum_start = skb_checksum_start_offset(skb);
>  
>  	lepp_frag_t frags[LEPP_MAX_FRAGS];
>  
> diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
> index 15c3774..95c62a1 100644
> --- a/net/ipv6/udp.c
> +++ b/net/ipv6/udp.c
> @@ -1328,7 +1328,7 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb, u32 features)
>  	/* Do software UFO. Complete and fill in the UDP checksum as HW cannot
>  	 * do checksum of UDP packets sent as multiple IP fragments.
>  	 */
> -	offset = skb->csum_start - skb_headroom(skb);
> +	offset = skb_checksum_start_offset(skb);
>  	csum = skb_checksum(skb, offset, skb->len- offset, 0);
>  	offset += skb->csum_offset;
>  	*(__sum16 *)(skb->data + offset) = csum_fold(csum);

I took the drivers/net/tile/ change into my tree, but I'll defer to David
or some other net person to take the net/ipv6/udp.c change.  Thanks!

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com



^ permalink raw reply

* Re: [PATCH net-next-2.6] net: dont hold rtnl mutex during netlink dump callbacks
From: David Miller @ 2011-05-02 22:27 UTC (permalink / raw)
  To: shemminger; +Cc: eric.dumazet, kaber, netdev, remi.denis-courmont
In-Reply-To: <20110428084337.6b54603e@nehalam>

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Thu, 28 Apr 2011 08:43:37 -0700

> On Thu, 28 Apr 2011 10:56:07 +0200
> Eric Dumazet <eric.dumazet@gmail.com> wrote:
> 
>> Four years ago, Patrick made a change to hold rtnl mutex during netlink
>> dump callbacks.
>> 
>> I believe it was a wrong move. This slows down concurrent dumps, making
>> good old /proc/net/ files faster than rtnetlink in some situations.
>> 
>> This occurred to me because one "ip link show dev ..." was _very_ slow
>> on a workload adding/removing network devices in background.
>> 
>> All dump callbacks are able to use RCU locking now, so this patch does
>> roughly a revert of commits :
>> 
>> 1c2d670f366 : [RTNETLINK]: Hold rtnl_mutex during netlink dump callbacks
>> 6313c1e0992 : [RTNETLINK]: Remove unnecessary locking in dump callbacks
>> 
>> This let writers fight for rtnl mutex and readers going full speed.
>> 
>> It also takes care of phonet : phonet_route_get() is now called from rcu
>> read section. I renamed it to phonet_route_get_rcu()
>> 
>> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>> Cc: Patrick McHardy <kaber@trash.net>
>> Cc: Remi Denis-Courmont <remi.denis-courmont@nokia.com>
> 
> Acked-by: Stephen Hemminger <shemminger@vyatta.com>

Applied, thanks everyone!

^ permalink raw reply

* Re: [PATCH net-next 1/3] net:use help function of skb_checksum_start_offset to calculate offset
From: Chris Metcalf @ 2011-05-02 22:29 UTC (permalink / raw)
  To: David Miller; +Cc: shanwei, netdev
In-Reply-To: <20110502.152136.115919893.davem@davemloft.net>

On 5/2/2011 6:21 PM, David Miller wrote:
> From: Chris Metcalf <cmetcalf@tilera.com>
> Date: Mon, 2 May 2011 18:20:01 -0400
>
>> I took the drivers/net/tile/ change into my tree, but I'll defer to David
>> or some other net person to take the net/ipv6/udp.c change.  Thanks!
> I took them both into my tree.  Didn't you see my reply?

I did, but I didn't see the change yet in .39-rc5, so I figured it would be
harmless to also take it into the tile tree.  And, I thought you might have
just taken the platform-independent part of the change.  I'll revert the
tile part of the change out of my tree.  Thanks!

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com



^ permalink raw reply

* Re: [PATCH net-next 1/3] net:use help function of skb_checksum_start_offset to calculate offset
From: David Miller @ 2011-05-02 22:35 UTC (permalink / raw)
  To: cmetcalf; +Cc: shanwei, netdev
In-Reply-To: <4DBF3037.30203@tilera.com>

From: Chris Metcalf <cmetcalf@tilera.com>
Date: Mon, 2 May 2011 18:29:11 -0400

> On 5/2/2011 6:21 PM, David Miller wrote:
>> From: Chris Metcalf <cmetcalf@tilera.com>
>> Date: Mon, 2 May 2011 18:20:01 -0400
>>
>>> I took the drivers/net/tile/ change into my tree, but I'll defer to David
>>> or some other net person to take the net/ipv6/udp.c change.  Thanks!
>> I took them both into my tree.  Didn't you see my reply?
> 
> I did, but I didn't see the change yet in .39-rc5, so I figured it would be
> harmless to also take it into the tile tree.

This change will show up in net-next-2.6 and as a consequence linux-2.6-next

^ permalink raw reply

* Re: [PATCH 1/5] networking: inappropriate ioctl operation should return ENOTTY
From: David Miller @ 2011-05-02 22:41 UTC (permalink / raw)
  To: lifongsun; +Cc: alan, netdev, linux-kernel
In-Reply-To: <1303977891-29280-1-git-send-email-lifongsun@gmail.com>

From: Lifeng Sun <lifongsun@gmail.com>
Date: Thu, 28 Apr 2011 16:04:51 +0800

> ioctl() calls against a socket with an inappropriate ioctl operation
> are incorrectly returning EINVAL rather than ENOTTY:
> 
>   [ENOTTY]
>       Inappropriate I/O control operation.
> 
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=33992
> 
> Signed-off-by: Lifeng Sun <lifongsun@gmail.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH] tg3: Fix failure to enable WoL by default when possible
From: David Miller @ 2011-05-02 22:47 UTC (permalink / raw)
  To: rjw; +Cc: netdev, linux-kernel, mcarlson, mchan, sfr, linux-next
In-Reply-To: <201104282302.15502.rjw@sisk.pl>

From: "Rafael J. Wysocki" <rjw@sisk.pl>
Date: Thu, 28 Apr 2011 23:02:15 +0200

> From: Rafael J. Wysocki <rjw@sisk.pl>
> 
> tg3 is supposed to enable WoL by default on adapters which support
> that, but it fails to do so unless the adapter's
> /sys/devices/.../power/wakeup file contains 'enabled' during the
> initialization of the adapter.  Fix that by making tg3 use
> device_set_wakeup_enable() to enable wakeup automatically whenever
> WoL should be enabled by default.
> 
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

Applied, thanks Rafael.

Stephen, this patch is going to show up in net-2.6 and it will
generate a merge conflict with Joe Perches's commit in net-next-2.6
which converts tg3 to use a bitmap for the tp->tg3_flags* values.

--------------------
commit 63c3a66fe6c827a731dcbdee181158b295626f83
Author: Joe Perches <joe@perches.com>
Date:   Tue Apr 26 08:12:10 2011 +0000

    tg3: Convert u32 flag,flg2,flg3 uses to bitmap
--------------------

It should be easy to resolve, and you don't need to report this
to us when you hit it while building your -next tree, thanks :-)

I'll resolve it myself over the next day or two.

> ---
>  drivers/net/tg3.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> Index: linux-2.6/drivers/net/tg3.c
> ===================================================================
> --- linux-2.6.orig/drivers/net/tg3.c
> +++ linux-2.6/drivers/net/tg3.c
> @@ -12327,8 +12327,10 @@ static void __devinit tg3_get_eeprom_hw_
>  		if (val & VCPU_CFGSHDW_ASPM_DBNC)
>  			tp->tg3_flags |= TG3_FLAG_ASPM_WORKAROUND;
>  		if ((val & VCPU_CFGSHDW_WOL_ENABLE) &&
> -		    (val & VCPU_CFGSHDW_WOL_MAGPKT))
> +		    (val & VCPU_CFGSHDW_WOL_MAGPKT)) {
>  			tp->tg3_flags |= TG3_FLAG_WOL_ENABLE;
> +			device_set_wakeup_enable(&tp->pdev->dev, true);
> +		}
>  		goto done;
>  	}
>  
> @@ -12461,8 +12463,10 @@ static void __devinit tg3_get_eeprom_hw_
>  			tp->tg3_flags &= ~TG3_FLAG_WOL_CAP;
>  
>  		if ((tp->tg3_flags & TG3_FLAG_WOL_CAP) &&
> -		    (nic_cfg & NIC_SRAM_DATA_CFG_WOL_ENABLE))
> +		    (nic_cfg & NIC_SRAM_DATA_CFG_WOL_ENABLE)) {
>  			tp->tg3_flags |= TG3_FLAG_WOL_ENABLE;
> +			device_set_wakeup_enable(&tp->pdev->dev, true);
> +		}
>  
>  		if (cfg2 & (1 << 17))
>  			tp->phy_flags |= TG3_PHYFLG_CAPACITIVE_COUPLING;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply

* Re: [PATCH] smsc95xx: fix reset check
From: David Miller @ 2011-05-02 22:51 UTC (permalink / raw)
  To: rabin; +Cc: steve.glendinning, netdev
In-Reply-To: <1304188167-18152-1-git-send-email-rabin@rab.in>

From: Rabin Vincent <rabin@rab.in>
Date: Sat, 30 Apr 2011 23:59:27 +0530

> The reset loop check should check the MII_BMCR register value for
> BMCR_RESET rather than for MII_BMCR (the register address, which also
> happens to be zero).
> 
> Signed-off-by: Rabin Vincent <rabin@rab.in>

Applied, thank you.

^ permalink raw reply

* Re: [PATCH] usbnet: runtime pm: fix out of memory
From: David Miller @ 2011-05-02 22:52 UTC (permalink / raw)
  To: tom.leiming; +Cc: netdev, linux-usb, oneukum
In-Reply-To: <1304066229-30875-1-git-send-email-tom.leiming@gmail.com>

From: tom.leiming@gmail.com
Date: Fri, 29 Apr 2011 16:37:09 +0800

> From: Ming Lei <tom.leiming@gmail.com>
> 
> This patch makes use of the EVENT_DEV_OPEN flag introduced recently to
> fix one out of memory issue, which can be reproduced on omap3/4 based
> pandaboard/beagle XM easily with steps below:
 ...

Oliver please review this patch.  Thanks!

> 	- enable runtime pm
> 	echo auto > /sys/devices/platform/usbhs-omap.0/ehci-omap.0/usb1/1-1/1-1.1/power/control
> 
> 	- ifconfig eth0 up
> 
> 	- then out of memroy happened, see [1] for kernel message.
> 
> Follows my analysis:
> 	- 'ifconfig eth0 up' brings eth0 out of suspend, and usbnet_resume
> 	is called to schedule dev->bh, then rx urbs are submited to prepare for
> 	recieving data;
> 
> 	- some usbnet devices will produce garbage rx packets flood if
> 	info->reset is not called in usbnet_open.
> 
> 	- so there is no enough chances for usbnet_bh to handle and release
> 	recieved skb buffers since many rx interrupts consumes cpu, so out of memory
> 	for atomic allocation in rx_submit happened.
> 
> This patch fixes the issue by simply not allowing schedule of usbnet_bh until device
> is opened.
> 
> [1], dmesg
> [  234.712005] smsc95xx 1-1.1:1.0: rpm_resume flags 0x4
> [  234.712066] usb 1-1.1: rpm_resume flags 0x0
> [  234.712066] usb 1-1: rpm_resume flags 0x0
> [  234.712097] usb usb1: rpm_resume flags 0x0
> [  234.712127] usb usb1: usb auto-resume
> [  234.712158] ehci-omap ehci-omap.0: resume root hub
> [  234.754028] hub 1-0:1.0: hub_resume
> [  234.754821] hub 1-0:1.0: port 1: status 0507 change 0000
> [  234.756011] hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0000
> [  234.756042] hub 1-0:1.0: rpm_resume flags 0x4
> [  234.756072] usb usb1: rpm_resume flags 0x0
> [  234.756164] usb usb1: rpm_resume returns 1
> [  234.756195] hub 1-0:1.0: rpm_resume returns 0
> [  234.756195] hub 1-0:1.0: rpm_suspend flags 0x4
> [  234.756225] hub 1-0:1.0: rpm_suspend returns 0
> [  234.756256] usb usb1: rpm_resume returns 0
> [  234.757141] usb 1-1: usb auto-resume
> [  234.793151] ehci-omap ehci-omap.0: GetStatus port:1 status 001005 0  ACK POWER sig=se0 PE CONNECT
> [  234.816558] usb 1-1: finish resume
> [  234.817871] hub 1-1:1.0: hub_resume
> [  234.818420] hub 1-1:1.0: port 1: status 0507 change 0000
> [  234.820495] ehci-omap ehci-omap.0: reused qh eec50220 schedule
> [  234.820495] usb 1-1: link qh256-0001/eec50220 start 1 [1/0 us]
> [  234.820587] usb 1-1: rpm_resume returns 0
> [  234.820800] hub 1-1:1.0: state 7 ports 5 chg 0000 evt 0000
> [  234.820800] hub 1-1:1.0: rpm_resume flags 0x4
> [  234.820831] hub 1-1:1.0: rpm_resume returns 0
> [  234.820861] hub 1-1:1.0: rpm_suspend flags 0x4
> [  234.820861] hub 1-1:1.0: rpm_suspend returns 0
> [  234.821777] usb 1-1.1: usb auto-resume
> [  234.868591] hub 1-1:1.0: state 7 ports 5 chg 0000 evt 0002
> [  234.868591] hub 1-1:1.0: rpm_resume flags 0x4
> [  234.868621] hub 1-1:1.0: rpm_resume returns 0
> [  234.868652] hub 1-1:1.0: rpm_suspend flags 0x4
> [  234.868652] hub 1-1:1.0: rpm_suspend returns 0
> [  234.879486] usb 1-1.1: finish resume
> [  234.880279] usb 1-1.1: rpm_resume returns 0
> [  234.880310] smsc95xx 1-1.1:1.0: rpm_resume returns 0
> [  238.880187] ksoftirqd/0: page allocation failure. order:0, mode:0x20
> [  238.880218] Backtrace:
> [  238.880249] [<c01b9800>] (dump_backtrace+0x0/0xf8) from [<c065e1dc>] (dump_stack+0x18/0x1c)
> [  238.880249]  r6:00000000 r5:00000000 r4:00000020 r3:00000002
> [  238.880310] [<c065e1c4>] (dump_stack+0x0/0x1c) from [<c026ece4>] (__alloc_pages_nodemask+0x620/0x724)
> [  238.880340] [<c026e6c4>] (__alloc_pages_nodemask+0x0/0x724) from [<c02986d4>] (kmem_getpages.clone.34+0x34/0xc8)
> [  238.880371] [<c02986a0>] (kmem_getpages.clone.34+0x0/0xc8) from [<c02988f8>] (cache_grow.clone.42+0x84/0x154)
> [  238.880371]  r6:ef871aa4 r5:ef871a80 r4:ef81fd40 r3:00000020
> [  238.880401] [<c0298874>] (cache_grow.clone.42+0x0/0x154) from [<c0298b64>] (cache_alloc_refill+0x19c/0x1f0)
> [  238.880432] [<c02989c8>] (cache_alloc_refill+0x0/0x1f0) from [<c0299804>] (kmem_cache_alloc+0x90/0x190)
> [  238.880462] [<c0299774>] (kmem_cache_alloc+0x0/0x190) from [<c052e260>] (__alloc_skb+0x34/0xe8)
> [  238.880493] [<c052e22c>] (__alloc_skb+0x0/0xe8) from [<bf0509f4>] (rx_submit+0x2c/0x1d4 [usbnet])
> [  238.880523] [<bf0509c8>] (rx_submit+0x0/0x1d4 [usbnet]) from [<bf050d38>] (rx_complete+0x19c/0x1b0 [usbnet])
> [  238.880737] [<bf050b9c>] (rx_complete+0x0/0x1b0 [usbnet]) from [<bf006fd0>] (usb_hcd_giveback_urb+0xa8/0xf4 [usbcore])
> [  238.880737]  r8:eeeced34 r7:eeecec00 r6:eeecec00 r5:00000000 r4:eec2dd20
> [  238.880767] r3:bf050b9c
> [  238.880859] [<bf006f28>] (usb_hcd_giveback_urb+0x0/0xf4 [usbcore]) from [<bf03c8f8>] (ehci_urb_done+0xb0/0xbc [ehci_hcd])
> [  238.880859]  r6:00000000 r5:eec2dd20 r4:eeeced44 r3:eec2dd34
> [  238.880920] [<bf03c848>] (ehci_urb_done+0x0/0xbc [ehci_hcd]) from [<bf040204>] (qh_completions+0x308/0x3bc [ehci_hcd])
> [  238.880920]  r7:00000000 r6:eeda21a0 r5:ffdfe3c0 r4:eeda21ac
> [  238.880981] [<bf03fefc>] (qh_completions+0x0/0x3bc [ehci_hcd]) from [<bf040ef8>] (scan_async+0xb0/0x16c [ehci_hcd])
> [  238.881011] [<bf040e48>] (scan_async+0x0/0x16c [ehci_hcd]) from [<bf040fec>] (ehci_work+0x38/0x90 [ehci_hcd])
> [  238.881042] [<bf040fb4>] (ehci_work+0x0/0x90 [ehci_hcd]) from [<bf042940>] (ehci_irq+0x300/0x34c [ehci_hcd])
> [  238.881072]  r4:eeeced34 r3:00000001
> [  238.881134] [<bf042640>] (ehci_irq+0x0/0x34c [ehci_hcd]) from [<bf006828>] (usb_hcd_irq+0x40/0xac [usbcore])
> [  238.881195] [<bf0067e8>] (usb_hcd_irq+0x0/0xac [usbcore]) from [<c0239764>] (handle_irq_event_percpu+0xb8/0x240)
> [  238.881225]  r6:eec504e0 r5:0000006d r4:eec504e0 r3:bf0067e8
> [  238.881256] [<c02396ac>] (handle_irq_event_percpu+0x0/0x240) from [<c0239930>] (handle_irq_event+0x44/0x64)
> [  238.881256] [<c02398ec>] (handle_irq_event+0x0/0x64) from [<c023bbd0>] (handle_level_irq+0xe0/0x114)
> [  238.881286]  r6:0000006d r5:c080c14c r4:c080c100 r3:00020000
> [  238.881317] [<c023baf0>] (handle_level_irq+0x0/0x114) from [<c01ab090>] (asm_do_IRQ+0x90/0xd0)
> [  238.881317]  r5:00000000 r4:0000006d
> [  238.881347] [<c01ab000>] (asm_do_IRQ+0x0/0xd0) from [<c06624d0>] (__irq_svc+0x50/0x134)
> [  238.881378] Exception stack(0xef837e20 to 0xef837e68)
> [  238.881378] 7e20: 00000001 00185610 016cc000 c00490c0 eb380000 ef800540 00000020 00004ae0
> [  238.881408] 7e40: 00000020 bf0509f4 60000013 ef837e9c ef837e40 ef837e68 c0226f0c c0298ca0
> [  238.881408] 7e60: 20000013 ffffffff
> [  238.881408]  r5:fa240100 r4:ffffffff
> [  238.881439] [<c0298bb8>] (__kmalloc_track_caller+0x0/0x1d0) from [<c052e284>] (__alloc_skb+0x58/0xe8)
> [  238.881469] [<c052e22c>] (__alloc_skb+0x0/0xe8) from [<bf0509f4>] (rx_submit+0x2c/0x1d4 [usbnet])
> [  238.881500] [<bf0509c8>] (rx_submit+0x0/0x1d4 [usbnet]) from [<bf0513d8>] (usbnet_bh+0x1b4/0x250 [usbnet])
> [  238.881530] [<bf051224>] (usbnet_bh+0x0/0x250 [usbnet]) from [<c01f912c>] (tasklet_action+0xb0/0x1f8)
> [  238.881530]  r6:00000000 r5:ef9757f0 r4:ef9757ec r3:bf051224
> [  238.881561] [<c01f907c>] (tasklet_action+0x0/0x1f8) from [<c01f97ac>] (__do_softirq+0x140/0x290)
> [  238.881561]  r8:00000006 r7:00000101 r6:00000000 r5:c0806098 r4:00000001
> [  238.881591] r3:c01f907c
> [  238.881622] [<c01f966c>] (__do_softirq+0x0/0x290) from [<c01f99cc>] (run_ksoftirqd+0xd0/0x1f4)
> [  238.881622] [<c01f98fc>] (run_ksoftirqd+0x0/0x1f4) from [<c02113b0>] (kthread+0x90/0x98)
> [  238.881652]  r7:00000013 r6:c01f98fc r5:00000000 r4:ef831efc
> [  238.881683] [<c0211320>] (kthread+0x0/0x98) from [<c01f62f4>] (do_exit+0x0/0x374)
> [  238.881713]  r6:c01f62f4 r5:c0211320 r4:ef831efc
> [  238.881713] Mem-info:
> [  238.881744] Normal per-cpu:
> [  238.881744] CPU    0: hi:  186, btch:  31 usd:  38
> [  238.881744] CPU    1: hi:  186, btch:  31 usd: 169
> [  238.881774] HighMem per-cpu:
> [  238.881774] CPU    0: hi:   90, btch:  15 usd:  66
> [  238.881774] CPU    1: hi:   90, btch:  15 usd:  86
> [  238.881805] active_anon:544 inactive_anon:71 isolated_anon:0
> [  238.881805]  active_file:926 inactive_file:2538 isolated_file:0
> [  238.881805]  unevictable:0 dirty:10 writeback:0 unstable:0
> [  238.881805]  free:57782 slab_reclaimable:864 slab_unreclaimable:186898
> [  238.881805]  mapped:632 shmem:144 pagetables:50 bounce:0
> [  238.881835] Normal free:1328kB min:3532kB low:4412kB high:5296kB active_anon:0kB inactive_anon:0kB active_file:880kB inactive_file:848kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:780288kB mlocked:0kB dirty:36kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:3456kB slab_unreclaimable:747592kB kernel_stack:392kB pagetables:200kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
> [  238.881866] lowmem_reserve[]: 0 1904 1904
> [  238.881896] HighMem free:229800kB min:236kB low:508kB high:784kB active_anon:2176kB inactive_anon:284kB active_file:2824kB inactive_file:9304kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:243712kB mlocked:0kB dirty:4kB writeback:0kB mapped:2528kB shmem:576kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
> [  238.881927] lowmem_reserve[]: 0 0 0
> [  238.881958] Normal: 0*4kB 4*8kB 6*16kB 0*32kB 1*64kB 1*128kB 0*256kB 2*512kB 0*1024kB 0*2048kB 0*4096kB = 1344kB
> [  238.882019] HighMem: 6*4kB 2*8kB 4*16kB 4*32kB 1*64kB 1*128kB 0*256kB 2*512kB 3*1024kB 0*2048kB 55*4096kB = 229800kB
> [  238.882080] 3610 total pagecache pages
> [  238.882080] 0 pages in swap cache
> [  238.882080] Swap cache stats: add 0, delete 0, find 0/0
> [  238.882110] Free swap  = 0kB
> [  238.882110] Total swap = 0kB
> [  238.933776] 262144 pages of RAM
> [  238.933776] 58240 free pages
> [  238.933776] 10503 reserved pages
> [  238.933776] 187773 slab pages
> [  238.933807] 2475 pages shared
> [  238.933807] 0 pages swap cached
> 
> Cc: David Miller <davem@davemloft.net>
> Signed-off-by: Ming Lei <tom.leiming@gmail.com>
> ---
>  drivers/net/usb/usbnet.c |   10 +++++++---
>  1 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
> index 009bba3..9ab439d 100644
> --- a/drivers/net/usb/usbnet.c
> +++ b/drivers/net/usb/usbnet.c
> @@ -645,6 +645,7 @@ int usbnet_stop (struct net_device *net)
>  	struct driver_info	*info = dev->driver_info;
>  	int			retval;
>  
> +	clear_bit(EVENT_DEV_OPEN, &dev->flags);
>  	netif_stop_queue (net);
>  
>  	netif_info(dev, ifdown, dev->net,
> @@ -1524,9 +1525,12 @@ int usbnet_resume (struct usb_interface *intf)
>  		smp_mb();
>  		clear_bit(EVENT_DEV_ASLEEP, &dev->flags);
>  		spin_unlock_irq(&dev->txq.lock);
> -		if (!(dev->txq.qlen >= TX_QLEN(dev)))
> -			netif_start_queue(dev->net);
> -		tasklet_schedule (&dev->bh);
> +
> +		if (test_bit(EVENT_DEV_OPEN, &dev->flags)) {
> +			if (!(dev->txq.qlen >= TX_QLEN(dev)))
> +				netif_start_queue(dev->net);
> +			tasklet_schedule (&dev->bh);
> +		}
>  	}
>  	return 0;
>  }
> -- 
> 1.7.4.1
> 

^ permalink raw reply

* Re: [PATCH net-next-2.6] veth: remove unneeded ifname code from veth_newlink()
From: David Miller @ 2011-05-02 22:55 UTC (permalink / raw)
  To: jpirko; +Cc: mirqus, netdev, xemul
In-Reply-To: <20110430112817.GD2658@psychotron.orion>

From: Jiri Pirko <jpirko@redhat.com>
Date: Sat, 30 Apr 2011 13:28:17 +0200

> Fri, Apr 22, 2011 at 11:43:10AM CEST, mirqus@gmail.com wrote:
>>2011/1/24 Jiri Pirko <jpirko@redhat.com>:
>>> The code is not needed because tb[IFLA_IFNAME] is already
>>> processed in rtnl_newlink(). Remove this redundancy.
>>>
>>> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
>>
>>Hi. This patch broke creation of veth devices. Reverting it fixes the issue.
> 
> Sorry for troubles.
> 
> For net-next-2.6 this is fixed by:
> http://patchwork.ozlabs.org/patch/93498/
> 
> For net-2.6 I suggest to revert this patch:
> 
> Subject: [PATCH net-2.6] Revert: veth: remove unneeded ifname code from veth_newlink()
> 
> 84c49d8c3e4abefb0a41a77b25aa37ebe8d6b743 caused regression on veth
> creation. This patch reverts the original one.
> 
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>

Applied, with "Reported-by: " added to give credit to Michał Mirosław.

^ permalink raw reply

* Re: [PATCH] sysctl: net: call unregister_net_sysctl_table where needed
From: David Miller @ 2011-05-02 23:12 UTC (permalink / raw)
  To: lucian.grijincu; +Cc: netdev
In-Reply-To: <BANLkTi=0-2aHDBtY2P794upF9brrW48aNA@mail.gmail.com>

From: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>
Date: Sun, 1 May 2011 13:48:04 +0200

> On Sun, May 1, 2011 at 1:44 PM, Lucian Adrian Grijincu
> <lucian.grijincu@gmail.com> wrote:
>> ctl_table_headers registered with register_net_sysctl_table should
>> have been unregistered with the equivalent unregister_net_sysctl_table
>>
>> Signed-off-by: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>
> 
> 
> David: I sent you this patch a while back but it was mixed with other
> unrelated patches that were mostly ignored.
> 
> Again, to clarify: it does not matter at the moment if
> register_net_sysctl_table or unregister_sysctl_table is called because
> both to the same thing:
 ...
> We should either get rid of unregister_net_sysctl_table or use it consistently.

Applied to net-2.6, thanks Lucian.

^ permalink raw reply

* [net-next-2.6 PATCH] ethtool: Support to take FW dump
From: anirban.chakraborty @ 2011-05-02 23:29 UTC (permalink / raw)
  To: netdev; +Cc: --no-chain-reply-to, bhutchings, davem, Anirban Chakraborty
In-Reply-To: <1304378957-24123-1-git-send-email-anirban.chakraborty@qlogic.com>

From: Anirban Chakraborty <anirban.chakraborty@qlogic.com>

Added code to take FW dump via ethtool. A pair of set and get functions are
added to configure dump level and fetch it from the driver respectively. A
third function is added to retrieve the dumped FW data from the driver.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
---
 include/linux/ethtool.h |   20 ++++++++++++
 net/core/ethtool.c      |   76 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 96 insertions(+), 0 deletions(-)

diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 9de3127..3dd91a5 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -595,6 +595,19 @@ struct ethtool_flash {
 	char	data[ETHTOOL_FLASH_MAX_FILENAME];
 };
 
+/**
+ * struct ethtool_dump - used for retrieving, setting device dump
+ * @flag: flag for dump setting
+ * @len: length of dump data
+ * @data: data collected for this command
+ */
+struct ethtool_dump {
+	__u32	cmd;
+	__u32	flag;
+	__u32	len;
+	u8	data[0];
+};
+
 /* for returning and changing feature sets */
 
 /**
@@ -926,6 +939,10 @@ struct ethtool_ops {
 				  const struct ethtool_rxfh_indir *);
 	void	(*get_channels)(struct net_device *, struct ethtool_channels *);
 	int	(*set_channels)(struct net_device *, struct ethtool_channels *);
+	int	(*set_dump)(struct net_device *, struct ethtool_dump *);
+	int	(*get_dump)(struct net_device *, struct ethtool_dump *);
+	int	(*get_dump_data)(struct net_device *,
+				struct ethtool_dump *, void *);
 
 };
 #endif /* __KERNEL__ */
@@ -997,6 +1014,9 @@ struct ethtool_ops {
 #define ETHTOOL_SFEATURES	0x0000003b /* Change device offload settings */
 #define ETHTOOL_GCHANNELS	0x0000003c /* Get no of channels */
 #define ETHTOOL_SCHANNELS	0x0000003d /* Set no of channels */
+#define ETHTOOL_SET_DUMP	0x0000003e /* Set dump settings */
+#define ETHTOOL_GET_DUMP	0x0000003f /* Get dump settings */
+#define ETHTOOL_GET_DUMP_DATA	0x00000040 /* Get dump data */
 
 /* compatibility with older code */
 #define SPARC_ETH_GSET		ETHTOOL_GSET
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index d8b1a8d..dce547c 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -1827,6 +1827,73 @@ static noinline_for_stack int ethtool_flash_device(struct net_device *dev,
 	return dev->ethtool_ops->flash_device(dev, &efl);
 }
 
+static int ethtool_set_dump(struct net_device *dev,
+			void __user *useraddr)
+{
+	struct ethtool_dump dump;
+
+	if (!dev->ethtool_ops->set_dump)
+		return -EOPNOTSUPP;
+
+	if (copy_from_user(&dump, useraddr, sizeof(dump)))
+		return -EFAULT;
+
+	return dev->ethtool_ops->set_dump(dev, &dump);
+}
+
+static int ethtool_get_dump(struct net_device *dev,
+			void __user *useraddr)
+{
+	struct ethtool_dump dump;
+	const struct ethtool_ops *ops = dev->ethtool_ops;
+
+	if (!dev->ethtool_ops->get_dump)
+		return -EOPNOTSUPP;
+
+	if (copy_from_user(&dump, useraddr, sizeof(dump)))
+		return -EFAULT;
+
+	if (ops->get_dump(dev, &dump))
+		return -EFAULT;
+
+	if (copy_to_user(useraddr, &dump, sizeof(dump)))
+		return -EFAULT;
+	return 0;
+}
+
+static int ethtool_get_dump_data(struct net_device *dev,
+				void __user *useraddr)
+{
+	int ret;
+	void *data;
+	struct ethtool_dump dump;
+	const struct ethtool_ops *ops = dev->ethtool_ops;
+
+	if (!dev->ethtool_ops->get_dump_data)
+		return -EOPNOTSUPP;
+
+	if (copy_from_user(&dump, useraddr, sizeof(dump)))
+		return -EFAULT;
+	data = vzalloc(dump.len);
+	if (!data)
+		return -ENOMEM;
+	ret = ops->get_dump_data(dev, &dump, data);
+	if (ret) {
+		ret = -EFAULT;
+		goto out;
+	}
+	if (copy_to_user(useraddr, &dump, sizeof(dump))) {
+		ret = -EFAULT;
+		goto out;
+	}
+	useraddr += offsetof(struct ethtool_dump, data);
+	if (copy_to_user(useraddr, data, dump.len))
+		ret = -EFAULT;
+out:
+	vfree(data);
+	return ret;
+}
+
 /* The main entry point in this file.  Called from net/core/dev.c */
 
 int dev_ethtool(struct net *net, struct ifreq *ifr)
@@ -2043,6 +2110,15 @@ int dev_ethtool(struct net *net, struct ifreq *ifr)
 	case ETHTOOL_SCHANNELS:
 		rc = ethtool_set_channels(dev, useraddr);
 		break;
+	case ETHTOOL_SET_DUMP:
+		rc = ethtool_set_dump(dev, useraddr);
+		break;
+	case ETHTOOL_GET_DUMP:
+		rc = ethtool_get_dump(dev, useraddr);
+		break;
+	case ETHTOOL_GET_DUMP_DATA:
+		rc = ethtool_get_dump_data(dev, useraddr);
+		break;
 	default:
 		rc = -EOPNOTSUPP;
 	}
-- 
1.7.4.1


^ permalink raw reply related

* [ethtool PATCH] FW dump support
From: anirban.chakraborty @ 2011-05-02 23:29 UTC (permalink / raw)
  To: netdev; +Cc: --no-chain-reply-to, bhutchings, davem, Anirban Chakraborty

From: Anirban Chakraborty <anirban.chakraborty@qlogic.com>

Added support to take FW dump via ethtool.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
---
 ethtool-copy.h |   17 ++++++++-
 ethtool.c      |  113 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 127 insertions(+), 3 deletions(-)

diff --git a/ethtool-copy.h b/ethtool-copy.h
index 5b45442..0c0e847 100644
--- a/ethtool-copy.h
+++ b/ethtool-copy.h
@@ -76,6 +76,19 @@ struct ethtool_drvinfo {
 	__u32	regdump_len;	/* Size of data from ETHTOOL_GREGS (bytes) */
 };
 
+/* dump struct
+ * cmd: commnad to identify type of operation
+ * flag: specify dump related options
+ * len: length of dumped data
+ * data: dump data
+ */
+struct ethtool_dump {
+	__u32	cmd;
+	__u32	flag;
+	__u32	len;
+	__u8	data[0];
+};
+
 #define SOPASS_MAX	6
 /* wake-on-lan settings */
 struct ethtool_wolinfo {
@@ -538,7 +551,6 @@ struct ethtool_flash {
 	char	data[ETHTOOL_FLASH_MAX_FILENAME];
 };
 
-
 /* CMDs currently supported */
 #define ETHTOOL_GSET		0x00000001 /* Get settings. */
 #define ETHTOOL_SSET		0x00000002 /* Set settings. */
@@ -599,6 +611,9 @@ struct ethtool_flash {
 #define ETHTOOL_GSSET_INFO	0x00000037 /* Get string set info */
 #define ETHTOOL_GRXFHINDIR	0x00000038 /* Get RX flow hash indir'n table */
 #define ETHTOOL_SRXFHINDIR	0x00000039 /* Set RX flow hash indir'n table */
+#define ETHTOOL_SET_DUMP	0x0000003e /* Set dump settings */
+#define ETHTOOL_GET_DUMP	0x0000003f /* Get dump settings */
+#define ETHTOOL_GET_DUMP_DATA	0x00000040 /* Get dump data */
 
 /* compatibility with older code */
 #define SPARC_ETH_GSET		ETHTOOL_GSET
diff --git a/ethtool.c b/ethtool.c
index cfdac65..1a826ae 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -28,6 +28,7 @@
 #include <sys/types.h>
 #include <string.h>
 #include <stdlib.h>
+#include <stddef.h>
 #include <sys/types.h>
 #include <sys/ioctl.h>
 #include <sys/stat.h>
@@ -110,6 +111,9 @@ static int do_srxntuple(int fd, struct ifreq *ifr);
 static int do_grxntuple(int fd, struct ifreq *ifr);
 static int do_flash(int fd, struct ifreq *ifr);
 static int do_permaddr(int fd, struct ifreq *ifr);
+static int do_getdump(int fd, struct ifreq *ifr);
+static int do_getdumpdata(int fd, struct ifreq *ifr);
+static int do_setdump(int fd, struct ifreq *ifr);
 
 static int send_ioctl(int fd, struct ifreq *ifr);
 
@@ -142,6 +146,9 @@ static enum {
 	MODE_GNTUPLE,
 	MODE_FLASHDEV,
 	MODE_PERMADDR,
+	MODE_SET_DUMP,
+	MODE_GET_DUMP,
+	MODE_GET_DUMP_DATA,
 } mode = MODE_GSET;
 
 static struct option {
@@ -263,6 +270,12 @@ static struct option {
 		"Get Rx ntuple filters and actions\n" },
     { "-P", "--show-permaddr", MODE_PERMADDR,
 		"Show permanent hardware address" },
+    { "-W", "--get-dump", MODE_GET_DUMP,
+		"Get dump level\n" },
+    { "-Wd", "--get-dump-data", MODE_GET_DUMP_DATA,
+		"Get dump data", "FILENAME " "Name of the dump file\n" },
+    { "-w", "--set-dump", MODE_SET_DUMP,
+		"Set dump level", "DUMPLEVEL " "Dump level for the device\n" },
     { "-h", "--help", MODE_HELP, "Show this help" },
     { NULL, "--version", MODE_VERSION, "Show version number" },
     {}
@@ -413,6 +426,8 @@ static int flash_region = -1;
 static int msglvl_changed;
 static u32 msglvl_wanted = 0;
 static u32 msglvl_mask = 0;
+static u32 dump_flag;
+static char *dump_file = NULL;
 
 static enum {
 	ONLINE=0,
@@ -852,7 +867,10 @@ static void parse_cmdline(int argc, char **argp)
 			    (mode == MODE_GNTUPLE) ||
 			    (mode == MODE_PHYS_ID) ||
 			    (mode == MODE_FLASHDEV) ||
-			    (mode == MODE_PERMADDR)) {
+			    (mode == MODE_PERMADDR) ||
+			    (mode == MODE_SET_DUMP) ||
+			    (mode == MODE_GET_DUMP_DATA) ||
+			    (mode == MODE_GET_DUMP)) {
 				devname = argp[i];
 				break;
 			}
@@ -874,6 +892,12 @@ static void parse_cmdline(int argc, char **argp)
 				flash_file = argp[i];
 				flash = 1;
 				break;
+			} else if (mode == MODE_SET_DUMP) {
+				dump_flag = get_u32(argp[i], 0);
+				break;
+			} else if (mode == MODE_GET_DUMP_DATA) {
+				dump_file = argp[i];
+				break;
 			}
 			/* fallthrough */
 		default:
@@ -2042,6 +2066,12 @@ static int doit(void)
 		return do_flash(fd, &ifr);
 	} else if (mode == MODE_PERMADDR) {
 		return do_permaddr(fd, &ifr);
+	} else if (mode == MODE_GET_DUMP_DATA) {
+		return do_getdumpdata(fd, &ifr);
+	} else if (mode == MODE_GET_DUMP) {
+		return do_getdump(fd, &ifr);
+	} else if (mode == MODE_SET_DUMP) {
+		return do_setdump(fd, &ifr);
 	}
 
 	return 69;
@@ -2679,7 +2709,6 @@ static int do_gregs(int fd, struct ifreq *ifr)
 		perror("Cannot get driver information");
 		return 72;
 	}
-
 	regs = calloc(1, sizeof(*regs)+drvinfo.regdump_len);
 	if (!regs) {
 		perror("Cannot allocate memory for register dump");
@@ -3241,6 +3270,86 @@ static int do_grxntuple(int fd, struct ifreq *ifr)
 	return 0;
 }
 
+static void do_writedump(struct ethtool_dump *dump)
+{
+	FILE *f = fopen(dump_file, "wb+");
+	size_t bytes;
+
+	if (!f ) {
+		fprintf(stderr, "Can't open file %s: %s\n",
+			dump_file, strerror(errno));
+		return;
+	}
+
+	bytes = fwrite(dump->data, 1, dump->len, f);
+	fclose(f);
+}
+
+static int do_getdump(int fd, struct ifreq *ifr)
+{
+	struct ethtool_dump ddata;
+	int err;
+
+	ddata.cmd = ETHTOOL_GET_DUMP;
+	ifr->ifr_data = (caddr_t) &ddata;
+	err = send_ioctl(fd, ifr);
+	if (err < 0) {
+		perror("Can not get dump flag");
+		return 74;
+	}
+	fprintf(stdout, "Dump flag: 0x%x\n", ddata.flag);
+	return 0;
+}
+
+static int do_getdumpdata(int fd, struct ifreq *ifr)
+{
+	int err;
+	struct ethtool_dump edata;
+	struct ethtool_dump *data;
+
+	edata.cmd = ETHTOOL_GET_DUMP;
+
+	ifr->ifr_data = (caddr_t) &edata;
+	err = send_ioctl(fd, ifr);
+	if (err < 0) {
+		perror("Can not get dump level");
+		return 74;
+	}
+	data = calloc(1, offsetof(struct ethtool_dump, data)+edata.len);
+	if (!data) {
+		perror("Can not allocate enough memory");
+		return 0;
+	}
+	data->cmd = ETHTOOL_GET_DUMP_DATA;
+	data->len = edata.len;
+	ifr->ifr_data = (caddr_t) data;
+	err = send_ioctl(fd, ifr);
+	if (err < 0) {
+		perror("Can not get dump data\n");
+		goto free;
+	}
+	do_writedump(data);
+free:
+	free(data);
+	return 0;
+}
+
+static int do_setdump(int fd, struct ifreq *ifr)
+{
+	int err;
+	struct ethtool_dump dump;
+
+	dump.cmd = ETHTOOL_SET_DUMP;
+	dump.flag = dump_flag;
+	ifr->ifr_data = (caddr_t)&dump;
+	err = send_ioctl(fd, ifr);
+	if (err < 0) {
+		perror("Can not set dump level");
+		return 74;
+	}
+	return 0;
+}
+
 static int send_ioctl(int fd, struct ifreq *ifr)
 {
 	return ioctl(fd, SIOCETHTOOL, ifr);
-- 
1.7.4.1


^ permalink raw reply related

* [PATCH 0/2] libertas: cleanup logging styles
From: Joe Perches @ 2011-05-02 23:49 UTC (permalink / raw)
  To: Dan Williams, libertas-dev
  Cc: John W. Linville, linux-wireless, netdev, linux-kernel

Joe Perches (2):
  libertas: Convert lbs_pr_<level> to pr_<level>
  libertas: Use netdev_<level> or dev_<level> where possible

Compiled but otherwise untested.

 drivers/net/wireless/libertas/cfg.c     |   16 +++---
 drivers/net/wireless/libertas/cmd.c     |   40 +++++++++------
 drivers/net/wireless/libertas/cmdresp.c |   27 ++++++----
 drivers/net/wireless/libertas/debugfs.c |    5 +-
 drivers/net/wireless/libertas/defs.h    |    7 ---
 drivers/net/wireless/libertas/if_cs.c   |   57 ++++++++++++---------
 drivers/net/wireless/libertas/if_sdio.c |   37 +++++++-------
 drivers/net/wireless/libertas/if_spi.c  |   83 +++++++++++++++++--------------
 drivers/net/wireless/libertas/if_usb.c  |   44 +++++++++-------
 drivers/net/wireless/libertas/main.c    |   42 +++++++++-------
 drivers/net/wireless/libertas/mesh.c    |    8 ++-
 drivers/net/wireless/libertas/rx.c      |    7 ++-
 12 files changed, 206 insertions(+), 167 deletions(-)

-- 
1.7.5.rc3.dirty

^ permalink raw reply

* [PATCH 1/2] libertas: Convert lbs_pr_<level> to pr_<level>
From: Joe Perches @ 2011-05-02 23:49 UTC (permalink / raw)
  To: Dan Williams
  Cc: John W. Linville, libertas-dev, linux-wireless, netdev,
	linux-kernel
In-Reply-To: <cover.1304379925.git.joe@perches.com>

Use the standard pr_<level> functions eases grep a bit.

Added a few missing terminating newlines to messages.
Coalesced long formats.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/libertas/cfg.c     |   15 +++---
 drivers/net/wireless/libertas/cmd.c     |   36 +++++++-------
 drivers/net/wireless/libertas/cmdresp.c |   29 +++++++-----
 drivers/net/wireless/libertas/debugfs.c |    6 ++-
 drivers/net/wireless/libertas/defs.h    |    7 ---
 drivers/net/wireless/libertas/if_cs.c   |   52 +++++++++++----------
 drivers/net/wireless/libertas/if_sdio.c |   38 ++++++++--------
 drivers/net/wireless/libertas/if_spi.c  |   74 ++++++++++++++-----------------
 drivers/net/wireless/libertas/if_usb.c  |   41 +++++++++--------
 drivers/net/wireless/libertas/main.c    |   33 +++++++-------
 drivers/net/wireless/libertas/mesh.c    |    8 ++-
 drivers/net/wireless/libertas/rx.c      |    7 ++-
 12 files changed, 174 insertions(+), 172 deletions(-)

diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index 5caa2ac..d6e0656 100644
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@ -6,6 +6,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/sched.h>
 #include <linux/wait.h>
 #include <linux/slab.h>
@@ -1314,8 +1316,7 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev,
 		sme->ssid, sme->ssid_len,
 		WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
 	if (!bss) {
-		lbs_pr_err("assoc: bss %pM not in scan results\n",
-			   sme->bssid);
+		pr_err("assoc: bss %pM not in scan results\n", sme->bssid);
 		ret = -ENOENT;
 		goto done;
 	}
@@ -1372,8 +1373,8 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev,
 		lbs_enable_rsn(priv, sme->crypto.cipher_group != 0);
 		break;
 	default:
-		lbs_pr_err("unsupported cipher group 0x%x\n",
-			   sme->crypto.cipher_group);
+		pr_err("unsupported cipher group 0x%x\n",
+		       sme->crypto.cipher_group);
 		ret = -ENOTSUPP;
 		goto done;
 	}
@@ -1491,7 +1492,7 @@ static int lbs_cfg_add_key(struct wiphy *wiphy, struct net_device *netdev,
 				     params->key, params->key_len);
 		break;
 	default:
-		lbs_pr_err("unhandled cipher 0x%x\n", params->cipher);
+		pr_err("unhandled cipher 0x%x\n", params->cipher);
 		ret = -ENOTSUPP;
 		break;
 	}
@@ -2118,13 +2119,13 @@ int lbs_cfg_register(struct lbs_private *priv)
 
 	ret = wiphy_register(wdev->wiphy);
 	if (ret < 0)
-		lbs_pr_err("cannot register wiphy device\n");
+		pr_err("cannot register wiphy device\n");
 
 	priv->wiphy_registered = true;
 
 	ret = register_netdev(priv->dev);
 	if (ret)
-		lbs_pr_err("cannot register network device\n");
+		pr_err("cannot register network device\n");
 
 	INIT_DELAYED_WORK(&priv->scan_work, lbs_scan_worker);
 
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 7e8a658..10ca485 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -3,6 +3,8 @@
   * It prepares command and sends it to firmware when it is ready.
   */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/kfifo.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
@@ -108,7 +110,7 @@ int lbs_update_hw_spec(struct lbs_private *priv)
 	 * CF card    firmware 5.0.16p0:   cap 0x00000303
 	 * USB dongle firmware 5.110.17p2: cap 0x00000303
 	 */
-	lbs_pr_info("%pM, fw %u.%u.%up%u, cap 0x%08x\n",
+	pr_info("%pM, fw %u.%u.%up%u, cap 0x%08x\n",
 		cmd.permanentaddr,
 		priv->fwrelease >> 24 & 0xff,
 		priv->fwrelease >> 16 & 0xff,
@@ -139,7 +141,7 @@ int lbs_update_hw_spec(struct lbs_private *priv)
 	/* if it's unidentified region code, use the default (USA) */
 	if (i >= MRVDRV_MAX_REGION_CODE) {
 		priv->regioncode = 0x10;
-		lbs_pr_info("unidentified region code; using the default (USA)\n");
+		pr_info("unidentified region code; using the default (USA)\n");
 	}
 
 	if (priv->current_addr[0] == 0xff)
@@ -209,7 +211,7 @@ int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria,
 					(uint8_t *)&cmd_config.wol_conf,
 					sizeof(struct wol_config));
 	} else {
-		lbs_pr_info("HOST_SLEEP_CFG failed %d\n", ret);
+		pr_info("HOST_SLEEP_CFG failed %d\n", ret);
 	}
 
 	return ret;
@@ -312,7 +314,7 @@ static int lbs_wait_for_ds_awake(struct lbs_private *priv)
 	if (priv->is_deep_sleep) {
 		if (!wait_event_interruptible_timeout(priv->ds_awake_q,
 					!priv->is_deep_sleep, (10 * HZ))) {
-			lbs_pr_err("ds_awake_q: timer expired\n");
+			pr_err("ds_awake_q: timer expired\n");
 			ret = -1;
 		}
 	}
@@ -337,7 +339,7 @@ int lbs_set_deep_sleep(struct lbs_private *priv, int deep_sleep)
 				netif_carrier_off(priv->dev);
 			}
 		} else {
-			lbs_pr_err("deep sleep: already enabled\n");
+			pr_err("deep sleep: already enabled\n");
 		}
 	} else {
 		if (priv->is_deep_sleep) {
@@ -347,8 +349,7 @@ int lbs_set_deep_sleep(struct lbs_private *priv, int deep_sleep)
 			if (!ret) {
 				ret = lbs_wait_for_ds_awake(priv);
 				if (ret)
-					lbs_pr_err("deep sleep: wakeup"
-							"failed\n");
+					pr_err("deep sleep: wakeup failed\n");
 			}
 		}
 	}
@@ -382,8 +383,8 @@ int lbs_set_host_sleep(struct lbs_private *priv, int host_sleep)
 			ret = lbs_host_sleep_cfg(priv, priv->wol_criteria,
 					(struct wol_config *)NULL);
 			if (ret) {
-				lbs_pr_info("Host sleep configuration failed: "
-						"%d\n", ret);
+				pr_info("Host sleep configuration failed: %d\n",
+					ret);
 				return ret;
 			}
 			if (priv->psstate == PS_STATE_FULL_POWER) {
@@ -393,19 +394,19 @@ int lbs_set_host_sleep(struct lbs_private *priv, int host_sleep)
 						sizeof(cmd),
 						lbs_ret_host_sleep_activate, 0);
 				if (ret)
-					lbs_pr_info("HOST_SLEEP_ACTIVATE "
-							"failed: %d\n", ret);
+					pr_info("HOST_SLEEP_ACTIVATE failed: %d\n",
+						ret);
 			}
 
 			if (!wait_event_interruptible_timeout(
 						priv->host_sleep_q,
 						priv->is_host_sleep_activated,
 						(10 * HZ))) {
-				lbs_pr_err("host_sleep_q: timer expired\n");
+				pr_err("host_sleep_q: timer expired\n");
 				ret = -1;
 			}
 		} else {
-			lbs_pr_err("host sleep: already enabled\n");
+			pr_err("host sleep: already enabled\n");
 		}
 	} else {
 		if (priv->is_host_sleep_activated)
@@ -1002,7 +1003,7 @@ static void lbs_submit_command(struct lbs_private *priv,
 	ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) cmd, cmdsize);
 
 	if (ret) {
-		lbs_pr_info("DNLD_CMD: hw_host_to_card failed: %d\n", ret);
+		pr_info("DNLD_CMD: hw_host_to_card failed: %d\n", ret);
 		/* Let the timer kick in and retry, and potentially reset
 		   the whole thing if the condition persists */
 		timeo = HZ/4;
@@ -1267,7 +1268,7 @@ int lbs_execute_next_command(struct lbs_private *priv)
 	spin_lock_irqsave(&priv->driver_lock, flags);
 
 	if (priv->cur_cmd) {
-		lbs_pr_alert( "EXEC_NEXT_CMD: already processing command!\n");
+		pr_alert( "EXEC_NEXT_CMD: already processing command!\n");
 		spin_unlock_irqrestore(&priv->driver_lock, flags);
 		ret = -1;
 		goto done;
@@ -1429,7 +1430,7 @@ static void lbs_send_confirmsleep(struct lbs_private *priv)
 	ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) &confirm_sleep,
 		sizeof(confirm_sleep));
 	if (ret) {
-		lbs_pr_alert("confirm_sleep failed\n");
+		pr_alert("confirm_sleep failed\n");
 		goto out;
 	}
 
@@ -1655,8 +1656,7 @@ int __lbs_cmd(struct lbs_private *priv, uint16_t command,
 	spin_lock_irqsave(&priv->driver_lock, flags);
 	ret = cmdnode->result;
 	if (ret)
-		lbs_pr_info("PREP_CMD: command 0x%04x failed: %d\n",
-			    command, ret);
+		pr_info("PREP_CMD: command 0x%04x failed: %d\n", command, ret);
 
 	__lbs_cleanup_and_insert_cmd(priv, cmdnode);
 	spin_unlock_irqrestore(&priv->driver_lock, flags);
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index 5e95da9..2cb6f5f 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -2,6 +2,9 @@
   * This file contains the handling of command
   * responses as well as events generated by firmware.
   */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/sched.h>
@@ -84,15 +87,17 @@ int lbs_process_command_response(struct lbs_private *priv, u8 *data, u32 len)
 	lbs_deb_hex(LBS_DEB_CMD, "CMD_RESP", (void *) resp, len);
 
 	if (resp->seqnum != priv->cur_cmd->cmdbuf->seqnum) {
-		lbs_pr_info("Received CMD_RESP with invalid sequence %d (expected %d)\n",
-			    le16_to_cpu(resp->seqnum), le16_to_cpu(priv->cur_cmd->cmdbuf->seqnum));
+		pr_info("Received CMD_RESP with invalid sequence %d (expected %d)\n",
+			le16_to_cpu(resp->seqnum),
+			le16_to_cpu(priv->cur_cmd->cmdbuf->seqnum));
 		spin_unlock_irqrestore(&priv->driver_lock, flags);
 		ret = -1;
 		goto done;
 	}
 	if (respcmd != CMD_RET(curcmd) &&
 	    respcmd != CMD_RET_802_11_ASSOCIATE && curcmd != CMD_802_11_ASSOCIATE) {
-		lbs_pr_info("Invalid CMD_RESP %x to command %x!\n", respcmd, curcmd);
+		pr_info("Invalid CMD_RESP %x to command %x!\n",
+			respcmd, curcmd);
 		spin_unlock_irqrestore(&priv->driver_lock, flags);
 		ret = -1;
 		goto done;
@@ -101,8 +106,8 @@ int lbs_process_command_response(struct lbs_private *priv, u8 *data, u32 len)
 	if (resp->result == cpu_to_le16(0x0004)) {
 		/* 0x0004 means -EAGAIN. Drop the response, let it time out
 		   and be resubmitted */
-		lbs_pr_info("Firmware returns DEFER to command %x. Will let it time out...\n",
-			    le16_to_cpu(resp->command));
+		pr_info("Firmware returns DEFER to command %x. Will let it time out...\n",
+			le16_to_cpu(resp->command));
 		spin_unlock_irqrestore(&priv->driver_lock, flags);
 		ret = -1;
 		goto done;
@@ -313,28 +318,28 @@ int lbs_process_event(struct lbs_private *priv, u32 event)
 		lbs_deb_cmd("EVENT: ADHOC beacon lost\n");
 		break;
 	case MACREG_INT_CODE_RSSI_LOW:
-		lbs_pr_alert("EVENT: rssi low\n");
+		pr_alert("EVENT: rssi low\n");
 		break;
 	case MACREG_INT_CODE_SNR_LOW:
-		lbs_pr_alert("EVENT: snr low\n");
+		pr_alert("EVENT: snr low\n");
 		break;
 	case MACREG_INT_CODE_MAX_FAIL:
-		lbs_pr_alert("EVENT: max fail\n");
+		pr_alert("EVENT: max fail\n");
 		break;
 	case MACREG_INT_CODE_RSSI_HIGH:
-		lbs_pr_alert("EVENT: rssi high\n");
+		pr_alert("EVENT: rssi high\n");
 		break;
 	case MACREG_INT_CODE_SNR_HIGH:
-		lbs_pr_alert("EVENT: snr high\n");
+		pr_alert("EVENT: snr high\n");
 		break;
 
 	case MACREG_INT_CODE_MESH_AUTO_STARTED:
 		/* Ignore spurious autostart events */
-		lbs_pr_info("EVENT: MESH_AUTO_STARTED (ignoring)\n");
+		pr_info("EVENT: MESH_AUTO_STARTED (ignoring)\n");
 		break;
 
 	default:
-		lbs_pr_alert("EVENT: unknown event id %d\n", event);
+		pr_alert("EVENT: unknown event id %d\n", event);
 		break;
 	}
 
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c
index fbf3b033..c179094 100644
--- a/drivers/net/wireless/libertas/debugfs.c
+++ b/drivers/net/wireless/libertas/debugfs.c
@@ -1,3 +1,5 @@
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/dcache.h>
 #include <linux/debugfs.h>
 #include <linux/delay.h>
@@ -151,13 +153,13 @@ static ssize_t lbs_host_sleep_write(struct file *file,
 		ret = lbs_set_host_sleep(priv, 0);
 	else if (host_sleep == 1) {
 		if (priv->wol_criteria == EHS_REMOVE_WAKEUP) {
-			lbs_pr_info("wake parameters not configured");
+			pr_info("wake parameters not configured\n");
 			ret = -EINVAL;
 			goto out_unlock;
 		}
 		ret = lbs_set_host_sleep(priv, 1);
 	} else {
-		lbs_pr_err("invalid option\n");
+		pr_err("invalid option\n");
 		ret = -EINVAL;
 	}
 
diff --git a/drivers/net/wireless/libertas/defs.h b/drivers/net/wireless/libertas/defs.h
index d00c728..c9b89b0 100644
--- a/drivers/net/wireless/libertas/defs.h
+++ b/drivers/net/wireless/libertas/defs.h
@@ -89,13 +89,6 @@ do { if ((lbs_debug & (grp)) == (grp)) \
 #define lbs_deb_spi(fmt, args...)       LBS_DEB_LL(LBS_DEB_SPI, " spi", fmt, ##args)
 #define lbs_deb_cfg80211(fmt, args...)  LBS_DEB_LL(LBS_DEB_CFG80211, " cfg80211", fmt, ##args)
 
-#define lbs_pr_info(format, args...) \
-	printk(KERN_INFO DRV_NAME": " format, ## args)
-#define lbs_pr_err(format, args...) \
-	printk(KERN_ERR DRV_NAME": " format, ## args)
-#define lbs_pr_alert(format, args...) \
-	printk(KERN_ALERT DRV_NAME": " format, ## args)
-
 #ifdef DEBUG
 static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, int len)
 {
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index 8712cb2..eb88d9a 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -21,6 +21,8 @@
 
 */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
@@ -361,7 +363,7 @@ static int if_cs_send_cmd(struct lbs_private *priv, u8 *buf, u16 nb)
 		if (status & IF_CS_BIT_COMMAND)
 			break;
 		if (++loops > 100) {
-			lbs_pr_err("card not ready for commands\n");
+			pr_err("card not ready for commands\n");
 			goto done;
 		}
 		mdelay(1);
@@ -431,14 +433,14 @@ static int if_cs_receive_cmdres(struct lbs_private *priv, u8 *data, u32 *len)
 	/* is hardware ready? */
 	status = if_cs_read16(priv->card, IF_CS_CARD_STATUS);
 	if ((status & IF_CS_BIT_RESP) == 0) {
-		lbs_pr_err("no cmd response in card\n");
+		pr_err("no cmd response in card\n");
 		*len = 0;
 		goto out;
 	}
 
 	*len = if_cs_read16(priv->card, IF_CS_RESP_LEN);
 	if ((*len == 0) || (*len > LBS_CMD_BUFFER_SIZE)) {
-		lbs_pr_err("card cmd buffer has invalid # of bytes (%d)\n", *len);
+		pr_err("card cmd buffer has invalid # of bytes (%d)\n", *len);
 		goto out;
 	}
 
@@ -472,7 +474,7 @@ static struct sk_buff *if_cs_receive_data(struct lbs_private *priv)
 
 	len = if_cs_read16(priv->card, IF_CS_READ_LEN);
 	if (len == 0 || len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) {
-		lbs_pr_err("card data buffer has invalid # of bytes (%d)\n", len);
+		pr_err("card data buffer has invalid # of bytes (%d)\n", len);
 		priv->dev->stats.rx_dropped++;
 		goto dat_err;
 	}
@@ -644,8 +646,8 @@ static int if_cs_prog_helper(struct if_cs_card *card, const struct firmware *fw)
 		ret = if_cs_poll_while_fw_download(card, IF_CS_CARD_STATUS,
 			IF_CS_BIT_COMMAND);
 		if (ret < 0) {
-			lbs_pr_err("can't download helper at 0x%x, ret %d\n",
-				sent, ret);
+			pr_err("can't download helper at 0x%x, ret %d\n",
+			       sent, ret);
 			goto done;
 		}
 
@@ -675,7 +677,7 @@ static int if_cs_prog_real(struct if_cs_card *card, const struct firmware *fw)
 	ret = if_cs_poll_while_fw_download(card, IF_CS_SQ_READ_LOW,
 		IF_CS_SQ_HELPER_OK);
 	if (ret < 0) {
-		lbs_pr_err("helper firmware doesn't answer\n");
+		pr_err("helper firmware doesn't answer\n");
 		goto done;
 	}
 
@@ -683,13 +685,13 @@ static int if_cs_prog_real(struct if_cs_card *card, const struct firmware *fw)
 		len = if_cs_read16(card, IF_CS_SQ_READ_LOW);
 		if (len & 1) {
 			retry++;
-			lbs_pr_info("odd, need to retry this firmware block\n");
+			pr_info("odd, need to retry this firmware block\n");
 		} else {
 			retry = 0;
 		}
 
 		if (retry > 20) {
-			lbs_pr_err("could not download firmware\n");
+			pr_err("could not download firmware\n");
 			ret = -ENODEV;
 			goto done;
 		}
@@ -709,14 +711,14 @@ static int if_cs_prog_real(struct if_cs_card *card, const struct firmware *fw)
 		ret = if_cs_poll_while_fw_download(card, IF_CS_CARD_STATUS,
 			IF_CS_BIT_COMMAND);
 		if (ret < 0) {
-			lbs_pr_err("can't download firmware at 0x%x\n", sent);
+			pr_err("can't download firmware at 0x%x\n", sent);
 			goto done;
 		}
 	}
 
 	ret = if_cs_poll_while_fw_download(card, IF_CS_SCRATCH, 0x5a);
 	if (ret < 0)
-		lbs_pr_err("firmware download failed\n");
+		pr_err("firmware download failed\n");
 
 done:
 	lbs_deb_leave_args(LBS_DEB_CS, "ret %d", ret);
@@ -750,7 +752,7 @@ static int if_cs_host_to_card(struct lbs_private *priv,
 		ret = if_cs_send_cmd(priv, buf, nb);
 		break;
 	default:
-		lbs_pr_err("%s: unsupported type %d\n", __func__, type);
+		pr_err("%s: unsupported type %d\n", __func__, type);
 	}
 
 	lbs_deb_leave_args(LBS_DEB_CS, "ret %d", ret);
@@ -779,7 +781,7 @@ static int if_cs_ioprobe(struct pcmcia_device *p_dev, void *priv_data)
 	p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
 
 	if (p_dev->resource[1]->end) {
-		lbs_pr_err("wrong CIS (check number of IO windows)\n");
+		pr_err("wrong CIS (check number of IO windows)\n");
 		return -ENODEV;
 	}
 
@@ -800,7 +802,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
 
 	card = kzalloc(sizeof(struct if_cs_card), GFP_KERNEL);
 	if (!card) {
-		lbs_pr_err("error in kzalloc\n");
+		pr_err("error in kzalloc\n");
 		goto out;
 	}
 	card->p_dev = p_dev;
@@ -809,7 +811,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
 	p_dev->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO;
 
 	if (pcmcia_loop_config(p_dev, if_cs_ioprobe, NULL)) {
-		lbs_pr_err("error in pcmcia_loop_config\n");
+		pr_err("error in pcmcia_loop_config\n");
 		goto out1;
 	}
 
@@ -825,14 +827,14 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
 	card->iobase = ioport_map(p_dev->resource[0]->start,
 				resource_size(p_dev->resource[0]));
 	if (!card->iobase) {
-		lbs_pr_err("error in ioport_map\n");
+		pr_err("error in ioport_map\n");
 		ret = -EIO;
 		goto out1;
 	}
 
 	ret = pcmcia_enable_device(p_dev);
 	if (ret) {
-		lbs_pr_err("error in pcmcia_enable_device\n");
+		pr_err("error in pcmcia_enable_device\n");
 		goto out2;
 	}
 
@@ -847,8 +849,8 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
 
 	card->model = get_model(p_dev->manf_id, p_dev->card_id);
 	if (card->model == MODEL_UNKNOWN) {
-		lbs_pr_err("unsupported manf_id 0x%04x / card_id 0x%04x\n",
-			   p_dev->manf_id, p_dev->card_id);
+		pr_err("unsupported manf_id 0x%04x / card_id 0x%04x\n",
+		       p_dev->manf_id, p_dev->card_id);
 		goto out2;
 	}
 
@@ -857,20 +859,20 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
 	if (card->model == MODEL_8305) {
 		card->align_regs = 1;
 		if (prod_id < IF_CS_CF8305_B1_REV) {
-			lbs_pr_err("8305 rev B0 and older are not supported\n");
+			pr_err("8305 rev B0 and older are not supported\n");
 			ret = -ENODEV;
 			goto out2;
 		}
 	}
 
 	if ((card->model == MODEL_8381) && prod_id < IF_CS_CF8381_B3_REV) {
-		lbs_pr_err("8381 rev B2 and older are not supported\n");
+		pr_err("8381 rev B2 and older are not supported\n");
 		ret = -ENODEV;
 		goto out2;
 	}
 
 	if ((card->model == MODEL_8385) && prod_id < IF_CS_CF8385_B1_REV) {
-		lbs_pr_err("8385 rev B0 and older are not supported\n");
+		pr_err("8385 rev B0 and older are not supported\n");
 		ret = -ENODEV;
 		goto out2;
 	}
@@ -878,7 +880,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
 	ret = lbs_get_firmware(&p_dev->dev, NULL, NULL, card->model,
 				&fw_table[0], &helper, &mainfw);
 	if (ret) {
-		lbs_pr_err("failed to find firmware (%d)\n", ret);
+		pr_err("failed to find firmware (%d)\n", ret);
 		goto out2;
 	}
 
@@ -909,7 +911,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
 	ret = request_irq(p_dev->irq, if_cs_interrupt,
 		IRQF_SHARED, DRV_NAME, card);
 	if (ret) {
-		lbs_pr_err("error in request_irq\n");
+		pr_err("error in request_irq\n");
 		goto out3;
 	}
 
@@ -920,7 +922,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
 
 	/* And finally bring the card up */
 	if (lbs_start_card(priv) != 0) {
-		lbs_pr_err("could not activate card\n");
+		pr_err("could not activate card\n");
 		goto out3;
 	}
 
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c
index b4de0ca..ab86779 100644
--- a/drivers/net/wireless/libertas/if_sdio.c
+++ b/drivers/net/wireless/libertas/if_sdio.c
@@ -26,6 +26,8 @@
  * if_sdio_card_to_host() to pad the data.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/kernel.h>
 #include <linux/moduleparam.h>
 #include <linux/slab.h>
@@ -409,7 +411,7 @@ static int if_sdio_card_to_host(struct if_sdio_card *card)
 
 out:
 	if (ret)
-		lbs_pr_err("problem fetching packet from firmware\n");
+		pr_err("problem fetching packet from firmware\n");
 
 	lbs_deb_leave_args(LBS_DEB_SDIO, "ret %d", ret);
 
@@ -446,7 +448,7 @@ static void if_sdio_host_to_card_worker(struct work_struct *work)
 		}
 
 		if (ret)
-			lbs_pr_err("error %d sending packet to firmware\n", ret);
+			pr_err("error %d sending packet to firmware\n", ret);
 
 		sdio_release_host(card->func);
 
@@ -555,7 +557,7 @@ release:
 
 out:
 	if (ret)
-		lbs_pr_err("failed to load helper firmware\n");
+		pr_err("failed to load helper firmware\n");
 
 	lbs_deb_leave_args(LBS_DEB_SDIO, "ret %d", ret);
 	return ret;
@@ -669,7 +671,7 @@ release:
 
 out:
 	if (ret)
-		lbs_pr_err("failed to load firmware\n");
+		pr_err("failed to load firmware\n");
 
 	lbs_deb_leave_args(LBS_DEB_SDIO, "ret %d", ret);
 	return ret;
@@ -723,7 +725,7 @@ static int if_sdio_prog_firmware(struct if_sdio_card *card)
 	ret = lbs_get_firmware(&card->func->dev, lbs_helper_name, lbs_fw_name,
 				card->model, &fw_table[0], &helper, &mainfw);
 	if (ret) {
-		lbs_pr_err("failed to find firmware (%d)\n", ret);
+		pr_err("failed to find firmware (%d)\n", ret);
 		goto out;
 	}
 
@@ -849,7 +851,7 @@ static int if_sdio_enter_deep_sleep(struct lbs_private *priv)
 	ret = __lbs_cmd(priv, CMD_802_11_DEEP_SLEEP, &cmd, sizeof(cmd),
 			lbs_cmd_copyback, (unsigned long) &cmd);
 	if (ret)
-		lbs_pr_err("DEEP_SLEEP cmd failed\n");
+		pr_err("DEEP_SLEEP cmd failed\n");
 
 	mdelay(200);
 	return ret;
@@ -865,7 +867,7 @@ static int if_sdio_exit_deep_sleep(struct lbs_private *priv)
 
 	sdio_writeb(card->func, HOST_POWER_UP, CONFIGURATION_REG, &ret);
 	if (ret)
-		lbs_pr_err("sdio_writeb failed!\n");
+		pr_err("sdio_writeb failed!\n");
 
 	sdio_release_host(card->func);
 	lbs_deb_leave_args(LBS_DEB_SDIO, "ret %d", ret);
@@ -882,7 +884,7 @@ static int if_sdio_reset_deep_sleep_wakeup(struct lbs_private *priv)
 
 	sdio_writeb(card->func, 0, CONFIGURATION_REG, &ret);
 	if (ret)
-		lbs_pr_err("sdio_writeb failed!\n");
+		pr_err("sdio_writeb failed!\n");
 
 	sdio_release_host(card->func);
 	lbs_deb_leave_args(LBS_DEB_SDIO, "ret %d", ret);
@@ -961,7 +963,7 @@ static int if_sdio_probe(struct sdio_func *func,
 	}
 
 	if (i == func->card->num_info) {
-		lbs_pr_err("unable to identify card model\n");
+		pr_err("unable to identify card model\n");
 		return -ENODEV;
 	}
 
@@ -995,7 +997,7 @@ static int if_sdio_probe(struct sdio_func *func,
 			break;
 	}
 	if (i == ARRAY_SIZE(fw_table)) {
-		lbs_pr_err("unknown card model 0x%x\n", card->model);
+		pr_err("unknown card model 0x%x\n", card->model);
 		ret = -ENODEV;
 		goto free;
 	}
@@ -1101,7 +1103,7 @@ static int if_sdio_probe(struct sdio_func *func,
 		lbs_deb_sdio("send function INIT command\n");
 		if (__lbs_cmd(priv, CMD_FUNC_INIT, &cmd, sizeof(cmd),
 				lbs_cmd_copyback, (unsigned long) &cmd))
-			lbs_pr_alert("CMD_FUNC_INIT cmd failed\n");
+			pr_alert("CMD_FUNC_INIT cmd failed\n");
 	}
 
 	ret = lbs_start_card(priv);
@@ -1163,7 +1165,7 @@ static void if_sdio_remove(struct sdio_func *func)
 		if (__lbs_cmd(card->priv, CMD_FUNC_SHUTDOWN,
 				&cmd, sizeof(cmd), lbs_cmd_copyback,
 				(unsigned long) &cmd))
-			lbs_pr_alert("CMD_FUNC_SHUTDOWN cmd failed\n");
+			pr_alert("CMD_FUNC_SHUTDOWN cmd failed\n");
 	}
 
 
@@ -1202,21 +1204,19 @@ static int if_sdio_suspend(struct device *dev)
 
 	mmc_pm_flag_t flags = sdio_get_host_pm_caps(func);
 
-	lbs_pr_info("%s: suspend: PM flags = 0x%x\n",
-						sdio_func_id(func), flags);
+	pr_info("%s: suspend: PM flags = 0x%x\n", sdio_func_id(func), flags);
 
 	/* If we aren't being asked to wake on anything, we should bail out
 	 * and let the SD stack power down the card.
 	 */
 	if (card->priv->wol_criteria == EHS_REMOVE_WAKEUP) {
-		lbs_pr_info("Suspend without wake params -- "
-						"powering down card.");
+		pr_info("Suspend without wake params -- powering down card\n");
 		return -ENOSYS;
 	}
 
 	if (!(flags & MMC_PM_KEEP_POWER)) {
-		lbs_pr_err("%s: cannot remain alive while host is suspended\n",
-			sdio_func_id(func));
+		pr_err("%s: cannot remain alive while host is suspended\n",
+		       sdio_func_id(func));
 		return -ENOSYS;
 	}
 
@@ -1237,7 +1237,7 @@ static int if_sdio_resume(struct device *dev)
 	struct if_sdio_card *card = sdio_get_drvdata(func);
 	int ret;
 
-	lbs_pr_info("%s: resume: we're back\n", sdio_func_id(func));
+	pr_info("%s: resume: we're back\n", sdio_func_id(func));
 
 	ret = lbs_resume(card->priv);
 
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c
index 078ef43..bebd9f0 100644
--- a/drivers/net/wireless/libertas/if_spi.c
+++ b/drivers/net/wireless/libertas/if_spi.c
@@ -17,6 +17,8 @@
  * (at your option) any later version.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/moduleparam.h>
 #include <linux/firmware.h>
 #include <linux/jiffies.h>
@@ -297,8 +299,7 @@ static int spu_wait_for_u16(struct if_spi_card *card, u16 reg,
 		}
 		udelay(100);
 		if (time_after(jiffies, timeout)) {
-			lbs_pr_err("%s: timeout with val=%02x, "
-			       "target_mask=%02x, target=%02x\n",
+			pr_err("%s: timeout with val=%02x, target_mask=%02x, target=%02x\n",
 			       __func__, val, target_mask, target);
 			return -ETIMEDOUT;
 		}
@@ -391,7 +392,7 @@ static int spu_set_bus_mode(struct if_spi_card *card, u16 mode)
 	if (err)
 		return err;
 	if ((rval & 0xF) != mode) {
-		lbs_pr_err("Can't read bus mode register.\n");
+		pr_err("Can't read bus mode register\n");
 		return -EIO;
 	}
 	return 0;
@@ -512,7 +513,7 @@ static int if_spi_prog_helper_firmware(struct if_spi_card *card,
 
 out:
 	if (err)
-		lbs_pr_err("failed to load helper firmware (err=%d)\n", err);
+		pr_err("failed to load helper firmware (err=%d)\n", err);
 	lbs_deb_leave_args(LBS_DEB_SPI, "err %d", err);
 	return err;
 }
@@ -531,7 +532,7 @@ static int if_spi_prog_main_firmware_check_len(struct if_spi_card *card,
 				IF_SPI_HIST_CMD_DOWNLOAD_RDY,
 				IF_SPI_HIST_CMD_DOWNLOAD_RDY);
 	if (err) {
-		lbs_pr_err("timed out waiting for host_int_status\n");
+		pr_err("timed out waiting for host_int_status\n");
 		return err;
 	}
 
@@ -541,9 +542,8 @@ static int if_spi_prog_main_firmware_check_len(struct if_spi_card *card,
 		return err;
 
 	if (len > IF_SPI_CMD_BUF_SIZE) {
-		lbs_pr_err("firmware load device requested a larger "
-			   "tranfer than we are prepared to "
-			   "handle. (len = %d)\n", len);
+		pr_err("firmware load device requested a larger transfer than we are prepared to handle (len = %d)\n",
+		       len);
 		return -EIO;
 	}
 	if (len & 0x1) {
@@ -572,8 +572,8 @@ static int if_spi_prog_main_firmware(struct if_spi_card *card,
 
 	err = spu_wait_for_u16(card, IF_SPI_SCRATCH_1_REG, 0, 0);
 	if (err) {
-		lbs_pr_err("%s: timed out waiting for initial "
-			   "scratch reg = 0\n", __func__);
+		pr_err("%s: timed out waiting for initial scratch reg = 0\n",
+		       __func__);
 		goto out;
 	}
 
@@ -589,15 +589,13 @@ static int if_spi_prog_main_firmware(struct if_spi_card *card,
 		if (bytes < 0) {
 			/* If there are no more bytes left, we would normally
 			 * expect to have terminated with len = 0 */
-			lbs_pr_err("Firmware load wants more bytes "
-				   "than we have to offer.\n");
+			pr_err("Firmware load wants more bytes than we have to offer\n");
 			break;
 		}
 		if (crc_err) {
 			/* Previous transfer failed. */
 			if (++num_crc_errs > MAX_MAIN_FW_LOAD_CRC_ERR) {
-				lbs_pr_err("Too many CRC errors encountered "
-					   "in firmware load.\n");
+				pr_err("Too many CRC errors encountered in firmware load\n");
 				err = -EIO;
 				goto out;
 			}
@@ -626,21 +624,20 @@ static int if_spi_prog_main_firmware(struct if_spi_card *card,
 		prev_len = len;
 	}
 	if (bytes > prev_len) {
-		lbs_pr_err("firmware load wants fewer bytes than "
-			   "we have to offer.\n");
+		pr_err("firmware load wants fewer bytes than we have to offer\n");
 	}
 
 	/* Confirm firmware download */
 	err = spu_wait_for_u32(card, IF_SPI_SCRATCH_4_REG,
 					SUCCESSFUL_FW_DOWNLOAD_MAGIC);
 	if (err) {
-		lbs_pr_err("failed to confirm the firmware download\n");
+		pr_err("failed to confirm the firmware download\n");
 		goto out;
 	}
 
 out:
 	if (err)
-		lbs_pr_err("failed to load firmware (err=%d)\n", err);
+		pr_err("failed to load firmware (err=%d)\n", err);
 	lbs_deb_leave_args(LBS_DEB_SPI, "err %d", err);
 	return err;
 }
@@ -677,14 +674,12 @@ static int if_spi_c2h_cmd(struct if_spi_card *card)
 	if (err)
 		goto out;
 	if (!len) {
-		lbs_pr_err("%s: error: card has no data for host\n",
-			   __func__);
+		pr_err("%s: error: card has no data for host\n", __func__);
 		err = -EINVAL;
 		goto out;
 	} else if (len > IF_SPI_CMD_BUF_SIZE) {
-		lbs_pr_err("%s: error: response packet too large: "
-			   "%d bytes, but maximum is %d\n",
-			   __func__, len, IF_SPI_CMD_BUF_SIZE);
+		pr_err("%s: error: response packet too large: %d bytes, but maximum is %d\n",
+		       __func__, len, IF_SPI_CMD_BUF_SIZE);
 		err = -EINVAL;
 		goto out;
 	}
@@ -705,7 +700,7 @@ static int if_spi_c2h_cmd(struct if_spi_card *card)
 
 out:
 	if (err)
-		lbs_pr_err("%s: err=%d\n", __func__, err);
+		pr_err("%s: err=%d\n", __func__, err);
 	lbs_deb_leave(LBS_DEB_SPI);
 	return err;
 }
@@ -725,14 +720,12 @@ static int if_spi_c2h_data(struct if_spi_card *card)
 	if (err)
 		goto out;
 	if (!len) {
-		lbs_pr_err("%s: error: card has no data for host\n",
-			   __func__);
+		pr_err("%s: error: card has no data for host\n", __func__);
 		err = -EINVAL;
 		goto out;
 	} else if (len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) {
-		lbs_pr_err("%s: error: card has %d bytes of data, but "
-			   "our maximum skb size is %zu\n",
-			   __func__, len, MRVDRV_ETH_RX_PACKET_BUFFER_SIZE);
+		pr_err("%s: error: card has %d bytes of data, but our maximum skb size is %zu\n",
+		       __func__, len, MRVDRV_ETH_RX_PACKET_BUFFER_SIZE);
 		err = -EINVAL;
 		goto out;
 	}
@@ -763,7 +756,7 @@ free_skb:
 	dev_kfree_skb(skb);
 out:
 	if (err)
-		lbs_pr_err("%s: err=%d\n", __func__, err);
+		pr_err("%s: err=%d\n", __func__, err);
 	lbs_deb_leave(LBS_DEB_SPI);
 	return err;
 }
@@ -785,7 +778,7 @@ static void if_spi_h2c(struct if_spi_card *card,
 		port_reg = IF_SPI_CMD_RDWRPORT_REG;
 		break;
 	default:
-		lbs_pr_err("can't transfer buffer of type %d\n", type);
+		pr_err("can't transfer buffer of type %d\n", type);
 		err = -EINVAL;
 		goto out;
 	}
@@ -799,7 +792,7 @@ out:
 	kfree(packet);
 
 	if (err)
-		lbs_pr_err("%s: error %d\n", __func__, err);
+		pr_err("%s: error %d\n", __func__, err);
 }
 
 /* Inform the host about a card event */
@@ -823,7 +816,7 @@ static void if_spi_e2h(struct if_spi_card *card)
 	lbs_queue_event(priv, cause & 0xff);
 out:
 	if (err)
-		lbs_pr_err("%s: error %d\n", __func__, err);
+		pr_err("%s: error %d\n", __func__, err);
 }
 
 static void if_spi_host_to_card_worker(struct work_struct *work)
@@ -843,7 +836,7 @@ static void if_spi_host_to_card_worker(struct work_struct *work)
 	err = spu_read_u16(card, IF_SPI_HOST_INT_STATUS_REG,
 				&hiStatus);
 	if (err) {
-		lbs_pr_err("I/O error\n");
+		pr_err("I/O error\n");
 		goto err;
 	}
 
@@ -905,7 +898,7 @@ static void if_spi_host_to_card_worker(struct work_struct *work)
 
 err:
 	if (err)
-		lbs_pr_err("%s: got error %d\n", __func__, err);
+		pr_err("%s: got error %d\n", __func__, err);
 
 	lbs_deb_leave(LBS_DEB_SPI);
 }
@@ -927,7 +920,7 @@ static int if_spi_host_to_card(struct lbs_private *priv,
 	lbs_deb_enter_args(LBS_DEB_SPI, "type %d, bytes %d", type, nb);
 
 	if (nb == 0) {
-		lbs_pr_err("%s: invalid size requested: %d\n", __func__, nb);
+		pr_err("%s: invalid size requested: %d\n", __func__, nb);
 		err = -EINVAL;
 		goto out;
 	}
@@ -955,7 +948,7 @@ static int if_spi_host_to_card(struct lbs_private *priv,
 		spin_unlock_irqrestore(&card->buffer_lock, flags);
 		break;
 	default:
-		lbs_pr_err("can't transfer buffer of type %d", type);
+		pr_err("can't transfer buffer of type %d\n", type);
 		err = -EINVAL;
 		break;
 	}
@@ -1016,8 +1009,7 @@ static int if_spi_init_card(struct if_spi_card *card)
 				break;
 		}
 		if (i == ARRAY_SIZE(fw_table)) {
-			lbs_pr_err("Unsupported chip_id: 0x%02x\n",
-					card->card_id);
+			pr_err("Unsupported chip_id: 0x%02x\n", card->card_id);
 			err = -ENODEV;
 			goto out;
 		}
@@ -1026,7 +1018,7 @@ static int if_spi_init_card(struct if_spi_card *card)
 					card->card_id, &fw_table[0], &helper,
 					&mainfw);
 		if (err) {
-			lbs_pr_err("failed to find firmware (%d)\n", err);
+			pr_err("failed to find firmware (%d)\n", err);
 			goto out;
 		}
 
@@ -1149,7 +1141,7 @@ static int __devinit if_spi_probe(struct spi_device *spi)
 	err = request_irq(spi->irq, if_spi_host_interrupt,
 			IRQF_TRIGGER_FALLING, "libertas_spi", card);
 	if (err) {
-		lbs_pr_err("can't get host irq line-- request_irq failed\n");
+		pr_err("can't get host irq line-- request_irq failed\n");
 		goto terminate_workqueue;
 	}
 
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
index 6524c70..7260791 100644
--- a/drivers/net/wireless/libertas/if_usb.c
+++ b/drivers/net/wireless/libertas/if_usb.c
@@ -1,6 +1,9 @@
 /**
   * This file contains functions used in USB interface module.
   */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/delay.h>
 #include <linux/moduleparam.h>
 #include <linux/firmware.h>
@@ -145,7 +148,7 @@ static void if_usb_write_bulk_callback(struct urb *urb)
 			lbs_host_to_card_done(priv);
 	} else {
 		/* print the failure status number for debug */
-		lbs_pr_info("URB in failure status: %d\n", urb->status);
+		pr_info("URB in failure status: %d\n", urb->status);
 	}
 }
 
@@ -195,7 +198,7 @@ static void if_usb_setup_firmware(struct lbs_private *priv)
 	wake_method.hdr.size = cpu_to_le16(sizeof(wake_method));
 	wake_method.action = cpu_to_le16(CMD_ACT_GET);
 	if (lbs_cmd_with_response(priv, CMD_802_11_FW_WAKE_METHOD, &wake_method)) {
-		lbs_pr_info("Firmware does not seem to support PS mode\n");
+		pr_info("Firmware does not seem to support PS mode\n");
 		priv->fwcapinfo &= ~FW_CAPINFO_PS;
 	} else {
 		if (le16_to_cpu(wake_method.method) == CMD_WAKE_METHOD_COMMAND_INT) {
@@ -204,7 +207,7 @@ static void if_usb_setup_firmware(struct lbs_private *priv)
 			/* The versions which boot up this way don't seem to
 			   work even if we set it to the command interrupt */
 			priv->fwcapinfo &= ~FW_CAPINFO_PS;
-			lbs_pr_info("Firmware doesn't wake via command interrupt; disabling PS mode\n");
+			pr_info("Firmware doesn't wake via command interrupt; disabling PS mode\n");
 		}
 	}
 }
@@ -216,7 +219,7 @@ static void if_usb_fw_timeo(unsigned long priv)
 	if (cardp->fwdnldover) {
 		lbs_deb_usb("Download complete, no event. Assuming success\n");
 	} else {
-		lbs_pr_err("Download timed out\n");
+		pr_err("Download timed out\n");
 		cardp->surprise_removed = 1;
 	}
 	wake_up(&cardp->fw_wq);
@@ -250,7 +253,7 @@ static int if_usb_probe(struct usb_interface *intf,
 
 	cardp = kzalloc(sizeof(struct if_usb_card), GFP_KERNEL);
 	if (!cardp) {
-		lbs_pr_err("Out of memory allocating private data.\n");
+		pr_err("Out of memory allocating private data\n");
 		goto error;
 	}
 
@@ -340,10 +343,10 @@ static int if_usb_probe(struct usb_interface *intf,
 	usb_set_intfdata(intf, cardp);
 
 	if (device_create_file(&priv->dev->dev, &dev_attr_lbs_flash_fw))
-		lbs_pr_err("cannot register lbs_flash_fw attribute\n");
+		pr_err("cannot register lbs_flash_fw attribute\n");
 
 	if (device_create_file(&priv->dev->dev, &dev_attr_lbs_flash_boot2))
-		lbs_pr_err("cannot register lbs_flash_boot2 attribute\n");
+		pr_err("cannot register lbs_flash_boot2 attribute\n");
 
 	/*
 	 * EHS_REMOVE_WAKEUP is not supported on all versions of the firmware.
@@ -528,7 +531,7 @@ static int __if_usb_submit_rx_urb(struct if_usb_card *cardp,
 	int ret = -1;
 
 	if (!(skb = dev_alloc_skb(MRVDRV_ETH_RX_PACKET_BUFFER_SIZE))) {
-		lbs_pr_err("No free skb\n");
+		pr_err("No free skb\n");
 		goto rx_ret;
 	}
 
@@ -587,7 +590,7 @@ static void if_usb_receive_fwload(struct urb *urb)
 
 		if (tmp[0] == cpu_to_le32(CMD_TYPE_INDICATION) &&
 		    tmp[1] == cpu_to_le32(MACREG_INT_CODE_FIRMWARE_READY)) {
-			lbs_pr_info("Firmware ready event received\n");
+			pr_info("Firmware ready event received\n");
 			wake_up(&cardp->fw_wq);
 		} else {
 			lbs_deb_usb("Waiting for confirmation; got %x %x\n",
@@ -614,20 +617,20 @@ static void if_usb_receive_fwload(struct urb *urb)
 			    bootcmdresp.magic == cpu_to_le32(CMD_TYPE_DATA) ||
 			    bootcmdresp.magic == cpu_to_le32(CMD_TYPE_INDICATION)) {
 				if (!cardp->bootcmdresp)
-					lbs_pr_info("Firmware already seems alive; resetting\n");
+					pr_info("Firmware already seems alive; resetting\n");
 				cardp->bootcmdresp = -1;
 			} else {
-				lbs_pr_info("boot cmd response wrong magic number (0x%x)\n",
+				pr_info("boot cmd response wrong magic number (0x%x)\n",
 					    le32_to_cpu(bootcmdresp.magic));
 			}
 		} else if ((bootcmdresp.cmd != BOOT_CMD_FW_BY_USB) &&
 			   (bootcmdresp.cmd != BOOT_CMD_UPDATE_FW) &&
 			   (bootcmdresp.cmd != BOOT_CMD_UPDATE_BOOT2)) {
-			lbs_pr_info("boot cmd response cmd_tag error (%d)\n",
-				    bootcmdresp.cmd);
+			pr_info("boot cmd response cmd_tag error (%d)\n",
+				bootcmdresp.cmd);
 		} else if (bootcmdresp.result != BOOT_CMD_RESP_OK) {
-			lbs_pr_info("boot cmd response result error (%d)\n",
-				    bootcmdresp.result);
+			pr_info("boot cmd response result error (%d)\n",
+				bootcmdresp.result);
 		} else {
 			cardp->bootcmdresp = 1;
 			lbs_deb_usbd(&cardp->udev->dev,
@@ -892,7 +895,7 @@ static int check_fwfile_format(const uint8_t *data, uint32_t totlen)
 	} while (!exit);
 
 	if (ret)
-		lbs_pr_err("firmware file format check FAIL\n");
+		pr_err("firmware file format check FAIL\n");
 	else
 		lbs_deb_fw("firmware file format check PASS\n");
 
@@ -989,7 +992,7 @@ static int __if_usb_prog_firmware(struct if_usb_card *cardp,
 
 	ret = get_fw(cardp, fwname);
 	if (ret) {
-		lbs_pr_err("failed to find firmware (%d)\n", ret);
+		pr_err("failed to find firmware (%d)\n", ret);
 		goto done;
 	}
 
@@ -1064,13 +1067,13 @@ restart:
 	usb_kill_urb(cardp->rx_urb);
 
 	if (!cardp->fwdnldover) {
-		lbs_pr_info("failed to load fw, resetting device!\n");
+		pr_info("failed to load fw, resetting device!\n");
 		if (--reset_count >= 0) {
 			if_usb_reset_device(cardp);
 			goto restart;
 		}
 
-		lbs_pr_info("FW download failure, time = %d ms\n", i * 100);
+		pr_info("FW download failure, time = %d ms\n", i * 100);
 		ret = -EIO;
 		goto release_fw;
 	}
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index ca8149c..639461b 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -4,6 +4,8 @@
   * thread etc..
   */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/moduleparam.h>
 #include <linux/delay.h>
 #include <linux/etherdevice.h>
@@ -153,7 +155,7 @@ static void lbs_tx_timeout(struct net_device *dev)
 
 	lbs_deb_enter(LBS_DEB_TX);
 
-	lbs_pr_err("tx watch dog timeout\n");
+	pr_err("tx watch dog timeout\n");
 
 	dev->trans_start = jiffies; /* prevent tx timeout */
 
@@ -462,7 +464,7 @@ static int lbs_thread(void *data)
 		if (priv->cmd_timed_out && priv->cur_cmd) {
 			struct cmd_ctrl_node *cmdnode = priv->cur_cmd;
 
-			lbs_pr_info("Timeout submitting command 0x%04x\n",
+			pr_info("Timeout submitting command 0x%04x\n",
 				le16_to_cpu(cmdnode->cmdbuf->command));
 			lbs_complete_command(priv, cmdnode, -ETIMEDOUT);
 			if (priv->reset_card)
@@ -490,8 +492,7 @@ static int lbs_thread(void *data)
 				 * after firmware fixes it
 				 */
 				priv->psstate = PS_STATE_AWAKE;
-				lbs_pr_alert("ignore PS_SleepConfirm in "
-					"non-connected state\n");
+				pr_alert("ignore PS_SleepConfirm in non-connected state\n");
 			}
 		}
 
@@ -585,7 +586,7 @@ int lbs_suspend(struct lbs_private *priv)
 	if (priv->is_deep_sleep) {
 		ret = lbs_set_deep_sleep(priv, 0);
 		if (ret) {
-			lbs_pr_err("deep sleep cancellation failed: %d\n", ret);
+			pr_err("deep sleep cancellation failed: %d\n", ret);
 			return ret;
 		}
 		priv->deep_sleep_required = 1;
@@ -618,7 +619,7 @@ int lbs_resume(struct lbs_private *priv)
 		priv->deep_sleep_required = 0;
 		ret = lbs_set_deep_sleep(priv, 1);
 		if (ret)
-			lbs_pr_err("deep sleep activation failed: %d\n", ret);
+			pr_err("deep sleep activation failed: %d\n", ret);
 	}
 
 	if (priv->setup_fw_on_resume)
@@ -644,7 +645,7 @@ static void lbs_cmd_timeout_handler(unsigned long data)
 	if (!priv->cur_cmd)
 		goto out;
 
-	lbs_pr_info("command 0x%04x timed out\n",
+	pr_info("command 0x%04x timed out\n",
 		le16_to_cpu(priv->cur_cmd->cmdbuf->command));
 
 	priv->cmd_timed_out = 1;
@@ -748,7 +749,7 @@ static int lbs_init_adapter(struct lbs_private *priv)
 
 	/* Allocate the command buffers */
 	if (lbs_allocate_cmd_buffer(priv)) {
-		lbs_pr_err("Out of memory allocating command buffers\n");
+		pr_err("Out of memory allocating command buffers\n");
 		ret = -ENOMEM;
 		goto out;
 	}
@@ -758,7 +759,7 @@ static int lbs_init_adapter(struct lbs_private *priv)
 	/* Create the event FIFO */
 	ret = kfifo_alloc(&priv->event_fifo, sizeof(u32) * 16, GFP_KERNEL);
 	if (ret) {
-		lbs_pr_err("Out of memory allocating event FIFO buffer\n");
+		pr_err("Out of memory allocating event FIFO buffer\n");
 		goto out;
 	}
 
@@ -809,7 +810,7 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev)
 	/* Allocate an Ethernet device and register it */
 	wdev = lbs_cfg_alloc(dmdev);
 	if (IS_ERR(wdev)) {
-		lbs_pr_err("cfg80211 init failed\n");
+		pr_err("cfg80211 init failed\n");
 		goto done;
 	}
 
@@ -818,7 +819,7 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev)
 	priv->wdev = wdev;
 
 	if (lbs_init_adapter(priv)) {
-		lbs_pr_err("failed to initialize adapter structure.\n");
+		pr_err("failed to initialize adapter structure\n");
 		goto err_wdev;
 	}
 
@@ -950,7 +951,7 @@ int lbs_start_card(struct lbs_private *priv)
 		goto done;
 
 	if (lbs_cfg_register(priv)) {
-		lbs_pr_err("cannot register device\n");
+		pr_err("cannot register device\n");
 		goto done;
 	}
 
@@ -960,7 +961,7 @@ int lbs_start_card(struct lbs_private *priv)
 
 	lbs_debugfs_init_one(priv, dev);
 
-	lbs_pr_info("%s: Marvell WLAN 802.11 adapter\n", dev->name);
+	pr_info("%s: Marvell WLAN 802.11 adapter\n", dev->name);
 
 	ret = 0;
 
@@ -1087,16 +1088,14 @@ int lbs_get_firmware(struct device *dev, const char *user_helper,
 	if (user_helper) {
 		ret = request_firmware(helper, user_helper, dev);
 		if (ret) {
-			lbs_pr_err("couldn't find helper firmware %s",
-					user_helper);
+			pr_err("couldn't find helper firmware %s", user_helper);
 			goto fail;
 		}
 	}
 	if (user_mainfw) {
 		ret = request_firmware(mainfw, user_mainfw, dev);
 		if (ret) {
-			lbs_pr_err("couldn't find main firmware %s",
-					user_mainfw);
+			pr_err("couldn't find main firmware %s", user_mainfw);
 			goto fail;
 		}
 	}
diff --git a/drivers/net/wireless/libertas/mesh.c b/drivers/net/wireless/libertas/mesh.c
index 9d097b9..f7c51cb 100644
--- a/drivers/net/wireless/libertas/mesh.c
+++ b/drivers/net/wireless/libertas/mesh.c
@@ -1,3 +1,5 @@
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/delay.h>
 #include <linux/etherdevice.h>
 #include <linux/netdevice.h>
@@ -246,7 +248,7 @@ int lbs_init_mesh(struct lbs_private *priv)
 		lbs_add_mesh(priv);
 
 		if (device_create_file(&dev->dev, &dev_attr_lbs_mesh))
-			lbs_pr_err("cannot register lbs_mesh attribute\n");
+			pr_err("cannot register lbs_mesh attribute\n");
 
 		ret = 1;
 	}
@@ -374,7 +376,7 @@ int lbs_add_mesh(struct lbs_private *priv)
 	/* Register virtual mesh interface */
 	ret = register_netdev(mesh_dev);
 	if (ret) {
-		lbs_pr_err("cannot register mshX virtual interface\n");
+		pr_err("cannot register mshX virtual interface\n");
 		goto err_free;
 	}
 
@@ -926,7 +928,7 @@ static ssize_t mesh_id_get(struct device *dev, struct device_attribute *attr,
 		return ret;
 
 	if (defs.meshie.val.mesh_id_len > IEEE80211_MAX_SSID_LEN) {
-		lbs_pr_err("inconsistent mesh ID length");
+		pr_err("inconsistent mesh ID length\n");
 		defs.meshie.val.mesh_id_len = IEEE80211_MAX_SSID_LEN;
 	}
 
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c
index a2b1df2..fd045aa 100644
--- a/drivers/net/wireless/libertas/rx.c
+++ b/drivers/net/wireless/libertas/rx.c
@@ -1,6 +1,9 @@
 /**
   * This file contains the handling of RX in wlan driver.
   */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/etherdevice.h>
 #include <linux/slab.h>
 #include <linux/types.h>
@@ -191,7 +194,7 @@ static u8 convert_mv_rate_to_radiotap(u8 rate)
 	case 12:		/*  54 Mbps */
 		return 108;
 	}
-	lbs_pr_alert("Invalid Marvell WLAN rate %i\n", rate);
+	pr_alert("Invalid Marvell WLAN rate %i\n", rate);
 	return 0;
 }
 
@@ -248,7 +251,7 @@ static int process_rxed_802_11_packet(struct lbs_private *priv,
 	/* add space for the new radio header */
 	if ((skb_headroom(skb) < sizeof(struct rx_radiotap_hdr)) &&
 	    pskb_expand_head(skb, sizeof(struct rx_radiotap_hdr), 0, GFP_ATOMIC)) {
-		lbs_pr_alert("%s: couldn't pskb_expand_head\n", __func__);
+		pr_alert("%s: couldn't pskb_expand_head\n", __func__);
 		ret = -ENOMEM;
 		kfree_skb(skb);
 		goto done;
-- 
1.7.5.rc3.dirty


^ permalink raw reply related

* [PATCH 2/2] libertas: Use netdev_<level> or dev_<level> where possible
From: Joe Perches @ 2011-05-02 23:49 UTC (permalink / raw)
  To: Dan Williams
  Cc: John W. Linville, libertas-dev, linux-wireless, netdev,
	linux-kernel
In-Reply-To: <cover.1304379925.git.joe@perches.com>

Using the more descriptive logging styles gives a bit
more information about the device being operated on.

Makes the object trivially smaller too.

$ size drivers/net/wireless/libertas/built-in.o.*
 187730	   2973	  38488	 229191	  37f47	drivers/net/wireless/libertas/built-in.o.new
 188195	   2973	  38488	 229656	  38118	drivers/net/wireless/libertas/built-in.o.old

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/libertas/cfg.c     |    9 +++--
 drivers/net/wireless/libertas/cmd.c     |   42 +++++++++++++----------
 drivers/net/wireless/libertas/cmdresp.c |   32 +++++++++---------
 drivers/net/wireless/libertas/debugfs.c |    7 ++--
 drivers/net/wireless/libertas/if_cs.c   |   15 +++++---
 drivers/net/wireless/libertas/if_sdio.c |   19 +++++-----
 drivers/net/wireless/libertas/if_spi.c  |   57 ++++++++++++++++++++-----------
 drivers/net/wireless/libertas/if_usb.c  |   11 ++++--
 drivers/net/wireless/libertas/main.c    |   27 +++++++++------
 drivers/net/wireless/libertas/mesh.c    |    4 +-
 drivers/net/wireless/libertas/rx.c      |    2 +-
 11 files changed, 131 insertions(+), 94 deletions(-)

diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index d6e0656..47b7f17 100644
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@ -1316,7 +1316,8 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev,
 		sme->ssid, sme->ssid_len,
 		WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
 	if (!bss) {
-		pr_err("assoc: bss %pM not in scan results\n", sme->bssid);
+		wiphy_err(wiphy, "assoc: bss %pM not in scan results\n",
+			  sme->bssid);
 		ret = -ENOENT;
 		goto done;
 	}
@@ -1373,8 +1374,8 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev,
 		lbs_enable_rsn(priv, sme->crypto.cipher_group != 0);
 		break;
 	default:
-		pr_err("unsupported cipher group 0x%x\n",
-		       sme->crypto.cipher_group);
+		wiphy_err(wiphy, "unsupported cipher group 0x%x\n",
+			  sme->crypto.cipher_group);
 		ret = -ENOTSUPP;
 		goto done;
 	}
@@ -1492,7 +1493,7 @@ static int lbs_cfg_add_key(struct wiphy *wiphy, struct net_device *netdev,
 				     params->key, params->key_len);
 		break;
 	default:
-		pr_err("unhandled cipher 0x%x\n", params->cipher);
+		wiphy_err(wiphy, "unhandled cipher 0x%x\n", params->cipher);
 		ret = -ENOTSUPP;
 		break;
 	}
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 10ca485..f11c656 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -3,8 +3,6 @@
   * It prepares command and sends it to firmware when it is ready.
   */
 
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
 #include <linux/kfifo.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
@@ -110,7 +108,7 @@ int lbs_update_hw_spec(struct lbs_private *priv)
 	 * CF card    firmware 5.0.16p0:   cap 0x00000303
 	 * USB dongle firmware 5.110.17p2: cap 0x00000303
 	 */
-	pr_info("%pM, fw %u.%u.%up%u, cap 0x%08x\n",
+	netdev_info(priv->dev, "%pM, fw %u.%u.%up%u, cap 0x%08x\n",
 		cmd.permanentaddr,
 		priv->fwrelease >> 24 & 0xff,
 		priv->fwrelease >> 16 & 0xff,
@@ -141,7 +139,8 @@ int lbs_update_hw_spec(struct lbs_private *priv)
 	/* if it's unidentified region code, use the default (USA) */
 	if (i >= MRVDRV_MAX_REGION_CODE) {
 		priv->regioncode = 0x10;
-		pr_info("unidentified region code; using the default (USA)\n");
+		netdev_info(priv->dev,
+			    "unidentified region code; using the default (USA)\n");
 	}
 
 	if (priv->current_addr[0] == 0xff)
@@ -211,7 +210,7 @@ int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria,
 					(uint8_t *)&cmd_config.wol_conf,
 					sizeof(struct wol_config));
 	} else {
-		pr_info("HOST_SLEEP_CFG failed %d\n", ret);
+		netdev_info(priv->dev, "HOST_SLEEP_CFG failed %d\n", ret);
 	}
 
 	return ret;
@@ -314,7 +313,7 @@ static int lbs_wait_for_ds_awake(struct lbs_private *priv)
 	if (priv->is_deep_sleep) {
 		if (!wait_event_interruptible_timeout(priv->ds_awake_q,
 					!priv->is_deep_sleep, (10 * HZ))) {
-			pr_err("ds_awake_q: timer expired\n");
+			netdev_err(priv->dev, "ds_awake_q: timer expired\n");
 			ret = -1;
 		}
 	}
@@ -339,7 +338,7 @@ int lbs_set_deep_sleep(struct lbs_private *priv, int deep_sleep)
 				netif_carrier_off(priv->dev);
 			}
 		} else {
-			pr_err("deep sleep: already enabled\n");
+			netdev_err(priv->dev, "deep sleep: already enabled\n");
 		}
 	} else {
 		if (priv->is_deep_sleep) {
@@ -349,7 +348,8 @@ int lbs_set_deep_sleep(struct lbs_private *priv, int deep_sleep)
 			if (!ret) {
 				ret = lbs_wait_for_ds_awake(priv);
 				if (ret)
-					pr_err("deep sleep: wakeup failed\n");
+					netdev_err(priv->dev,
+						   "deep sleep: wakeup failed\n");
 			}
 		}
 	}
@@ -383,8 +383,9 @@ int lbs_set_host_sleep(struct lbs_private *priv, int host_sleep)
 			ret = lbs_host_sleep_cfg(priv, priv->wol_criteria,
 					(struct wol_config *)NULL);
 			if (ret) {
-				pr_info("Host sleep configuration failed: %d\n",
-					ret);
+				netdev_info(priv->dev,
+					    "Host sleep configuration failed: %d\n",
+					    ret);
 				return ret;
 			}
 			if (priv->psstate == PS_STATE_FULL_POWER) {
@@ -394,19 +395,21 @@ int lbs_set_host_sleep(struct lbs_private *priv, int host_sleep)
 						sizeof(cmd),
 						lbs_ret_host_sleep_activate, 0);
 				if (ret)
-					pr_info("HOST_SLEEP_ACTIVATE failed: %d\n",
-						ret);
+					netdev_info(priv->dev,
+						    "HOST_SLEEP_ACTIVATE failed: %d\n",
+						    ret);
 			}
 
 			if (!wait_event_interruptible_timeout(
 						priv->host_sleep_q,
 						priv->is_host_sleep_activated,
 						(10 * HZ))) {
-				pr_err("host_sleep_q: timer expired\n");
+				netdev_err(priv->dev,
+					   "host_sleep_q: timer expired\n");
 				ret = -1;
 			}
 		} else {
-			pr_err("host sleep: already enabled\n");
+			netdev_err(priv->dev, "host sleep: already enabled\n");
 		}
 	} else {
 		if (priv->is_host_sleep_activated)
@@ -1003,7 +1006,8 @@ static void lbs_submit_command(struct lbs_private *priv,
 	ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) cmd, cmdsize);
 
 	if (ret) {
-		pr_info("DNLD_CMD: hw_host_to_card failed: %d\n", ret);
+		netdev_info(priv->dev, "DNLD_CMD: hw_host_to_card failed: %d\n",
+			    ret);
 		/* Let the timer kick in and retry, and potentially reset
 		   the whole thing if the condition persists */
 		timeo = HZ/4;
@@ -1268,7 +1272,8 @@ int lbs_execute_next_command(struct lbs_private *priv)
 	spin_lock_irqsave(&priv->driver_lock, flags);
 
 	if (priv->cur_cmd) {
-		pr_alert( "EXEC_NEXT_CMD: already processing command!\n");
+		netdev_alert(priv->dev,
+			     "EXEC_NEXT_CMD: already processing command!\n");
 		spin_unlock_irqrestore(&priv->driver_lock, flags);
 		ret = -1;
 		goto done;
@@ -1430,7 +1435,7 @@ static void lbs_send_confirmsleep(struct lbs_private *priv)
 	ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) &confirm_sleep,
 		sizeof(confirm_sleep));
 	if (ret) {
-		pr_alert("confirm_sleep failed\n");
+		netdev_alert(priv->dev, "confirm_sleep failed\n");
 		goto out;
 	}
 
@@ -1656,7 +1661,8 @@ int __lbs_cmd(struct lbs_private *priv, uint16_t command,
 	spin_lock_irqsave(&priv->driver_lock, flags);
 	ret = cmdnode->result;
 	if (ret)
-		pr_info("PREP_CMD: command 0x%04x failed: %d\n", command, ret);
+		netdev_info(priv->dev, "PREP_CMD: command 0x%04x failed: %d\n",
+			    command, ret);
 
 	__lbs_cleanup_and_insert_cmd(priv, cmdnode);
 	spin_unlock_irqrestore(&priv->driver_lock, flags);
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index 2cb6f5f..4352e92 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -3,8 +3,6 @@
   * responses as well as events generated by firmware.
   */
 
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/sched.h>
@@ -87,17 +85,18 @@ int lbs_process_command_response(struct lbs_private *priv, u8 *data, u32 len)
 	lbs_deb_hex(LBS_DEB_CMD, "CMD_RESP", (void *) resp, len);
 
 	if (resp->seqnum != priv->cur_cmd->cmdbuf->seqnum) {
-		pr_info("Received CMD_RESP with invalid sequence %d (expected %d)\n",
-			le16_to_cpu(resp->seqnum),
-			le16_to_cpu(priv->cur_cmd->cmdbuf->seqnum));
+		netdev_info(priv->dev,
+			    "Received CMD_RESP with invalid sequence %d (expected %d)\n",
+			    le16_to_cpu(resp->seqnum),
+			    le16_to_cpu(priv->cur_cmd->cmdbuf->seqnum));
 		spin_unlock_irqrestore(&priv->driver_lock, flags);
 		ret = -1;
 		goto done;
 	}
 	if (respcmd != CMD_RET(curcmd) &&
 	    respcmd != CMD_RET_802_11_ASSOCIATE && curcmd != CMD_802_11_ASSOCIATE) {
-		pr_info("Invalid CMD_RESP %x to command %x!\n",
-			respcmd, curcmd);
+		netdev_info(priv->dev, "Invalid CMD_RESP %x to command %x!\n",
+			    respcmd, curcmd);
 		spin_unlock_irqrestore(&priv->driver_lock, flags);
 		ret = -1;
 		goto done;
@@ -106,8 +105,9 @@ int lbs_process_command_response(struct lbs_private *priv, u8 *data, u32 len)
 	if (resp->result == cpu_to_le16(0x0004)) {
 		/* 0x0004 means -EAGAIN. Drop the response, let it time out
 		   and be resubmitted */
-		pr_info("Firmware returns DEFER to command %x. Will let it time out...\n",
-			le16_to_cpu(resp->command));
+		netdev_info(priv->dev,
+			    "Firmware returns DEFER to command %x. Will let it time out...\n",
+			    le16_to_cpu(resp->command));
 		spin_unlock_irqrestore(&priv->driver_lock, flags);
 		ret = -1;
 		goto done;
@@ -318,28 +318,28 @@ int lbs_process_event(struct lbs_private *priv, u32 event)
 		lbs_deb_cmd("EVENT: ADHOC beacon lost\n");
 		break;
 	case MACREG_INT_CODE_RSSI_LOW:
-		pr_alert("EVENT: rssi low\n");
+		netdev_alert(priv->dev, "EVENT: rssi low\n");
 		break;
 	case MACREG_INT_CODE_SNR_LOW:
-		pr_alert("EVENT: snr low\n");
+		netdev_alert(priv->dev, "EVENT: snr low\n");
 		break;
 	case MACREG_INT_CODE_MAX_FAIL:
-		pr_alert("EVENT: max fail\n");
+		netdev_alert(priv->dev, "EVENT: max fail\n");
 		break;
 	case MACREG_INT_CODE_RSSI_HIGH:
-		pr_alert("EVENT: rssi high\n");
+		netdev_alert(priv->dev, "EVENT: rssi high\n");
 		break;
 	case MACREG_INT_CODE_SNR_HIGH:
-		pr_alert("EVENT: snr high\n");
+		netdev_alert(priv->dev, "EVENT: snr high\n");
 		break;
 
 	case MACREG_INT_CODE_MESH_AUTO_STARTED:
 		/* Ignore spurious autostart events */
-		pr_info("EVENT: MESH_AUTO_STARTED (ignoring)\n");
+		netdev_info(priv->dev, "EVENT: MESH_AUTO_STARTED (ignoring)\n");
 		break;
 
 	default:
-		pr_alert("EVENT: unknown event id %d\n", event);
+		netdev_alert(priv->dev, "EVENT: unknown event id %d\n", event);
 		break;
 	}
 
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c
index c179094..f2f65bc 100644
--- a/drivers/net/wireless/libertas/debugfs.c
+++ b/drivers/net/wireless/libertas/debugfs.c
@@ -1,5 +1,3 @@
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
 #include <linux/dcache.h>
 #include <linux/debugfs.h>
 #include <linux/delay.h>
@@ -153,13 +151,14 @@ static ssize_t lbs_host_sleep_write(struct file *file,
 		ret = lbs_set_host_sleep(priv, 0);
 	else if (host_sleep == 1) {
 		if (priv->wol_criteria == EHS_REMOVE_WAKEUP) {
-			pr_info("wake parameters not configured\n");
+			netdev_info(priv->dev,
+				    "wake parameters not configured\n");
 			ret = -EINVAL;
 			goto out_unlock;
 		}
 		ret = lbs_set_host_sleep(priv, 1);
 	} else {
-		pr_err("invalid option\n");
+		netdev_err(priv->dev, "invalid option\n");
 		ret = -EINVAL;
 	}
 
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index eb88d9a..d6f757e 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -363,7 +363,7 @@ static int if_cs_send_cmd(struct lbs_private *priv, u8 *buf, u16 nb)
 		if (status & IF_CS_BIT_COMMAND)
 			break;
 		if (++loops > 100) {
-			pr_err("card not ready for commands\n");
+			netdev_err(priv->dev, "card not ready for commands\n");
 			goto done;
 		}
 		mdelay(1);
@@ -433,14 +433,16 @@ static int if_cs_receive_cmdres(struct lbs_private *priv, u8 *data, u32 *len)
 	/* is hardware ready? */
 	status = if_cs_read16(priv->card, IF_CS_CARD_STATUS);
 	if ((status & IF_CS_BIT_RESP) == 0) {
-		pr_err("no cmd response in card\n");
+		netdev_err(priv->dev, "no cmd response in card\n");
 		*len = 0;
 		goto out;
 	}
 
 	*len = if_cs_read16(priv->card, IF_CS_RESP_LEN);
 	if ((*len == 0) || (*len > LBS_CMD_BUFFER_SIZE)) {
-		pr_err("card cmd buffer has invalid # of bytes (%d)\n", *len);
+		netdev_err(priv->dev,
+			   "card cmd buffer has invalid # of bytes (%d)\n",
+			   *len);
 		goto out;
 	}
 
@@ -474,7 +476,9 @@ static struct sk_buff *if_cs_receive_data(struct lbs_private *priv)
 
 	len = if_cs_read16(priv->card, IF_CS_READ_LEN);
 	if (len == 0 || len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) {
-		pr_err("card data buffer has invalid # of bytes (%d)\n", len);
+		netdev_err(priv->dev,
+			   "card data buffer has invalid # of bytes (%d)\n",
+			   len);
 		priv->dev->stats.rx_dropped++;
 		goto dat_err;
 	}
@@ -752,7 +756,8 @@ static int if_cs_host_to_card(struct lbs_private *priv,
 		ret = if_cs_send_cmd(priv, buf, nb);
 		break;
 	default:
-		pr_err("%s: unsupported type %d\n", __func__, type);
+		netdev_err(priv->dev, "%s: unsupported type %d\n",
+			   __func__, type);
 	}
 
 	lbs_deb_leave_args(LBS_DEB_CS, "ret %d", ret);
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c
index ab86779..a7b5cb0 100644
--- a/drivers/net/wireless/libertas/if_sdio.c
+++ b/drivers/net/wireless/libertas/if_sdio.c
@@ -851,7 +851,7 @@ static int if_sdio_enter_deep_sleep(struct lbs_private *priv)
 	ret = __lbs_cmd(priv, CMD_802_11_DEEP_SLEEP, &cmd, sizeof(cmd),
 			lbs_cmd_copyback, (unsigned long) &cmd);
 	if (ret)
-		pr_err("DEEP_SLEEP cmd failed\n");
+		netdev_err(priv->dev, "DEEP_SLEEP cmd failed\n");
 
 	mdelay(200);
 	return ret;
@@ -867,7 +867,7 @@ static int if_sdio_exit_deep_sleep(struct lbs_private *priv)
 
 	sdio_writeb(card->func, HOST_POWER_UP, CONFIGURATION_REG, &ret);
 	if (ret)
-		pr_err("sdio_writeb failed!\n");
+		netdev_err(priv->dev, "sdio_writeb failed!\n");
 
 	sdio_release_host(card->func);
 	lbs_deb_leave_args(LBS_DEB_SDIO, "ret %d", ret);
@@ -884,7 +884,7 @@ static int if_sdio_reset_deep_sleep_wakeup(struct lbs_private *priv)
 
 	sdio_writeb(card->func, 0, CONFIGURATION_REG, &ret);
 	if (ret)
-		pr_err("sdio_writeb failed!\n");
+		netdev_err(priv->dev, "sdio_writeb failed!\n");
 
 	sdio_release_host(card->func);
 	lbs_deb_leave_args(LBS_DEB_SDIO, "ret %d", ret);
@@ -1103,7 +1103,7 @@ static int if_sdio_probe(struct sdio_func *func,
 		lbs_deb_sdio("send function INIT command\n");
 		if (__lbs_cmd(priv, CMD_FUNC_INIT, &cmd, sizeof(cmd),
 				lbs_cmd_copyback, (unsigned long) &cmd))
-			pr_alert("CMD_FUNC_INIT cmd failed\n");
+			netdev_alert(priv->dev, "CMD_FUNC_INIT cmd failed\n");
 	}
 
 	ret = lbs_start_card(priv);
@@ -1204,19 +1204,20 @@ static int if_sdio_suspend(struct device *dev)
 
 	mmc_pm_flag_t flags = sdio_get_host_pm_caps(func);
 
-	pr_info("%s: suspend: PM flags = 0x%x\n", sdio_func_id(func), flags);
+	dev_info(dev, "%s: suspend: PM flags = 0x%x\n",
+		 sdio_func_id(func), flags);
 
 	/* If we aren't being asked to wake on anything, we should bail out
 	 * and let the SD stack power down the card.
 	 */
 	if (card->priv->wol_criteria == EHS_REMOVE_WAKEUP) {
-		pr_info("Suspend without wake params -- powering down card\n");
+		dev_info(dev, "Suspend without wake params -- powering down card\n");
 		return -ENOSYS;
 	}
 
 	if (!(flags & MMC_PM_KEEP_POWER)) {
-		pr_err("%s: cannot remain alive while host is suspended\n",
-		       sdio_func_id(func));
+		dev_err(dev, "%s: cannot remain alive while host is suspended\n",
+			sdio_func_id(func));
 		return -ENOSYS;
 	}
 
@@ -1237,7 +1238,7 @@ static int if_sdio_resume(struct device *dev)
 	struct if_sdio_card *card = sdio_get_drvdata(func);
 	int ret;
 
-	pr_info("%s: resume: we're back\n", sdio_func_id(func));
+	dev_info(dev, "%s: resume: we're back\n", sdio_func_id(func));
 
 	ret = lbs_resume(card->priv);
 
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c
index bebd9f0..30f21b1 100644
--- a/drivers/net/wireless/libertas/if_spi.c
+++ b/drivers/net/wireless/libertas/if_spi.c
@@ -559,6 +559,7 @@ static int if_spi_prog_main_firmware_check_len(struct if_spi_card *card,
 static int if_spi_prog_main_firmware(struct if_spi_card *card,
 					const struct firmware *firmware)
 {
+	struct lbs_private *priv = card->priv;
 	int len, prev_len;
 	int bytes, crc_err = 0, err = 0;
 	const u8 *fw;
@@ -572,8 +573,9 @@ static int if_spi_prog_main_firmware(struct if_spi_card *card,
 
 	err = spu_wait_for_u16(card, IF_SPI_SCRATCH_1_REG, 0, 0);
 	if (err) {
-		pr_err("%s: timed out waiting for initial scratch reg = 0\n",
-		       __func__);
+		netdev_err(priv->dev,
+			   "%s: timed out waiting for initial scratch reg = 0\n",
+			   __func__);
 		goto out;
 	}
 
@@ -589,7 +591,8 @@ static int if_spi_prog_main_firmware(struct if_spi_card *card,
 		if (bytes < 0) {
 			/* If there are no more bytes left, we would normally
 			 * expect to have terminated with len = 0 */
-			pr_err("Firmware load wants more bytes than we have to offer\n");
+			netdev_err(priv->dev,
+				   "Firmware load wants more bytes than we have to offer\n");
 			break;
 		}
 		if (crc_err) {
@@ -674,12 +677,14 @@ static int if_spi_c2h_cmd(struct if_spi_card *card)
 	if (err)
 		goto out;
 	if (!len) {
-		pr_err("%s: error: card has no data for host\n", __func__);
+		netdev_err(priv->dev, "%s: error: card has no data for host\n",
+			   __func__);
 		err = -EINVAL;
 		goto out;
 	} else if (len > IF_SPI_CMD_BUF_SIZE) {
-		pr_err("%s: error: response packet too large: %d bytes, but maximum is %d\n",
-		       __func__, len, IF_SPI_CMD_BUF_SIZE);
+		netdev_err(priv->dev,
+			   "%s: error: response packet too large: %d bytes, but maximum is %d\n",
+			   __func__, len, IF_SPI_CMD_BUF_SIZE);
 		err = -EINVAL;
 		goto out;
 	}
@@ -700,7 +705,7 @@ static int if_spi_c2h_cmd(struct if_spi_card *card)
 
 out:
 	if (err)
-		pr_err("%s: err=%d\n", __func__, err);
+		netdev_err(priv->dev, "%s: err=%d\n", __func__, err);
 	lbs_deb_leave(LBS_DEB_SPI);
 	return err;
 }
@@ -708,6 +713,7 @@ out:
 /* Move data from the card to the host */
 static int if_spi_c2h_data(struct if_spi_card *card)
 {
+	struct lbs_private *priv = card->priv;
 	struct sk_buff *skb;
 	char *data;
 	u16 len;
@@ -720,12 +726,14 @@ static int if_spi_c2h_data(struct if_spi_card *card)
 	if (err)
 		goto out;
 	if (!len) {
-		pr_err("%s: error: card has no data for host\n", __func__);
+		netdev_err(priv->dev, "%s: error: card has no data for host\n",
+			   __func__);
 		err = -EINVAL;
 		goto out;
 	} else if (len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) {
-		pr_err("%s: error: card has %d bytes of data, but our maximum skb size is %zu\n",
-		       __func__, len, MRVDRV_ETH_RX_PACKET_BUFFER_SIZE);
+		netdev_err(priv->dev,
+			   "%s: error: card has %d bytes of data, but our maximum skb size is %zu\n",
+			   __func__, len, MRVDRV_ETH_RX_PACKET_BUFFER_SIZE);
 		err = -EINVAL;
 		goto out;
 	}
@@ -756,7 +764,7 @@ free_skb:
 	dev_kfree_skb(skb);
 out:
 	if (err)
-		pr_err("%s: err=%d\n", __func__, err);
+		netdev_err(priv->dev, "%s: err=%d\n", __func__, err);
 	lbs_deb_leave(LBS_DEB_SPI);
 	return err;
 }
@@ -765,6 +773,7 @@ out:
 static void if_spi_h2c(struct if_spi_card *card,
 			struct if_spi_packet *packet, int type)
 {
+	struct lbs_private *priv = card->priv;
 	int err = 0;
 	u16 int_type, port_reg;
 
@@ -778,7 +787,8 @@ static void if_spi_h2c(struct if_spi_card *card,
 		port_reg = IF_SPI_CMD_RDWRPORT_REG;
 		break;
 	default:
-		pr_err("can't transfer buffer of type %d\n", type);
+		netdev_err(priv->dev, "can't transfer buffer of type %d\n",
+			   type);
 		err = -EINVAL;
 		goto out;
 	}
@@ -792,7 +802,7 @@ out:
 	kfree(packet);
 
 	if (err)
-		pr_err("%s: error %d\n", __func__, err);
+		netdev_err(priv->dev, "%s: error %d\n", __func__, err);
 }
 
 /* Inform the host about a card event */
@@ -816,7 +826,7 @@ static void if_spi_e2h(struct if_spi_card *card)
 	lbs_queue_event(priv, cause & 0xff);
 out:
 	if (err)
-		pr_err("%s: error %d\n", __func__, err);
+		netdev_err(priv->dev, "%s: error %d\n", __func__, err);
 }
 
 static void if_spi_host_to_card_worker(struct work_struct *work)
@@ -826,8 +836,10 @@ static void if_spi_host_to_card_worker(struct work_struct *work)
 	u16 hiStatus;
 	unsigned long flags;
 	struct if_spi_packet *packet;
+	struct lbs_private *priv;
 
 	card = container_of(work, struct if_spi_card, packet_work);
+	priv = card->priv;
 
 	lbs_deb_enter(LBS_DEB_SPI);
 
@@ -836,7 +848,7 @@ static void if_spi_host_to_card_worker(struct work_struct *work)
 	err = spu_read_u16(card, IF_SPI_HOST_INT_STATUS_REG,
 				&hiStatus);
 	if (err) {
-		pr_err("I/O error\n");
+		netdev_err(priv->dev, "I/O error\n");
 		goto err;
 	}
 
@@ -898,7 +910,7 @@ static void if_spi_host_to_card_worker(struct work_struct *work)
 
 err:
 	if (err)
-		pr_err("%s: got error %d\n", __func__, err);
+		netdev_err(priv->dev, "%s: got error %d\n", __func__, err);
 
 	lbs_deb_leave(LBS_DEB_SPI);
 }
@@ -920,7 +932,8 @@ static int if_spi_host_to_card(struct lbs_private *priv,
 	lbs_deb_enter_args(LBS_DEB_SPI, "type %d, bytes %d", type, nb);
 
 	if (nb == 0) {
-		pr_err("%s: invalid size requested: %d\n", __func__, nb);
+		netdev_err(priv->dev, "%s: invalid size requested: %d\n",
+			   __func__, nb);
 		err = -EINVAL;
 		goto out;
 	}
@@ -948,7 +961,8 @@ static int if_spi_host_to_card(struct lbs_private *priv,
 		spin_unlock_irqrestore(&card->buffer_lock, flags);
 		break;
 	default:
-		pr_err("can't transfer buffer of type %d\n", type);
+		netdev_err(priv->dev, "can't transfer buffer of type %d\n",
+			   type);
 		err = -EINVAL;
 		break;
 	}
@@ -981,6 +995,7 @@ static irqreturn_t if_spi_host_interrupt(int irq, void *dev_id)
 
 static int if_spi_init_card(struct if_spi_card *card)
 {
+	struct lbs_private *priv = card->priv;
 	struct spi_device *spi = card->spi;
 	int err, i;
 	u32 scratch;
@@ -1009,7 +1024,8 @@ static int if_spi_init_card(struct if_spi_card *card)
 				break;
 		}
 		if (i == ARRAY_SIZE(fw_table)) {
-			pr_err("Unsupported chip_id: 0x%02x\n", card->card_id);
+			netdev_err(priv->dev, "Unsupported chip_id: 0x%02x\n",
+				   card->card_id);
 			err = -ENODEV;
 			goto out;
 		}
@@ -1018,7 +1034,8 @@ static int if_spi_init_card(struct if_spi_card *card)
 					card->card_id, &fw_table[0], &helper,
 					&mainfw);
 		if (err) {
-			pr_err("failed to find firmware (%d)\n", err);
+			netdev_err(priv->dev, "failed to find firmware (%d)\n",
+				   err);
 			goto out;
 		}
 
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
index 7260791..63e7e2c 100644
--- a/drivers/net/wireless/libertas/if_usb.c
+++ b/drivers/net/wireless/libertas/if_usb.c
@@ -198,7 +198,7 @@ static void if_usb_setup_firmware(struct lbs_private *priv)
 	wake_method.hdr.size = cpu_to_le16(sizeof(wake_method));
 	wake_method.action = cpu_to_le16(CMD_ACT_GET);
 	if (lbs_cmd_with_response(priv, CMD_802_11_FW_WAKE_METHOD, &wake_method)) {
-		pr_info("Firmware does not seem to support PS mode\n");
+		netdev_info(priv->dev, "Firmware does not seem to support PS mode\n");
 		priv->fwcapinfo &= ~FW_CAPINFO_PS;
 	} else {
 		if (le16_to_cpu(wake_method.method) == CMD_WAKE_METHOD_COMMAND_INT) {
@@ -207,7 +207,8 @@ static void if_usb_setup_firmware(struct lbs_private *priv)
 			/* The versions which boot up this way don't seem to
 			   work even if we set it to the command interrupt */
 			priv->fwcapinfo &= ~FW_CAPINFO_PS;
-			pr_info("Firmware doesn't wake via command interrupt; disabling PS mode\n");
+			netdev_info(priv->dev,
+				    "Firmware doesn't wake via command interrupt; disabling PS mode\n");
 		}
 	}
 }
@@ -343,10 +344,12 @@ static int if_usb_probe(struct usb_interface *intf,
 	usb_set_intfdata(intf, cardp);
 
 	if (device_create_file(&priv->dev->dev, &dev_attr_lbs_flash_fw))
-		pr_err("cannot register lbs_flash_fw attribute\n");
+		netdev_err(priv->dev,
+			   "cannot register lbs_flash_fw attribute\n");
 
 	if (device_create_file(&priv->dev->dev, &dev_attr_lbs_flash_boot2))
-		pr_err("cannot register lbs_flash_boot2 attribute\n");
+		netdev_err(priv->dev,
+			   "cannot register lbs_flash_boot2 attribute\n");
 
 	/*
 	 * EHS_REMOVE_WAKEUP is not supported on all versions of the firmware.
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 639461b..84ffafe 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -155,7 +155,7 @@ static void lbs_tx_timeout(struct net_device *dev)
 
 	lbs_deb_enter(LBS_DEB_TX);
 
-	pr_err("tx watch dog timeout\n");
+	netdev_err(dev, "tx watch dog timeout\n");
 
 	dev->trans_start = jiffies; /* prevent tx timeout */
 
@@ -464,8 +464,8 @@ static int lbs_thread(void *data)
 		if (priv->cmd_timed_out && priv->cur_cmd) {
 			struct cmd_ctrl_node *cmdnode = priv->cur_cmd;
 
-			pr_info("Timeout submitting command 0x%04x\n",
-				le16_to_cpu(cmdnode->cmdbuf->command));
+			netdev_info(dev, "Timeout submitting command 0x%04x\n",
+				    le16_to_cpu(cmdnode->cmdbuf->command));
 			lbs_complete_command(priv, cmdnode, -ETIMEDOUT);
 			if (priv->reset_card)
 				priv->reset_card(priv);
@@ -492,7 +492,8 @@ static int lbs_thread(void *data)
 				 * after firmware fixes it
 				 */
 				priv->psstate = PS_STATE_AWAKE;
-				pr_alert("ignore PS_SleepConfirm in non-connected state\n");
+				netdev_alert(dev,
+					     "ignore PS_SleepConfirm in non-connected state\n");
 			}
 		}
 
@@ -586,7 +587,8 @@ int lbs_suspend(struct lbs_private *priv)
 	if (priv->is_deep_sleep) {
 		ret = lbs_set_deep_sleep(priv, 0);
 		if (ret) {
-			pr_err("deep sleep cancellation failed: %d\n", ret);
+			netdev_err(priv->dev,
+				   "deep sleep cancellation failed: %d\n", ret);
 			return ret;
 		}
 		priv->deep_sleep_required = 1;
@@ -619,7 +621,8 @@ int lbs_resume(struct lbs_private *priv)
 		priv->deep_sleep_required = 0;
 		ret = lbs_set_deep_sleep(priv, 1);
 		if (ret)
-			pr_err("deep sleep activation failed: %d\n", ret);
+			netdev_err(priv->dev,
+				   "deep sleep activation failed: %d\n", ret);
 	}
 
 	if (priv->setup_fw_on_resume)
@@ -645,8 +648,8 @@ static void lbs_cmd_timeout_handler(unsigned long data)
 	if (!priv->cur_cmd)
 		goto out;
 
-	pr_info("command 0x%04x timed out\n",
-		le16_to_cpu(priv->cur_cmd->cmdbuf->command));
+	netdev_info(priv->dev, "command 0x%04x timed out\n",
+		    le16_to_cpu(priv->cur_cmd->cmdbuf->command));
 
 	priv->cmd_timed_out = 1;
 	wake_up_interruptible(&priv->waitq);
@@ -961,7 +964,7 @@ int lbs_start_card(struct lbs_private *priv)
 
 	lbs_debugfs_init_one(priv, dev);
 
-	pr_info("%s: Marvell WLAN 802.11 adapter\n", dev->name);
+	netdev_info(dev, "Marvell WLAN 802.11 adapter\n");
 
 	ret = 0;
 
@@ -1088,14 +1091,16 @@ int lbs_get_firmware(struct device *dev, const char *user_helper,
 	if (user_helper) {
 		ret = request_firmware(helper, user_helper, dev);
 		if (ret) {
-			pr_err("couldn't find helper firmware %s", user_helper);
+			dev_err(dev, "couldn't find helper firmware %s\n",
+				user_helper);
 			goto fail;
 		}
 	}
 	if (user_mainfw) {
 		ret = request_firmware(mainfw, user_mainfw, dev);
 		if (ret) {
-			pr_err("couldn't find main firmware %s", user_mainfw);
+			dev_err(dev, "couldn't find main firmware %s\n",
+				user_mainfw);
 			goto fail;
 		}
 	}
diff --git a/drivers/net/wireless/libertas/mesh.c b/drivers/net/wireless/libertas/mesh.c
index f7c51cb..f4c4f1c 100644
--- a/drivers/net/wireless/libertas/mesh.c
+++ b/drivers/net/wireless/libertas/mesh.c
@@ -248,7 +248,7 @@ int lbs_init_mesh(struct lbs_private *priv)
 		lbs_add_mesh(priv);
 
 		if (device_create_file(&dev->dev, &dev_attr_lbs_mesh))
-			pr_err("cannot register lbs_mesh attribute\n");
+			netdev_err(dev, "cannot register lbs_mesh attribute\n");
 
 		ret = 1;
 	}
@@ -928,7 +928,7 @@ static ssize_t mesh_id_get(struct device *dev, struct device_attribute *attr,
 		return ret;
 
 	if (defs.meshie.val.mesh_id_len > IEEE80211_MAX_SSID_LEN) {
-		pr_err("inconsistent mesh ID length\n");
+		dev_err(dev, "inconsistent mesh ID length\n");
 		defs.meshie.val.mesh_id_len = IEEE80211_MAX_SSID_LEN;
 	}
 
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c
index fd045aa..f2ef0ae 100644
--- a/drivers/net/wireless/libertas/rx.c
+++ b/drivers/net/wireless/libertas/rx.c
@@ -251,7 +251,7 @@ static int process_rxed_802_11_packet(struct lbs_private *priv,
 	/* add space for the new radio header */
 	if ((skb_headroom(skb) < sizeof(struct rx_radiotap_hdr)) &&
 	    pskb_expand_head(skb, sizeof(struct rx_radiotap_hdr), 0, GFP_ATOMIC)) {
-		pr_alert("%s: couldn't pskb_expand_head\n", __func__);
+		netdev_alert(dev, "%s: couldn't pskb_expand_head\n", __func__);
 		ret = -ENOMEM;
 		kfree_skb(skb);
 		goto done;
-- 
1.7.5.rc3.dirty


^ permalink raw reply related

* [GIT] Networking
From: David Miller @ 2011-05-03  0:18 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, netdev, linux-kernel


The commit count here is not as low as I would have liked, but it is the
usual smattering of one-liners fixing problems people are actually
running into.  Considering the fact that the last networking pull
request was nearly 2 weeks ago, the hit count isn't that bad.

Along with the straight-out fixes, there are a few reverts for changes
that caused clear regressions.

Anyways:

1) Revert veth change, breaks configuration of veth devices, from Jiri
   Pirko.

2) WoL by default isn't done properly in tg3 driver, from Rafael
   J. Wysocki.

3) fs_enet driver doesn't configure multicast into the chip properly,
   from Andrea Galbusera.

4) Fix QoS config send halting TX in iwlwifi, from Daniel Halperin.

5) atl1c manages async work events using non-atomic bit field, use
   atomic bitops to fix these races, from Tim Gardner.

6) Revert bridging change which broke 802.3ad bonding inside of
   bridge.

7) Removing a net driver can wedge in netconsole due to recursive
   locking, fix from Neil Horman.

8) bnx2x blindly dereferences packets as if they were all TCP,
   fix to check protocol type properly and handle UDP correctly
   as well.  From Eric Dumazet and Vladislav Zolotarov.

9) Fix r8169 to not request firmware before userspace is even
   present, from Francois Romieu.

10) Blackhole routes need to provide ->cow_metrics() op otherwise
    we OOPS, from Held Benhard.

11) IPSEC replay window handling fixes from Steffen Klassert.

12) usbnet can wedge on resume because a pending interrupt URB
    gets lost, resubmit it on resume.  From Paul Stewart.

13) Pending timer on remove results in OOPS in bnx2 driver, fix
    from Neil Horman.

14) ftmac100 does usleep_range() in non-sleepable contexts, fix
    to use udelay() for now.  From Adam Jaremko.

15) AF_UNIX sockets use a dummy packet send in order to implement
    connect() and accept().  We want to completely ignore these
    pseudo-packets in recvmsg() otherwise we can OOPS.  Fix
    from Eric W. Biederman.

16) Every net namespace creation emits an annoying log message from
    the fib_trie code, kill it.  From Alexey Dobriyan.

17) Invalid ioctl commands should emit -ENOTTY not -EINVAL.  From
    Lifeng Sun.

18) smsc95xx driver checks BMCR register bit improperly, it's
    actually using a register address (which is zero and thus
    the test never passes) :-)  Sharp eyed fix from Rabin Vincent.

19) Calls to register_net_sysctl_table() should be consistently
    paired with unregister_net_sysctl_table().  Fix broken cases,
    from Lucian Adrian Grijincu.

20) RAW CAN socket release can OOPS due to missing 'sk' check, from
    Oliver Hartkopp.

    The BCM CAN code has an identical bug, also fixed here, as
    was originally reported by Dave Jones.

    These bugs were uncovered thanks to Dave's syscall stresser.

21) SKB use after free fixes in iwlwifi and iwl4965, from Stanislaw
    Gruszka.

22) udp6_ufo_fragment() mis-calculates SKB headroom, from Shan Wei.

23) A conversion of how the RTAX_HOPLIMIT mertric is handled in ipv6
    missed one case, resulting in addrconf routes always using
    "255" as the hop limit.  Fix from Thomas Egerer.

24) Missing counter bump in be2net driver results in temperature
    sense happening way too often, from Ivan Vecera.

25) agg_device_up() in the bonding code uses the wrong method to find
    the aggregator of the bond, it should use agg->lag_ports->slave
    instead of agg->slave.  Fix from Jiri Bohac.

26) Bluetooth HCI connect code does one refcount grab too many,
    fix from Ville Tervo.

Please pull, thanks a lot!

The following changes since commit adadfe48df3858c3c1ba52963502f38885ab2f3c:

  Merge branch 'for-linus' of git://git.infradead.org/ubifs-2.6 (2011-05-02 12:17:29 -0700)

are available in the git repository at:

  master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git master

Adam Jaremko (1):
      net: ftmac100: fix scheduling while atomic during PHY link status change

Alexey Dobriyan (1):
      ipv4: don't spam dmesg with "Using LC-trie" messages

Andrea Galbusera (1):
      powerpc: Fix multicast problem in fs_enet driver

Breno Leitao (1):
      ehea: Fix a DLPAR bug on ehea_rereg_mrs().

Dan Williams (1):
      usbnet: add support for some Huawei modems with cdc-ether ports

Daniel Halperin (1):
      iwlwifi: fix frame injection for HT channels

Dave Jones (1):
      can: Add missing socket check in can/bcm release.

David S. Miller (4):
      Revert "bridge: Forward reserved group addresses if !STP"
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless-2.6
      Merge branch 'davem.r8169' of git://git.kernel.org/.../romieu/netdev-2.6
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless-2.6

Eric W. Biederman (1):
      af_unix: Only allow recv on connected seqpacket sockets.

Felix Fietkau (1):
      ath9k: fix the return value of ath_stoprecv

François Romieu (1):
      r8169: don't request firmware when there's no userspace.

Hans Petter Selasky (1):
      cdc_ncm: fix short packet issue on some devices

Held Bernhard (1):
      net: provide cow_metrics() methods to blackhole dst_ops

Ivan Vecera (1):
      be2net: increment work_counter in be_worker

Jiri Bohac (1):
      bonding: 802.3ad - fix agg_device_up

Jiri Pirko (1):
      Revert: veth: remove unneeded ifname code from veth_newlink()

Joe Perches (1):
      amd8111e: trivial typo spelling: Negotitate -> Negotiate

Johannes Berg (1):
      mac80211: fix SMPS debugfs locking

John W. Linville (1):
      Merge branch 'master' of git://git.kernel.org/.../padovan/bluetooth-2.6

Lifeng Sun (1):
      networking: inappropriate ioctl operation should return ENOTTY

Lucian Adrian Grijincu (1):
      sysctl: net: call unregister_net_sysctl_table where needed

Luiz Augusto von Dentz (1):
      Bluetooth: fix shutdown on SCO sockets

Neil Horman (2):
      netconsole: fix deadlock when removing net driver that netconsole is using (v2)
      bnx2: cancel timer on device removal

Oliver Hartkopp (1):
      can: add missing socket check in can/raw release

Oliver Neukum (1):
      usbnet: Transfer of maintainership

Paul Stewart (1):
      usbnet: Resubmit interrupt URB if device is open

Peter Korsgaard (1):
      dsa/mv88e6131: fix unknown multicast/broadcast forwarding on mv88e6085

Rabin Vincent (1):
      smsc95xx: fix reset check

Rafael J. Wysocki (1):
      tg3: Fix failure to enable WoL by default when possible

Rafał Miłecki (1):
      b43: trivial: update module info about ucode16_mimo firmware

Ruiyi Zhang (1):
      Bluetooth: Only keeping SAR bits when retransmitting one frame.

Shan Wei (1):
      ipv6: udp: fix the wrong headroom check

Stanislaw Gruszka (5):
      iwlwifi: fix skb usage after free
      iwl4965: fix skb usage after free
      iwl4965: fix "TX Power requested while scanning"
      iwlagn: fix "Received BA when not expected"
      iwl4965: fix "Received BA when not expected"

Steffen Klassert (3):
      xfrm: Fix replay window size calculation on initialization
      esp6: Fix scatterlist initialization
      xfrm: Check for the new replay implementation if an esn state is inserted

Thomas Egerer (1):
      ipv6: Remove hoplimit initialization to -1

Tim Gardner (1):
      atl1c: Fix work event interrupt/task races

Ville Tervo (1):
      Bluetooth: Fix refcount balance for hci connection

Vinicius Costa Gomes (1):
      Bluetooth: Fix keeping the command timer running

Vladislav Zolotarov (1):
      bnx2x: fix UDP csum offload

Wey-Yi Guy (1):
      iwlegacy: led stay solid on when no traffic

artpol (1):
      mii: add support of pause frames in mii_get_an

 MAINTAINERS                                  |    2 +-
 arch/powerpc/include/asm/8xx_immap.h         |    4 +-
 drivers/net/amd8111e.c                       |    2 +-
 drivers/net/atl1c/atl1c.h                    |    6 +-
 drivers/net/atl1c/atl1c_main.c               |   14 ++---
 drivers/net/benet/be_main.c                  |    1 +
 drivers/net/bnx2.c                           |    2 +
 drivers/net/bnx2x/bnx2x_cmn.c                |   34 ++++++---
 drivers/net/bonding/bond_3ad.c               |    7 ++-
 drivers/net/ehea/ehea_main.c                 |    9 ++-
 drivers/net/fs_enet/mac-fec.c                |    8 +-
 drivers/net/ftmac100.c                       |    8 +-
 drivers/net/mii.c                            |    4 +
 drivers/net/netconsole.c                     |    8 ++
 drivers/net/r8169.c                          |   99 ++++++++++++++++++-------
 drivers/net/tg3.c                            |    8 ++-
 drivers/net/usb/cdc_ether.c                  |   14 +++-
 drivers/net/usb/cdc_ncm.c                    |    4 +-
 drivers/net/usb/smsc95xx.c                   |    2 +-
 drivers/net/usb/usbnet.c                     |    8 ++
 drivers/net/veth.c                           |   12 +++
 drivers/net/wireless/ath/ath9k/recv.c        |    2 +-
 drivers/net/wireless/b43/main.c              |    1 +
 drivers/net/wireless/iwlegacy/iwl-4965-tx.c  |   28 +++++---
 drivers/net/wireless/iwlegacy/iwl-led.c      |   20 +++++-
 drivers/net/wireless/iwlegacy/iwl4965-base.c |    8 +-
 drivers/net/wireless/iwlwifi/iwl-agn-rxon.c  |    7 +--
 drivers/net/wireless/iwlwifi/iwl-agn-tx.c    |   27 +++++---
 include/linux/usb/usbnet.h                   |    1 +
 net/bluetooth/hci_core.c                     |    5 +-
 net/bluetooth/hci_event.c                    |    2 -
 net/bluetooth/l2cap_core.c                   |    1 +
 net/bluetooth/sco.c                          |    9 +++
 net/bridge/br_input.c                        |    2 +-
 net/can/bcm.c                                |    7 ++-
 net/can/raw.c                                |    7 ++-
 net/core/dev.c                               |    6 +-
 net/dsa/Kconfig                              |    4 +-
 net/dsa/mv88e6131.c                          |   26 ++++++--
 net/ipv4/devinet.c                           |    2 +-
 net/ipv4/fib_trie.c                          |    3 -
 net/ipv4/route.c                             |    7 ++
 net/ipv6/addrconf.c                          |    2 +-
 net/ipv6/esp6.c                              |    2 +-
 net/ipv6/route.c                             |    8 ++-
 net/ipv6/udp.c                               |    2 +-
 net/mac80211/cfg.c                           |    2 +
 net/mac80211/debugfs_netdev.c                |    4 +-
 net/unix/af_unix.c                           |   16 ++++-
 net/xfrm/xfrm_replay.c                       |    2 +-
 net/xfrm/xfrm_user.c                         |    3 +
 51 files changed, 338 insertions(+), 134 deletions(-)

^ permalink raw reply

* Re: [PATCH] net: fix rtnl even race in register_netdevice()
From: Kalle Valo @ 2011-05-03  2:38 UTC (permalink / raw)
  To: David Miller
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20110429.135339.200375209.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> writes:

> From: Kalle Valo <kvalo-BkwN83ws05HQT0dZR+AlfA@public.gmane.org>
> Date: Fri, 29 Apr 2011 20:26:34 +0300
>
>> From: Kalle Valo <kalle.valo-DlyHzToyqoxBDgjK7y7TUQ@public.gmane.org>
>> 
>> There's a race in register_netdevice so that the rtnl event is sent before
>> the device is actually ready. This was visible with flimflam, chrome os
>> connection manager:

[...]

>> The fix is to call netdev_register_kobject() after the device is added
>> to the list.
>> 
>> Signed-off-by: Kalle Valo <kalle.valo-DlyHzToyqoxBDgjK7y7TUQ@public.gmane.org>
>
> This is not correct.
>
> If you move the kobject registry around, you have to change the
> error handling cleanup to match.
>
> This change will leave the netdevice on all sorts of lists, it will
> also leak a reference to the device.
>
> I also think this points a fundamental problem with this change, in
> that you can't register the kobject after the device is added to
> the various lists in list_netdevice().
>
> Once it's in those lists, any thread of control can find the device
> and those threads of control may try to get at the data backed by
> the kobject and therefore they really expect it to be there by
> then.
>
> What you can do instead is try to delay the NETREG_REGISTERED
> setting, and block the problematic notifications by testing
> reg_state or similar.

Thanks for the review. I'll investigate more about this and send v2
once I found a better solution.

-- 
Kalle Valo
--
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


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