Netdev List
 help / color / mirror / Atom feed
* [PATCH NEXT 1/1] MAINTAINERS: change netxen_nic maintainers
From: amit.salecha @ 2011-08-18 10:44 UTC (permalink / raw)
  To: davem
  Cc: netdev, ameen.rahman, Amit Kumar Salecha, Sony Chacko,
	Rajesh Borundia

From: Amit Kumar Salecha <amit.salecha@qlogic.com>

I will no longer maintain netxen_nic driver.
Sony Chacko and Rajesh Borundia are taking over.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Cc: Sony Chacko <sony.chacko@qlogic.com>
Cc: Rajesh Borundia <rajesh.borundia@qlogic.com>
---
 MAINTAINERS |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index d374c6f..79edb1c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4495,7 +4495,8 @@ F:	include/linux/if_*
 F:	include/linux/*device.h
 
 NETXEN (1/10) GbE SUPPORT
-M:	Amit Kumar Salecha <amit.salecha@qlogic.com>
+M:	Sony Chacko <sony.chacko@qlogic.com>
+M:	Rajesh Borundia <rajesh.borundia@qlogic.com>
 L:	netdev@vger.kernel.org
 W:	http://www.qlogic.com
 S:	Supported
-- 
1.7.3.3



^ permalink raw reply related

* Re: [PATCH NEXT 1/1] MAINTAINERS: change netxen_nic maintainers
From: David Miller @ 2011-08-18 11:13 UTC (permalink / raw)
  To: amit.salecha; +Cc: netdev, ameen.rahman, sony.chacko, rajesh.borundia
In-Reply-To: <1313664250-14639-1-git-send-email-amit.salecha@qlogic.com>

From: <amit.salecha@qlogic.com>
Date: Thu, 18 Aug 2011 03:44:10 -0700

> From: Amit Kumar Salecha <amit.salecha@qlogic.com>
> 
> I will no longer maintain netxen_nic driver.
> Sony Chacko and Rajesh Borundia are taking over.
> 
> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>

Applied, thank you.

^ permalink raw reply

* [PATCH net-next-2.6] be2net: Storing the 'vid' got by the grp5 event instead of storing the vlan_tag
From: Somnath Kotur @ 2011-08-18 16:40 UTC (permalink / raw)
  To: netdev, davem; +Cc: Somnath Kotur


Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
---
 drivers/net/ethernet/emulex/benet/be_cmds.c |    2 +-
 drivers/net/ethernet/emulex/benet/be_main.c |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index 4278595..bec039d 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.c
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
@@ -140,7 +140,7 @@ static void be_async_grp5_pvid_state_process(struct be_adapter *adapter,
 		struct be_async_event_grp5_pvid_state *evt)
 {
 	if (evt->enabled)
-		adapter->pvid = le16_to_cpu(evt->tag);
+		adapter->pvid = le16_to_cpu(evt->tag) & VLAN_VID_MASK;
 	else
 		adapter->pvid = 0;
 }
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 7c98d8e..cbc10c9 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -1277,8 +1277,7 @@ static struct be_rx_compl_info *be_rx_compl_get(struct be_rx_obj *rxo)
 		if (!lancer_chip(adapter))
 			rxcp->vlan_tag = swab16(rxcp->vlan_tag);
 
-		if (((adapter->pvid & VLAN_VID_MASK) ==
-		     (rxcp->vlan_tag & VLAN_VID_MASK)) &&
+		if (adapter->pvid == (rxcp->vlan_tag & VLAN_VID_MASK) &&
 		    !adapter->vlan_tag[rxcp->vlan_tag])
 			rxcp->vlanf = 0;
 	}
-- 
1.5.6.1


^ permalink raw reply related

* Re: [PATCH] bnx2x: downgrade Max BW error message to debug
From: Michal Schmidt @ 2011-08-18 11:37 UTC (permalink / raw)
  To: eilong; +Cc: netdev@vger.kernel.org, Dmitry Kravkov, Vladislav Zolotarov
In-Reply-To: <1313603055.12483.3.camel@lb-tlvb-eilong.il.broadcom.com>

On Wed, 17 Aug 2011 20:44:15 +0300 Eilon Greenstein wrote:
> I think that we should use DP instead of DBG_ERR. How about this one:
... 
> Can you sing-off on somethign like this?

OK, let's use DP. Thanks!


Subject: [PATCH v2] bnx2x: downgrade Max BW error message to debug

There are valid configurations where Max BW is configured to zero for
some VNs.
Print the message only if debugging is enabled and do not call the
configuration "illegal".

[v2: use DP(), not BNX2X_DBG_ERR(); recommended by Eilon Greenstein.]

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
index 223bfee..9059aef 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
@@ -1481,8 +1481,8 @@ static inline u16 bnx2x_extract_max_cfg(struct bnx2x *bp, u32 mf_cfg)
 	u16 max_cfg = (mf_cfg & FUNC_MF_CFG_MAX_BW_MASK) >>
 			      FUNC_MF_CFG_MAX_BW_SHIFT;
 	if (!max_cfg) {
-		BNX2X_ERR("Illegal configuration detected for Max BW - "
-			  "using 100 instead\n");
+		DP(NETIF_MSG_LINK,
+		   "Max BW configured to 0 - using 100 instead\n");
 		max_cfg = 100;
 	}
 	return max_cfg;
-- 
1.7.6


^ permalink raw reply related

* Re: [Bug 41212] New: [regression] [3.1-git] ipoib causes kernel panic (NULL pointer dereference)
From: Bernd Schubert @ 2011-08-18 11:44 UTC (permalink / raw)
  To: Erez Shitrit
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <CAAk-MO9Y4h7scaJEE9aFKw9sp=VF3YZrT+oY2xvQY9tvGhvOTg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hello Erez,

maybe it is another bug? Do you have the stack trace?
Any I guess you are the networking expert ;) I only looked at the 
3.1-ipoib issue, as it prevented me too boot at all and I couldn't do my 
real work...


Cheers,
Bernd

On 08/17/2011 11:06 AM, Erez Shitrit wrote:
> Hi Bernd,
> you are right, but it still happened. (also no changes in IPoIB between
> the tags, it might connected to the networking? )
>
> Thanks, Erez
>
> On Tue, Aug 16, 2011 at 1:34 PM, Bernd Schubert
> <bernd.schubert-97jfqw80gc6171pxa8y+qA@public.gmane.org <mailto:bernd.schubert-97jfqw80gc6171pxa8y+qA@public.gmane.org>> wrote:
>
>     Hello Erez,
>
>     are you sure? Commit 69cce1d1404968f78b177a0314f582 2d5afdbbfb is
>     not in 3.0 yet and I also don't see how 3.0 should fail there, as it
>     tests immediately for "if (likely(skb_dst(skb)"
>
>
>     Thanks,
>     Bernd
>
>
>     On 08/16/2011 10:06 AM, Erez Shitrit wrote:
>
>         Hi,
>         it happened in 3.0 also, if you take the git tag v3.0-rc7 and
>         below it
>         will work.
>
>         Thanks, Erez
>
>         On Mon, Aug 15, 2011 at 6:40 PM, <bugzilla-daemon@bugzilla.
>         kernel.org <mailto:bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r@public.gmane.org>
>         <mailto:bugzilla-daemon@ bugzilla.kernel.org
>         <mailto:bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r@public.gmane.org>>> wrote:
>
>         https://bugzilla.kernel.org/ show_bug.cgi?id=41212
>         <https://bugzilla.kernel.org/show_bug.cgi?id=41212>
>
>                        Summary: [regression] [3.1-git] ipoib causes
>         kernel panic
>             (NULL
>                                 pointer dereference)
>                        Product: Networking
>                        Version: 2.5
>                 Kernel Version: 3.1-git
>                       Platform: All
>                     OS/Version: Linux
>                           Tree: Mainline
>                         Status: NEW
>                       Severity: normal
>                       Priority: P1
>                      Component: Other
>                     AssignedTo: acme-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org
>         <mailto:acme-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
>         <mailto:acme@ghostprotocols. net <mailto:acme-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>>
>
>                     ReportedBy: bernd.schubert-97jfqw80gc6171pxa8y+qA@public.gmane.org
>         <mailto:bernd.schubert-97jfqw80gc6171pxa8y+qA@public.gmane.org>
>         <mailto:bernd.schubert@ fastmail.fm
>         <mailto:bernd.schubert-97jfqw80gc6171pxa8y+qA@public.gmane.org>>
>
>                             CC: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>         <mailto:linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
>         <mailto:linux-rdma@vger. kernel.org
>         <mailto:linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>>
>
>                     Regression: Yes
>
>
>             Each time when I start IPoIB with any 3.1-rcX git version I
>         tested
>             so far I get
>             a kernel panic. This didn't happen in 3.0 yet.
>
>
>             fslab2 login: [  114.392408] EXT4-fs (sdc): barriers disabled
>             [  114.449737] EXT4-fs (sdc): mounted filesystem with
>         writeback data
>             mode.
>             Opts: journal_async_commit,barrier= 0,data=writeback
>             [  240.944030] BUG: unable to handle kernel NULL pointer
>         dereference at
>             0000000000000040
>             [  240.948007] IP: [<ffffffffa0366ce9>]
>         ipoib_start_xmit+0x39/0x280
>             [ib_ipoib]
>             [  240.948007] PGD 1f964f067 PUD 1f9bf2067 PMD 0
>             [  240.948007] Oops: 0000 [#1] SMP
>             [  240.948007] CPU 1
>             [  240.948007] Modules linked in: ext4 mbcache jbd2 crc16 nfsd
>             ib_umad rdma_ucm
>             rdma_cm iw_cm ib_addr ib_uverbs ib_ipoib sg ib_cm ib_sa ipv6
>         sd_mod
>             crc_t10dif
>             loop arcmsr md_mod pcspkr ib_mthca ib_mad ib_core 8250_pnp fuse
>             af_packet nfs
>             lockd fscache auth_rpcgss nfs_acl sunrpc btrfs lzo_decompress
>             lzo_compress
>             zlib_deflate crc32c libcrc32c crypto_hash crypto_algapi
>         ata_generic
>             pata_acpi
>             e1000 pata_amd sata_nv libata scsi_mod unix [last unloaded:
>             scsi_wait_scan]
>             [  240.948007]
>             [  240.948007] Pid: 0, comm: kworker/0:0 Not tainted
>         3.1.0-rc2+ #29
>             Supermicro
>             H8DCE/H8DCE
>             [  240.948007] RIP: 0010:[<ffffffffa0366ce9>]
>           [<ffffffffa0366ce9>]
>             ipoib_start_xmit+0x39/0x280 [ib_ipoib]
>             [  240.948007] RSP: 0018:ffff8801ffc03c10  EFLAGS: 00010246
>             [  240.948007] RAX: 0000000000000000 RBX: ffff8801f99ea000 RCX:
>             0000000000004420
>             [  240.948007] RDX: 0000000000000000 RSI: ffff8801f99ea000 RDI:
>             ffff8801f9afd500
>             [  240.948007] RBP: ffff8801ffc03c40 R08: ffff8801f940d49c R09:
>             ffff8801f9852240
>             [  240.948007] R10: 0000000000000000 R11: 0000000000000020 R12:
>             ffff8801f9afd500
>             [  240.948007] R13: 0000000000000050 R14: ffff8801f99ea600 R15:
>             ffff8801f9852280
>             [  240.948007] FS:  00007f0b66016700(0000)
>         GS:ffff8801ffc00000(0000)
>             knlGS:0000000000000000
>             [  240.948007] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
>             [  240.948007] CR2: 0000000000000040 CR3: 00000001f9a65000 CR4:
>             00000000000006e0
>             [  240.948007] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
>             0000000000000000
>             [  240.948007] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
>             0000000000000400
>             [  240.948007] Process kworker/0:0 (pid: 0, threadinfo
>             ffff8800bfe82000, task
>             ffff8800bfe6f1a0)
>             [  240.948007] Stack:
>             [  240.948007]  0000000000000010 ffff8801f9afd500
>         0000000000004420
>             0000000000000050
>             [  240.948007]  ffff8801f99ea000 ffff8801f9852280
>         ffff8801ffc03ca0
>             ffffffff812cd5e0
>             [  240.948007]  0000000000000001 ffffffffa03721a0
>         ffffffff8131f680
>             ffff8801fa110540
>             [  240.948007] Call Trace:
>             [  240.948007] <IRQ>
>             [  240.948007]  [<ffffffff812cd5e0>]
>         dev_hard_start_xmit+0x2a0/ 0x590
>             [  240.948007]  [<ffffffff8131f680>] ? arp_create+0x70/0x200
>             [  240.948007]  [<ffffffff812e8e1f>] sch_direct_xmit+0xef/0x1c0
>             [  240.948007]  [<ffffffff812cd9f9>] dev_queue_xmit+0x129/0x3b0
>             [  240.948007]  [<ffffffff8131f853>] arp_send+0x43/0x50
>             [  240.948007]  [<ffffffff8131f96b>] arp_solicit+0x10b/0x240
>
>             --
>             Configure bugmail: https://bugzilla.kernel.org/
>         userprefs.cgi?tab=email
>         <https://bugzilla.kernel.org/userprefs.cgi?tab=email>
>             ------- You are receiving this mail because: -------
>             You are on the CC list for the bug.
>             --
>             To unsubscribe from this list: send the line "unsubscribe
>         linux-rdma" in
>             the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>         <mailto:majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
>         <mailto:majordomo-u79uwXL29TasMV2rI37PzA@public.gmane.org org
>         <mailto:majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>>
>
>             More majordomo info at http://vger.kernel.org/
>         majordomo-info.html <http://vger.kernel.org/majordomo-info.html>
>
>
>
>

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

^ permalink raw reply

* Re: [PATCH] bnx2x: downgrade Max BW error message to debug
From: Eilon Greenstein @ 2011-08-18 12:22 UTC (permalink / raw)
  To: Michal Schmidt
  Cc: netdev@vger.kernel.org, Dmitry Kravkov, Vladislav Zolotarov
In-Reply-To: <20110818133751.3ba77279@brian.englab.brq.redhat.com>

On Thu, 2011-08-18 at 04:37 -0700, Michal Schmidt wrote:
> On Wed, 17 Aug 2011 20:44:15 +0300 Eilon Greenstein wrote:
> > I think that we should use DP instead of DBG_ERR. How about this one:
> ... 
> > Can you sing-off on somethign like this?
> 
> OK, let's use DP. Thanks!
> 
> 
> Subject: [PATCH v2] bnx2x: downgrade Max BW error message to debug
> 
> There are valid configurations where Max BW is configured to zero for
> some VNs.
> Print the message only if debugging is enabled and do not call the
> configuration "illegal".
> 
> [v2: use DP(), not BNX2X_DBG_ERR(); recommended by Eilon Greenstein.]
> 
> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>

Acked-by: Eilon Greenstein <eilong@broadcom.com>

Thanks Michal!



^ permalink raw reply

* Re: Linux vs FreeBSD Which is correct.
From: Stephen Clark @ 2011-08-18 12:42 UTC (permalink / raw)
  To: Pascal Hambourg; +Cc: Rémi Denis-Courmont, Linux Kernel Network Developers
In-Reply-To: <4E4C2178.1000809@plouf.fr.eu.org>

On 08/17/2011 04:15 PM, Pascal Hambourg wrote:
> Hello,
>
> Stephen Clark a écrit :
>    
>> On 08/17/2011 01:17 PM, Rémi Denis-Courmont wrote:
>>      
>>> Le mercredi 17 août 2011 20:03:18 Stephen Clark, vous avez écrit :
>>>
>>>        
>>>> I have run into a situation where if I ping our HQ the response comes
>>>> back on a different
>>>> interface than what the request went out on. FreeBSD is happy and says
>>>> it got the response,
>>>> Linux is not and gives no indication it got a response.
>>>>
>>>> So is FreeBSD wrong or is Linux wrong?
>>>>          
> Neither is right or wrong. It partly depends whether you want to enforce
> so-called "weak" or "strong" host model.
>
>    
>>> Most distributions enable reverse path filtering by default.
>>> It can be disabled:
>>> # echo -n 0>   /proc/sys/net/ipv4/conf/all/rp_filter
>>>
>>> But you should probably fix the configuration instead (e.g. /etc/sysctl.conf).
>>>
>>>        
>> Sorry that didn't help either.
>>      
> Since some kernel version the logic of this sysctl has changed from
> AND(all, $interface) to MAX(all, $interface). So you must set
> net/ipv4/conf/$interface/rp_filter to 0 too to disable it.
> Or set net/ipv4/conf/all/rp_filter to 2 to make it weaker.
>
>    
I guess I don't really understand what reverse path filter stuff is all 
about, much less making it weaker.
But using 2 made the pings responses be seen.

-- 

"They that give up essential liberty to obtain temporary safety,
deserve neither liberty nor safety."  (Ben Franklin)

"The course of history shows that as a government grows, liberty
decreases."  (Thomas Jefferson)




^ permalink raw reply

* Re: [RFC PATCH] net: vlan: 802.1ad S-VLAN support
From: Ben Hutchings @ 2011-08-18 14:38 UTC (permalink / raw)
  To: David Lamparter; +Cc: netdev, Patrick McHardy
In-Reply-To: <1310936105-3494206-1-git-send-email-equinox@diac24.net>

On Sun, 2011-07-17 at 22:55 +0200, David Lamparter wrote:
> this adds support for 802.1ad S-VLANs, which basically are regular VLANs
> with a different protocol field. also supported are the legacy QinQ
> 9100/9200/9300 ethertypes. as with the CFI bit for 802.1Q, the DEI bit
> is blissfully ignored.
> 
> this patch modifies the 802.1Q code, but keeps the regular VLAN
> acceleration architecture unchanged. the S-VLAN code does not use that;
> I am not aware of any NIC implementing it for ethertypes other than
> 8100.
[...]

I've not heard of multiple-VLAN-tag-insertion, but any controller that
implements a generic 16-bit checksum should be able to do TX checksum
offload regardless of the number of tags present.  So I think VLAN
devices should have their own vlan_features set to at least:
    NETIF_F_HW_CSUM | NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDM

Some controllers that rely on header parsing for TX checksum offload can
also handle multiple VLAN tags; our current chips recognise up to 3 VLAN
tags with any of those Ethertypes.  It would be good to have some way
for physical device drivers to advertise this feature so that nested
VLAN devices can take advantage of it.  (I am definitely *not* proposing
vlan2_features, vlan3_features, which wouldn't even be sufficient to
represent Ethertype constraints.)

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


^ permalink raw reply

* Re: protect raw sockets
From: krbmit siso @ 2011-08-18 15:01 UTC (permalink / raw)
  To: netdev, ipsec-tools-users, ipsec-tools-devel, ikev2-devel,
	Timo Teräs
In-Reply-To: <CABjs8yWMgyyPHC1Nfgs2TZ1ixN7Khq0OimEhUhTs-Ux_9LAx5g@mail.gmail.com>

Hi All,
After adding the below code in net/ipv4/raw.c in function raw_send_hdrinc()
I am able to see packet sent using RAW_SOCKET getting protected .

Please  let me know how can it be done better and provide it has a feature
, so that others can also use it  if  packet sent using RAW_SOCKET
needs to be protected.

/**************  net/ipv4/raw.c *************/
  struct flowi fl;
        struct dst_entry *dst;
        int res;

        if (xfrm_decode_session(skb, &fl, AF_INET)<0){

        printk("\n xfrm_decode_session FAILED \n");
                XFRM_INC_STATS(net, LINUX_MIB_XFRMFWDHDRERROR);
                return 0;
        }

        dst = skb_dst(skb);

        printk("\n xfrm_lookup called \n");
        res = xfrm_lookup(net, &dst, &fl, NULL, 0) == 0;
        skb_dst_set(skb, dst);

       err = NF_HOOK(PF_INET, NF_INET_LOCAL_OUT, skb, NULL, rt->u.dst.dev,
                      dst_output);
/*************************************************/

Thanks and Regards
Naveen

On Thu, Aug 18, 2011 at 1:58 PM, krbmit siso <krbmit@gmail.com> wrote:
> Hi Timo,
>
> Thanks for your reply .
> Yes i did explore this yesterday and i was successful in sending the IKE
> messages unprotected after using the below code only for UDP sockets.
>
> int setsockopt_bypass(int fd, int family)
> {
>        struct sadb_x_policy policy;
>        int level, optname;
>
>        switch (family) {
>                case AF_INET:
>                        level = IPPROTO_IP;
>                        optname = IP_IPSEC_POLICY;
>                        break;
>                case AF_INET6:
>                        level = IPPROTO_IPV6;
>                        optname = IPV6_IPSEC_POLICY;
>                        break;
>                default:
>                        return -1;
>        }
>
>        memset(&policy, 0, sizeof(policy));
>        policy.sadb_x_policy_len = PFKEY_UNIT64(sizeof(policy));
>        policy.sadb_x_policy_exttype = SADB_X_EXT_POLICY;
>        policy.sadb_x_policy_type = IPSEC_POLICY_BYPASS;
>        policy.sadb_x_policy_dir = IPSEC_DIR_INBOUND;
>        if (setsockopt(fd, level, optname, &policy, sizeof(policy)) == -1) {
>                return -1;
>        }
>        policy.sadb_x_policy_dir = IPSEC_DIR_OUTBOUND;
>        if (setsockopt(fd, level, optname, &policy, sizeof(policy)) == -1) {
>                return -1;
>        }
>        return 0;
> }
>
> But i did try the same on RAW socket by setting the policy has
> policy.sadb_x_policy_type = IPSEC_POLICY_ENTRUST|IPSEC_POLICY_IPSEC;
> But the packet is going unprotected .
> Please show some light on how to protect RAW packets if there is a Policy
> matching in the SPD saying it need to be protected.
> I have checked the posting there is no help on this isues , could
> you please give some options , if it is possible from Application.
>
>
> Thanks and Regards
> Naveen
>
> On Thu, Aug 18, 2011 at 1:45 PM, Naveen B N (nbn) <nbn@cisco.com> wrote:
>> Hi All,
>> Is there a way to enforce IPsec protection for packets sent from
>> application using RAW_SOCKET.
>>
>> My analysis is to add a code at the raw_sendmsg() & raw_v4_input() to
>> call xfrm_policy_check() ..
>> Is it a good method to proceed or is there a better and smart way to
>> achieve this .
>>
>> Hoping for some guide lines ..
>>
>> Thanks in advance ..
>>
>> Thanks and Regards
>> Naveen
>> --
>> To unsubscribe from this list: send the line "unsubscribe netdev" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>

^ permalink raw reply

* Re: [RFC] bridge: allow passing link-local multicast
From: Nick Carter @ 2011-08-18 15:06 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ed Swierk, netdev, David Lamparter, bridge
In-Reply-To: <20110815150501.3a6cc432@nehalam.ftrdhcpuser.net>

On 15 August 2011 23:05, Stephen Hemminger <shemminger@vyatta.com> wrote:
> Several users have wanted to forward 802.1x EAP multicast
> packets through a bridge. And there has been a couple of
> attempts at allowing some form of this in the past.
>
> If a bridge does not have spanning tree turned on, then it should
> act like a pure hub and forward all traffic. This makes it fully
> transparent, and if there is another bridge using spanning tree
> the STP packets will still work for detecting loops in the network.
>
> If bridge has STP enabled, then the default behavior is to
> process all link-local multicasts locally. The expectation is
> that if 802.1x or other protocol using link-local multicasts
> that a service (or proxy) for that protocol will be used.
>
> Optionally, a sysctl value can be set to allow non STP packets
> to still be forwarded.  I chose sysctl for this because it is
> where such modifications exist when doing IP or netfilter.
> There are other filtering/configuration options that are needed
> and this is a better way to enable them.
>
> Thanks to David Lamparter, and others for bringing this up.
> Users who need this facility should provide feedback, is this
> a usable solution?
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
> ---
> Patch against net-next
>
>  Documentation/networking/ip-sysctl.txt |    4 ++
>  net/bridge/Makefile                    |    2 -
>  net/bridge/br.c                        |   12 ++++++
>  net/bridge/br_input.c                  |   30 ++++++++++++++++-
>  net/bridge/br_private.h                |    5 ++
>  net/bridge/br_sysctl.c                 |   57 +++++++++++++++++++++++++++++++++
>  6 files changed, 107 insertions(+), 3 deletions(-)
>
> --- a/Documentation/networking/ip-sysctl.txt    2011-08-15 10:58:36.451532115 -0700
> +++ b/Documentation/networking/ip-sysctl.txt    2011-08-15 11:39:57.719438766 -0700
> @@ -1289,6 +1289,10 @@ bridge-nf-filter-pppoe-tagged - BOOLEAN
>        0 : disable this.
>        Default: 1
>
> +bridge-forward-link-local - BOOLEAN
> +       1 : pass link-local multicasts through bridge in STP mode
> +       0 : disable this.
> +       Default: 0
>
>  proc/sys/net/sctp/* Variables:
>
> --- a/net/bridge/Makefile       2011-08-15 10:30:25.203595742 -0700
> +++ b/net/bridge/Makefile       2011-08-15 11:22:38.139477877 -0700
> @@ -9,7 +9,7 @@ bridge-y        := br.o br_device.o br_fdb.o br
>                        br_stp_if.o br_stp_timer.o br_netlink.o
>
>  bridge-$(CONFIG_SYSFS) += br_sysfs_if.o br_sysfs_br.o
> -
> +bridge-$(CONFIG_SYSCTL) += br_sysctl.o
>  bridge-$(CONFIG_BRIDGE_NETFILTER) += br_netfilter.o
>
>  bridge-$(CONFIG_BRIDGE_IGMP_SNOOPING) += br_multicast.o
> --- a/net/bridge/br.c   2011-08-15 10:30:48.755594855 -0700
> +++ b/net/bridge/br.c   2011-08-15 10:33:07.215589647 -0700
> @@ -60,6 +60,12 @@ static int __init br_init(void)
>        if (err)
>                goto err_out4;
>
> +#ifdef CONFIG_SYSCTL
> +       err = br_sysctl_init();
> +       if (err)
> +               goto err_out5;
> +#endif
> +
>        brioctl_set(br_ioctl_deviceless_stub);
>
>  #if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE)
> @@ -67,6 +73,9 @@ static int __init br_init(void)
>  #endif
>
>        return 0;
> +
> +err_out5:
> +       br_netlink_fini();
>  err_out4:
>        unregister_netdevice_notifier(&br_device_notifier);
>  err_out3:
> @@ -84,6 +93,9 @@ static void __exit br_deinit(void)
>  {
>        stp_proto_unregister(&br_stp_proto);
>
> +#ifdef CONFIG_SYSCTL
> +       br_sysctl_fini();
> +#endif
>        br_netlink_fini();
>        unregister_netdevice_notifier(&br_device_notifier);
>        brioctl_set(NULL);
> --- a/net/bridge/br_input.c     2011-08-15 10:40:21.435573311 -0700
> +++ b/net/bridge/br_input.c     2011-08-15 11:39:57.719438766 -0700
> @@ -16,11 +16,18 @@
>  #include <linux/netdevice.h>
>  #include <linux/etherdevice.h>
>  #include <linux/netfilter_bridge.h>
> +#include <linux/llc.h>
> +#include <net/llc.h>
> +#include <net/llc_pdu.h>
> +
>  #include "br_private.h"
>
>  /* Bridge group multicast address 802.1d (pg 51). */
>  const u8 br_group_address[ETH_ALEN] = { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x00 };
>
> +/* Should link-local packets be forwarded (in STP mode) */
> +int br_forward_link_local;
> +
>  /* Hook for brouter */
>  br_should_route_hook_t __rcu *br_should_route_hook __read_mostly;
>  EXPORT_SYMBOL(br_should_route_hook);
> @@ -138,6 +145,17 @@ static inline int is_link_local(const un
>        return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | ((a[2] ^ b[2]) & m)) == 0;
>  }
>
> +/* Identify Spanning Tree packets based on header */
Why can't we use the 802.1D specified STP group address to identify ?
The existing code uses that address.
I know you said on another thread that there are people using other addresses.
Who are these people ?
Are they following any standard ?
What address / address range are they using ?

Thanks,
Nick
> +static bool is_stp_bpdu(struct sk_buff *skb)
> +{
> +       struct llc_pdu_un *pdu = llc_pdu_un_hdr(skb);
> +
> +       return skb->protocol == htons(ETH_P_802_2) &&
> +               pdu->ctrl_1 == LLC_PDU_TYPE_U &&
> +               pdu->dsap == LLC_SAP_BSPAN &&
> +               pdu->ssap == LLC_SAP_BSPAN;
> +}
> +
>  /*
>  * Return NULL if skb is handled
>  * note: already called with rcu_read_lock
> @@ -166,8 +184,16 @@ rx_handler_result_t br_handle_frame(stru
>                if (skb->protocol == htons(ETH_P_PAUSE))
>                        goto drop;
>
> -               /* If STP is turned off, then forward */
> -               if (p->br->stp_enabled == BR_NO_STP && dest[5] == 0)
> +               /* If STP is turned off, then in hub mode */
> +               if (p->br->stp_enabled == BR_NO_STP)
> +                       goto forward;
> +
> +               /*
> +                * If STP is on
> +                * then Always handle STP packets locally,
> +                *      other packets can be forwarded if sysctl is enabled.
> +                */
> +               if (!is_stp_bpdu(skb) && br_forward_link_local)
>                        goto forward;
>
>                if (NF_HOOK(NFPROTO_BRIDGE, NF_BR_LOCAL_IN, skb, skb->dev,
> --- a/net/bridge/br_private.h   2011-08-15 10:38:35.587577293 -0700
> +++ b/net/bridge/br_private.h   2011-08-15 10:57:36.983534352 -0700
> @@ -284,6 +284,7 @@ struct br_input_skb_cb {
>        pr_debug("%s: " format,  (br)->dev->name, ##args)
>
>  extern struct notifier_block br_device_notifier;
> +extern int br_forward_link_local;
>  extern const u8 br_group_address[ETH_ALEN];
>
>  /* called under bridge lock */
> @@ -546,6 +547,10 @@ extern int br_sysfs_renameif(struct net_
>  extern int br_sysfs_addbr(struct net_device *dev);
>  extern void br_sysfs_delbr(struct net_device *dev);
>
> +/* br_sysctl.c */
> +extern int br_sysctl_init(void);
> +extern void br_sysctl_fini(void);
> +
>  #else
>
>  #define br_sysfs_addif(p)      (0)
> --- /dev/null   1970-01-01 00:00:00.000000000 +0000
> +++ b/net/bridge/br_sysctl.c    2011-08-15 11:41:00.819436393 -0700
> @@ -0,0 +1,57 @@
> +/*
> + *     Sysctl settings for bridge
> + *
> + *     Authors:
> + *     Stephen Hemminger               <shemminger@osdl.org>
> + *
> + *     This program is free software; you can redistribute it and/or
> + *     modify it under the terms of the GNU General Public License
> + *     as published by the Free Software Foundation; either version
> + *     2 of the License, or (at your option) any later version.
> + */
> +
> +#include <linux/module.h>
> +#include <linux/kernel.h>
> +#include <linux/slab.h>
> +#include <linux/ip.h>
> +#include <linux/netdevice.h>
> +#include <linux/skbuff.h>
> +#include <linux/if_arp.h>
> +#include <linux/if_ether.h>
> +#include <linux/if_vlan.h>
> +#include <linux/if_pppox.h>
> +#include <linux/sysctl.h>
> +
> +#include "br_private.h"
> +
> +static struct ctl_table bridge_table[] = {
> +       {
> +               .procname       = "bridge-forward-link-local",
> +               .data           = &br_forward_link_local,
> +               .maxlen         = sizeof(int),
> +               .mode           = 0644,
> +               .proc_handler   = proc_dointvec
> +       },
> +};
> +
> +static struct ctl_path bridge_ctl_path[] = {
> +       { .procname = "net", },
> +       { .procname = "bridge", },
> +       { },
> +};
> +
> +static struct ctl_table_header *br_sysctl;
> +
> +int __init br_sysctl_init(void)
> +{
> +       br_sysctl = register_sysctl_paths(bridge_ctl_path, bridge_table);
> +       if (br_sysctl == NULL)
> +               return -ENOMEM;
> +
> +       return 0;
> +}
> +
> +void __exit br_sysctl_fini(void)
> +{
> +       unregister_net_sysctl_table(br_sysctl);
> +}
>

^ permalink raw reply

* Re: [RFC] bridge: allow passing link-local multicast
From: Stephen Hemminger @ 2011-08-18 15:10 UTC (permalink / raw)
  To: Nick Carter; +Cc: Ed Swierk, netdev, David Lamparter, bridge
In-Reply-To: <CAEJpZP0fOydMMbgquAud7dfwcO28BXAMzAwnMjSZO6TvEjxgpQ@mail.gmail.com>

On Thu, 18 Aug 2011 16:06:19 +0100
Nick Carter <ncarter100@gmail.com> wrote:

> Why can't we use the 802.1D specified STP group address to identify ?
> The existing code uses that address.
> I know you said on another thread that there are people using other addresses.
> Who are these people ?
> Are they following any standard ?
> What address / address range are they using ?

The group address can be reprogrammed, and it is settable on other
routing equipment. People do it to create spanning tree domains.

^ permalink raw reply

* Re: [Bug 41212] New: [regression] [3.1-git] ipoib causes kernel panic (NULL pointer dereference)
From: Roland Dreier @ 2011-08-18 15:50 UTC (permalink / raw)
  To: Bernd Schubert; +Cc: Erez Shitrit, linux-rdma, netdev
In-Reply-To: <4E4A47BE.9090903@fastmail.fm>

Remember that kernels after the release of 3.0 but before 3.1-rc1 will
report their version as 3.0 (even though they may have lots of commits
that went in after the 3.0 release).  Could that be the explanation?

On Tue, Aug 16, 2011 at 3:34 AM, Bernd Schubert
<bernd.schubert@fastmail.fm> wrote:
> Hello Erez,
>
> are you sure? Commit 69cce1d1404968f78b177a0314f5822d5afdbbfb is not in 3.0
> yet and I also don't see how 3.0 should fail there, as it tests immediately
> for "if (likely(skb_dst(skb)"
>
>
> Thanks,
> Bernd
>
> On 08/16/2011 10:06 AM, Erez Shitrit wrote:
>>
>> Hi,
>> it happened in 3.0 also, if you take the git tag v3.0-rc7 and below it
>> will work.
>>
>> Thanks, Erez

^ permalink raw reply

* Re: [RFC] bridge: allow passing link-local multicast
From: Nick Carter @ 2011-08-18 15:52 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ed Swierk, netdev, David Lamparter, bridge
In-Reply-To: <20110818081019.4b9bb79e@nehalam.ftrdhcpuser.net>

On 18 August 2011 16:10, Stephen Hemminger <shemminger@vyatta.com> wrote:
> On Thu, 18 Aug 2011 16:06:19 +0100
> Nick Carter <ncarter100@gmail.com> wrote:
>
>> Why can't we use the 802.1D specified STP group address to identify ?
>> The existing code uses that address.
>> I know you said on another thread that there are people using other addresses.
>> Who are these people ?
>> Are they following any standard ?
>> What address / address range are they using ?
>
> The group address can be reprogrammed, and it is settable on other
> routing equipment. People do it to create spanning tree domains.
>
But before the new
+               if (!is_stp_bpdu(skb) && br_forward_link_local)
check, we have already checked
	if (unlikely(is_link_local(dest))) {
So the frame must have a link local destination.  If the reprogrammed
group address is outside of the link local range then the new code in
this patch will never be hit.  If the reprogrammed group address is in
the link local range then i'd suggest my previous group_fwd_mask patch
is cleaner and more flexible.

Nick

^ permalink raw reply

* [patch net-2.6] vlan: reset headers on accel emulation path
From: Jiri Pirko @ 2011-08-18 16:35 UTC (permalink / raw)
  To: netdev; +Cc: davem, gregkh, kaber, shemminger, eric.dumazet

It's after all necessary to do reset headers here. The reason is we
cannot depend that it gets reseted in __netif_receive_skb once skb is
reinjected. For incoming vlanids without vlan_dev, vlan_do_receive()
returns false with skb != NULL and __netif_reveive_skb continues, skb is
not reinjected.

This might be good material for 3.0-stable as well

Reported-by: Mike Auty <mike.auty@gmail.com>
Signed-off-by: Jiri Pirko <jpirko@redhat.com>

---
 net/8021q/vlan_core.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
index 5f27f8e..f1f2f7b 100644
--- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c
@@ -167,6 +167,8 @@ struct sk_buff *vlan_untag(struct sk_buff *skb)
 	if (unlikely(!skb))
 		goto err_free;
 
+	skb_reset_network_header(skb);
+	skb_reset_transport_header(skb);
 	return skb;
 
 err_free:
-- 
1.7.6


^ permalink raw reply related

* Re: [Bugme-new] [Bug 41152] New: kernel 3.0 and above fails to handle vlan id 0 (802.1p) packets properly without hardware acceleration
From: Jiri Pirko @ 2011-08-18 16:37 UTC (permalink / raw)
  To: Mike Auty; +Cc: Andrew Morton, bugme-daemon, netdev
In-Reply-To: <4E4C4549.6020802@gmail.com>

Thu, Aug 18, 2011 at 12:48:41AM CEST, mike.auty@gmail.com wrote:
>On 17/08/11 11:59, Jiri Pirko wrote:
>> 
>> I just obtained very similar card (8086:422b). Going to look at it right
>> away.
>> 
>> One more thing. What do you use to generate vlan0 tagged packets? I'm
>> using pktgen with "vlan_id 0". Would you please try that it behaves the
>> same for you?
>> 	
>
>Sorry, I haven't been using pktgen.  I've got an actual device (a
>Samsung android phone) which seems to tag all normal outbound packets
>with this type of vlan tag.  I only discovered a month ago that I needed
>the 8021q module to be able to talk to it, and then suddenly it stopped
>working once I moved to the 3.0 kernel.
>
>I might not have made it clear, but the packets are received (in so much
>as the packet is definitely sent, and it's seen by tools such as
>wireshark), but no reply is ever sent.  I've attached packet logs from
>the 3.0.1 kernel and the 2.6.39.3 kernel.  Oddly the tagging only seems
>to be used on the first SYN,ACK packet, but again I don't know enough
>about the pipeline or what the Samsung kernel's doing to cause that.
>
>I hope that's of some help?  I may be able to get systemtap support
>rolled into my kernel tomorrow at some point, but if not then it will
>have to wait until the weekend.  I don't know if that will provide
>useful information for debugging this, but I am happy to run whatever
>tests I can to figure this out...
>
>Mike  5:)

Patch posted:
http://patchwork.ozlabs.org/patch/110535/

sorry I forgot to cc you Mike. Thanks a lot for report!

Jirka



^ permalink raw reply

* Re: [RFC] bridge: allow passing link-local multicast
From: Stephen Hemminger @ 2011-08-18 16:39 UTC (permalink / raw)
  To: Nick Carter; +Cc: Ed Swierk, netdev, David Lamparter, bridge
In-Reply-To: <CAEJpZP2FGhPmTi0+eS+QRhj4y+aqfQHnEUrjmOOLHUay1SuAKg@mail.gmail.com>

On Thu, 18 Aug 2011 16:52:45 +0100
Nick Carter <ncarter100@gmail.com> wrote:

> On 18 August 2011 16:10, Stephen Hemminger <shemminger@vyatta.com> wrote:
> > On Thu, 18 Aug 2011 16:06:19 +0100
> > Nick Carter <ncarter100@gmail.com> wrote:
> >
> >> Why can't we use the 802.1D specified STP group address to identify ?
> >> The existing code uses that address.
> >> I know you said on another thread that there are people using other addresses.
> >> Who are these people ?
> >> Are they following any standard ?
> >> What address / address range are they using ?
> >
> > The group address can be reprogrammed, and it is settable on other
> > routing equipment. People do it to create spanning tree domains.
> >
> But before the new
> +               if (!is_stp_bpdu(skb) && br_forward_link_local)
> check, we have already checked
> 	if (unlikely(is_link_local(dest))) {
> So the frame must have a link local destination.  If the reprogrammed
> group address is outside of the link local range then the new code in
> this patch will never be hit.  If the reprogrammed group address is in
> the link local range then i'd suggest my previous group_fwd_mask patch
> is cleaner and more flexible.

The problem is that the group_fwd_mask is specific to the address
not the protocol.

^ permalink raw reply

* [patch v2] net: netdev-features.txt update to Documentation/networking/00-INDEX
From: Willem de Bruijn @ 2011-08-18 16:44 UTC (permalink / raw)
  To: netdev; +Cc: davem

Update netdev-features.txt entry in 00-INDEX to incorporate
feedback by Michał Mirosław.

v2: restored tabs that were inadvertently changed to spaces in v1.
sorry for the error.

Signed-off-by: Willem de Bruijn <willemb@google.com>
---
 Documentation/networking/00-INDEX |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/networking/00-INDEX b/Documentation/networking/00-INDEX
index 811252b..bbce121 100644
--- a/Documentation/networking/00-INDEX
+++ b/Documentation/networking/00-INDEX
@@ -135,7 +135,7 @@ multiqueue.txt
 netconsole.txt
 	- The network console module netconsole.ko: configuration and notes.
 netdev-features.txt
-	- Network interface "feature mess and how to get out from it alive".
+	- Network interface features API description.
 netdevices.txt
 	- info on network device driver functions exported to the kernel.
 netif-msg.txt
-- 
1.7.3.1



^ permalink raw reply related

* network protocol
From: Augusto Salazar @ 2011-08-18 17:07 UTC (permalink / raw)
  To: netdev@vger.kernel.org

Greetings,



How do I create a protocol that caches all the traffic, the incomming before any other protocol, and outgoing before going to the lower layer?

Why do I need this? because I want to modify the packets,

For example:
 add vlan tags to incomming packets so my vlan aware linux handles them and remove them on the way out so my non vlan aware pc can handle the packet.

I created a module using dev_add_pack, it works well as a sniffer but it does not prevent the other protocols from getting the packet.

As a test after the "sniffing" I called netif_rx insted of destroying the packet, I endeed up in a loop where I get one packet, sended to process and get back again ( at least that is how I understand it).

Any idea of how to do this?

I am hoping to achieve this without patching the kernel.
 
BR,
AUGUSTO SALAZAR

^ permalink raw reply

* Re: [patch net-2.6] vlan: reset headers on accel emulation path
From: Greg KH @ 2011-08-18 18:16 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: netdev, davem, kaber, shemminger, eric.dumazet
In-Reply-To: <1313685345-2417-1-git-send-email-jpirko@redhat.com>

On Thu, Aug 18, 2011 at 06:35:45PM +0200, Jiri Pirko wrote:
> It's after all necessary to do reset headers here. The reason is we
> cannot depend that it gets reseted in __netif_receive_skb once skb is
> reinjected. For incoming vlanids without vlan_dev, vlan_do_receive()
> returns false with skb != NULL and __netif_reveive_skb continues, skb is
> not reinjected.
> 
> This might be good material for 3.0-stable as well

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read Documentation/stable_kernel_rules.txt
for how to do this properly.

</formletter>

^ permalink raw reply

* Re: [net-next 03/10] seeq: Move the SEEQ drivers
From: Ralf Baechle @ 2011-08-18 19:36 UTC (permalink / raw)
  To: Jeff Kirsher; +Cc: davem, netdev, gospo, sassmann, Russell King, Hamish Coleman
In-Reply-To: <1313134384-7287-4-git-send-email-jeffrey.t.kirsher@intel.com>

On Fri, Aug 12, 2011 at 12:32:57AM -0700, Jeff Kirsher wrote:

> Move the drivers that use SEEQ chipset into drivers/net/ethernet/seeq
> and make the necessary Kconfig and Makefile changes.
> 
> CC: Russell King <linux@arm.linux.org.uk>
> CC: Hamish Coleman <hamish@zot.apana.org.au>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
>  MAINTAINERS                                 |    3 +-
>  drivers/net/Kconfig                         |   18 -----------
>  drivers/net/Makefile                        |    2 -
>  drivers/net/arm/Kconfig                     |    7 ----
>  drivers/net/arm/Makefile                    |    1 -
>  drivers/net/ethernet/Kconfig                |    1 +
>  drivers/net/ethernet/Makefile               |    1 +
>  drivers/net/ethernet/seeq/Kconfig           |   45 +++++++++++++++++++++++++++
>  drivers/net/ethernet/seeq/Makefile          |    7 ++++
>  drivers/net/{arm => ethernet/seeq}/ether3.c |    0
>  drivers/net/{arm => ethernet/seeq}/ether3.h |    0
>  drivers/net/{ => ethernet/seeq}/seeq8005.c  |    0
>  drivers/net/{ => ethernet/seeq}/seeq8005.h  |    0
>  drivers/net/{ => ethernet/seeq}/sgiseeq.c   |    0
>  drivers/net/{ => ethernet/seeq}/sgiseeq.h   |    0
>  15 files changed, 56 insertions(+), 29 deletions(-)
>  create mode 100644 drivers/net/ethernet/seeq/Kconfig
>  create mode 100644 drivers/net/ethernet/seeq/Makefile
>  rename drivers/net/{arm => ethernet/seeq}/ether3.c (100%)
>  rename drivers/net/{arm => ethernet/seeq}/ether3.h (100%)
>  rename drivers/net/{ => ethernet/seeq}/seeq8005.c (100%)
>  rename drivers/net/{ => ethernet/seeq}/seeq8005.h (100%)
>  rename drivers/net/{ => ethernet/seeq}/sgiseeq.c (100%)
>  rename drivers/net/{ => ethernet/seeq}/sgiseeq.h (100%)

This makes a lot more sense than shoving the Seeq drivers into
drivers/net/ethernet/sgi/ - even though sgiseeq depends on an SGI IP22/IP28
specific DMA engine.

Acked-by: Ralf Baechle <ralf@linux-mips.org>

  Ralf

^ permalink raw reply

* Re: [Bugme-new] [Bug 41152] New: kernel 3.0 and above fails to handle vlan id 0 (802.1p) packets properly without hardware acceleration
From: Mike Auty @ 2011-08-18 19:39 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: Andrew Morton, bugme-daemon, netdev
In-Reply-To: <20110818163702.GA1911@minipsycho>

On 18/08/11 17:37, Jiri Pirko wrote:
> 
> Patch posted:
> http://patchwork.ozlabs.org/patch/110535/
> 
> sorry I forgot to cc you Mike. Thanks a lot for report!

No problem,

Thanks very much for the speedy fix!  I've applied the patch and can
confirm it solves my problem.  I look forward to seeing it hit the
mainline...  5:)

Mike  5:)

^ permalink raw reply

* Re: [net-next 02/10] ioc3-eth/meth: Move the SGI drivers
From: Ralf Baechle @ 2011-08-18 19:46 UTC (permalink / raw)
  To: Jeff Kirsher; +Cc: davem, netdev, gospo, sassmann
In-Reply-To: <1313134384-7287-3-git-send-email-jeffrey.t.kirsher@intel.com>

On Fri, Aug 12, 2011 at 12:32:56AM -0700, Jeff Kirsher wrote:

> diff --git a/drivers/net/ethernet/sgi/Kconfig b/drivers/net/ethernet/sgi/Kconfig
> new file mode 100644
> index 0000000..3098594
> --- /dev/null
> +++ b/drivers/net/ethernet/sgi/Kconfig
> @@ -0,0 +1,34 @@
> +#
> +# SGI device configuration
> +#
> +
> +config NET_VENDOR_SGI
> +	bool "SGI devices"
> +	depends on (PCI && SGI_IP27) || SGI_IP32

Can you make NET_VENDOR_SGI default to y for these systems?  There is
normally no reason other than maybe testing to ever disable NET_VENDOR_SGI
as these NICs are all on the motherboard.

Otherwise ok.  Thanks,

  Ralf

^ permalink raw reply

* [PATCH] PM: add macro to test for runtime PM events
From: Alan Stern @ 2011-08-18 20:06 UTC (permalink / raw)
  To: Greg KH, Rafael J. Wysocki
  Cc: Linux-pm mailing list, USB list, netdev, linux-bluetooth,
	linux-input, Takashi Iwai

This patch (as1482) adds a macro for testing whether or not a
pm_message value represents an autosuspend or autoresume (i.e., a
runtime PM) event.  Encapsulating this notion seems preferable to
open-coding the test all over the place.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>

---

This is a minor change in the PM API, but most of the affected files 
are in the USB subsystem.  Therefore either Rafael or Greg might prefer 
to accept this patch.



 Documentation/usb/power-management.txt |    8 ++++----
 drivers/bluetooth/btusb.c              |    2 +-
 drivers/hid/hid-picolcd.c              |    2 +-
 drivers/hid/usbhid/hid-core.c          |    7 +++----
 drivers/net/usb/usbnet.c               |    2 +-
 drivers/net/wimax/i2400m/usb.c         |    4 ++--
 drivers/usb/class/cdc-acm.c            |    2 +-
 drivers/usb/class/cdc-wdm.c            |    6 +++---
 drivers/usb/core/driver.c              |    9 ++++-----
 drivers/usb/core/hcd.c                 |    4 ++--
 drivers/usb/core/hub.c                 |   10 +++++-----
 drivers/usb/serial/sierra.c            |    2 +-
 drivers/usb/serial/usb_wwan.c          |    2 +-
 include/linux/pm.h                     |    2 ++
 sound/usb/card.c                       |    2 +-
 15 files changed, 32 insertions(+), 32 deletions(-)

Index: usb-3.1/include/linux/pm.h
===================================================================
--- usb-3.1.orig/include/linux/pm.h
+++ usb-3.1/include/linux/pm.h
@@ -366,6 +366,8 @@ extern struct dev_pm_ops generic_subsys_
 #define PMSG_AUTO_RESUME	((struct pm_message) \
 					{ .event = PM_EVENT_AUTO_RESUME, })
 
+#define PMSG_IS_AUTO(msg)	(((msg).event & PM_EVENT_AUTO) != 0)
+
 /**
  * Device run-time power management status.
  *
Index: usb-3.1/Documentation/usb/power-management.txt
===================================================================
--- usb-3.1.orig/Documentation/usb/power-management.txt
+++ usb-3.1/Documentation/usb/power-management.txt
@@ -439,10 +439,10 @@ cause autosuspends to fail with -EBUSY i
 device.
 
 External suspend calls should never be allowed to fail in this way,
-only autosuspend calls.  The driver can tell them apart by checking
-the PM_EVENT_AUTO bit in the message.event argument to the suspend
-method; this bit will be set for internal PM events (autosuspend) and
-clear for external PM events.
+only autosuspend calls.  The driver can tell them apart by applying
+the PMSG_IS_AUTO() macro to the message argument to the suspend
+method; it will return True for internal PM events (autosuspend) and
+False for external PM events.
 
 
 	Mutual exclusion
Index: usb-3.1/drivers/net/usb/usbnet.c
===================================================================
--- usb-3.1.orig/drivers/net/usb/usbnet.c
+++ usb-3.1/drivers/net/usb/usbnet.c
@@ -1470,7 +1470,7 @@ int usbnet_suspend (struct usb_interface
 	if (!dev->suspend_count++) {
 		spin_lock_irq(&dev->txq.lock);
 		/* don't autosuspend while transmitting */
-		if (dev->txq.qlen && (message.event & PM_EVENT_AUTO)) {
+		if (dev->txq.qlen && PMSG_IS_AUTO(message)) {
 			spin_unlock_irq(&dev->txq.lock);
 			return -EBUSY;
 		} else {
Index: usb-3.1/drivers/net/wimax/i2400m/usb.c
===================================================================
--- usb-3.1.orig/drivers/net/wimax/i2400m/usb.c
+++ usb-3.1/drivers/net/wimax/i2400m/usb.c
@@ -599,7 +599,7 @@ void i2400mu_disconnect(struct usb_inter
  *
  *    As well, the device might refuse going to sleep for whichever
  *    reason. In this case we just fail. For system suspend/hibernate,
- *    we *can't* fail. We check PM_EVENT_AUTO to see if the
+ *    we *can't* fail. We check PMSG_IS_AUTO to see if the
  *    suspend call comes from the USB stack or from the system and act
  *    in consequence.
  *
@@ -615,7 +615,7 @@ int i2400mu_suspend(struct usb_interface
 	struct i2400m *i2400m = &i2400mu->i2400m;
 
 #ifdef CONFIG_PM
-	if (pm_msg.event & PM_EVENT_AUTO)
+	if (PMSG_IS_AUTO(pm_msg))
 		is_autosuspend = 1;
 #endif
 
Index: usb-3.1/sound/usb/card.c
===================================================================
--- usb-3.1.orig/sound/usb/card.c
+++ usb-3.1/sound/usb/card.c
@@ -628,7 +628,7 @@ static int usb_audio_suspend(struct usb_
 	if (chip == (void *)-1L)
 		return 0;
 
-	if (!(message.event & PM_EVENT_AUTO)) {
+	if (!PMSG_IS_AUTO(message)) {
 		snd_power_change_state(chip->card, SNDRV_CTL_POWER_D3hot);
 		if (!chip->num_suspended_intf++) {
 			list_for_each(p, &chip->pcm_list) {
Index: usb-3.1/drivers/bluetooth/btusb.c
===================================================================
--- usb-3.1.orig/drivers/bluetooth/btusb.c
+++ usb-3.1/drivers/bluetooth/btusb.c
@@ -1103,7 +1103,7 @@ static int btusb_suspend(struct usb_inte
 		return 0;
 
 	spin_lock_irq(&data->txlock);
-	if (!((message.event & PM_EVENT_AUTO) && data->tx_in_flight)) {
+	if (!(PMSG_IS_AUTO(message) && data->tx_in_flight)) {
 		set_bit(BTUSB_SUSPENDING, &data->flags);
 		spin_unlock_irq(&data->txlock);
 	} else {
Index: usb-3.1/drivers/hid/hid-picolcd.c
===================================================================
--- usb-3.1.orig/drivers/hid/hid-picolcd.c
+++ usb-3.1/drivers/hid/hid-picolcd.c
@@ -2409,7 +2409,7 @@ static int picolcd_raw_event(struct hid_
 #ifdef CONFIG_PM
 static int picolcd_suspend(struct hid_device *hdev, pm_message_t message)
 {
-	if (message.event & PM_EVENT_AUTO)
+	if (PMSG_IS_AUTO(message))
 		return 0;
 
 	picolcd_suspend_backlight(hid_get_drvdata(hdev));
Index: usb-3.1/drivers/hid/usbhid/hid-core.c
===================================================================
--- usb-3.1.orig/drivers/hid/usbhid/hid-core.c
+++ usb-3.1/drivers/hid/usbhid/hid-core.c
@@ -1332,7 +1332,7 @@ static int hid_suspend(struct usb_interf
 	struct usbhid_device *usbhid = hid->driver_data;
 	int status;
 
-	if (message.event & PM_EVENT_AUTO) {
+	if (PMSG_IS_AUTO(message)) {
 		spin_lock_irq(&usbhid->lock);	/* Sync with error handler */
 		if (!test_bit(HID_RESET_PENDING, &usbhid->iofl)
 		    && !test_bit(HID_CLEAR_HALT, &usbhid->iofl)
@@ -1367,7 +1367,7 @@ static int hid_suspend(struct usb_interf
 			return -EIO;
 	}
 
-	if (!ignoreled && (message.event & PM_EVENT_AUTO)) {
+	if (!ignoreled && PMSG_IS_AUTO(message)) {
 		spin_lock_irq(&usbhid->lock);
 		if (test_bit(HID_LED_ON, &usbhid->iofl)) {
 			spin_unlock_irq(&usbhid->lock);
@@ -1380,8 +1380,7 @@ static int hid_suspend(struct usb_interf
 	hid_cancel_delayed_stuff(usbhid);
 	hid_cease_io(usbhid);
 
-	if ((message.event & PM_EVENT_AUTO) &&
-			test_bit(HID_KEYS_PRESSED, &usbhid->iofl)) {
+	if (PMSG_IS_AUTO(message) && test_bit(HID_KEYS_PRESSED, &usbhid->iofl)) {
 		/* lost race against keypresses */
 		status = hid_start_in(hid);
 		if (status < 0)
Index: usb-3.1/drivers/usb/class/cdc-acm.c
===================================================================
--- usb-3.1.orig/drivers/usb/class/cdc-acm.c
+++ usb-3.1/drivers/usb/class/cdc-acm.c
@@ -1305,7 +1305,7 @@ static int acm_suspend(struct usb_interf
 	struct acm *acm = usb_get_intfdata(intf);
 	int cnt;
 
-	if (message.event & PM_EVENT_AUTO) {
+	if (PMSG_IS_AUTO(message)) {
 		int b;
 
 		spin_lock_irq(&acm->write_lock);
Index: usb-3.1/drivers/usb/class/cdc-wdm.c
===================================================================
--- usb-3.1.orig/drivers/usb/class/cdc-wdm.c
+++ usb-3.1/drivers/usb/class/cdc-wdm.c
@@ -798,11 +798,11 @@ static int wdm_suspend(struct usb_interf
 	dev_dbg(&desc->intf->dev, "wdm%d_suspend\n", intf->minor);
 
 	/* if this is an autosuspend the caller does the locking */
-	if (!(message.event & PM_EVENT_AUTO))
+	if (!PMSG_IS_AUTO(message))
 		mutex_lock(&desc->lock);
 	spin_lock_irq(&desc->iuspin);
 
-	if ((message.event & PM_EVENT_AUTO) &&
+	if (PMSG_IS_AUTO(message) &&
 			(test_bit(WDM_IN_USE, &desc->flags)
 			|| test_bit(WDM_RESPONDING, &desc->flags))) {
 		spin_unlock_irq(&desc->iuspin);
@@ -815,7 +815,7 @@ static int wdm_suspend(struct usb_interf
 		kill_urbs(desc);
 		cancel_work_sync(&desc->rxwork);
 	}
-	if (!(message.event & PM_EVENT_AUTO))
+	if (!PMSG_IS_AUTO(message))
 		mutex_unlock(&desc->lock);
 
 	return rv;
Index: usb-3.1/drivers/usb/core/driver.c
===================================================================
--- usb-3.1.orig/drivers/usb/core/driver.c
+++ usb-3.1/drivers/usb/core/driver.c
@@ -1046,8 +1046,7 @@ static int usb_resume_device(struct usb_
 	/* Non-root devices on a full/low-speed bus must wait for their
 	 * companion high-speed root hub, in case a handoff is needed.
 	 */
-	if (!(msg.event & PM_EVENT_AUTO) && udev->parent &&
-			udev->bus->hs_companion)
+	if (!PMSG_IS_AUTO(msg) && udev->parent && udev->bus->hs_companion)
 		device_pm_wait_for_dev(&udev->dev,
 				&udev->bus->hs_companion->root_hub->dev);
 
@@ -1075,7 +1074,7 @@ static int usb_suspend_interface(struct 
 
 	if (driver->suspend) {
 		status = driver->suspend(intf, msg);
-		if (status && !(msg.event & PM_EVENT_AUTO))
+		if (status && !PMSG_IS_AUTO(msg))
 			dev_err(&intf->dev, "%s error %d\n",
 					"suspend", status);
 	} else {
@@ -1189,7 +1188,7 @@ static int usb_suspend_both(struct usb_d
 			status = usb_suspend_interface(udev, intf, msg);
 
 			/* Ignore errors during system sleep transitions */
-			if (!(msg.event & PM_EVENT_AUTO))
+			if (!PMSG_IS_AUTO(msg))
 				status = 0;
 			if (status != 0)
 				break;
@@ -1199,7 +1198,7 @@ static int usb_suspend_both(struct usb_d
 		status = usb_suspend_device(udev, msg);
 
 		/* Again, ignore errors during system sleep transitions */
-		if (!(msg.event & PM_EVENT_AUTO))
+		if (!PMSG_IS_AUTO(msg))
 			status = 0;
 	}
 
Index: usb-3.1/drivers/usb/core/hcd.c
===================================================================
--- usb-3.1.orig/drivers/usb/core/hcd.c
+++ usb-3.1/drivers/usb/core/hcd.c
@@ -1960,7 +1960,7 @@ int hcd_bus_suspend(struct usb_device *r
 	int		old_state = hcd->state;
 
 	dev_dbg(&rhdev->dev, "bus %s%s\n",
-			(msg.event & PM_EVENT_AUTO ? "auto-" : ""), "suspend");
+			(PMSG_IS_AUTO(msg) ? "auto-" : ""), "suspend");
 	if (HCD_DEAD(hcd)) {
 		dev_dbg(&rhdev->dev, "skipped %s of dead bus\n", "suspend");
 		return 0;
@@ -1996,7 +1996,7 @@ int hcd_bus_resume(struct usb_device *rh
 	int		old_state = hcd->state;
 
 	dev_dbg(&rhdev->dev, "usb %s%s\n",
-			(msg.event & PM_EVENT_AUTO ? "auto-" : ""), "resume");
+			(PMSG_IS_AUTO(msg) ? "auto-" : ""), "resume");
 	if (HCD_DEAD(hcd)) {
 		dev_dbg(&rhdev->dev, "skipped %s of dead bus\n", "resume");
 		return 0;
Index: usb-3.1/drivers/usb/core/hub.c
===================================================================
--- usb-3.1.orig/drivers/usb/core/hub.c
+++ usb-3.1/drivers/usb/core/hub.c
@@ -2342,7 +2342,7 @@ int usb_port_suspend(struct usb_device *
 			dev_dbg(&udev->dev, "won't remote wakeup, status %d\n",
 					status);
 			/* bail if autosuspend is requested */
-			if (msg.event & PM_EVENT_AUTO)
+			if (PMSG_IS_AUTO(msg))
 				return status;
 		}
 	}
@@ -2367,12 +2367,12 @@ int usb_port_suspend(struct usb_device *
 				USB_CTRL_SET_TIMEOUT);
 
 		/* System sleep transitions should never fail */
-		if (!(msg.event & PM_EVENT_AUTO))
+		if (!PMSG_IS_AUTO(msg))
 			status = 0;
 	} else {
 		/* device has up to 10 msec to fully suspend */
 		dev_dbg(&udev->dev, "usb %ssuspend\n",
-				(msg.event & PM_EVENT_AUTO ? "auto-" : ""));
+				(PMSG_IS_AUTO(msg) ? "auto-" : ""));
 		usb_set_device_state(udev, USB_STATE_SUSPENDED);
 		msleep(10);
 	}
@@ -2523,7 +2523,7 @@ int usb_port_resume(struct usb_device *u
 	} else {
 		/* drive resume for at least 20 msec */
 		dev_dbg(&udev->dev, "usb %sresume\n",
-				(msg.event & PM_EVENT_AUTO ? "auto-" : ""));
+				(PMSG_IS_AUTO(msg) ? "auto-" : ""));
 		msleep(25);
 
 		/* Virtual root hubs can trigger on GET_PORT_STATUS to
@@ -2625,7 +2625,7 @@ static int hub_suspend(struct usb_interf
 		udev = hdev->children [port1-1];
 		if (udev && udev->can_submit) {
 			dev_warn(&intf->dev, "port %d nyet suspended\n", port1);
-			if (msg.event & PM_EVENT_AUTO)
+			if (PMSG_IS_AUTO(msg))
 				return -EBUSY;
 		}
 	}
Index: usb-3.1/drivers/usb/serial/sierra.c
===================================================================
--- usb-3.1.orig/drivers/usb/serial/sierra.c
+++ usb-3.1/drivers/usb/serial/sierra.c
@@ -1009,7 +1009,7 @@ static int sierra_suspend(struct usb_ser
 	struct sierra_intf_private *intfdata;
 	int b;
 
-	if (message.event & PM_EVENT_AUTO) {
+	if (PMSG_IS_AUTO(message)) {
 		intfdata = serial->private;
 		spin_lock_irq(&intfdata->susp_lock);
 		b = intfdata->in_flight;
Index: usb-3.1/drivers/usb/serial/usb_wwan.c
===================================================================
--- usb-3.1.orig/drivers/usb/serial/usb_wwan.c
+++ usb-3.1/drivers/usb/serial/usb_wwan.c
@@ -651,7 +651,7 @@ int usb_wwan_suspend(struct usb_serial *
 
 	dbg("%s entered", __func__);
 
-	if (message.event & PM_EVENT_AUTO) {
+	if (PMSG_IS_AUTO(message)) {
 		spin_lock_irq(&intfdata->susp_lock);
 		b = intfdata->in_flight;
 		spin_unlock_irq(&intfdata->susp_lock);


^ permalink raw reply

* [PATCH net-next] MAINTAINERS: qlcnic
From: Anirban Chakraborty @ 2011-08-18 20:03 UTC (permalink / raw)
  To: davem
  Cc: netdev, Dept_NX_Linux_NIC_Driver, Amit Kumar Salecha,
	Anirban Chakraborty

Please apply the change. Thanks.

-Anirban

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
---
 MAINTAINERS |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index d374c6f..92e051d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5248,8 +5248,8 @@ F:	Documentation/networking/LICENSE.qla3xxx
 F:	drivers/net/ethernet/qlogic/qla3xxx.*
 
 QLOGIC QLCNIC (1/10)Gb ETHERNET DRIVER
-M:	Amit Kumar Salecha <amit.salecha@qlogic.com>
 M:	Anirban Chakraborty <anirban.chakraborty@qlogic.com>
+M:	Sony Chacko <sony.chacko@qlogic.com>
 M:	linux-driver@qlogic.com
 L:	netdev@vger.kernel.org
 S:	Supported
-- 
1.7.4.1



^ permalink raw reply related

* Re: [PATCH] PM: add macro to test for runtime PM events
From: Rafael J. Wysocki @ 2011-08-18 20:52 UTC (permalink / raw)
  To: Alan Stern
  Cc: Greg KH, Linux-pm mailing list, USB list, netdev, linux-bluetooth,
	linux-input, Takashi Iwai
In-Reply-To: <Pine.LNX.4.44L0.1108181600020.1628-100000@iolanthe.rowland.org>

Hi,

On Thursday, August 18, 2011, Alan Stern wrote:
> This patch (as1482) adds a macro for testing whether or not a
> pm_message value represents an autosuspend or autoresume (i.e., a
> runtime PM) event.  Encapsulating this notion seems preferable to
> open-coding the test all over the place.
> 
> Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
> 
> ---
> 
> This is a minor change in the PM API, but most of the affected files 
> are in the USB subsystem.  Therefore either Rafael or Greg might prefer 
> to accept this patch.

I can take the patch if Greg is fine with that.

Thanks,
Rafael

 
>  Documentation/usb/power-management.txt |    8 ++++----
>  drivers/bluetooth/btusb.c              |    2 +-
>  drivers/hid/hid-picolcd.c              |    2 +-
>  drivers/hid/usbhid/hid-core.c          |    7 +++----
>  drivers/net/usb/usbnet.c               |    2 +-
>  drivers/net/wimax/i2400m/usb.c         |    4 ++--
>  drivers/usb/class/cdc-acm.c            |    2 +-
>  drivers/usb/class/cdc-wdm.c            |    6 +++---
>  drivers/usb/core/driver.c              |    9 ++++-----
>  drivers/usb/core/hcd.c                 |    4 ++--
>  drivers/usb/core/hub.c                 |   10 +++++-----
>  drivers/usb/serial/sierra.c            |    2 +-
>  drivers/usb/serial/usb_wwan.c          |    2 +-
>  include/linux/pm.h                     |    2 ++
>  sound/usb/card.c                       |    2 +-
>  15 files changed, 32 insertions(+), 32 deletions(-)
> 
> Index: usb-3.1/include/linux/pm.h
> ===================================================================
> --- usb-3.1.orig/include/linux/pm.h
> +++ usb-3.1/include/linux/pm.h
> @@ -366,6 +366,8 @@ extern struct dev_pm_ops generic_subsys_
>  #define PMSG_AUTO_RESUME	((struct pm_message) \
>  					{ .event = PM_EVENT_AUTO_RESUME, })
>  
> +#define PMSG_IS_AUTO(msg)	(((msg).event & PM_EVENT_AUTO) != 0)
> +
>  /**
>   * Device run-time power management status.
>   *
> Index: usb-3.1/Documentation/usb/power-management.txt
> ===================================================================
> --- usb-3.1.orig/Documentation/usb/power-management.txt
> +++ usb-3.1/Documentation/usb/power-management.txt
> @@ -439,10 +439,10 @@ cause autosuspends to fail with -EBUSY i
>  device.
>  
>  External suspend calls should never be allowed to fail in this way,
> -only autosuspend calls.  The driver can tell them apart by checking
> -the PM_EVENT_AUTO bit in the message.event argument to the suspend
> -method; this bit will be set for internal PM events (autosuspend) and
> -clear for external PM events.
> +only autosuspend calls.  The driver can tell them apart by applying
> +the PMSG_IS_AUTO() macro to the message argument to the suspend
> +method; it will return True for internal PM events (autosuspend) and
> +False for external PM events.
>  
>  
>  	Mutual exclusion
> Index: usb-3.1/drivers/net/usb/usbnet.c
> ===================================================================
> --- usb-3.1.orig/drivers/net/usb/usbnet.c
> +++ usb-3.1/drivers/net/usb/usbnet.c
> @@ -1470,7 +1470,7 @@ int usbnet_suspend (struct usb_interface
>  	if (!dev->suspend_count++) {
>  		spin_lock_irq(&dev->txq.lock);
>  		/* don't autosuspend while transmitting */
> -		if (dev->txq.qlen && (message.event & PM_EVENT_AUTO)) {
> +		if (dev->txq.qlen && PMSG_IS_AUTO(message)) {
>  			spin_unlock_irq(&dev->txq.lock);
>  			return -EBUSY;
>  		} else {
> Index: usb-3.1/drivers/net/wimax/i2400m/usb.c
> ===================================================================
> --- usb-3.1.orig/drivers/net/wimax/i2400m/usb.c
> +++ usb-3.1/drivers/net/wimax/i2400m/usb.c
> @@ -599,7 +599,7 @@ void i2400mu_disconnect(struct usb_inter
>   *
>   *    As well, the device might refuse going to sleep for whichever
>   *    reason. In this case we just fail. For system suspend/hibernate,
> - *    we *can't* fail. We check PM_EVENT_AUTO to see if the
> + *    we *can't* fail. We check PMSG_IS_AUTO to see if the
>   *    suspend call comes from the USB stack or from the system and act
>   *    in consequence.
>   *
> @@ -615,7 +615,7 @@ int i2400mu_suspend(struct usb_interface
>  	struct i2400m *i2400m = &i2400mu->i2400m;
>  
>  #ifdef CONFIG_PM
> -	if (pm_msg.event & PM_EVENT_AUTO)
> +	if (PMSG_IS_AUTO(pm_msg))
>  		is_autosuspend = 1;
>  #endif
>  
> Index: usb-3.1/sound/usb/card.c
> ===================================================================
> --- usb-3.1.orig/sound/usb/card.c
> +++ usb-3.1/sound/usb/card.c
> @@ -628,7 +628,7 @@ static int usb_audio_suspend(struct usb_
>  	if (chip == (void *)-1L)
>  		return 0;
>  
> -	if (!(message.event & PM_EVENT_AUTO)) {
> +	if (!PMSG_IS_AUTO(message)) {
>  		snd_power_change_state(chip->card, SNDRV_CTL_POWER_D3hot);
>  		if (!chip->num_suspended_intf++) {
>  			list_for_each(p, &chip->pcm_list) {
> Index: usb-3.1/drivers/bluetooth/btusb.c
> ===================================================================
> --- usb-3.1.orig/drivers/bluetooth/btusb.c
> +++ usb-3.1/drivers/bluetooth/btusb.c
> @@ -1103,7 +1103,7 @@ static int btusb_suspend(struct usb_inte
>  		return 0;
>  
>  	spin_lock_irq(&data->txlock);
> -	if (!((message.event & PM_EVENT_AUTO) && data->tx_in_flight)) {
> +	if (!(PMSG_IS_AUTO(message) && data->tx_in_flight)) {
>  		set_bit(BTUSB_SUSPENDING, &data->flags);
>  		spin_unlock_irq(&data->txlock);
>  	} else {
> Index: usb-3.1/drivers/hid/hid-picolcd.c
> ===================================================================
> --- usb-3.1.orig/drivers/hid/hid-picolcd.c
> +++ usb-3.1/drivers/hid/hid-picolcd.c
> @@ -2409,7 +2409,7 @@ static int picolcd_raw_event(struct hid_
>  #ifdef CONFIG_PM
>  static int picolcd_suspend(struct hid_device *hdev, pm_message_t message)
>  {
> -	if (message.event & PM_EVENT_AUTO)
> +	if (PMSG_IS_AUTO(message))
>  		return 0;
>  
>  	picolcd_suspend_backlight(hid_get_drvdata(hdev));
> Index: usb-3.1/drivers/hid/usbhid/hid-core.c
> ===================================================================
> --- usb-3.1.orig/drivers/hid/usbhid/hid-core.c
> +++ usb-3.1/drivers/hid/usbhid/hid-core.c
> @@ -1332,7 +1332,7 @@ static int hid_suspend(struct usb_interf
>  	struct usbhid_device *usbhid = hid->driver_data;
>  	int status;
>  
> -	if (message.event & PM_EVENT_AUTO) {
> +	if (PMSG_IS_AUTO(message)) {
>  		spin_lock_irq(&usbhid->lock);	/* Sync with error handler */
>  		if (!test_bit(HID_RESET_PENDING, &usbhid->iofl)
>  		    && !test_bit(HID_CLEAR_HALT, &usbhid->iofl)
> @@ -1367,7 +1367,7 @@ static int hid_suspend(struct usb_interf
>  			return -EIO;
>  	}
>  
> -	if (!ignoreled && (message.event & PM_EVENT_AUTO)) {
> +	if (!ignoreled && PMSG_IS_AUTO(message)) {
>  		spin_lock_irq(&usbhid->lock);
>  		if (test_bit(HID_LED_ON, &usbhid->iofl)) {
>  			spin_unlock_irq(&usbhid->lock);
> @@ -1380,8 +1380,7 @@ static int hid_suspend(struct usb_interf
>  	hid_cancel_delayed_stuff(usbhid);
>  	hid_cease_io(usbhid);
>  
> -	if ((message.event & PM_EVENT_AUTO) &&
> -			test_bit(HID_KEYS_PRESSED, &usbhid->iofl)) {
> +	if (PMSG_IS_AUTO(message) && test_bit(HID_KEYS_PRESSED, &usbhid->iofl)) {
>  		/* lost race against keypresses */
>  		status = hid_start_in(hid);
>  		if (status < 0)
> Index: usb-3.1/drivers/usb/class/cdc-acm.c
> ===================================================================
> --- usb-3.1.orig/drivers/usb/class/cdc-acm.c
> +++ usb-3.1/drivers/usb/class/cdc-acm.c
> @@ -1305,7 +1305,7 @@ static int acm_suspend(struct usb_interf
>  	struct acm *acm = usb_get_intfdata(intf);
>  	int cnt;
>  
> -	if (message.event & PM_EVENT_AUTO) {
> +	if (PMSG_IS_AUTO(message)) {
>  		int b;
>  
>  		spin_lock_irq(&acm->write_lock);
> Index: usb-3.1/drivers/usb/class/cdc-wdm.c
> ===================================================================
> --- usb-3.1.orig/drivers/usb/class/cdc-wdm.c
> +++ usb-3.1/drivers/usb/class/cdc-wdm.c
> @@ -798,11 +798,11 @@ static int wdm_suspend(struct usb_interf
>  	dev_dbg(&desc->intf->dev, "wdm%d_suspend\n", intf->minor);
>  
>  	/* if this is an autosuspend the caller does the locking */
> -	if (!(message.event & PM_EVENT_AUTO))
> +	if (!PMSG_IS_AUTO(message))
>  		mutex_lock(&desc->lock);
>  	spin_lock_irq(&desc->iuspin);
>  
> -	if ((message.event & PM_EVENT_AUTO) &&
> +	if (PMSG_IS_AUTO(message) &&
>  			(test_bit(WDM_IN_USE, &desc->flags)
>  			|| test_bit(WDM_RESPONDING, &desc->flags))) {
>  		spin_unlock_irq(&desc->iuspin);
> @@ -815,7 +815,7 @@ static int wdm_suspend(struct usb_interf
>  		kill_urbs(desc);
>  		cancel_work_sync(&desc->rxwork);
>  	}
> -	if (!(message.event & PM_EVENT_AUTO))
> +	if (!PMSG_IS_AUTO(message))
>  		mutex_unlock(&desc->lock);
>  
>  	return rv;
> Index: usb-3.1/drivers/usb/core/driver.c
> ===================================================================
> --- usb-3.1.orig/drivers/usb/core/driver.c
> +++ usb-3.1/drivers/usb/core/driver.c
> @@ -1046,8 +1046,7 @@ static int usb_resume_device(struct usb_
>  	/* Non-root devices on a full/low-speed bus must wait for their
>  	 * companion high-speed root hub, in case a handoff is needed.
>  	 */
> -	if (!(msg.event & PM_EVENT_AUTO) && udev->parent &&
> -			udev->bus->hs_companion)
> +	if (!PMSG_IS_AUTO(msg) && udev->parent && udev->bus->hs_companion)
>  		device_pm_wait_for_dev(&udev->dev,
>  				&udev->bus->hs_companion->root_hub->dev);
>  
> @@ -1075,7 +1074,7 @@ static int usb_suspend_interface(struct 
>  
>  	if (driver->suspend) {
>  		status = driver->suspend(intf, msg);
> -		if (status && !(msg.event & PM_EVENT_AUTO))
> +		if (status && !PMSG_IS_AUTO(msg))
>  			dev_err(&intf->dev, "%s error %d\n",
>  					"suspend", status);
>  	} else {
> @@ -1189,7 +1188,7 @@ static int usb_suspend_both(struct usb_d
>  			status = usb_suspend_interface(udev, intf, msg);
>  
>  			/* Ignore errors during system sleep transitions */
> -			if (!(msg.event & PM_EVENT_AUTO))
> +			if (!PMSG_IS_AUTO(msg))
>  				status = 0;
>  			if (status != 0)
>  				break;
> @@ -1199,7 +1198,7 @@ static int usb_suspend_both(struct usb_d
>  		status = usb_suspend_device(udev, msg);
>  
>  		/* Again, ignore errors during system sleep transitions */
> -		if (!(msg.event & PM_EVENT_AUTO))
> +		if (!PMSG_IS_AUTO(msg))
>  			status = 0;
>  	}
>  
> Index: usb-3.1/drivers/usb/core/hcd.c
> ===================================================================
> --- usb-3.1.orig/drivers/usb/core/hcd.c
> +++ usb-3.1/drivers/usb/core/hcd.c
> @@ -1960,7 +1960,7 @@ int hcd_bus_suspend(struct usb_device *r
>  	int		old_state = hcd->state;
>  
>  	dev_dbg(&rhdev->dev, "bus %s%s\n",
> -			(msg.event & PM_EVENT_AUTO ? "auto-" : ""), "suspend");
> +			(PMSG_IS_AUTO(msg) ? "auto-" : ""), "suspend");
>  	if (HCD_DEAD(hcd)) {
>  		dev_dbg(&rhdev->dev, "skipped %s of dead bus\n", "suspend");
>  		return 0;
> @@ -1996,7 +1996,7 @@ int hcd_bus_resume(struct usb_device *rh
>  	int		old_state = hcd->state;
>  
>  	dev_dbg(&rhdev->dev, "usb %s%s\n",
> -			(msg.event & PM_EVENT_AUTO ? "auto-" : ""), "resume");
> +			(PMSG_IS_AUTO(msg) ? "auto-" : ""), "resume");
>  	if (HCD_DEAD(hcd)) {
>  		dev_dbg(&rhdev->dev, "skipped %s of dead bus\n", "resume");
>  		return 0;
> Index: usb-3.1/drivers/usb/core/hub.c
> ===================================================================
> --- usb-3.1.orig/drivers/usb/core/hub.c
> +++ usb-3.1/drivers/usb/core/hub.c
> @@ -2342,7 +2342,7 @@ int usb_port_suspend(struct usb_device *
>  			dev_dbg(&udev->dev, "won't remote wakeup, status %d\n",
>  					status);
>  			/* bail if autosuspend is requested */
> -			if (msg.event & PM_EVENT_AUTO)
> +			if (PMSG_IS_AUTO(msg))
>  				return status;
>  		}
>  	}
> @@ -2367,12 +2367,12 @@ int usb_port_suspend(struct usb_device *
>  				USB_CTRL_SET_TIMEOUT);
>  
>  		/* System sleep transitions should never fail */
> -		if (!(msg.event & PM_EVENT_AUTO))
> +		if (!PMSG_IS_AUTO(msg))
>  			status = 0;
>  	} else {
>  		/* device has up to 10 msec to fully suspend */
>  		dev_dbg(&udev->dev, "usb %ssuspend\n",
> -				(msg.event & PM_EVENT_AUTO ? "auto-" : ""));
> +				(PMSG_IS_AUTO(msg) ? "auto-" : ""));
>  		usb_set_device_state(udev, USB_STATE_SUSPENDED);
>  		msleep(10);
>  	}
> @@ -2523,7 +2523,7 @@ int usb_port_resume(struct usb_device *u
>  	} else {
>  		/* drive resume for at least 20 msec */
>  		dev_dbg(&udev->dev, "usb %sresume\n",
> -				(msg.event & PM_EVENT_AUTO ? "auto-" : ""));
> +				(PMSG_IS_AUTO(msg) ? "auto-" : ""));
>  		msleep(25);
>  
>  		/* Virtual root hubs can trigger on GET_PORT_STATUS to
> @@ -2625,7 +2625,7 @@ static int hub_suspend(struct usb_interf
>  		udev = hdev->children [port1-1];
>  		if (udev && udev->can_submit) {
>  			dev_warn(&intf->dev, "port %d nyet suspended\n", port1);
> -			if (msg.event & PM_EVENT_AUTO)
> +			if (PMSG_IS_AUTO(msg))
>  				return -EBUSY;
>  		}
>  	}
> Index: usb-3.1/drivers/usb/serial/sierra.c
> ===================================================================
> --- usb-3.1.orig/drivers/usb/serial/sierra.c
> +++ usb-3.1/drivers/usb/serial/sierra.c
> @@ -1009,7 +1009,7 @@ static int sierra_suspend(struct usb_ser
>  	struct sierra_intf_private *intfdata;
>  	int b;
>  
> -	if (message.event & PM_EVENT_AUTO) {
> +	if (PMSG_IS_AUTO(message)) {
>  		intfdata = serial->private;
>  		spin_lock_irq(&intfdata->susp_lock);
>  		b = intfdata->in_flight;
> Index: usb-3.1/drivers/usb/serial/usb_wwan.c
> ===================================================================
> --- usb-3.1.orig/drivers/usb/serial/usb_wwan.c
> +++ usb-3.1/drivers/usb/serial/usb_wwan.c
> @@ -651,7 +651,7 @@ int usb_wwan_suspend(struct usb_serial *
>  
>  	dbg("%s entered", __func__);
>  
> -	if (message.event & PM_EVENT_AUTO) {
> +	if (PMSG_IS_AUTO(message)) {
>  		spin_lock_irq(&intfdata->susp_lock);
>  		b = intfdata->in_flight;
>  		spin_unlock_irq(&intfdata->susp_lock);
> 
> 
> 


^ 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