Skip to content

Commit aac2b1f

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking updates from David Miller: 1) UAPI changes for networking from David Howells 2) A netlink dump is an operation we can sleep within, and therefore we need to make sure the dump provider module doesn't disappear on us meanwhile. Fix from Gao Feng. 3) Now that tunnels support GRO, we have to be more careful in skb_gro_reset_offset() otherwise we OOPS, from Eric Dumazet. 4) We can end up processing packets for VLANs we aren't actually configured to be on, fix from Florian Zumbiehl. 5) Fix routing cache removal regression in redirects and IPVS. The core issue on the IPVS side is that it wants to rewrite who the nexthop is and we have to explicitly accomodate that case. From Julian Anastasov. 6) Error code return fixes all over the networking drivers from Peter Senna Tschudin. 7) Fix routing cache removal regressions in IPSEC, from Steffen Klassert. 8) Fix deadlock in RDS during pings, from Jeff Liu. 9) Neighbour packet queue can trigger skb_under_panic() because we do not reset the network header of the SKB in the right spot. From Ramesh Nagappa. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (61 commits) RDS: fix rds-ping spinlock recursion netdev/phy: Prototype of_mdio_find_bus() farsync: fix support for over 30 cards be2net: Remove code that stops further access to BE NIC based on UE bits pch_gbe: Fix build error by selecting all the possible dependencies. e1000e: add device IDs for i218 ixgbe/ixgbevf: Limit maximum jumbo frame size to 9.5K to avoid Tx hangs ixgbevf: Set the netdev number of Tx queues UAPI: (Scripted) Disintegrate include/linux/tc_ematch UAPI: (Scripted) Disintegrate include/linux/tc_act UAPI: (Scripted) Disintegrate include/linux/netfilter_ipv6 UAPI: (Scripted) Disintegrate include/linux/netfilter_ipv4 UAPI: (Scripted) Disintegrate include/linux/netfilter_bridge UAPI: (Scripted) Disintegrate include/linux/netfilter_arp UAPI: (Scripted) Disintegrate include/linux/netfilter/ipset UAPI: (Scripted) Disintegrate include/linux/netfilter UAPI: (Scripted) Disintegrate include/linux/isdn UAPI: (Scripted) Disintegrate include/linux/caif net: fix typo in freescale/ucc_geth.c vxlan: fix more sparse warnings ...
2 parents 23d5385 + 5175a5e commit aac2b1f

File tree

238 files changed

+2392
-2292
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+2392
-2292
lines changed

drivers/infiniband/core/cma.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3498,7 +3498,8 @@ static int cma_get_id_stats(struct sk_buff *skb, struct netlink_callback *cb)
34983498
}
34993499

35003500
static const struct ibnl_client_cbs cma_cb_table[] = {
3501-
[RDMA_NL_RDMA_CM_ID_STATS] = { .dump = cma_get_id_stats },
3501+
[RDMA_NL_RDMA_CM_ID_STATS] = { .dump = cma_get_id_stats,
3502+
.module = THIS_MODULE },
35023503
};
35033504

35043505
static int __init cma_init(void)

drivers/infiniband/core/netlink.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ static int ibnl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
154154
{
155155
struct netlink_dump_control c = {
156156
.dump = client->cb_table[op].dump,
157+
.module = client->cb_table[op].module,
157158
};
158159
return netlink_dump_start(nls, skb, nlh, &c);
159160
}

drivers/net/ethernet/amd/amd8111e.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,13 +1845,15 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev,
18451845
if((pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM))==0){
18461846
printk(KERN_ERR "amd8111e: No Power Management capability, "
18471847
"exiting.\n");
1848+
err = -ENODEV;
18481849
goto err_free_reg;
18491850
}
18501851

18511852
/* Initialize DMA */
18521853
if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) < 0) {
18531854
printk(KERN_ERR "amd8111e: DMA not supported,"
18541855
"exiting.\n");
1856+
err = -ENODEV;
18551857
goto err_free_reg;
18561858
}
18571859

drivers/net/ethernet/amd/au1000_eth.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,8 +1174,10 @@ static int __devinit au1000_probe(struct platform_device *pdev)
11741174
snprintf(aup->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
11751175
pdev->name, aup->mac_id);
11761176
aup->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
1177-
if (aup->mii_bus->irq == NULL)
1177+
if (aup->mii_bus->irq == NULL) {
1178+
err = -ENOMEM;
11781179
goto err_out;
1180+
}
11791181

11801182
for (i = 0; i < PHY_MAX_ADDR; ++i)
11811183
aup->mii_bus->irq[i] = PHY_POLL;
@@ -1190,7 +1192,8 @@ static int __devinit au1000_probe(struct platform_device *pdev)
11901192
goto err_mdiobus_reg;
11911193
}
11921194

1193-
if (au1000_mii_probe(dev) != 0)
1195+
err = au1000_mii_probe(dev);
1196+
if (err != 0)
11941197
goto err_out;
11951198

11961199
pDBfree = NULL;
@@ -1205,6 +1208,7 @@ static int __devinit au1000_probe(struct platform_device *pdev)
12051208
}
12061209
aup->pDBfree = pDBfree;
12071210

1211+
err = -ENODEV;
12081212
for (i = 0; i < NUM_RX_DMA; i++) {
12091213
pDB = au1000_GetFreeDB(aup);
12101214
if (!pDB)
@@ -1213,6 +1217,8 @@ static int __devinit au1000_probe(struct platform_device *pdev)
12131217
aup->rx_dma_ring[i]->buff_stat = (unsigned)pDB->dma_addr;
12141218
aup->rx_db_inuse[i] = pDB;
12151219
}
1220+
1221+
err = -ENODEV;
12161222
for (i = 0; i < NUM_TX_DMA; i++) {
12171223
pDB = au1000_GetFreeDB(aup);
12181224
if (!pDB)

drivers/net/ethernet/calxeda/xgmac.c

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,6 @@ struct xgmac_priv {
375375
unsigned int tx_tail;
376376

377377
void __iomem *base;
378-
struct sk_buff_head rx_recycle;
379378
unsigned int dma_buf_sz;
380379
dma_addr_t dma_rx_phy;
381380
dma_addr_t dma_tx_phy;
@@ -672,9 +671,7 @@ static void xgmac_rx_refill(struct xgmac_priv *priv)
672671
p = priv->dma_rx + entry;
673672

674673
if (priv->rx_skbuff[entry] == NULL) {
675-
skb = __skb_dequeue(&priv->rx_recycle);
676-
if (skb == NULL)
677-
skb = netdev_alloc_skb(priv->dev, priv->dma_buf_sz);
674+
skb = netdev_alloc_skb(priv->dev, priv->dma_buf_sz);
678675
if (unlikely(skb == NULL))
679676
break;
680677

@@ -887,17 +884,7 @@ static void xgmac_tx_complete(struct xgmac_priv *priv)
887884
desc_get_buf_len(p), DMA_TO_DEVICE);
888885
}
889886

890-
/*
891-
* If there's room in the queue (limit it to size)
892-
* we add this skb back into the pool,
893-
* if it's the right size.
894-
*/
895-
if ((skb_queue_len(&priv->rx_recycle) <
896-
DMA_RX_RING_SZ) &&
897-
skb_recycle_check(skb, priv->dma_buf_sz))
898-
__skb_queue_head(&priv->rx_recycle, skb);
899-
else
900-
dev_kfree_skb(skb);
887+
dev_kfree_skb(skb);
901888
}
902889

903890
if (dma_ring_space(priv->tx_head, priv->tx_tail, DMA_TX_RING_SZ) >
@@ -1016,7 +1003,6 @@ static int xgmac_open(struct net_device *dev)
10161003
dev->dev_addr);
10171004
}
10181005

1019-
skb_queue_head_init(&priv->rx_recycle);
10201006
memset(&priv->xstats, 0, sizeof(struct xgmac_extra_stats));
10211007

10221008
/* Initialize the XGMAC and descriptors */
@@ -1053,7 +1039,6 @@ static int xgmac_stop(struct net_device *dev)
10531039
napi_disable(&priv->napi);
10541040

10551041
writel(0, priv->base + XGMAC_DMA_INTR_ENA);
1056-
skb_queue_purge(&priv->rx_recycle);
10571042

10581043
/* Disable the MAC core */
10591044
xgmac_mac_disable(priv->base);

drivers/net/ethernet/chelsio/cxgb4/cxgb4.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,7 @@ int t4_seeprom_wp(struct adapter *adapter, bool enable);
696696
int get_vpd_params(struct adapter *adapter, struct vpd_params *p);
697697
int t4_load_fw(struct adapter *adapter, const u8 *fw_data, unsigned int size);
698698
unsigned int t4_flash_cfg_addr(struct adapter *adapter);
699+
int t4_load_cfg(struct adapter *adapter, const u8 *cfg_data, unsigned int size);
699700
int t4_check_fw_version(struct adapter *adapter);
700701
int t4_prep_adapter(struct adapter *adapter);
701702
int t4_port_init(struct adapter *adap, int mbox, int pf, int vf);

drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,10 @@ int dbfifo_int_thresh = 10; /* 10 == 640 entry threshold */
443443
module_param(dbfifo_int_thresh, int, 0644);
444444
MODULE_PARM_DESC(dbfifo_int_thresh, "doorbell fifo interrupt threshold");
445445

446-
int dbfifo_drain_delay = 1000; /* usecs to sleep while draining the dbfifo */
446+
/*
447+
* usecs to sleep while draining the dbfifo
448+
*/
449+
static int dbfifo_drain_delay = 1000;
447450
module_param(dbfifo_drain_delay, int, 0644);
448451
MODULE_PARM_DESC(dbfifo_drain_delay,
449452
"usecs to sleep while draining the dbfifo");
@@ -636,64 +639,68 @@ static void name_msix_vecs(struct adapter *adap)
636639
static int request_msix_queue_irqs(struct adapter *adap)
637640
{
638641
struct sge *s = &adap->sge;
639-
int err, ethqidx, ofldqidx = 0, rdmaqidx = 0, msi = 2;
642+
int err, ethqidx, ofldqidx = 0, rdmaqidx = 0, msi_index = 2;
640643

641644
err = request_irq(adap->msix_info[1].vec, t4_sge_intr_msix, 0,
642645
adap->msix_info[1].desc, &s->fw_evtq);
643646
if (err)
644647
return err;
645648

646649
for_each_ethrxq(s, ethqidx) {
647-
err = request_irq(adap->msix_info[msi].vec, t4_sge_intr_msix, 0,
648-
adap->msix_info[msi].desc,
650+
err = request_irq(adap->msix_info[msi_index].vec,
651+
t4_sge_intr_msix, 0,
652+
adap->msix_info[msi_index].desc,
649653
&s->ethrxq[ethqidx].rspq);
650654
if (err)
651655
goto unwind;
652-
msi++;
656+
msi_index++;
653657
}
654658
for_each_ofldrxq(s, ofldqidx) {
655-
err = request_irq(adap->msix_info[msi].vec, t4_sge_intr_msix, 0,
656-
adap->msix_info[msi].desc,
659+
err = request_irq(adap->msix_info[msi_index].vec,
660+
t4_sge_intr_msix, 0,
661+
adap->msix_info[msi_index].desc,
657662
&s->ofldrxq[ofldqidx].rspq);
658663
if (err)
659664
goto unwind;
660-
msi++;
665+
msi_index++;
661666
}
662667
for_each_rdmarxq(s, rdmaqidx) {
663-
err = request_irq(adap->msix_info[msi].vec, t4_sge_intr_msix, 0,
664-
adap->msix_info[msi].desc,
668+
err = request_irq(adap->msix_info[msi_index].vec,
669+
t4_sge_intr_msix, 0,
670+
adap->msix_info[msi_index].desc,
665671
&s->rdmarxq[rdmaqidx].rspq);
666672
if (err)
667673
goto unwind;
668-
msi++;
674+
msi_index++;
669675
}
670676
return 0;
671677

672678
unwind:
673679
while (--rdmaqidx >= 0)
674-
free_irq(adap->msix_info[--msi].vec,
680+
free_irq(adap->msix_info[--msi_index].vec,
675681
&s->rdmarxq[rdmaqidx].rspq);
676682
while (--ofldqidx >= 0)
677-
free_irq(adap->msix_info[--msi].vec,
683+
free_irq(adap->msix_info[--msi_index].vec,
678684
&s->ofldrxq[ofldqidx].rspq);
679685
while (--ethqidx >= 0)
680-
free_irq(adap->msix_info[--msi].vec, &s->ethrxq[ethqidx].rspq);
686+
free_irq(adap->msix_info[--msi_index].vec,
687+
&s->ethrxq[ethqidx].rspq);
681688
free_irq(adap->msix_info[1].vec, &s->fw_evtq);
682689
return err;
683690
}
684691

685692
static void free_msix_queue_irqs(struct adapter *adap)
686693
{
687-
int i, msi = 2;
694+
int i, msi_index = 2;
688695
struct sge *s = &adap->sge;
689696

690697
free_irq(adap->msix_info[1].vec, &s->fw_evtq);
691698
for_each_ethrxq(s, i)
692-
free_irq(adap->msix_info[msi++].vec, &s->ethrxq[i].rspq);
699+
free_irq(adap->msix_info[msi_index++].vec, &s->ethrxq[i].rspq);
693700
for_each_ofldrxq(s, i)
694-
free_irq(adap->msix_info[msi++].vec, &s->ofldrxq[i].rspq);
701+
free_irq(adap->msix_info[msi_index++].vec, &s->ofldrxq[i].rspq);
695702
for_each_rdmarxq(s, i)
696-
free_irq(adap->msix_info[msi++].vec, &s->rdmarxq[i].rspq);
703+
free_irq(adap->msix_info[msi_index++].vec, &s->rdmarxq[i].rspq);
697704
}
698705

699706
/**
@@ -2535,9 +2542,8 @@ static int read_eq_indices(struct adapter *adap, u16 qid, u16 *pidx, u16 *cidx)
25352542

25362543
ret = t4_mem_win_read_len(adap, addr, (__be32 *)&indices, 8);
25372544
if (!ret) {
2538-
indices = be64_to_cpu(indices);
2539-
*cidx = (indices >> 25) & 0xffff;
2540-
*pidx = (indices >> 9) & 0xffff;
2545+
*cidx = (be64_to_cpu(indices) >> 25) & 0xffff;
2546+
*pidx = (be64_to_cpu(indices) >> 9) & 0xffff;
25412547
}
25422548
return ret;
25432549
}
@@ -3634,10 +3640,10 @@ static int adap_init0_no_config(struct adapter *adapter, int reset)
36343640
* field selections will fit in the 36-bit budget.
36353641
*/
36363642
if (tp_vlan_pri_map != TP_VLAN_PRI_MAP_DEFAULT) {
3637-
int i, bits = 0;
3643+
int j, bits = 0;
36383644

3639-
for (i = TP_VLAN_PRI_MAP_FIRST; i <= TP_VLAN_PRI_MAP_LAST; i++)
3640-
switch (tp_vlan_pri_map & (1 << i)) {
3645+
for (j = TP_VLAN_PRI_MAP_FIRST; j <= TP_VLAN_PRI_MAP_LAST; j++)
3646+
switch (tp_vlan_pri_map & (1 << j)) {
36413647
case 0:
36423648
/* compressed filter field not enabled */
36433649
break;

drivers/net/ethernet/chelsio/cxgb4/t4_hw.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,11 @@ static int t4_mem_win_rw(struct adapter *adap, u32 addr, __be32 *data, int dir)
380380
/* Collecting data 4 bytes at a time upto MEMWIN0_APERTURE */
381381
for (i = 0; i < MEMWIN0_APERTURE; i = i+0x4) {
382382
if (dir)
383-
*data++ = t4_read_reg(adap, (MEMWIN0_BASE + i));
383+
*data++ = (__force __be32) t4_read_reg(adap,
384+
(MEMWIN0_BASE + i));
384385
else
385-
t4_write_reg(adap, (MEMWIN0_BASE + i), *data++);
386+
t4_write_reg(adap, (MEMWIN0_BASE + i),
387+
(__force u32) *data++);
386388
}
387389

388390
return 0;
@@ -417,7 +419,7 @@ static int t4_memory_rw(struct adapter *adap, int mtype, u32 addr, u32 len,
417419
if ((addr & 0x3) || (len & 0x3))
418420
return -EINVAL;
419421

420-
data = vmalloc(MEMWIN0_APERTURE/sizeof(__be32));
422+
data = vmalloc(MEMWIN0_APERTURE);
421423
if (!data)
422424
return -ENOMEM;
423425

@@ -744,7 +746,7 @@ static int t4_read_flash(struct adapter *adapter, unsigned int addr,
744746
if (ret)
745747
return ret;
746748
if (byte_oriented)
747-
*data = htonl(*data);
749+
*data = (__force __u32) (htonl(*data));
748750
}
749751
return 0;
750752
}
@@ -992,7 +994,7 @@ int t4_load_fw(struct adapter *adap, const u8 *fw_data, unsigned int size)
992994
int ret, addr;
993995
unsigned int i;
994996
u8 first_page[SF_PAGE_SIZE];
995-
const u32 *p = (const u32 *)fw_data;
997+
const __be32 *p = (const __be32 *)fw_data;
996998
const struct fw_hdr *hdr = (const struct fw_hdr *)fw_data;
997999
unsigned int sf_sec_size = adap->params.sf_size / adap->params.sf_nsec;
9981000
unsigned int fw_img_start = adap->params.sf_fw_start;
@@ -2315,7 +2317,8 @@ int t4_mem_win_read_len(struct adapter *adap, u32 addr, __be32 *data, int len)
23152317
t4_read_reg(adap, PCIE_MEM_ACCESS_OFFSET);
23162318

23172319
for (i = 0; i < len; i += 4)
2318-
*data++ = t4_read_reg(adap, (MEMWIN0_BASE + off + i));
2320+
*data++ = (__force __be32) t4_read_reg(adap,
2321+
(MEMWIN0_BASE + off + i));
23192322

23202323
return 0;
23212324
}

drivers/net/ethernet/dec/tulip/dmfe.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,13 +446,17 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
446446
/* Allocate Tx/Rx descriptor memory */
447447
db->desc_pool_ptr = pci_alloc_consistent(pdev, sizeof(struct tx_desc) *
448448
DESC_ALL_CNT + 0x20, &db->desc_pool_dma_ptr);
449-
if (!db->desc_pool_ptr)
449+
if (!db->desc_pool_ptr) {
450+
err = -ENOMEM;
450451
goto err_out_res;
452+
}
451453

452454
db->buf_pool_ptr = pci_alloc_consistent(pdev, TX_BUF_ALLOC *
453455
TX_DESC_CNT + 4, &db->buf_pool_dma_ptr);
454-
if (!db->buf_pool_ptr)
456+
if (!db->buf_pool_ptr) {
457+
err = -ENOMEM;
455458
goto err_out_free_desc;
459+
}
456460

457461
db->first_tx_desc = (struct tx_desc *) db->desc_pool_ptr;
458462
db->first_tx_desc_dma = db->desc_pool_dma_ptr;
@@ -462,8 +466,10 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
462466
db->chip_id = ent->driver_data;
463467
/* IO type range. */
464468
db->ioaddr = pci_iomap(pdev, 0, 0);
465-
if (!db->ioaddr)
469+
if (!db->ioaddr) {
470+
err = -ENOMEM;
466471
goto err_out_free_buf;
472+
}
467473

468474
db->chip_revision = pdev->revision;
469475
db->wol_mode = 0;

drivers/net/ethernet/emulex/benet/be_main.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2129,8 +2129,11 @@ void be_detect_error(struct be_adapter *adapter)
21292129
ue_hi = (ue_hi & ~ue_hi_mask);
21302130
}
21312131

2132-
if (ue_lo || ue_hi ||
2133-
sliport_status & SLIPORT_STATUS_ERR_MASK) {
2132+
/* On certain platforms BE hardware can indicate spurious UEs.
2133+
* Allow the h/w to stop working completely in case of a real UE.
2134+
* Hence not setting the hw_error for UE detection.
2135+
*/
2136+
if (sliport_status & SLIPORT_STATUS_ERR_MASK) {
21342137
adapter->hw_error = true;
21352138
dev_err(&adapter->pdev->dev,
21362139
"Error detected in the card\n");

0 commit comments

Comments
 (0)