aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/networking/ip-sysctl.txt4
-rw-r--r--MAINTAINERS1
-rw-r--r--drivers/net/bonding/bond_3ad.c3
-rw-r--r--drivers/net/bonding/bond_alb.c3
-rw-r--r--drivers/net/bonding/bond_main.c13
-rw-r--r--drivers/net/cxgb4/cxgb4_main.c3
-rw-r--r--drivers/net/ibmveth.c4
-rw-r--r--drivers/net/pch_gbe/pch_gbe_main.c56
-rw-r--r--drivers/net/phy/dp83640.c4
-rw-r--r--drivers/net/xen-netback/interface.c4
-rw-r--r--include/linux/ptp_classify.h13
-rw-r--r--net/can/bcm.c53
-rw-r--r--net/ipv6/tcp_ipv6.c3
-rw-r--r--net/packet/af_packet.c5
-rw-r--r--net/rds/iw_rdma.c13
15 files changed, 100 insertions, 82 deletions
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index 81546990f41..ca5cdcd0f0e 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -1042,7 +1042,7 @@ conf/interface/*:
1042 The functional behaviour for certain settings is different 1042 The functional behaviour for certain settings is different
1043 depending on whether local forwarding is enabled or not. 1043 depending on whether local forwarding is enabled or not.
1044 1044
1045accept_ra - BOOLEAN 1045accept_ra - INTEGER
1046 Accept Router Advertisements; autoconfigure using them. 1046 Accept Router Advertisements; autoconfigure using them.
1047 1047
1048 Possible values are: 1048 Possible values are:
@@ -1106,7 +1106,7 @@ dad_transmits - INTEGER
1106 The amount of Duplicate Address Detection probes to send. 1106 The amount of Duplicate Address Detection probes to send.
1107 Default: 1 1107 Default: 1
1108 1108
1109forwarding - BOOLEAN 1109forwarding - INTEGER
1110 Configure interface-specific Host/Router behaviour. 1110 Configure interface-specific Host/Router behaviour.
1111 1111
1112 Note: It is recommended to have the same setting on all 1112 Note: It is recommended to have the same setting on all
diff --git a/MAINTAINERS b/MAINTAINERS
index ae8820e173a..ace8f9c81b9 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6374,7 +6374,6 @@ S: Supported
6374F: arch/arm/mach-tegra 6374F: arch/arm/mach-tegra
6375 6375
6376TEHUTI ETHERNET DRIVER 6376TEHUTI ETHERNET DRIVER
6377M: Alexander Indenbaum <baum@tehutinetworks.net>
6378M: Andy Gospodarek <andy@greyhouse.net> 6377M: Andy Gospodarek <andy@greyhouse.net>
6379L: netdev@vger.kernel.org 6378L: netdev@vger.kernel.org
6380S: Supported 6379S: Supported
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index a047eb973e3..47b928ed08f 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -2168,7 +2168,8 @@ void bond_3ad_state_machine_handler(struct work_struct *work)
2168 } 2168 }
2169 2169
2170re_arm: 2170re_arm:
2171 queue_delayed_work(bond->wq, &bond->ad_work, ad_delta_in_ticks); 2171 if (!bond->kill_timers)
2172 queue_delayed_work(bond->wq, &bond->ad_work, ad_delta_in_ticks);
2172out: 2173out:
2173 read_unlock(&bond->lock); 2174 read_unlock(&bond->lock);
2174} 2175}
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 7f8b20a34ee..d4fbd2e6261 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -1440,7 +1440,8 @@ void bond_alb_monitor(struct work_struct *work)
1440 } 1440 }
1441 1441
1442re_arm: 1442re_arm:
1443 queue_delayed_work(bond->wq, &bond->alb_work, alb_delta_in_ticks); 1443 if (!bond->kill_timers)
1444 queue_delayed_work(bond->wq, &bond->alb_work, alb_delta_in_ticks);
1444out: 1445out:
1445 read_unlock(&bond->lock); 1446 read_unlock(&bond->lock);
1446} 1447}
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 43f2ea54108..6d79b78cfc7 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -777,6 +777,9 @@ static void bond_resend_igmp_join_requests(struct bonding *bond)
777 777
778 read_lock(&bond->lock); 778 read_lock(&bond->lock);
779 779
780 if (bond->kill_timers)
781 goto out;
782
780 /* rejoin all groups on bond device */ 783 /* rejoin all groups on bond device */
781 __bond_resend_igmp_join_requests(bond->dev); 784 __bond_resend_igmp_join_requests(bond->dev);
782 785
@@ -790,9 +793,9 @@ static void bond_resend_igmp_join_requests(struct bonding *bond)
790 __bond_resend_igmp_join_requests(vlan_dev); 793 __bond_resend_igmp_join_requests(vlan_dev);
791 } 794 }
792 795
793 if (--bond->igmp_retrans > 0) 796 if ((--bond->igmp_retrans > 0) && !bond->kill_timers)
794 queue_delayed_work(bond->wq, &bond->mcast_work, HZ/5); 797 queue_delayed_work(bond->wq, &bond->mcast_work, HZ/5);
795 798out:
796 read_unlock(&bond->lock); 799 read_unlock(&bond->lock);
797} 800}
798 801
@@ -2538,7 +2541,7 @@ void bond_mii_monitor(struct work_struct *work)
2538 } 2541 }
2539 2542
2540re_arm: 2543re_arm:
2541 if (bond->params.miimon) 2544 if (bond->params.miimon && !bond->kill_timers)
2542 queue_delayed_work(bond->wq, &bond->mii_work, 2545 queue_delayed_work(bond->wq, &bond->mii_work,
2543 msecs_to_jiffies(bond->params.miimon)); 2546 msecs_to_jiffies(bond->params.miimon));
2544out: 2547out:
@@ -2886,7 +2889,7 @@ void bond_loadbalance_arp_mon(struct work_struct *work)
2886 } 2889 }
2887 2890
2888re_arm: 2891re_arm:
2889 if (bond->params.arp_interval) 2892 if (bond->params.arp_interval && !bond->kill_timers)
2890 queue_delayed_work(bond->wq, &bond->arp_work, delta_in_ticks); 2893 queue_delayed_work(bond->wq, &bond->arp_work, delta_in_ticks);
2891out: 2894out:
2892 read_unlock(&bond->lock); 2895 read_unlock(&bond->lock);
@@ -3154,7 +3157,7 @@ void bond_activebackup_arp_mon(struct work_struct *work)
3154 bond_ab_arp_probe(bond); 3157 bond_ab_arp_probe(bond);
3155 3158
3156re_arm: 3159re_arm:
3157 if (bond->params.arp_interval) 3160 if (bond->params.arp_interval && !bond->kill_timers)
3158 queue_delayed_work(bond->wq, &bond->arp_work, delta_in_ticks); 3161 queue_delayed_work(bond->wq, &bond->arp_work, delta_in_ticks);
3159out: 3162out:
3160 read_unlock(&bond->lock); 3163 read_unlock(&bond->lock);
diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c
index c9957b7f17b..b4efa292fd6 100644
--- a/drivers/net/cxgb4/cxgb4_main.c
+++ b/drivers/net/cxgb4/cxgb4_main.c
@@ -3712,6 +3712,9 @@ static int __devinit init_one(struct pci_dev *pdev,
3712 setup_debugfs(adapter); 3712 setup_debugfs(adapter);
3713 } 3713 }
3714 3714
3715 /* PCIe EEH recovery on powerpc platforms needs fundamental reset */
3716 pdev->needs_freset = 1;
3717
3715 if (is_offload(adapter)) 3718 if (is_offload(adapter))
3716 attach_ulds(adapter); 3719 attach_ulds(adapter);
3717 3720
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c
index 8dd5fccef72..d393f1e764e 100644
--- a/drivers/net/ibmveth.c
+++ b/drivers/net/ibmveth.c
@@ -636,8 +636,8 @@ static int ibmveth_open(struct net_device *netdev)
636 netdev_err(netdev, "unable to request irq 0x%x, rc %d\n", 636 netdev_err(netdev, "unable to request irq 0x%x, rc %d\n",
637 netdev->irq, rc); 637 netdev->irq, rc);
638 do { 638 do {
639 rc = h_free_logical_lan(adapter->vdev->unit_address); 639 lpar_rc = h_free_logical_lan(adapter->vdev->unit_address);
640 } while (H_IS_LONG_BUSY(rc) || (rc == H_BUSY)); 640 } while (H_IS_LONG_BUSY(lpar_rc) || (lpar_rc == H_BUSY));
641 641
642 goto err_out; 642 goto err_out;
643 } 643 }
diff --git a/drivers/net/pch_gbe/pch_gbe_main.c b/drivers/net/pch_gbe/pch_gbe_main.c
index 567ff10889b..b8b4ba27b0e 100644
--- a/drivers/net/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/pch_gbe/pch_gbe_main.c
@@ -1199,6 +1199,8 @@ static irqreturn_t pch_gbe_intr(int irq, void *data)
1199 iowrite32((int_en & ~PCH_GBE_INT_RX_FIFO_ERR), 1199 iowrite32((int_en & ~PCH_GBE_INT_RX_FIFO_ERR),
1200 &hw->reg->INT_EN); 1200 &hw->reg->INT_EN);
1201 pch_gbe_stop_receive(adapter); 1201 pch_gbe_stop_receive(adapter);
1202 int_st |= ioread32(&hw->reg->INT_ST);
1203 int_st = int_st & ioread32(&hw->reg->INT_EN);
1202 } 1204 }
1203 if (int_st & PCH_GBE_INT_RX_DMA_ERR) 1205 if (int_st & PCH_GBE_INT_RX_DMA_ERR)
1204 adapter->stats.intr_rx_dma_err_count++; 1206 adapter->stats.intr_rx_dma_err_count++;
@@ -1218,14 +1220,11 @@ static irqreturn_t pch_gbe_intr(int irq, void *data)
1218 /* Set Pause packet */ 1220 /* Set Pause packet */
1219 pch_gbe_mac_set_pause_packet(hw); 1221 pch_gbe_mac_set_pause_packet(hw);
1220 } 1222 }
1221 if ((int_en & (PCH_GBE_INT_RX_DMA_CMPLT | PCH_GBE_INT_TX_CMPLT))
1222 == 0) {
1223 return IRQ_HANDLED;
1224 }
1225 } 1223 }
1226 1224
1227 /* When request status is Receive interruption */ 1225 /* When request status is Receive interruption */
1228 if ((int_st & (PCH_GBE_INT_RX_DMA_CMPLT | PCH_GBE_INT_TX_CMPLT))) { 1226 if ((int_st & (PCH_GBE_INT_RX_DMA_CMPLT | PCH_GBE_INT_TX_CMPLT)) ||
1227 (adapter->rx_stop_flag == true)) {
1229 if (likely(napi_schedule_prep(&adapter->napi))) { 1228 if (likely(napi_schedule_prep(&adapter->napi))) {
1230 /* Enable only Rx Descriptor empty */ 1229 /* Enable only Rx Descriptor empty */
1231 atomic_inc(&adapter->irq_sem); 1230 atomic_inc(&adapter->irq_sem);
@@ -1385,7 +1384,7 @@ pch_gbe_clean_tx(struct pch_gbe_adapter *adapter,
1385 struct sk_buff *skb; 1384 struct sk_buff *skb;
1386 unsigned int i; 1385 unsigned int i;
1387 unsigned int cleaned_count = 0; 1386 unsigned int cleaned_count = 0;
1388 bool cleaned = false; 1387 bool cleaned = true;
1389 1388
1390 pr_debug("next_to_clean : %d\n", tx_ring->next_to_clean); 1389 pr_debug("next_to_clean : %d\n", tx_ring->next_to_clean);
1391 1390
@@ -1396,7 +1395,6 @@ pch_gbe_clean_tx(struct pch_gbe_adapter *adapter,
1396 1395
1397 while ((tx_desc->gbec_status & DSC_INIT16) == 0x0000) { 1396 while ((tx_desc->gbec_status & DSC_INIT16) == 0x0000) {
1398 pr_debug("gbec_status:0x%04x\n", tx_desc->gbec_status); 1397 pr_debug("gbec_status:0x%04x\n", tx_desc->gbec_status);
1399 cleaned = true;
1400 buffer_info = &tx_ring->buffer_info[i]; 1398 buffer_info = &tx_ring->buffer_info[i];
1401 skb = buffer_info->skb; 1399 skb = buffer_info->skb;
1402 1400
@@ -1439,8 +1437,10 @@ pch_gbe_clean_tx(struct pch_gbe_adapter *adapter,
1439 tx_desc = PCH_GBE_TX_DESC(*tx_ring, i); 1437 tx_desc = PCH_GBE_TX_DESC(*tx_ring, i);
1440 1438
1441 /* weight of a sort for tx, to avoid endless transmit cleanup */ 1439 /* weight of a sort for tx, to avoid endless transmit cleanup */
1442 if (cleaned_count++ == PCH_GBE_TX_WEIGHT) 1440 if (cleaned_count++ == PCH_GBE_TX_WEIGHT) {
1441 cleaned = false;
1443 break; 1442 break;
1443 }
1444 } 1444 }
1445 pr_debug("called pch_gbe_unmap_and_free_tx_resource() %d count\n", 1445 pr_debug("called pch_gbe_unmap_and_free_tx_resource() %d count\n",
1446 cleaned_count); 1446 cleaned_count);
@@ -2168,7 +2168,6 @@ static int pch_gbe_napi_poll(struct napi_struct *napi, int budget)
2168{ 2168{
2169 struct pch_gbe_adapter *adapter = 2169 struct pch_gbe_adapter *adapter =
2170 container_of(napi, struct pch_gbe_adapter, napi); 2170 container_of(napi, struct pch_gbe_adapter, napi);
2171 struct net_device *netdev = adapter->netdev;
2172 int work_done = 0; 2171 int work_done = 0;
2173 bool poll_end_flag = false; 2172 bool poll_end_flag = false;
2174 bool cleaned = false; 2173 bool cleaned = false;
@@ -2176,33 +2175,32 @@ static int pch_gbe_napi_poll(struct napi_struct *napi, int budget)
2176 2175
2177 pr_debug("budget : %d\n", budget); 2176 pr_debug("budget : %d\n", budget);
2178 2177
2179 /* Keep link state information with original netdev */ 2178 pch_gbe_clean_rx(adapter, adapter->rx_ring, &work_done, budget);
2180 if (!netif_carrier_ok(netdev)) { 2179 cleaned = pch_gbe_clean_tx(adapter, adapter->tx_ring);
2180
2181 if (!cleaned)
2182 work_done = budget;
2183 /* If no Tx and not enough Rx work done,
2184 * exit the polling mode
2185 */
2186 if (work_done < budget)
2181 poll_end_flag = true; 2187 poll_end_flag = true;
2182 } else { 2188
2183 pch_gbe_clean_rx(adapter, adapter->rx_ring, &work_done, budget); 2189 if (poll_end_flag) {
2190 napi_complete(napi);
2191 if (adapter->rx_stop_flag) {
2192 adapter->rx_stop_flag = false;
2193 pch_gbe_start_receive(&adapter->hw);
2194 }
2195 pch_gbe_irq_enable(adapter);
2196 } else
2184 if (adapter->rx_stop_flag) { 2197 if (adapter->rx_stop_flag) {
2185 adapter->rx_stop_flag = false; 2198 adapter->rx_stop_flag = false;
2186 pch_gbe_start_receive(&adapter->hw); 2199 pch_gbe_start_receive(&adapter->hw);
2187 int_en = ioread32(&adapter->hw.reg->INT_EN); 2200 int_en = ioread32(&adapter->hw.reg->INT_EN);
2188 iowrite32((int_en | PCH_GBE_INT_RX_FIFO_ERR), 2201 iowrite32((int_en | PCH_GBE_INT_RX_FIFO_ERR),
2189 &adapter->hw.reg->INT_EN); 2202 &adapter->hw.reg->INT_EN);
2190 } 2203 }
2191 cleaned = pch_gbe_clean_tx(adapter, adapter->tx_ring);
2192
2193 if (cleaned)
2194 work_done = budget;
2195 /* If no Tx and not enough Rx work done,
2196 * exit the polling mode
2197 */
2198 if ((work_done < budget) || !netif_running(netdev))
2199 poll_end_flag = true;
2200 }
2201
2202 if (poll_end_flag) {
2203 napi_complete(napi);
2204 pch_gbe_irq_enable(adapter);
2205 }
2206 2204
2207 pr_debug("poll_end_flag : %d work_done : %d budget : %d\n", 2205 pr_debug("poll_end_flag : %d work_done : %d budget : %d\n",
2208 poll_end_flag, work_done, budget); 2206 poll_end_flag, work_done, budget);
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c
index cb6e0b486b1..edd7304773e 100644
--- a/drivers/net/phy/dp83640.c
+++ b/drivers/net/phy/dp83640.c
@@ -589,7 +589,7 @@ static void decode_rxts(struct dp83640_private *dp83640,
589 prune_rx_ts(dp83640); 589 prune_rx_ts(dp83640);
590 590
591 if (list_empty(&dp83640->rxpool)) { 591 if (list_empty(&dp83640->rxpool)) {
592 pr_warning("dp83640: rx timestamp pool is empty\n"); 592 pr_debug("dp83640: rx timestamp pool is empty\n");
593 goto out; 593 goto out;
594 } 594 }
595 rxts = list_first_entry(&dp83640->rxpool, struct rxts, list); 595 rxts = list_first_entry(&dp83640->rxpool, struct rxts, list);
@@ -612,7 +612,7 @@ static void decode_txts(struct dp83640_private *dp83640,
612 skb = skb_dequeue(&dp83640->tx_queue); 612 skb = skb_dequeue(&dp83640->tx_queue);
613 613
614 if (!skb) { 614 if (!skb) {
615 pr_warning("dp83640: have timestamp but tx_queue empty\n"); 615 pr_debug("dp83640: have timestamp but tx_queue empty\n");
616 return; 616 return;
617 } 617 }
618 ns = phy2txts(phy_txts); 618 ns = phy2txts(phy_txts);
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index 0ca86f9ec4e..182562952c7 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -327,12 +327,12 @@ int xenvif_connect(struct xenvif *vif, unsigned long tx_ring_ref,
327 xenvif_get(vif); 327 xenvif_get(vif);
328 328
329 rtnl_lock(); 329 rtnl_lock();
330 if (netif_running(vif->dev))
331 xenvif_up(vif);
332 if (!vif->can_sg && vif->dev->mtu > ETH_DATA_LEN) 330 if (!vif->can_sg && vif->dev->mtu > ETH_DATA_LEN)
333 dev_set_mtu(vif->dev, ETH_DATA_LEN); 331 dev_set_mtu(vif->dev, ETH_DATA_LEN);
334 netdev_update_features(vif->dev); 332 netdev_update_features(vif->dev);
335 netif_carrier_on(vif->dev); 333 netif_carrier_on(vif->dev);
334 if (netif_running(vif->dev))
335 xenvif_up(vif);
336 rtnl_unlock(); 336 rtnl_unlock();
337 337
338 return 0; 338 return 0;
diff --git a/include/linux/ptp_classify.h b/include/linux/ptp_classify.h
index e07e2742a86..1dc420ba213 100644
--- a/include/linux/ptp_classify.h
+++ b/include/linux/ptp_classify.h
@@ -51,6 +51,7 @@
51#define PTP_CLASS_V2_VLAN (PTP_CLASS_V2 | PTP_CLASS_VLAN) 51#define PTP_CLASS_V2_VLAN (PTP_CLASS_V2 | PTP_CLASS_VLAN)
52 52
53#define PTP_EV_PORT 319 53#define PTP_EV_PORT 319
54#define PTP_GEN_BIT 0x08 /* indicates general message, if set in message type */
54 55
55#define OFF_ETYPE 12 56#define OFF_ETYPE 12
56#define OFF_IHL 14 57#define OFF_IHL 14
@@ -116,14 +117,20 @@ static inline int ptp_filter_init(struct sock_filter *f, int len)
116 {OP_OR, 0, 0, PTP_CLASS_IPV6 }, /* */ \ 117 {OP_OR, 0, 0, PTP_CLASS_IPV6 }, /* */ \
117 {OP_RETA, 0, 0, 0 }, /* */ \ 118 {OP_RETA, 0, 0, 0 }, /* */ \
118/*L3x*/ {OP_RETK, 0, 0, PTP_CLASS_NONE }, /* */ \ 119/*L3x*/ {OP_RETK, 0, 0, PTP_CLASS_NONE }, /* */ \
119/*L40*/ {OP_JEQ, 0, 6, ETH_P_8021Q }, /* f goto L50 */ \ 120/*L40*/ {OP_JEQ, 0, 9, ETH_P_8021Q }, /* f goto L50 */ \
120 {OP_LDH, 0, 0, OFF_ETYPE + 4 }, /* */ \ 121 {OP_LDH, 0, 0, OFF_ETYPE + 4 }, /* */ \
121 {OP_JEQ, 0, 9, ETH_P_1588 }, /* f goto L60 */ \ 122 {OP_JEQ, 0, 15, ETH_P_1588 }, /* f goto L60 */ \
123 {OP_LDB, 0, 0, ETH_HLEN + VLAN_HLEN }, /* */ \
124 {OP_AND, 0, 0, PTP_GEN_BIT }, /* */ \
125 {OP_JEQ, 0, 12, 0 }, /* f goto L6x */ \
122 {OP_LDH, 0, 0, ETH_HLEN + VLAN_HLEN }, /* */ \ 126 {OP_LDH, 0, 0, ETH_HLEN + VLAN_HLEN }, /* */ \
123 {OP_AND, 0, 0, PTP_CLASS_VMASK }, /* */ \ 127 {OP_AND, 0, 0, PTP_CLASS_VMASK }, /* */ \
124 {OP_OR, 0, 0, PTP_CLASS_VLAN }, /* */ \ 128 {OP_OR, 0, 0, PTP_CLASS_VLAN }, /* */ \
125 {OP_RETA, 0, 0, 0 }, /* */ \ 129 {OP_RETA, 0, 0, 0 }, /* */ \
126/*L50*/ {OP_JEQ, 0, 4, ETH_P_1588 }, /* f goto L61 */ \ 130/*L50*/ {OP_JEQ, 0, 7, ETH_P_1588 }, /* f goto L61 */ \
131 {OP_LDB, 0, 0, ETH_HLEN }, /* */ \
132 {OP_AND, 0, 0, PTP_GEN_BIT }, /* */ \
133 {OP_JEQ, 0, 4, 0 }, /* f goto L6x */ \
127 {OP_LDH, 0, 0, ETH_HLEN }, /* */ \ 134 {OP_LDH, 0, 0, ETH_HLEN }, /* */ \
128 {OP_AND, 0, 0, PTP_CLASS_VMASK }, /* */ \ 135 {OP_AND, 0, 0, PTP_CLASS_VMASK }, /* */ \
129 {OP_OR, 0, 0, PTP_CLASS_L2 }, /* */ \ 136 {OP_OR, 0, 0, PTP_CLASS_L2 }, /* */ \
diff --git a/net/can/bcm.c b/net/can/bcm.c
index d6c8ae5b2e6..c84963d2dee 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -344,6 +344,18 @@ static void bcm_send_to_user(struct bcm_op *op, struct bcm_msg_head *head,
344 } 344 }
345} 345}
346 346
347static void bcm_tx_start_timer(struct bcm_op *op)
348{
349 if (op->kt_ival1.tv64 && op->count)
350 hrtimer_start(&op->timer,
351 ktime_add(ktime_get(), op->kt_ival1),
352 HRTIMER_MODE_ABS);
353 else if (op->kt_ival2.tv64)
354 hrtimer_start(&op->timer,
355 ktime_add(ktime_get(), op->kt_ival2),
356 HRTIMER_MODE_ABS);
357}
358
347static void bcm_tx_timeout_tsklet(unsigned long data) 359static void bcm_tx_timeout_tsklet(unsigned long data)
348{ 360{
349 struct bcm_op *op = (struct bcm_op *)data; 361 struct bcm_op *op = (struct bcm_op *)data;
@@ -365,26 +377,12 @@ static void bcm_tx_timeout_tsklet(unsigned long data)
365 377
366 bcm_send_to_user(op, &msg_head, NULL, 0); 378 bcm_send_to_user(op, &msg_head, NULL, 0);
367 } 379 }
368 }
369
370 if (op->kt_ival1.tv64 && (op->count > 0)) {
371
372 /* send (next) frame */
373 bcm_can_tx(op); 380 bcm_can_tx(op);
374 hrtimer_start(&op->timer,
375 ktime_add(ktime_get(), op->kt_ival1),
376 HRTIMER_MODE_ABS);
377 381
378 } else { 382 } else if (op->kt_ival2.tv64)
379 if (op->kt_ival2.tv64) { 383 bcm_can_tx(op);
380 384
381 /* send (next) frame */ 385 bcm_tx_start_timer(op);
382 bcm_can_tx(op);
383 hrtimer_start(&op->timer,
384 ktime_add(ktime_get(), op->kt_ival2),
385 HRTIMER_MODE_ABS);
386 }
387 }
388} 386}
389 387
390/* 388/*
@@ -964,23 +962,20 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
964 hrtimer_cancel(&op->timer); 962 hrtimer_cancel(&op->timer);
965 } 963 }
966 964
967 if ((op->flags & STARTTIMER) && 965 if (op->flags & STARTTIMER) {
968 ((op->kt_ival1.tv64 && op->count) || op->kt_ival2.tv64)) { 966 hrtimer_cancel(&op->timer);
969
970 /* spec: send can_frame when starting timer */ 967 /* spec: send can_frame when starting timer */
971 op->flags |= TX_ANNOUNCE; 968 op->flags |= TX_ANNOUNCE;
972
973 if (op->kt_ival1.tv64 && (op->count > 0)) {
974 /* op->count-- is done in bcm_tx_timeout_handler */
975 hrtimer_start(&op->timer, op->kt_ival1,
976 HRTIMER_MODE_REL);
977 } else
978 hrtimer_start(&op->timer, op->kt_ival2,
979 HRTIMER_MODE_REL);
980 } 969 }
981 970
982 if (op->flags & TX_ANNOUNCE) 971 if (op->flags & TX_ANNOUNCE) {
983 bcm_can_tx(op); 972 bcm_can_tx(op);
973 if (op->count)
974 op->count--;
975 }
976
977 if (op->flags & STARTTIMER)
978 bcm_tx_start_timer(op);
984 979
985 return msg_head->nframes * CFSIZ + MHSIZ; 980 return msg_head->nframes * CFSIZ + MHSIZ;
986} 981}
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 3c9fa618b69..79cc6469508 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1383,6 +1383,8 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
1383 newtp->af_specific = &tcp_sock_ipv6_mapped_specific; 1383 newtp->af_specific = &tcp_sock_ipv6_mapped_specific;
1384#endif 1384#endif
1385 1385
1386 newnp->ipv6_ac_list = NULL;
1387 newnp->ipv6_fl_list = NULL;
1386 newnp->pktoptions = NULL; 1388 newnp->pktoptions = NULL;
1387 newnp->opt = NULL; 1389 newnp->opt = NULL;
1388 newnp->mcast_oif = inet6_iif(skb); 1390 newnp->mcast_oif = inet6_iif(skb);
@@ -1447,6 +1449,7 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
1447 First: no IPv4 options. 1449 First: no IPv4 options.
1448 */ 1450 */
1449 newinet->inet_opt = NULL; 1451 newinet->inet_opt = NULL;
1452 newnp->ipv6_ac_list = NULL;
1450 newnp->ipv6_fl_list = NULL; 1453 newnp->ipv6_fl_list = NULL;
1451 1454
1452 /* Clone RX bits */ 1455 /* Clone RX bits */
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index c698cec0a44..fabb4fafa28 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -961,7 +961,10 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
961 return 0; 961 return 0;
962 962
963drop_n_acct: 963drop_n_acct:
964 po->stats.tp_drops = atomic_inc_return(&sk->sk_drops); 964 spin_lock(&sk->sk_receive_queue.lock);
965 po->stats.tp_drops++;
966 atomic_inc(&sk->sk_drops);
967 spin_unlock(&sk->sk_receive_queue.lock);
965 968
966drop_n_restore: 969drop_n_restore:
967 if (skb_head != skb->data && skb_shared(skb)) { 970 if (skb_head != skb->data && skb_shared(skb)) {
diff --git a/net/rds/iw_rdma.c b/net/rds/iw_rdma.c
index 8b77edbab27..4e1de171866 100644
--- a/net/rds/iw_rdma.c
+++ b/net/rds/iw_rdma.c
@@ -84,7 +84,8 @@ static int rds_iw_map_fastreg(struct rds_iw_mr_pool *pool,
84static void rds_iw_free_fastreg(struct rds_iw_mr_pool *pool, struct rds_iw_mr *ibmr); 84static void rds_iw_free_fastreg(struct rds_iw_mr_pool *pool, struct rds_iw_mr *ibmr);
85static unsigned int rds_iw_unmap_fastreg_list(struct rds_iw_mr_pool *pool, 85static unsigned int rds_iw_unmap_fastreg_list(struct rds_iw_mr_pool *pool,
86 struct list_head *unmap_list, 86 struct list_head *unmap_list,
87 struct list_head *kill_list); 87 struct list_head *kill_list,
88 int *unpinned);
88static void rds_iw_destroy_fastreg(struct rds_iw_mr_pool *pool, struct rds_iw_mr *ibmr); 89static void rds_iw_destroy_fastreg(struct rds_iw_mr_pool *pool, struct rds_iw_mr *ibmr);
89 90
90static int rds_iw_get_device(struct rds_sock *rs, struct rds_iw_device **rds_iwdev, struct rdma_cm_id **cm_id) 91static int rds_iw_get_device(struct rds_sock *rs, struct rds_iw_device **rds_iwdev, struct rdma_cm_id **cm_id)
@@ -499,7 +500,7 @@ static int rds_iw_flush_mr_pool(struct rds_iw_mr_pool *pool, int free_all)
499 LIST_HEAD(unmap_list); 500 LIST_HEAD(unmap_list);
500 LIST_HEAD(kill_list); 501 LIST_HEAD(kill_list);
501 unsigned long flags; 502 unsigned long flags;
502 unsigned int nfreed = 0, ncleaned = 0, free_goal; 503 unsigned int nfreed = 0, ncleaned = 0, unpinned = 0, free_goal;
503 int ret = 0; 504 int ret = 0;
504 505
505 rds_iw_stats_inc(s_iw_rdma_mr_pool_flush); 506 rds_iw_stats_inc(s_iw_rdma_mr_pool_flush);
@@ -524,7 +525,8 @@ static int rds_iw_flush_mr_pool(struct rds_iw_mr_pool *pool, int free_all)
524 * will be destroyed by the unmap function. 525 * will be destroyed by the unmap function.
525 */ 526 */
526 if (!list_empty(&unmap_list)) { 527 if (!list_empty(&unmap_list)) {
527 ncleaned = rds_iw_unmap_fastreg_list(pool, &unmap_list, &kill_list); 528 ncleaned = rds_iw_unmap_fastreg_list(pool, &unmap_list,
529 &kill_list, &unpinned);
528 /* If we've been asked to destroy all MRs, move those 530 /* If we've been asked to destroy all MRs, move those
529 * that were simply cleaned to the kill list */ 531 * that were simply cleaned to the kill list */
530 if (free_all) 532 if (free_all)
@@ -548,6 +550,7 @@ static int rds_iw_flush_mr_pool(struct rds_iw_mr_pool *pool, int free_all)
548 spin_unlock_irqrestore(&pool->list_lock, flags); 550 spin_unlock_irqrestore(&pool->list_lock, flags);
549 } 551 }
550 552
553 atomic_sub(unpinned, &pool->free_pinned);
551 atomic_sub(ncleaned, &pool->dirty_count); 554 atomic_sub(ncleaned, &pool->dirty_count);
552 atomic_sub(nfreed, &pool->item_count); 555 atomic_sub(nfreed, &pool->item_count);
553 556
@@ -828,7 +831,8 @@ static void rds_iw_free_fastreg(struct rds_iw_mr_pool *pool,
828 831
829static unsigned int rds_iw_unmap_fastreg_list(struct rds_iw_mr_pool *pool, 832static unsigned int rds_iw_unmap_fastreg_list(struct rds_iw_mr_pool *pool,
830 struct list_head *unmap_list, 833 struct list_head *unmap_list,
831 struct list_head *kill_list) 834 struct list_head *kill_list,
835 int *unpinned)
832{ 836{
833 struct rds_iw_mapping *mapping, *next; 837 struct rds_iw_mapping *mapping, *next;
834 unsigned int ncleaned = 0; 838 unsigned int ncleaned = 0;
@@ -855,6 +859,7 @@ static unsigned int rds_iw_unmap_fastreg_list(struct rds_iw_mr_pool *pool,
855 859
856 spin_lock_irqsave(&pool->list_lock, flags); 860 spin_lock_irqsave(&pool->list_lock, flags);
857 list_for_each_entry_safe(mapping, next, unmap_list, m_list) { 861 list_for_each_entry_safe(mapping, next, unmap_list, m_list) {
862 *unpinned += mapping->m_sg.len;
858 list_move(&mapping->m_list, &laundered); 863 list_move(&mapping->m_list, &laundered);
859 ncleaned++; 864 ncleaned++;
860 } 865 }