aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/bonding/bond_main.c82
-rw-r--r--drivers/net/bonding/bonding.h18
-rw-r--r--drivers/net/ethernet/broadcom/cnic.c12
-rw-r--r--drivers/net/ethernet/broadcom/cnic_defs.h28
-rw-r--r--drivers/net/ethernet/broadcom/cnic_if.h4
-rw-r--r--drivers/net/ethernet/broadcom/tg3.c25
-rw-r--r--drivers/net/ethernet/broadcom/tg3.h1
-rw-r--r--drivers/net/ethernet/marvell/sky2.c11
-rw-r--r--drivers/net/usb/usbnet.c11
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_constants.h1
-rw-r--r--drivers/scsi/bnx2i/57xx_iscsi_constants.h1
-rw-r--r--net/core/dev.c3
-rw-r--r--net/ipv4/devinet.c1
-rw-r--r--net/ipv4/netfilter/iptable_filter.c9
-rw-r--r--net/ipv6/netfilter/ip6table_filter.c9
-rw-r--r--net/l2tp/l2tp_ppp.c1
-rw-r--r--net/netlabel/netlabel_kapi.c2
-rw-r--r--net/rds/ib_cm.c2
-rw-r--r--net/rds/iw_cm.c2
-rw-r--r--net/rds/loop.c2
-rw-r--r--net/xfrm/xfrm_output.c4
-rw-r--r--net/xfrm/xfrm_replay.c6
22 files changed, 104 insertions, 131 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 0730203a19f2..b920d829692a 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2573,12 +2573,16 @@ re_arm:
2573static int bond_has_this_ip(struct bonding *bond, __be32 ip) 2573static int bond_has_this_ip(struct bonding *bond, __be32 ip)
2574{ 2574{
2575 struct vlan_entry *vlan; 2575 struct vlan_entry *vlan;
2576 struct net_device *vlan_dev;
2576 2577
2577 if (ip == bond->master_ip) 2578 if (ip == bond_confirm_addr(bond->dev, 0, ip))
2578 return 1; 2579 return 1;
2579 2580
2580 list_for_each_entry(vlan, &bond->vlan_list, vlan_list) { 2581 list_for_each_entry(vlan, &bond->vlan_list, vlan_list) {
2581 if (ip == vlan->vlan_ip) 2582 rcu_read_lock();
2583 vlan_dev = __vlan_find_dev_deep(bond->dev, vlan->vlan_id);
2584 rcu_read_unlock();
2585 if (vlan_dev && ip == bond_confirm_addr(vlan_dev, 0, ip))
2582 return 1; 2586 return 1;
2583 } 2587 }
2584 2588
@@ -2620,17 +2624,19 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave)
2620 int i, vlan_id; 2624 int i, vlan_id;
2621 __be32 *targets = bond->params.arp_targets; 2625 __be32 *targets = bond->params.arp_targets;
2622 struct vlan_entry *vlan; 2626 struct vlan_entry *vlan;
2623 struct net_device *vlan_dev; 2627 struct net_device *vlan_dev = NULL;
2624 struct rtable *rt; 2628 struct rtable *rt;
2625 2629
2626 for (i = 0; (i < BOND_MAX_ARP_TARGETS); i++) { 2630 for (i = 0; (i < BOND_MAX_ARP_TARGETS); i++) {
2631 __be32 addr;
2627 if (!targets[i]) 2632 if (!targets[i])
2628 break; 2633 break;
2629 pr_debug("basa: target %x\n", targets[i]); 2634 pr_debug("basa: target %x\n", targets[i]);
2630 if (!bond_vlan_used(bond)) { 2635 if (!bond_vlan_used(bond)) {
2631 pr_debug("basa: empty vlan: arp_send\n"); 2636 pr_debug("basa: empty vlan: arp_send\n");
2637 addr = bond_confirm_addr(bond->dev, targets[i], 0);
2632 bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i], 2638 bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i],
2633 bond->master_ip, 0); 2639 addr, 0);
2634 continue; 2640 continue;
2635 } 2641 }
2636 2642
@@ -2655,8 +2661,9 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave)
2655 if (rt->dst.dev == bond->dev) { 2661 if (rt->dst.dev == bond->dev) {
2656 ip_rt_put(rt); 2662 ip_rt_put(rt);
2657 pr_debug("basa: rtdev == bond->dev: arp_send\n"); 2663 pr_debug("basa: rtdev == bond->dev: arp_send\n");
2664 addr = bond_confirm_addr(bond->dev, targets[i], 0);
2658 bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i], 2665 bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i],
2659 bond->master_ip, 0); 2666 addr, 0);
2660 continue; 2667 continue;
2661 } 2668 }
2662 2669
@@ -2674,10 +2681,11 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave)
2674 } 2681 }
2675 } 2682 }
2676 2683
2677 if (vlan_id) { 2684 if (vlan_id && vlan_dev) {
2678 ip_rt_put(rt); 2685 ip_rt_put(rt);
2686 addr = bond_confirm_addr(vlan_dev, targets[i], 0);
2679 bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i], 2687 bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i],
2680 vlan->vlan_ip, vlan_id); 2688 addr, vlan_id);
2681 continue; 2689 continue;
2682 } 2690 }
2683 2691
@@ -3299,68 +3307,10 @@ static int bond_netdev_event(struct notifier_block *this,
3299 return NOTIFY_DONE; 3307 return NOTIFY_DONE;
3300} 3308}
3301 3309
3302/*
3303 * bond_inetaddr_event: handle inetaddr notifier chain events.
3304 *
3305 * We keep track of device IPs primarily to use as source addresses in
3306 * ARP monitor probes (rather than spewing out broadcasts all the time).
3307 *
3308 * We track one IP for the main device (if it has one), plus one per VLAN.
3309 */
3310static int bond_inetaddr_event(struct notifier_block *this, unsigned long event, void *ptr)
3311{
3312 struct in_ifaddr *ifa = ptr;
3313 struct net_device *vlan_dev, *event_dev = ifa->ifa_dev->dev;
3314 struct bond_net *bn = net_generic(dev_net(event_dev), bond_net_id);
3315 struct bonding *bond;
3316 struct vlan_entry *vlan;
3317
3318 /* we only care about primary address */
3319 if(ifa->ifa_flags & IFA_F_SECONDARY)
3320 return NOTIFY_DONE;
3321
3322 list_for_each_entry(bond, &bn->dev_list, bond_list) {
3323 if (bond->dev == event_dev) {
3324 switch (event) {
3325 case NETDEV_UP:
3326 bond->master_ip = ifa->ifa_local;
3327 return NOTIFY_OK;
3328 case NETDEV_DOWN:
3329 bond->master_ip = 0;
3330 return NOTIFY_OK;
3331 default:
3332 return NOTIFY_DONE;
3333 }
3334 }
3335
3336 list_for_each_entry(vlan, &bond->vlan_list, vlan_list) {
3337 vlan_dev = __vlan_find_dev_deep(bond->dev,
3338 vlan->vlan_id);
3339 if (vlan_dev == event_dev) {
3340 switch (event) {
3341 case NETDEV_UP:
3342 vlan->vlan_ip = ifa->ifa_local;
3343 return NOTIFY_OK;
3344 case NETDEV_DOWN:
3345 vlan->vlan_ip = 0;
3346 return NOTIFY_OK;
3347 default:
3348 return NOTIFY_DONE;
3349 }
3350 }
3351 }
3352 }
3353 return NOTIFY_DONE;
3354}
3355
3356static struct notifier_block bond_netdev_notifier = { 3310static struct notifier_block bond_netdev_notifier = {
3357 .notifier_call = bond_netdev_event, 3311 .notifier_call = bond_netdev_event,
3358}; 3312};
3359 3313
3360static struct notifier_block bond_inetaddr_notifier = {
3361 .notifier_call = bond_inetaddr_event,
3362};
3363
3364/*---------------------------- Hashing Policies -----------------------------*/ 3314/*---------------------------- Hashing Policies -----------------------------*/
3365 3315
3366/* 3316/*
@@ -4929,7 +4879,6 @@ static int __init bonding_init(void)
4929 } 4879 }
4930 4880
4931 register_netdevice_notifier(&bond_netdev_notifier); 4881 register_netdevice_notifier(&bond_netdev_notifier);
4932 register_inetaddr_notifier(&bond_inetaddr_notifier);
4933out: 4882out:
4934 return res; 4883 return res;
4935err: 4884err:
@@ -4943,7 +4892,6 @@ err_link:
4943static void __exit bonding_exit(void) 4892static void __exit bonding_exit(void)
4944{ 4893{
4945 unregister_netdevice_notifier(&bond_netdev_notifier); 4894 unregister_netdevice_notifier(&bond_netdev_notifier);
4946 unregister_inetaddr_notifier(&bond_inetaddr_notifier);
4947 4895
4948 bond_destroy_debugfs(); 4896 bond_destroy_debugfs();
4949 4897
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index 1aecc37e5b4d..9f2bae6616d3 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -21,6 +21,7 @@
21#include <linux/cpumask.h> 21#include <linux/cpumask.h>
22#include <linux/in6.h> 22#include <linux/in6.h>
23#include <linux/netpoll.h> 23#include <linux/netpoll.h>
24#include <linux/inetdevice.h>
24#include "bond_3ad.h" 25#include "bond_3ad.h"
25#include "bond_alb.h" 26#include "bond_alb.h"
26 27
@@ -166,7 +167,6 @@ struct bond_parm_tbl {
166 167
167struct vlan_entry { 168struct vlan_entry {
168 struct list_head vlan_list; 169 struct list_head vlan_list;
169 __be32 vlan_ip;
170 unsigned short vlan_id; 170 unsigned short vlan_id;
171}; 171};
172 172
@@ -232,7 +232,6 @@ struct bonding {
232 struct list_head bond_list; 232 struct list_head bond_list;
233 struct netdev_hw_addr_list mc_list; 233 struct netdev_hw_addr_list mc_list;
234 int (*xmit_hash_policy)(struct sk_buff *, int); 234 int (*xmit_hash_policy)(struct sk_buff *, int);
235 __be32 master_ip;
236 u16 rr_tx_counter; 235 u16 rr_tx_counter;
237 struct ad_bond_info ad_info; 236 struct ad_bond_info ad_info;
238 struct alb_bond_info alb_info; 237 struct alb_bond_info alb_info;
@@ -378,6 +377,21 @@ static inline bool bond_is_slave_inactive(struct slave *slave)
378 return slave->inactive; 377 return slave->inactive;
379} 378}
380 379
380static inline __be32 bond_confirm_addr(struct net_device *dev, __be32 dst, __be32 local)
381{
382 struct in_device *in_dev;
383 __be32 addr = 0;
384
385 rcu_read_lock();
386 in_dev = __in_dev_get_rcu(dev);
387
388 if (in_dev)
389 addr = inet_confirm_addr(in_dev, dst, local, RT_SCOPE_HOST);
390
391 rcu_read_unlock();
392 return addr;
393}
394
381struct bond_net; 395struct bond_net;
382 396
383struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr); 397struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr);
diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c
index 7b65716b8734..c95e7b5e2b85 100644
--- a/drivers/net/ethernet/broadcom/cnic.c
+++ b/drivers/net/ethernet/broadcom/cnic.c
@@ -47,6 +47,7 @@
47#include "bnx2x/bnx2x_hsi.h" 47#include "bnx2x/bnx2x_hsi.h"
48#include "../../../scsi/bnx2i/57xx_iscsi_constants.h" 48#include "../../../scsi/bnx2i/57xx_iscsi_constants.h"
49#include "../../../scsi/bnx2i/57xx_iscsi_hsi.h" 49#include "../../../scsi/bnx2i/57xx_iscsi_hsi.h"
50#include "../../../scsi/bnx2fc/bnx2fc_constants.h"
50#include "cnic.h" 51#include "cnic.h"
51#include "cnic_defs.h" 52#include "cnic_defs.h"
52 53
@@ -2547,7 +2548,7 @@ static void cnic_bnx2x_kwqe_err(struct cnic_dev *dev, struct kwqe *kwqe)
2547 } 2548 }
2548 kcqe.kcqe_op_flag = kcqe_op << KCQE_FLAGS_OPCODE_SHIFT; 2549 kcqe.kcqe_op_flag = kcqe_op << KCQE_FLAGS_OPCODE_SHIFT;
2549 kcqe.kcqe_op_flag |= KCQE_FLAGS_LAYER_MASK_L5_FCOE; 2550 kcqe.kcqe_op_flag |= KCQE_FLAGS_LAYER_MASK_L5_FCOE;
2550 kcqe.kcqe_info1 = FCOE_KCQE_COMPLETION_STATUS_NIC_ERROR; 2551 kcqe.kcqe_info1 = FCOE_KCQE_COMPLETION_STATUS_PARITY_ERROR;
2551 kcqe.kcqe_info2 = cid; 2552 kcqe.kcqe_info2 = cid;
2552 kcqe.kcqe_info0 = l5_cid; 2553 kcqe.kcqe_info0 = l5_cid;
2553 2554
@@ -2558,7 +2559,7 @@ static void cnic_bnx2x_kwqe_err(struct cnic_dev *dev, struct kwqe *kwqe)
2558 2559
2559 kcqe.kcqe_op_flag = (opcode + 0x10) << KCQE_FLAGS_OPCODE_SHIFT; 2560 kcqe.kcqe_op_flag = (opcode + 0x10) << KCQE_FLAGS_OPCODE_SHIFT;
2560 kcqe.kcqe_op_flag |= KCQE_FLAGS_LAYER_MASK_L5_ISCSI; 2561 kcqe.kcqe_op_flag |= KCQE_FLAGS_LAYER_MASK_L5_ISCSI;
2561 kcqe.kcqe_info1 = ISCSI_KCQE_COMPLETION_STATUS_NIC_ERROR; 2562 kcqe.kcqe_info1 = ISCSI_KCQE_COMPLETION_STATUS_PARITY_ERR;
2562 kcqe.kcqe_info2 = cid; 2563 kcqe.kcqe_info2 = cid;
2563 cnic_get_l5_cid(cp, BNX2X_SW_CID(cid), &kcqe.kcqe_info0); 2564 cnic_get_l5_cid(cp, BNX2X_SW_CID(cid), &kcqe.kcqe_info0);
2564 2565
@@ -2577,7 +2578,7 @@ static void cnic_bnx2x_kwqe_err(struct cnic_dev *dev, struct kwqe *kwqe)
2577 2578
2578 kcqe.kcqe_op_flag = (kcqe_op << KCQE_FLAGS_OPCODE_SHIFT) | 2579 kcqe.kcqe_op_flag = (kcqe_op << KCQE_FLAGS_OPCODE_SHIFT) |
2579 KCQE_FLAGS_LAYER_MASK_L4; 2580 KCQE_FLAGS_LAYER_MASK_L4;
2580 l4kcqe->status = L4_KCQE_COMPLETION_STATUS_NIC_ERROR; 2581 l4kcqe->status = L4_KCQE_COMPLETION_STATUS_PARITY_ERROR;
2581 l4kcqe->cid = cid; 2582 l4kcqe->cid = cid;
2582 cnic_get_l5_cid(cp, BNX2X_SW_CID(cid), &l4kcqe->conn_id); 2583 cnic_get_l5_cid(cp, BNX2X_SW_CID(cid), &l4kcqe->conn_id);
2583 } else { 2584 } else {
@@ -3933,7 +3934,8 @@ static void cnic_cm_process_kcqe(struct cnic_dev *dev, struct kcqe *kcqe)
3933 case L4_KCQE_OPCODE_VALUE_CONNECT_COMPLETE: 3934 case L4_KCQE_OPCODE_VALUE_CONNECT_COMPLETE:
3934 if (l4kcqe->status == 0) 3935 if (l4kcqe->status == 0)
3935 set_bit(SK_F_OFFLD_COMPLETE, &csk->flags); 3936 set_bit(SK_F_OFFLD_COMPLETE, &csk->flags);
3936 else if (l4kcqe->status == L4_KCQE_COMPLETION_STATUS_NIC_ERROR) 3937 else if (l4kcqe->status ==
3938 L4_KCQE_COMPLETION_STATUS_PARITY_ERROR)
3937 set_bit(SK_F_HW_ERR, &csk->flags); 3939 set_bit(SK_F_HW_ERR, &csk->flags);
3938 3940
3939 smp_mb__before_clear_bit(); 3941 smp_mb__before_clear_bit();
@@ -3946,7 +3948,7 @@ static void cnic_cm_process_kcqe(struct cnic_dev *dev, struct kcqe *kcqe)
3946 case L4_KCQE_OPCODE_VALUE_RESET_COMP: 3948 case L4_KCQE_OPCODE_VALUE_RESET_COMP:
3947 case L5CM_RAMROD_CMD_ID_SEARCHER_DELETE: 3949 case L5CM_RAMROD_CMD_ID_SEARCHER_DELETE:
3948 case L5CM_RAMROD_CMD_ID_TERMINATE_OFFLOAD: 3950 case L5CM_RAMROD_CMD_ID_TERMINATE_OFFLOAD:
3949 if (l4kcqe->status == L4_KCQE_COMPLETION_STATUS_NIC_ERROR) 3951 if (l4kcqe->status == L4_KCQE_COMPLETION_STATUS_PARITY_ERROR)
3950 set_bit(SK_F_HW_ERR, &csk->flags); 3952 set_bit(SK_F_HW_ERR, &csk->flags);
3951 3953
3952 cp->close_conn(csk, opcode); 3954 cp->close_conn(csk, opcode);
diff --git a/drivers/net/ethernet/broadcom/cnic_defs.h b/drivers/net/ethernet/broadcom/cnic_defs.h
index 06ca00266d70..382c98b0cc0c 100644
--- a/drivers/net/ethernet/broadcom/cnic_defs.h
+++ b/drivers/net/ethernet/broadcom/cnic_defs.h
@@ -35,16 +35,6 @@
35#define L5CM_RAMROD_CMD_ID_SEARCHER_DELETE (L5CM_RAMROD_CMD_ID_BASE + 14) 35#define L5CM_RAMROD_CMD_ID_SEARCHER_DELETE (L5CM_RAMROD_CMD_ID_BASE + 14)
36#define L5CM_RAMROD_CMD_ID_TERMINATE_OFFLOAD (L5CM_RAMROD_CMD_ID_BASE + 15) 36#define L5CM_RAMROD_CMD_ID_TERMINATE_OFFLOAD (L5CM_RAMROD_CMD_ID_BASE + 15)
37 37
38#define FCOE_KCQE_OPCODE_INIT_FUNC (0x10)
39#define FCOE_KCQE_OPCODE_DESTROY_FUNC (0x11)
40#define FCOE_KCQE_OPCODE_STAT_FUNC (0x12)
41#define FCOE_KCQE_OPCODE_OFFLOAD_CONN (0x15)
42#define FCOE_KCQE_OPCODE_ENABLE_CONN (0x16)
43#define FCOE_KCQE_OPCODE_DISABLE_CONN (0x17)
44#define FCOE_KCQE_OPCODE_DESTROY_CONN (0x18)
45#define FCOE_KCQE_OPCODE_CQ_EVENT_NOTIFICATION (0x20)
46#define FCOE_KCQE_OPCODE_FCOE_ERROR (0x21)
47
48#define FCOE_RAMROD_CMD_ID_INIT_FUNC (FCOE_KCQE_OPCODE_INIT_FUNC) 38#define FCOE_RAMROD_CMD_ID_INIT_FUNC (FCOE_KCQE_OPCODE_INIT_FUNC)
49#define FCOE_RAMROD_CMD_ID_DESTROY_FUNC (FCOE_KCQE_OPCODE_DESTROY_FUNC) 39#define FCOE_RAMROD_CMD_ID_DESTROY_FUNC (FCOE_KCQE_OPCODE_DESTROY_FUNC)
50#define FCOE_RAMROD_CMD_ID_STAT_FUNC (FCOE_KCQE_OPCODE_STAT_FUNC) 40#define FCOE_RAMROD_CMD_ID_STAT_FUNC (FCOE_KCQE_OPCODE_STAT_FUNC)
@@ -54,23 +44,6 @@
54#define FCOE_RAMROD_CMD_ID_DESTROY_CONN (FCOE_KCQE_OPCODE_DESTROY_CONN) 44#define FCOE_RAMROD_CMD_ID_DESTROY_CONN (FCOE_KCQE_OPCODE_DESTROY_CONN)
55#define FCOE_RAMROD_CMD_ID_TERMINATE_CONN (0x81) 45#define FCOE_RAMROD_CMD_ID_TERMINATE_CONN (0x81)
56 46
57#define FCOE_KWQE_OPCODE_INIT1 (0)
58#define FCOE_KWQE_OPCODE_INIT2 (1)
59#define FCOE_KWQE_OPCODE_INIT3 (2)
60#define FCOE_KWQE_OPCODE_OFFLOAD_CONN1 (3)
61#define FCOE_KWQE_OPCODE_OFFLOAD_CONN2 (4)
62#define FCOE_KWQE_OPCODE_OFFLOAD_CONN3 (5)
63#define FCOE_KWQE_OPCODE_OFFLOAD_CONN4 (6)
64#define FCOE_KWQE_OPCODE_ENABLE_CONN (7)
65#define FCOE_KWQE_OPCODE_DISABLE_CONN (8)
66#define FCOE_KWQE_OPCODE_DESTROY_CONN (9)
67#define FCOE_KWQE_OPCODE_DESTROY (10)
68#define FCOE_KWQE_OPCODE_STAT (11)
69
70#define FCOE_KCQE_COMPLETION_STATUS_ERROR (0x1)
71#define FCOE_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAILURE (0x3)
72#define FCOE_KCQE_COMPLETION_STATUS_NIC_ERROR (0x5)
73
74/* KCQ (kernel completion queue) response op codes */ 47/* KCQ (kernel completion queue) response op codes */
75#define L4_KCQE_OPCODE_VALUE_CLOSE_COMP (53) 48#define L4_KCQE_OPCODE_VALUE_CLOSE_COMP (53)
76#define L4_KCQE_OPCODE_VALUE_RESET_COMP (54) 49#define L4_KCQE_OPCODE_VALUE_RESET_COMP (54)
@@ -87,6 +60,7 @@
87/* KCQ (kernel completion queue) completion status */ 60/* KCQ (kernel completion queue) completion status */
88#define L4_KCQE_COMPLETION_STATUS_SUCCESS (0) 61#define L4_KCQE_COMPLETION_STATUS_SUCCESS (0)
89#define L4_KCQE_COMPLETION_STATUS_NIC_ERROR (4) 62#define L4_KCQE_COMPLETION_STATUS_NIC_ERROR (4)
63#define L4_KCQE_COMPLETION_STATUS_PARITY_ERROR (0x81)
90#define L4_KCQE_COMPLETION_STATUS_TIMEOUT (0x93) 64#define L4_KCQE_COMPLETION_STATUS_TIMEOUT (0x93)
91 65
92#define L4_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAIL (0x83) 66#define L4_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAIL (0x83)
diff --git a/drivers/net/ethernet/broadcom/cnic_if.h b/drivers/net/ethernet/broadcom/cnic_if.h
index 60deb84d36bd..289274e546be 100644
--- a/drivers/net/ethernet/broadcom/cnic_if.h
+++ b/drivers/net/ethernet/broadcom/cnic_if.h
@@ -12,8 +12,8 @@
12#ifndef CNIC_IF_H 12#ifndef CNIC_IF_H
13#define CNIC_IF_H 13#define CNIC_IF_H
14 14
15#define CNIC_MODULE_VERSION "2.5.9" 15#define CNIC_MODULE_VERSION "2.5.10"
16#define CNIC_MODULE_RELDATE "Feb 8, 2012" 16#define CNIC_MODULE_RELDATE "March 21, 2012"
17 17
18#define CNIC_ULP_RDMA 0 18#define CNIC_ULP_RDMA 0
19#define CNIC_ULP_ISCSI 1 19#define CNIC_ULP_ISCSI 1
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index b0657466041d..7b71387cf93c 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -89,10 +89,10 @@ static inline void _tg3_flag_clear(enum TG3_FLAGS flag, unsigned long *bits)
89 89
90#define DRV_MODULE_NAME "tg3" 90#define DRV_MODULE_NAME "tg3"
91#define TG3_MAJ_NUM 3 91#define TG3_MAJ_NUM 3
92#define TG3_MIN_NUM 122 92#define TG3_MIN_NUM 123
93#define DRV_MODULE_VERSION \ 93#define DRV_MODULE_VERSION \
94 __stringify(TG3_MAJ_NUM) "." __stringify(TG3_MIN_NUM) 94 __stringify(TG3_MAJ_NUM) "." __stringify(TG3_MIN_NUM)
95#define DRV_MODULE_RELDATE "December 7, 2011" 95#define DRV_MODULE_RELDATE "March 21, 2012"
96 96
97#define RESET_KIND_SHUTDOWN 0 97#define RESET_KIND_SHUTDOWN 0
98#define RESET_KIND_INIT 1 98#define RESET_KIND_INIT 1
@@ -5953,8 +5953,10 @@ next_pkt_nopost:
5953 tpr->rx_std_prod_idx = std_prod_idx & tp->rx_std_ring_mask; 5953 tpr->rx_std_prod_idx = std_prod_idx & tp->rx_std_ring_mask;
5954 tpr->rx_jmb_prod_idx = jmb_prod_idx & tp->rx_jmb_ring_mask; 5954 tpr->rx_jmb_prod_idx = jmb_prod_idx & tp->rx_jmb_ring_mask;
5955 5955
5956 if (tnapi != &tp->napi[1]) 5956 if (tnapi != &tp->napi[1]) {
5957 tp->rx_refill = true;
5957 napi_schedule(&tp->napi[1].napi); 5958 napi_schedule(&tp->napi[1].napi);
5959 }
5958 } 5960 }
5959 5961
5960 return received; 5962 return received;
@@ -6134,6 +6136,7 @@ static int tg3_poll_work(struct tg3_napi *tnapi, int work_done, int budget)
6134 u32 std_prod_idx = dpr->rx_std_prod_idx; 6136 u32 std_prod_idx = dpr->rx_std_prod_idx;
6135 u32 jmb_prod_idx = dpr->rx_jmb_prod_idx; 6137 u32 jmb_prod_idx = dpr->rx_jmb_prod_idx;
6136 6138
6139 tp->rx_refill = false;
6137 for (i = 1; i < tp->irq_cnt; i++) 6140 for (i = 1; i < tp->irq_cnt; i++)
6138 err |= tg3_rx_prodring_xfer(tp, dpr, 6141 err |= tg3_rx_prodring_xfer(tp, dpr,
6139 &tp->napi[i].prodring); 6142 &tp->napi[i].prodring);
@@ -6197,9 +6200,25 @@ static int tg3_poll_msix(struct napi_struct *napi, int budget)
6197 /* check for RX/TX work to do */ 6200 /* check for RX/TX work to do */
6198 if (likely(sblk->idx[0].tx_consumer == tnapi->tx_cons && 6201 if (likely(sblk->idx[0].tx_consumer == tnapi->tx_cons &&
6199 *(tnapi->rx_rcb_prod_idx) == tnapi->rx_rcb_ptr)) { 6202 *(tnapi->rx_rcb_prod_idx) == tnapi->rx_rcb_ptr)) {
6203
6204 /* This test here is not race free, but will reduce
6205 * the number of interrupts by looping again.
6206 */
6207 if (tnapi == &tp->napi[1] && tp->rx_refill)
6208 continue;
6209
6200 napi_complete(napi); 6210 napi_complete(napi);
6201 /* Reenable interrupts. */ 6211 /* Reenable interrupts. */
6202 tw32_mailbox(tnapi->int_mbox, tnapi->last_tag << 24); 6212 tw32_mailbox(tnapi->int_mbox, tnapi->last_tag << 24);
6213
6214 /* This test here is synchronized by napi_schedule()
6215 * and napi_complete() to close the race condition.
6216 */
6217 if (unlikely(tnapi == &tp->napi[1] && tp->rx_refill)) {
6218 tw32(HOSTCC_MODE, tp->coalesce_mode |
6219 HOSTCC_MODE_ENABLE |
6220 tnapi->coal_now);
6221 }
6203 mmiowb(); 6222 mmiowb();
6204 break; 6223 break;
6205 } 6224 }
diff --git a/drivers/net/ethernet/broadcom/tg3.h b/drivers/net/ethernet/broadcom/tg3.h
index 66bcfca55261..93865f899a4f 100644
--- a/drivers/net/ethernet/broadcom/tg3.h
+++ b/drivers/net/ethernet/broadcom/tg3.h
@@ -3007,6 +3007,7 @@ struct tg3 {
3007 u32 rx_std_max_post; 3007 u32 rx_std_max_post;
3008 u32 rx_offset; 3008 u32 rx_offset;
3009 u32 rx_pkt_map_sz; 3009 u32 rx_pkt_map_sz;
3010 bool rx_refill;
3010 3011
3011 3012
3012 /* begin "everything else" cacheline(s) section */ 3013 /* begin "everything else" cacheline(s) section */
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index 82c2c86a1951..423a1a2a702e 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -95,6 +95,10 @@ static int disable_msi = 0;
95module_param(disable_msi, int, 0); 95module_param(disable_msi, int, 0);
96MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)"); 96MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)");
97 97
98static int legacy_pme = 0;
99module_param(legacy_pme, int, 0);
100MODULE_PARM_DESC(legacy_pme, "Legacy power management");
101
98static DEFINE_PCI_DEVICE_TABLE(sky2_id_table) = { 102static DEFINE_PCI_DEVICE_TABLE(sky2_id_table) = {
99 { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) }, /* SK-9Sxx */ 103 { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) }, /* SK-9Sxx */
100 { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) }, /* SK-9Exx */ 104 { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) }, /* SK-9Exx */
@@ -867,6 +871,13 @@ static void sky2_wol_init(struct sky2_port *sky2)
867 /* Disable PiG firmware */ 871 /* Disable PiG firmware */
868 sky2_write16(hw, B0_CTST, Y2_HW_WOL_OFF); 872 sky2_write16(hw, B0_CTST, Y2_HW_WOL_OFF);
869 873
874 /* Needed by some broken BIOSes, use PCI rather than PCI-e for WOL */
875 if (legacy_pme) {
876 u32 reg1 = sky2_pci_read32(hw, PCI_DEV_REG1);
877 reg1 |= PCI_Y2_PME_LEGACY;
878 sky2_pci_write32(hw, PCI_DEV_REG1, reg1);
879 }
880
870 /* block receiver */ 881 /* block receiver */
871 sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET); 882 sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET);
872 sky2_read32(hw, B0_CTST); 883 sky2_read32(hw, B0_CTST);
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 4b8b52ca09d8..b7b3f5b0d406 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -493,6 +493,7 @@ block:
493 if (netif_running (dev->net) && 493 if (netif_running (dev->net) &&
494 !test_bit (EVENT_RX_HALT, &dev->flags)) { 494 !test_bit (EVENT_RX_HALT, &dev->flags)) {
495 rx_submit (dev, urb, GFP_ATOMIC); 495 rx_submit (dev, urb, GFP_ATOMIC);
496 usb_mark_last_busy(dev->udev);
496 return; 497 return;
497 } 498 }
498 usb_free_urb (urb); 499 usb_free_urb (urb);
@@ -589,6 +590,14 @@ static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q)
589 entry = (struct skb_data *) skb->cb; 590 entry = (struct skb_data *) skb->cb;
590 urb = entry->urb; 591 urb = entry->urb;
591 592
593 /*
594 * Get reference count of the URB to avoid it to be
595 * freed during usb_unlink_urb, which may trigger
596 * use-after-free problem inside usb_unlink_urb since
597 * usb_unlink_urb is always racing with .complete
598 * handler(include defer_bh).
599 */
600 usb_get_urb(urb);
592 spin_unlock_irqrestore(&q->lock, flags); 601 spin_unlock_irqrestore(&q->lock, flags);
593 // during some PM-driven resume scenarios, 602 // during some PM-driven resume scenarios,
594 // these (async) unlinks complete immediately 603 // these (async) unlinks complete immediately
@@ -597,6 +606,7 @@ static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q)
597 netdev_dbg(dev->net, "unlink urb err, %d\n", retval); 606 netdev_dbg(dev->net, "unlink urb err, %d\n", retval);
598 else 607 else
599 count++; 608 count++;
609 usb_put_urb(urb);
600 spin_lock_irqsave(&q->lock, flags); 610 spin_lock_irqsave(&q->lock, flags);
601 } 611 }
602 spin_unlock_irqrestore (&q->lock, flags); 612 spin_unlock_irqrestore (&q->lock, flags);
@@ -1028,7 +1038,6 @@ static void tx_complete (struct urb *urb)
1028 } 1038 }
1029 1039
1030 usb_autopm_put_interface_async(dev->intf); 1040 usb_autopm_put_interface_async(dev->intf);
1031 urb->dev = NULL;
1032 entry->state = tx_done; 1041 entry->state = tx_done;
1033 defer_bh(dev, skb, &dev->txq); 1042 defer_bh(dev, skb, &dev->txq);
1034} 1043}
diff --git a/drivers/scsi/bnx2fc/bnx2fc_constants.h b/drivers/scsi/bnx2fc/bnx2fc_constants.h
index c12702bb16d6..dad9924abbbb 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_constants.h
+++ b/drivers/scsi/bnx2fc/bnx2fc_constants.h
@@ -47,6 +47,7 @@
47#define FCOE_KCQE_COMPLETION_STATUS_CTX_FREE_FAILURE (0x4) 47#define FCOE_KCQE_COMPLETION_STATUS_CTX_FREE_FAILURE (0x4)
48#define FCOE_KCQE_COMPLETION_STATUS_NIC_ERROR (0x5) 48#define FCOE_KCQE_COMPLETION_STATUS_NIC_ERROR (0x5)
49#define FCOE_KCQE_COMPLETION_STATUS_WRONG_HSI_VERSION (0x6) 49#define FCOE_KCQE_COMPLETION_STATUS_WRONG_HSI_VERSION (0x6)
50#define FCOE_KCQE_COMPLETION_STATUS_PARITY_ERROR (0x81)
50 51
51/* CQE type */ 52/* CQE type */
52#define FCOE_PENDING_CQE_TYPE 0 53#define FCOE_PENDING_CQE_TYPE 0
diff --git a/drivers/scsi/bnx2i/57xx_iscsi_constants.h b/drivers/scsi/bnx2i/57xx_iscsi_constants.h
index 57515f1f1690..495a841645f9 100644
--- a/drivers/scsi/bnx2i/57xx_iscsi_constants.h
+++ b/drivers/scsi/bnx2i/57xx_iscsi_constants.h
@@ -122,6 +122,7 @@
122#define ISCSI_KCQE_COMPLETION_STATUS_LOM_ISCSI_NOT_ENABLED (0x51) 122#define ISCSI_KCQE_COMPLETION_STATUS_LOM_ISCSI_NOT_ENABLED (0x51)
123 123
124#define ISCSI_KCQE_COMPLETION_STATUS_CID_BUSY (0x80) 124#define ISCSI_KCQE_COMPLETION_STATUS_CID_BUSY (0x80)
125#define ISCSI_KCQE_COMPLETION_STATUS_PARITY_ERR (0x81)
125 126
126/* SQ/RQ/CQ DB structure sizes */ 127/* SQ/RQ/CQ DB structure sizes */
127#define ISCSI_SQ_DB_SIZE (16) 128#define ISCSI_SQ_DB_SIZE (16)
diff --git a/net/core/dev.c b/net/core/dev.c
index 0f3eb7d79a2d..452db7090d18 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3560,7 +3560,8 @@ EXPORT_SYMBOL(napi_gro_receive);
3560static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb) 3560static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb)
3561{ 3561{
3562 __skb_pull(skb, skb_headlen(skb)); 3562 __skb_pull(skb, skb_headlen(skb));
3563 skb_reserve(skb, NET_IP_ALIGN - skb_headroom(skb)); 3563 /* restore the reserve we had after netdev_alloc_skb_ip_align() */
3564 skb_reserve(skb, NET_SKB_PAD + NET_IP_ALIGN - skb_headroom(skb));
3564 skb->vlan_tci = 0; 3565 skb->vlan_tci = 0;
3565 skb->dev = napi->dev; 3566 skb->dev = napi->dev;
3566 skb->skb_iif = 0; 3567 skb->skb_iif = 0;
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index e41c40f48cfe..d4fad5c77447 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1079,6 +1079,7 @@ __be32 inet_confirm_addr(struct in_device *in_dev,
1079 1079
1080 return addr; 1080 return addr;
1081} 1081}
1082EXPORT_SYMBOL(inet_confirm_addr);
1082 1083
1083/* 1084/*
1084 * Device notifier 1085 * Device notifier
diff --git a/net/ipv4/netfilter/iptable_filter.c b/net/ipv4/netfilter/iptable_filter.c
index 0e58f09e59fb..851acec852d2 100644
--- a/net/ipv4/netfilter/iptable_filter.c
+++ b/net/ipv4/netfilter/iptable_filter.c
@@ -52,7 +52,7 @@ iptable_filter_hook(unsigned int hook, struct sk_buff *skb,
52static struct nf_hook_ops *filter_ops __read_mostly; 52static struct nf_hook_ops *filter_ops __read_mostly;
53 53
54/* Default to forward because I got too much mail already. */ 54/* Default to forward because I got too much mail already. */
55static bool forward = NF_ACCEPT; 55static bool forward = true;
56module_param(forward, bool, 0000); 56module_param(forward, bool, 0000);
57 57
58static int __net_init iptable_filter_net_init(struct net *net) 58static int __net_init iptable_filter_net_init(struct net *net)
@@ -64,7 +64,7 @@ static int __net_init iptable_filter_net_init(struct net *net)
64 return -ENOMEM; 64 return -ENOMEM;
65 /* Entry 1 is the FORWARD hook */ 65 /* Entry 1 is the FORWARD hook */
66 ((struct ipt_standard *)repl->entries)[1].target.verdict = 66 ((struct ipt_standard *)repl->entries)[1].target.verdict =
67 -forward - 1; 67 forward ? -NF_ACCEPT - 1 : -NF_DROP - 1;
68 68
69 net->ipv4.iptable_filter = 69 net->ipv4.iptable_filter =
70 ipt_register_table(net, &packet_filter, repl); 70 ipt_register_table(net, &packet_filter, repl);
@@ -88,11 +88,6 @@ static int __init iptable_filter_init(void)
88{ 88{
89 int ret; 89 int ret;
90 90
91 if (forward < 0 || forward > NF_MAX_VERDICT) {
92 pr_err("iptables forward must be 0 or 1\n");
93 return -EINVAL;
94 }
95
96 ret = register_pernet_subsys(&iptable_filter_net_ops); 91 ret = register_pernet_subsys(&iptable_filter_net_ops);
97 if (ret < 0) 92 if (ret < 0)
98 return ret; 93 return ret;
diff --git a/net/ipv6/netfilter/ip6table_filter.c b/net/ipv6/netfilter/ip6table_filter.c
index a8f6da97e3b2..325e59a0224f 100644
--- a/net/ipv6/netfilter/ip6table_filter.c
+++ b/net/ipv6/netfilter/ip6table_filter.c
@@ -44,7 +44,7 @@ ip6table_filter_hook(unsigned int hook, struct sk_buff *skb,
44static struct nf_hook_ops *filter_ops __read_mostly; 44static struct nf_hook_ops *filter_ops __read_mostly;
45 45
46/* Default to forward because I got too much mail already. */ 46/* Default to forward because I got too much mail already. */
47static bool forward = NF_ACCEPT; 47static bool forward = true;
48module_param(forward, bool, 0000); 48module_param(forward, bool, 0000);
49 49
50static int __net_init ip6table_filter_net_init(struct net *net) 50static int __net_init ip6table_filter_net_init(struct net *net)
@@ -56,7 +56,7 @@ static int __net_init ip6table_filter_net_init(struct net *net)
56 return -ENOMEM; 56 return -ENOMEM;
57 /* Entry 1 is the FORWARD hook */ 57 /* Entry 1 is the FORWARD hook */
58 ((struct ip6t_standard *)repl->entries)[1].target.verdict = 58 ((struct ip6t_standard *)repl->entries)[1].target.verdict =
59 -forward - 1; 59 forward ? -NF_ACCEPT - 1 : -NF_DROP - 1;
60 60
61 net->ipv6.ip6table_filter = 61 net->ipv6.ip6table_filter =
62 ip6t_register_table(net, &packet_filter, repl); 62 ip6t_register_table(net, &packet_filter, repl);
@@ -80,11 +80,6 @@ static int __init ip6table_filter_init(void)
80{ 80{
81 int ret; 81 int ret;
82 82
83 if (forward < 0 || forward > NF_MAX_VERDICT) {
84 pr_err("iptables forward must be 0 or 1\n");
85 return -EINVAL;
86 }
87
88 ret = register_pernet_subsys(&ip6table_filter_net_ops); 83 ret = register_pernet_subsys(&ip6table_filter_net_ops);
89 if (ret < 0) 84 if (ret < 0)
90 return ret; 85 return ret;
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c
index 9b071910b4ba..1addd9f3f40a 100644
--- a/net/l2tp/l2tp_ppp.c
+++ b/net/l2tp/l2tp_ppp.c
@@ -1845,3 +1845,4 @@ MODULE_AUTHOR("James Chapman <jchapman@katalix.com>");
1845MODULE_DESCRIPTION("PPP over L2TP over UDP"); 1845MODULE_DESCRIPTION("PPP over L2TP over UDP");
1846MODULE_LICENSE("GPL"); 1846MODULE_LICENSE("GPL");
1847MODULE_VERSION(PPPOL2TP_DRV_VERSION); 1847MODULE_VERSION(PPPOL2TP_DRV_VERSION);
1848MODULE_ALIAS("pppox-proto-" __stringify(PX_PROTO_OL2TP));
diff --git a/net/netlabel/netlabel_kapi.c b/net/netlabel/netlabel_kapi.c
index 2560e7b441c6..7c94aedd0912 100644
--- a/net/netlabel/netlabel_kapi.c
+++ b/net/netlabel/netlabel_kapi.c
@@ -597,7 +597,7 @@ int netlbl_secattr_catmap_setrng(struct netlbl_lsm_secattr_catmap *catmap,
597 iter = iter->next; 597 iter = iter->next;
598 iter_max_spot = iter->startbit + NETLBL_CATMAP_SIZE; 598 iter_max_spot = iter->startbit + NETLBL_CATMAP_SIZE;
599 } 599 }
600 ret_val = netlbl_secattr_catmap_setbit(iter, spot, GFP_ATOMIC); 600 ret_val = netlbl_secattr_catmap_setbit(iter, spot, flags);
601 } 601 }
602 602
603 return ret_val; 603 return ret_val;
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
index 51c868923f64..a1e116277477 100644
--- a/net/rds/ib_cm.c
+++ b/net/rds/ib_cm.c
@@ -749,7 +749,7 @@ int rds_ib_conn_alloc(struct rds_connection *conn, gfp_t gfp)
749 int ret; 749 int ret;
750 750
751 /* XXX too lazy? */ 751 /* XXX too lazy? */
752 ic = kzalloc(sizeof(struct rds_ib_connection), GFP_KERNEL); 752 ic = kzalloc(sizeof(struct rds_ib_connection), gfp);
753 if (!ic) 753 if (!ic)
754 return -ENOMEM; 754 return -ENOMEM;
755 755
diff --git a/net/rds/iw_cm.c b/net/rds/iw_cm.c
index 9556d2895f7a..a91e1db62ee6 100644
--- a/net/rds/iw_cm.c
+++ b/net/rds/iw_cm.c
@@ -694,7 +694,7 @@ int rds_iw_conn_alloc(struct rds_connection *conn, gfp_t gfp)
694 unsigned long flags; 694 unsigned long flags;
695 695
696 /* XXX too lazy? */ 696 /* XXX too lazy? */
697 ic = kzalloc(sizeof(struct rds_iw_connection), GFP_KERNEL); 697 ic = kzalloc(sizeof(struct rds_iw_connection), gfp);
698 if (!ic) 698 if (!ic)
699 return -ENOMEM; 699 return -ENOMEM;
700 700
diff --git a/net/rds/loop.c b/net/rds/loop.c
index 87ff2a8a454b..6b12b68541ae 100644
--- a/net/rds/loop.c
+++ b/net/rds/loop.c
@@ -121,7 +121,7 @@ static int rds_loop_conn_alloc(struct rds_connection *conn, gfp_t gfp)
121 struct rds_loop_connection *lc; 121 struct rds_loop_connection *lc;
122 unsigned long flags; 122 unsigned long flags;
123 123
124 lc = kzalloc(sizeof(struct rds_loop_connection), GFP_KERNEL); 124 lc = kzalloc(sizeof(struct rds_loop_connection), gfp);
125 if (!lc) 125 if (!lc)
126 return -ENOMEM; 126 return -ENOMEM;
127 127
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
index 47bacd8c0250..95a338c89f99 100644
--- a/net/xfrm/xfrm_output.c
+++ b/net/xfrm/xfrm_output.c
@@ -21,7 +21,7 @@
21 21
22static int xfrm_output2(struct sk_buff *skb); 22static int xfrm_output2(struct sk_buff *skb);
23 23
24static int xfrm_state_check_space(struct xfrm_state *x, struct sk_buff *skb) 24static int xfrm_skb_check_space(struct sk_buff *skb)
25{ 25{
26 struct dst_entry *dst = skb_dst(skb); 26 struct dst_entry *dst = skb_dst(skb);
27 int nhead = dst->header_len + LL_RESERVED_SPACE(dst->dev) 27 int nhead = dst->header_len + LL_RESERVED_SPACE(dst->dev)
@@ -48,7 +48,7 @@ static int xfrm_output_one(struct sk_buff *skb, int err)
48 goto resume; 48 goto resume;
49 49
50 do { 50 do {
51 err = xfrm_state_check_space(x, skb); 51 err = xfrm_skb_check_space(skb);
52 if (err) { 52 if (err) {
53 XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTERROR); 53 XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTERROR);
54 goto error_nolock; 54 goto error_nolock;
diff --git a/net/xfrm/xfrm_replay.c b/net/xfrm/xfrm_replay.c
index 39e02c54ed26..2f6d11d04a2b 100644
--- a/net/xfrm/xfrm_replay.c
+++ b/net/xfrm/xfrm_replay.c
@@ -167,7 +167,7 @@ static void xfrm_replay_advance(struct xfrm_state *x, __be32 net_seq)
167 } 167 }
168 168
169 if (xfrm_aevent_is_on(xs_net(x))) 169 if (xfrm_aevent_is_on(xs_net(x)))
170 xfrm_replay_notify(x, XFRM_REPLAY_UPDATE); 170 x->repl->notify(x, XFRM_REPLAY_UPDATE);
171} 171}
172 172
173static int xfrm_replay_overflow_bmp(struct xfrm_state *x, struct sk_buff *skb) 173static int xfrm_replay_overflow_bmp(struct xfrm_state *x, struct sk_buff *skb)
@@ -279,7 +279,7 @@ static void xfrm_replay_advance_bmp(struct xfrm_state *x, __be32 net_seq)
279 replay_esn->bmp[nr] |= (1U << bitnr); 279 replay_esn->bmp[nr] |= (1U << bitnr);
280 280
281 if (xfrm_aevent_is_on(xs_net(x))) 281 if (xfrm_aevent_is_on(xs_net(x)))
282 xfrm_replay_notify(x, XFRM_REPLAY_UPDATE); 282 x->repl->notify(x, XFRM_REPLAY_UPDATE);
283} 283}
284 284
285static void xfrm_replay_notify_bmp(struct xfrm_state *x, int event) 285static void xfrm_replay_notify_bmp(struct xfrm_state *x, int event)
@@ -473,7 +473,7 @@ static void xfrm_replay_advance_esn(struct xfrm_state *x, __be32 net_seq)
473 replay_esn->bmp[nr] |= (1U << bitnr); 473 replay_esn->bmp[nr] |= (1U << bitnr);
474 474
475 if (xfrm_aevent_is_on(xs_net(x))) 475 if (xfrm_aevent_is_on(xs_net(x)))
476 xfrm_replay_notify(x, XFRM_REPLAY_UPDATE); 476 x->repl->notify(x, XFRM_REPLAY_UPDATE);
477} 477}
478 478
479static struct xfrm_replay xfrm_replay_legacy = { 479static struct xfrm_replay xfrm_replay_legacy = {