Skip to content

Commit 8a04b45

Browse files
committed
Merge git://github.com/davem330/net
* git://github.com/davem330/net: pch_gbe: Fixed the issue on which a network freezes pch_gbe: Fixed the issue on which PC was frozen when link was downed. make PACKET_STATISTICS getsockopt report consistently between ring and non-ring net: xen-netback: correctly restart Tx after a VM restore/migrate bonding: properly stop queuing work when requested can bcm: fix incomplete tx_setup fix RDSRDMA: Fix cleanup of rds_iw_mr_pool net: Documentation: Fix type of variables ibmveth: Fix oops on request_irq failure ipv6: nullify ipv6_ac_list and ipv6_fl_list when creating new socket cxgb4: Fix EEH on IBM P7IOC can bcm: fix tx_setup off-by-one errors MAINTAINERS: tehuti: Alexander Indenbaum's address bounces dp83640: reduce driver noise ptp: fix L2 event message recognition
2 parents a8062e4 + 805e969 commit 8a04b45

File tree

15 files changed

+100
-82
lines changed

15 files changed

+100
-82
lines changed

Documentation/networking/ip-sysctl.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ conf/interface/*:
10421042
The functional behaviour for certain settings is different
10431043
depending on whether local forwarding is enabled or not.
10441044

1045-
accept_ra - BOOLEAN
1045+
accept_ra - INTEGER
10461046
Accept Router Advertisements; autoconfigure using them.
10471047

10481048
Possible values are:
@@ -1106,7 +1106,7 @@ dad_transmits - INTEGER
11061106
The amount of Duplicate Address Detection probes to send.
11071107
Default: 1
11081108

1109-
forwarding - BOOLEAN
1109+
forwarding - INTEGER
11101110
Configure interface-specific Host/Router behaviour.
11111111

11121112
Note: It is recommended to have the same setting on all

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6374,7 +6374,6 @@ S: Supported
63746374
F: arch/arm/mach-tegra
63756375

63766376
TEHUTI ETHERNET DRIVER
6377-
M: Alexander Indenbaum <[email protected]>
63786377
M: Andy Gospodarek <[email protected]>
63796378
63806379
S: Supported

drivers/net/bonding/bond_3ad.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2168,7 +2168,8 @@ void bond_3ad_state_machine_handler(struct work_struct *work)
21682168
}
21692169

21702170
re_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);
21722173
out:
21732174
read_unlock(&bond->lock);
21742175
}

drivers/net/bonding/bond_alb.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,8 @@ void bond_alb_monitor(struct work_struct *work)
14401440
}
14411441

14421442
re_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);
14441445
out:
14451446
read_unlock(&bond->lock);
14461447
}

drivers/net/bonding/bond_main.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,9 @@ static void bond_resend_igmp_join_requests(struct bonding *bond)
777777

778778
read_lock(&bond->lock);
779779

780+
if (bond->kill_timers)
781+
goto out;
782+
780783
/* rejoin all groups on bond device */
781784
__bond_resend_igmp_join_requests(bond->dev);
782785

@@ -790,9 +793,9 @@ static void bond_resend_igmp_join_requests(struct bonding *bond)
790793
__bond_resend_igmp_join_requests(vlan_dev);
791794
}
792795

793-
if (--bond->igmp_retrans > 0)
796+
if ((--bond->igmp_retrans > 0) && !bond->kill_timers)
794797
queue_delayed_work(bond->wq, &bond->mcast_work, HZ/5);
795-
798+
out:
796799
read_unlock(&bond->lock);
797800
}
798801

@@ -2538,7 +2541,7 @@ void bond_mii_monitor(struct work_struct *work)
25382541
}
25392542

25402543
re_arm:
2541-
if (bond->params.miimon)
2544+
if (bond->params.miimon && !bond->kill_timers)
25422545
queue_delayed_work(bond->wq, &bond->mii_work,
25432546
msecs_to_jiffies(bond->params.miimon));
25442547
out:
@@ -2886,7 +2889,7 @@ void bond_loadbalance_arp_mon(struct work_struct *work)
28862889
}
28872890

28882891
re_arm:
2889-
if (bond->params.arp_interval)
2892+
if (bond->params.arp_interval && !bond->kill_timers)
28902893
queue_delayed_work(bond->wq, &bond->arp_work, delta_in_ticks);
28912894
out:
28922895
read_unlock(&bond->lock);
@@ -3154,7 +3157,7 @@ void bond_activebackup_arp_mon(struct work_struct *work)
31543157
bond_ab_arp_probe(bond);
31553158

31563159
re_arm:
3157-
if (bond->params.arp_interval)
3160+
if (bond->params.arp_interval && !bond->kill_timers)
31583161
queue_delayed_work(bond->wq, &bond->arp_work, delta_in_ticks);
31593162
out:
31603163
read_unlock(&bond->lock);

drivers/net/cxgb4/cxgb4_main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3712,6 +3712,9 @@ static int __devinit init_one(struct pci_dev *pdev,
37123712
setup_debugfs(adapter);
37133713
}
37143714

3715+
/* PCIe EEH recovery on powerpc platforms needs fundamental reset */
3716+
pdev->needs_freset = 1;
3717+
37153718
if (is_offload(adapter))
37163719
attach_ulds(adapter);
37173720

drivers/net/ibmveth.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,8 +636,8 @@ static int ibmveth_open(struct net_device *netdev)
636636
netdev_err(netdev, "unable to request irq 0x%x, rc %d\n",
637637
netdev->irq, rc);
638638
do {
639-
rc = h_free_logical_lan(adapter->vdev->unit_address);
640-
} while (H_IS_LONG_BUSY(rc) || (rc == H_BUSY));
639+
lpar_rc = h_free_logical_lan(adapter->vdev->unit_address);
640+
} while (H_IS_LONG_BUSY(lpar_rc) || (lpar_rc == H_BUSY));
641641

642642
goto err_out;
643643
}

drivers/net/pch_gbe/pch_gbe_main.c

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,6 +1199,8 @@ static irqreturn_t pch_gbe_intr(int irq, void *data)
11991199
iowrite32((int_en & ~PCH_GBE_INT_RX_FIFO_ERR),
12001200
&hw->reg->INT_EN);
12011201
pch_gbe_stop_receive(adapter);
1202+
int_st |= ioread32(&hw->reg->INT_ST);
1203+
int_st = int_st & ioread32(&hw->reg->INT_EN);
12021204
}
12031205
if (int_st & PCH_GBE_INT_RX_DMA_ERR)
12041206
adapter->stats.intr_rx_dma_err_count++;
@@ -1218,14 +1220,11 @@ static irqreturn_t pch_gbe_intr(int irq, void *data)
12181220
/* Set Pause packet */
12191221
pch_gbe_mac_set_pause_packet(hw);
12201222
}
1221-
if ((int_en & (PCH_GBE_INT_RX_DMA_CMPLT | PCH_GBE_INT_TX_CMPLT))
1222-
== 0) {
1223-
return IRQ_HANDLED;
1224-
}
12251223
}
12261224

12271225
/* 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)) {
12291228
if (likely(napi_schedule_prep(&adapter->napi))) {
12301229
/* Enable only Rx Descriptor empty */
12311230
atomic_inc(&adapter->irq_sem);
@@ -1385,7 +1384,7 @@ pch_gbe_clean_tx(struct pch_gbe_adapter *adapter,
13851384
struct sk_buff *skb;
13861385
unsigned int i;
13871386
unsigned int cleaned_count = 0;
1388-
bool cleaned = false;
1387+
bool cleaned = true;
13891388

13901389
pr_debug("next_to_clean : %d\n", tx_ring->next_to_clean);
13911390

@@ -1396,7 +1395,6 @@ pch_gbe_clean_tx(struct pch_gbe_adapter *adapter,
13961395

13971396
while ((tx_desc->gbec_status & DSC_INIT16) == 0x0000) {
13981397
pr_debug("gbec_status:0x%04x\n", tx_desc->gbec_status);
1399-
cleaned = true;
14001398
buffer_info = &tx_ring->buffer_info[i];
14011399
skb = buffer_info->skb;
14021400

@@ -1439,8 +1437,10 @@ pch_gbe_clean_tx(struct pch_gbe_adapter *adapter,
14391437
tx_desc = PCH_GBE_TX_DESC(*tx_ring, i);
14401438

14411439
/* 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;
14431442
break;
1443+
}
14441444
}
14451445
pr_debug("called pch_gbe_unmap_and_free_tx_resource() %d count\n",
14461446
cleaned_count);
@@ -2168,41 +2168,39 @@ static int pch_gbe_napi_poll(struct napi_struct *napi, int budget)
21682168
{
21692169
struct pch_gbe_adapter *adapter =
21702170
container_of(napi, struct pch_gbe_adapter, napi);
2171-
struct net_device *netdev = adapter->netdev;
21722171
int work_done = 0;
21732172
bool poll_end_flag = false;
21742173
bool cleaned = false;
21752174
u32 int_en;
21762175

21772176
pr_debug("budget : %d\n", budget);
21782177

2179-
/* Keep link state information with original netdev */
2180-
if (!netif_carrier_ok(netdev)) {
2178+
pch_gbe_clean_rx(adapter, adapter->rx_ring, &work_done, budget);
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)
21812187
poll_end_flag = true;
2182-
} else {
2183-
pch_gbe_clean_rx(adapter, adapter->rx_ring, &work_done, budget);
2188+
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
21842197
if (adapter->rx_stop_flag) {
21852198
adapter->rx_stop_flag = false;
21862199
pch_gbe_start_receive(&adapter->hw);
21872200
int_en = ioread32(&adapter->hw.reg->INT_EN);
21882201
iowrite32((int_en | PCH_GBE_INT_RX_FIFO_ERR),
2189-
&adapter->hw.reg->INT_EN);
2202+
&adapter->hw.reg->INT_EN);
21902203
}
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-
}
22062204

22072205
pr_debug("poll_end_flag : %d work_done : %d budget : %d\n",
22082206
poll_end_flag, work_done, budget);

drivers/net/phy/dp83640.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ static void decode_rxts(struct dp83640_private *dp83640,
589589
prune_rx_ts(dp83640);
590590

591591
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");
593593
goto out;
594594
}
595595
rxts = list_first_entry(&dp83640->rxpool, struct rxts, list);
@@ -612,7 +612,7 @@ static void decode_txts(struct dp83640_private *dp83640,
612612
skb = skb_dequeue(&dp83640->tx_queue);
613613

614614
if (!skb) {
615-
pr_warning("dp83640: have timestamp but tx_queue empty\n");
615+
pr_debug("dp83640: have timestamp but tx_queue empty\n");
616616
return;
617617
}
618618
ns = phy2txts(phy_txts);

drivers/net/xen-netback/interface.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,12 +327,12 @@ int xenvif_connect(struct xenvif *vif, unsigned long tx_ring_ref,
327327
xenvif_get(vif);
328328

329329
rtnl_lock();
330-
if (netif_running(vif->dev))
331-
xenvif_up(vif);
332330
if (!vif->can_sg && vif->dev->mtu > ETH_DATA_LEN)
333331
dev_set_mtu(vif->dev, ETH_DATA_LEN);
334332
netdev_update_features(vif->dev);
335333
netif_carrier_on(vif->dev);
334+
if (netif_running(vif->dev))
335+
xenvif_up(vif);
336336
rtnl_unlock();
337337

338338
return 0;

include/linux/ptp_classify.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#define PTP_CLASS_V2_VLAN (PTP_CLASS_V2 | PTP_CLASS_VLAN)
5252

5353
#define PTP_EV_PORT 319
54+
#define PTP_GEN_BIT 0x08 /* indicates general message, if set in message type */
5455

5556
#define OFF_ETYPE 12
5657
#define OFF_IHL 14
@@ -116,14 +117,20 @@ static inline int ptp_filter_init(struct sock_filter *f, int len)
116117
{OP_OR, 0, 0, PTP_CLASS_IPV6 }, /* */ \
117118
{OP_RETA, 0, 0, 0 }, /* */ \
118119
/*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 */ \
120121
{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 */ \
122126
{OP_LDH, 0, 0, ETH_HLEN + VLAN_HLEN }, /* */ \
123127
{OP_AND, 0, 0, PTP_CLASS_VMASK }, /* */ \
124128
{OP_OR, 0, 0, PTP_CLASS_VLAN }, /* */ \
125129
{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 */ \
127134
{OP_LDH, 0, 0, ETH_HLEN }, /* */ \
128135
{OP_AND, 0, 0, PTP_CLASS_VMASK }, /* */ \
129136
{OP_OR, 0, 0, PTP_CLASS_L2 }, /* */ \

net/can/bcm.c

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,18 @@ static void bcm_send_to_user(struct bcm_op *op, struct bcm_msg_head *head,
344344
}
345345
}
346346

347+
static 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+
347359
static void bcm_tx_timeout_tsklet(unsigned long data)
348360
{
349361
struct bcm_op *op = (struct bcm_op *)data;
@@ -365,26 +377,12 @@ static void bcm_tx_timeout_tsklet(unsigned long data)
365377

366378
bcm_send_to_user(op, &msg_head, NULL, 0);
367379
}
368-
}
369-
370-
if (op->kt_ival1.tv64 && (op->count > 0)) {
371-
372-
/* send (next) frame */
373380
bcm_can_tx(op);
374-
hrtimer_start(&op->timer,
375-
ktime_add(ktime_get(), op->kt_ival1),
376-
HRTIMER_MODE_ABS);
377381

378-
} else {
379-
if (op->kt_ival2.tv64) {
382+
} else if (op->kt_ival2.tv64)
383+
bcm_can_tx(op);
380384

381-
/* send (next) frame */
382-
bcm_can_tx(op);
383-
hrtimer_start(&op->timer,
384-
ktime_add(ktime_get(), op->kt_ival2),
385-
HRTIMER_MODE_ABS);
386-
}
387-
}
385+
bcm_tx_start_timer(op);
388386
}
389387

390388
/*
@@ -964,23 +962,20 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
964962
hrtimer_cancel(&op->timer);
965963
}
966964

967-
if ((op->flags & STARTTIMER) &&
968-
((op->kt_ival1.tv64 && op->count) || op->kt_ival2.tv64)) {
969-
965+
if (op->flags & STARTTIMER) {
966+
hrtimer_cancel(&op->timer);
970967
/* spec: send can_frame when starting timer */
971968
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);
980969
}
981970

982-
if (op->flags & TX_ANNOUNCE)
971+
if (op->flags & TX_ANNOUNCE) {
983972
bcm_can_tx(op);
973+
if (op->count)
974+
op->count--;
975+
}
976+
977+
if (op->flags & STARTTIMER)
978+
bcm_tx_start_timer(op);
984979

985980
return msg_head->nframes * CFSIZ + MHSIZ;
986981
}

net/ipv6/tcp_ipv6.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,6 +1383,8 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
13831383
newtp->af_specific = &tcp_sock_ipv6_mapped_specific;
13841384
#endif
13851385

1386+
newnp->ipv6_ac_list = NULL;
1387+
newnp->ipv6_fl_list = NULL;
13861388
newnp->pktoptions = NULL;
13871389
newnp->opt = NULL;
13881390
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,
14471449
First: no IPv4 options.
14481450
*/
14491451
newinet->inet_opt = NULL;
1452+
newnp->ipv6_ac_list = NULL;
14501453
newnp->ipv6_fl_list = NULL;
14511454

14521455
/* Clone RX bits */

0 commit comments

Comments
 (0)