diff options
32 files changed, 209 insertions, 185 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 7858c58df4a3..b721902bb6b4 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -4826,6 +4826,7 @@ static int bond_check_params(struct bond_params *params) | |||
4826 | 4826 | ||
4827 | static struct lock_class_key bonding_netdev_xmit_lock_key; | 4827 | static struct lock_class_key bonding_netdev_xmit_lock_key; |
4828 | static struct lock_class_key bonding_netdev_addr_lock_key; | 4828 | static struct lock_class_key bonding_netdev_addr_lock_key; |
4829 | static struct lock_class_key bonding_tx_busylock_key; | ||
4829 | 4830 | ||
4830 | static void bond_set_lockdep_class_one(struct net_device *dev, | 4831 | static void bond_set_lockdep_class_one(struct net_device *dev, |
4831 | struct netdev_queue *txq, | 4832 | struct netdev_queue *txq, |
@@ -4840,6 +4841,7 @@ static void bond_set_lockdep_class(struct net_device *dev) | |||
4840 | lockdep_set_class(&dev->addr_list_lock, | 4841 | lockdep_set_class(&dev->addr_list_lock, |
4841 | &bonding_netdev_addr_lock_key); | 4842 | &bonding_netdev_addr_lock_key); |
4842 | netdev_for_each_tx_queue(dev, bond_set_lockdep_class_one, NULL); | 4843 | netdev_for_each_tx_queue(dev, bond_set_lockdep_class_one, NULL); |
4844 | dev->qdisc_tx_busylock = &bonding_tx_busylock_key; | ||
4843 | } | 4845 | } |
4844 | 4846 | ||
4845 | /* | 4847 | /* |
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c index c975999bb055..799c354083c4 100644 --- a/drivers/net/can/mscan/mpc5xxx_can.c +++ b/drivers/net/can/mscan/mpc5xxx_can.c | |||
@@ -247,7 +247,7 @@ static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev, | |||
247 | } | 247 | } |
248 | #endif /* CONFIG_PPC_MPC512x */ | 248 | #endif /* CONFIG_PPC_MPC512x */ |
249 | 249 | ||
250 | static struct of_device_id mpc5xxx_can_table[]; | 250 | static const struct of_device_id mpc5xxx_can_table[]; |
251 | static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev) | 251 | static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev) |
252 | { | 252 | { |
253 | const struct of_device_id *match; | 253 | const struct of_device_id *match; |
@@ -380,17 +380,17 @@ static int mpc5xxx_can_resume(struct platform_device *ofdev) | |||
380 | } | 380 | } |
381 | #endif | 381 | #endif |
382 | 382 | ||
383 | static const struct mpc5xxx_can_data __devinitdata mpc5200_can_data = { | 383 | static const struct mpc5xxx_can_data __devinitconst mpc5200_can_data = { |
384 | .type = MSCAN_TYPE_MPC5200, | 384 | .type = MSCAN_TYPE_MPC5200, |
385 | .get_clock = mpc52xx_can_get_clock, | 385 | .get_clock = mpc52xx_can_get_clock, |
386 | }; | 386 | }; |
387 | 387 | ||
388 | static const struct mpc5xxx_can_data __devinitdata mpc5121_can_data = { | 388 | static const struct mpc5xxx_can_data __devinitconst mpc5121_can_data = { |
389 | .type = MSCAN_TYPE_MPC5121, | 389 | .type = MSCAN_TYPE_MPC5121, |
390 | .get_clock = mpc512x_can_get_clock, | 390 | .get_clock = mpc512x_can_get_clock, |
391 | }; | 391 | }; |
392 | 392 | ||
393 | static struct of_device_id __devinitdata mpc5xxx_can_table[] = { | 393 | static const struct of_device_id __devinitconst mpc5xxx_can_table[] = { |
394 | { .compatible = "fsl,mpc5200-mscan", .data = &mpc5200_can_data, }, | 394 | { .compatible = "fsl,mpc5200-mscan", .data = &mpc5200_can_data, }, |
395 | /* Note that only MPC5121 Rev. 2 (and later) is supported */ | 395 | /* Note that only MPC5121 Rev. 2 (and later) is supported */ |
396 | { .compatible = "fsl,mpc5121-mscan", .data = &mpc5121_can_data, }, | 396 | { .compatible = "fsl,mpc5121-mscan", .data = &mpc5121_can_data, }, |
diff --git a/drivers/net/can/sja1000/peak_pci.c b/drivers/net/can/sja1000/peak_pci.c index f0a12962f7b6..f5b82aeb2540 100644 --- a/drivers/net/can/sja1000/peak_pci.c +++ b/drivers/net/can/sja1000/peak_pci.c | |||
@@ -583,12 +583,14 @@ static int __devinit peak_pci_probe(struct pci_dev *pdev, | |||
583 | cfg_base = pci_iomap(pdev, 0, PEAK_PCI_CFG_SIZE); | 583 | cfg_base = pci_iomap(pdev, 0, PEAK_PCI_CFG_SIZE); |
584 | if (!cfg_base) { | 584 | if (!cfg_base) { |
585 | dev_err(&pdev->dev, "failed to map PCI resource #0\n"); | 585 | dev_err(&pdev->dev, "failed to map PCI resource #0\n"); |
586 | err = -ENOMEM; | ||
586 | goto failure_release_regions; | 587 | goto failure_release_regions; |
587 | } | 588 | } |
588 | 589 | ||
589 | reg_base = pci_iomap(pdev, 1, PEAK_PCI_CHAN_SIZE * channels); | 590 | reg_base = pci_iomap(pdev, 1, PEAK_PCI_CHAN_SIZE * channels); |
590 | if (!reg_base) { | 591 | if (!reg_base) { |
591 | dev_err(&pdev->dev, "failed to map PCI resource #1\n"); | 592 | dev_err(&pdev->dev, "failed to map PCI resource #1\n"); |
593 | err = -ENOMEM; | ||
592 | goto failure_unmap_cfg_base; | 594 | goto failure_unmap_cfg_base; |
593 | } | 595 | } |
594 | 596 | ||
diff --git a/drivers/net/can/sja1000/peak_pcmcia.c b/drivers/net/can/sja1000/peak_pcmcia.c index ec6bd9d1b2af..272a85f32b14 100644 --- a/drivers/net/can/sja1000/peak_pcmcia.c +++ b/drivers/net/can/sja1000/peak_pcmcia.c | |||
@@ -686,8 +686,10 @@ static int __devinit pcan_probe(struct pcmcia_device *pdev) | |||
686 | 686 | ||
687 | /* detect available channels */ | 687 | /* detect available channels */ |
688 | pcan_add_channels(card); | 688 | pcan_add_channels(card); |
689 | if (!card->chan_count) | 689 | if (!card->chan_count) { |
690 | err = -ENOMEM; | ||
690 | goto probe_err_4; | 691 | goto probe_err_4; |
692 | } | ||
691 | 693 | ||
692 | /* init the timer which controls the leds */ | 694 | /* init the timer which controls the leds */ |
693 | init_timer(&card->led_timer); | 695 | init_timer(&card->led_timer); |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index 30f04a389227..24220992413f 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | |||
@@ -3523,15 +3523,18 @@ static int bnx2x_alloc_fp_mem_at(struct bnx2x *bp, int index) | |||
3523 | } else | 3523 | } else |
3524 | #endif | 3524 | #endif |
3525 | if (!bp->rx_ring_size) { | 3525 | if (!bp->rx_ring_size) { |
3526 | u32 cfg = SHMEM_RD(bp, | ||
3527 | dev_info.port_hw_config[BP_PORT(bp)].default_cfg); | ||
3528 | |||
3529 | rx_ring_size = MAX_RX_AVAIL/BNX2X_NUM_RX_QUEUES(bp); | 3526 | rx_ring_size = MAX_RX_AVAIL/BNX2X_NUM_RX_QUEUES(bp); |
3530 | 3527 | ||
3531 | /* Dercease ring size for 1G functions */ | 3528 | if (CHIP_IS_E3(bp)) { |
3532 | if ((cfg & PORT_HW_CFG_NET_SERDES_IF_MASK) == | 3529 | u32 cfg = SHMEM_RD(bp, |
3533 | PORT_HW_CFG_NET_SERDES_IF_SGMII) | 3530 | dev_info.port_hw_config[BP_PORT(bp)]. |
3534 | rx_ring_size /= 10; | 3531 | default_cfg); |
3532 | |||
3533 | /* Decrease ring size for 1G functions */ | ||
3534 | if ((cfg & PORT_HW_CFG_NET_SERDES_IF_MASK) == | ||
3535 | PORT_HW_CFG_NET_SERDES_IF_SGMII) | ||
3536 | rx_ring_size /= 10; | ||
3537 | } | ||
3535 | 3538 | ||
3536 | /* allocate at least number of buffers required by FW */ | 3539 | /* allocate at least number of buffers required by FW */ |
3537 | rx_ring_size = max_t(int, bp->disable_tpa ? MIN_RX_SIZE_NONTPA : | 3540 | rx_ring_size = max_t(int, bp->disable_tpa ? MIN_RX_SIZE_NONTPA : |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index f7ed122f4071..d5648fc666bd 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |||
@@ -3052,9 +3052,8 @@ static void bnx2x_drv_info_ether_stat(struct bnx2x *bp) | |||
3052 | struct eth_stats_info *ether_stat = | 3052 | struct eth_stats_info *ether_stat = |
3053 | &bp->slowpath->drv_info_to_mcp.ether_stat; | 3053 | &bp->slowpath->drv_info_to_mcp.ether_stat; |
3054 | 3054 | ||
3055 | /* leave last char as NULL */ | 3055 | strlcpy(ether_stat->version, DRV_MODULE_VERSION, |
3056 | memcpy(ether_stat->version, DRV_MODULE_VERSION, | 3056 | ETH_STAT_INFO_VERSION_LEN); |
3057 | ETH_STAT_INFO_VERSION_LEN - 1); | ||
3058 | 3057 | ||
3059 | bp->sp_objs[0].mac_obj.get_n_elements(bp, &bp->sp_objs[0].mac_obj, | 3058 | bp->sp_objs[0].mac_obj.get_n_elements(bp, &bp->sp_objs[0].mac_obj, |
3060 | DRV_INFO_ETH_STAT_NUM_MACS_REQUIRED, | 3059 | DRV_INFO_ETH_STAT_NUM_MACS_REQUIRED, |
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 46280ba4c5d4..a8800ac10df9 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c | |||
@@ -782,7 +782,8 @@ static int tg3_ape_wait_for_event(struct tg3 *tp, u32 timeout_us) | |||
782 | return i == timeout_us / 10; | 782 | return i == timeout_us / 10; |
783 | } | 783 | } |
784 | 784 | ||
785 | int tg3_ape_scratchpad_read(struct tg3 *tp, u32 *data, u32 base_off, u32 len) | 785 | static int tg3_ape_scratchpad_read(struct tg3 *tp, u32 *data, u32 base_off, |
786 | u32 len) | ||
786 | { | 787 | { |
787 | int err; | 788 | int err; |
788 | u32 i, bufoff, msgoff, maxlen, apedata; | 789 | u32 i, bufoff, msgoff, maxlen, apedata; |
@@ -7763,7 +7764,7 @@ static int tg3_alloc_consistent(struct tg3 *tp) | |||
7763 | sblk = tnapi->hw_status; | 7764 | sblk = tnapi->hw_status; |
7764 | 7765 | ||
7765 | if (tg3_flag(tp, ENABLE_RSS)) { | 7766 | if (tg3_flag(tp, ENABLE_RSS)) { |
7766 | u16 *prodptr = 0; | 7767 | u16 *prodptr = NULL; |
7767 | 7768 | ||
7768 | /* | 7769 | /* |
7769 | * When RSS is enabled, the status block format changes | 7770 | * When RSS is enabled, the status block format changes |
@@ -8103,11 +8104,11 @@ static int tg3_chip_reset(struct tg3 *tp) | |||
8103 | u16 val16; | 8104 | u16 val16; |
8104 | 8105 | ||
8105 | if (tp->pci_chip_rev_id == CHIPREV_ID_5750_A0) { | 8106 | if (tp->pci_chip_rev_id == CHIPREV_ID_5750_A0) { |
8106 | int i; | 8107 | int j; |
8107 | u32 cfg_val; | 8108 | u32 cfg_val; |
8108 | 8109 | ||
8109 | /* Wait for link training to complete. */ | 8110 | /* Wait for link training to complete. */ |
8110 | for (i = 0; i < 5000; i++) | 8111 | for (j = 0; j < 5000; j++) |
8111 | udelay(100); | 8112 | udelay(100); |
8112 | 8113 | ||
8113 | pci_read_config_dword(tp->pdev, 0xc4, &cfg_val); | 8114 | pci_read_config_dword(tp->pdev, 0xc4, &cfg_val); |
@@ -10206,7 +10207,7 @@ static u32 tg3_irq_count(struct tg3 *tp) | |||
10206 | static bool tg3_enable_msix(struct tg3 *tp) | 10207 | static bool tg3_enable_msix(struct tg3 *tp) |
10207 | { | 10208 | { |
10208 | int i, rc; | 10209 | int i, rc; |
10209 | struct msix_entry msix_ent[tp->irq_max]; | 10210 | struct msix_entry msix_ent[TG3_IRQ_MAX_VECS]; |
10210 | 10211 | ||
10211 | tp->txq_cnt = tp->txq_req; | 10212 | tp->txq_cnt = tp->txq_req; |
10212 | tp->rxq_cnt = tp->rxq_req; | 10213 | tp->rxq_cnt = tp->rxq_req; |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h index 745a1f53361f..31752b24434e 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/pci.h> | 43 | #include <linux/pci.h> |
44 | #include <linux/spinlock.h> | 44 | #include <linux/spinlock.h> |
45 | #include <linux/timer.h> | 45 | #include <linux/timer.h> |
46 | #include <linux/vmalloc.h> | ||
46 | #include <asm/io.h> | 47 | #include <asm/io.h> |
47 | #include "cxgb4_uld.h" | 48 | #include "cxgb4_uld.h" |
48 | #include "t4_hw.h" | 49 | #include "t4_hw.h" |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c index 35b81d8b59e9..137a24438d9c 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | |||
@@ -408,7 +408,8 @@ static int t4_memory_rw(struct adapter *adap, int mtype, u32 addr, u32 len, | |||
408 | __be32 *buf, int dir) | 408 | __be32 *buf, int dir) |
409 | { | 409 | { |
410 | u32 pos, start, end, offset, memoffset; | 410 | u32 pos, start, end, offset, memoffset; |
411 | int ret; | 411 | int ret = 0; |
412 | __be32 *data; | ||
412 | 413 | ||
413 | /* | 414 | /* |
414 | * Argument sanity checks ... | 415 | * Argument sanity checks ... |
@@ -416,6 +417,10 @@ static int t4_memory_rw(struct adapter *adap, int mtype, u32 addr, u32 len, | |||
416 | if ((addr & 0x3) || (len & 0x3)) | 417 | if ((addr & 0x3) || (len & 0x3)) |
417 | return -EINVAL; | 418 | return -EINVAL; |
418 | 419 | ||
420 | data = vmalloc(MEMWIN0_APERTURE/sizeof(__be32)); | ||
421 | if (!data) | ||
422 | return -ENOMEM; | ||
423 | |||
419 | /* | 424 | /* |
420 | * Offset into the region of memory which is being accessed | 425 | * Offset into the region of memory which is being accessed |
421 | * MEM_EDC0 = 0 | 426 | * MEM_EDC0 = 0 |
@@ -438,7 +443,6 @@ static int t4_memory_rw(struct adapter *adap, int mtype, u32 addr, u32 len, | |||
438 | offset = (addr - start)/sizeof(__be32); | 443 | offset = (addr - start)/sizeof(__be32); |
439 | 444 | ||
440 | for (pos = start; pos < end; pos += MEMWIN0_APERTURE, offset = 0) { | 445 | for (pos = start; pos < end; pos += MEMWIN0_APERTURE, offset = 0) { |
441 | __be32 data[MEMWIN0_APERTURE/sizeof(__be32)]; | ||
442 | 446 | ||
443 | /* | 447 | /* |
444 | * If we're writing, copy the data from the caller's memory | 448 | * If we're writing, copy the data from the caller's memory |
@@ -452,7 +456,7 @@ static int t4_memory_rw(struct adapter *adap, int mtype, u32 addr, u32 len, | |||
452 | if (offset || len < MEMWIN0_APERTURE) { | 456 | if (offset || len < MEMWIN0_APERTURE) { |
453 | ret = t4_mem_win_rw(adap, pos, data, 1); | 457 | ret = t4_mem_win_rw(adap, pos, data, 1); |
454 | if (ret) | 458 | if (ret) |
455 | return ret; | 459 | break; |
456 | } | 460 | } |
457 | while (offset < (MEMWIN0_APERTURE/sizeof(__be32)) && | 461 | while (offset < (MEMWIN0_APERTURE/sizeof(__be32)) && |
458 | len > 0) { | 462 | len > 0) { |
@@ -466,7 +470,7 @@ static int t4_memory_rw(struct adapter *adap, int mtype, u32 addr, u32 len, | |||
466 | */ | 470 | */ |
467 | ret = t4_mem_win_rw(adap, pos, data, dir); | 471 | ret = t4_mem_win_rw(adap, pos, data, dir); |
468 | if (ret) | 472 | if (ret) |
469 | return ret; | 473 | break; |
470 | 474 | ||
471 | /* | 475 | /* |
472 | * If we're reading, copy the data into the caller's memory | 476 | * If we're reading, copy the data into the caller's memory |
@@ -480,7 +484,8 @@ static int t4_memory_rw(struct adapter *adap, int mtype, u32 addr, u32 len, | |||
480 | } | 484 | } |
481 | } | 485 | } |
482 | 486 | ||
483 | return 0; | 487 | vfree(data); |
488 | return ret; | ||
484 | } | 489 | } |
485 | 490 | ||
486 | int t4_memory_write(struct adapter *adap, int mtype, u32 addr, u32 len, | 491 | int t4_memory_write(struct adapter *adap, int mtype, u32 addr, u32 len, |
@@ -519,16 +524,21 @@ int get_vpd_params(struct adapter *adapter, struct vpd_params *p) | |||
519 | u32 cclk_param, cclk_val; | 524 | u32 cclk_param, cclk_val; |
520 | int i, ret; | 525 | int i, ret; |
521 | int ec, sn; | 526 | int ec, sn; |
522 | u8 vpd[VPD_LEN], csum; | 527 | u8 *vpd, csum; |
523 | unsigned int vpdr_len, kw_offset, id_len; | 528 | unsigned int vpdr_len, kw_offset, id_len; |
524 | 529 | ||
525 | ret = pci_read_vpd(adapter->pdev, VPD_BASE, sizeof(vpd), vpd); | 530 | vpd = vmalloc(VPD_LEN); |
531 | if (!vpd) | ||
532 | return -ENOMEM; | ||
533 | |||
534 | ret = pci_read_vpd(adapter->pdev, VPD_BASE, VPD_LEN, vpd); | ||
526 | if (ret < 0) | 535 | if (ret < 0) |
527 | return ret; | 536 | goto out; |
528 | 537 | ||
529 | if (vpd[0] != PCI_VPD_LRDT_ID_STRING) { | 538 | if (vpd[0] != PCI_VPD_LRDT_ID_STRING) { |
530 | dev_err(adapter->pdev_dev, "missing VPD ID string\n"); | 539 | dev_err(adapter->pdev_dev, "missing VPD ID string\n"); |
531 | return -EINVAL; | 540 | ret = -EINVAL; |
541 | goto out; | ||
532 | } | 542 | } |
533 | 543 | ||
534 | id_len = pci_vpd_lrdt_size(vpd); | 544 | id_len = pci_vpd_lrdt_size(vpd); |
@@ -538,21 +548,24 @@ int get_vpd_params(struct adapter *adapter, struct vpd_params *p) | |||
538 | i = pci_vpd_find_tag(vpd, 0, VPD_LEN, PCI_VPD_LRDT_RO_DATA); | 548 | i = pci_vpd_find_tag(vpd, 0, VPD_LEN, PCI_VPD_LRDT_RO_DATA); |
539 | if (i < 0) { | 549 | if (i < 0) { |
540 | dev_err(adapter->pdev_dev, "missing VPD-R section\n"); | 550 | dev_err(adapter->pdev_dev, "missing VPD-R section\n"); |
541 | return -EINVAL; | 551 | ret = -EINVAL; |
552 | goto out; | ||
542 | } | 553 | } |
543 | 554 | ||
544 | vpdr_len = pci_vpd_lrdt_size(&vpd[i]); | 555 | vpdr_len = pci_vpd_lrdt_size(&vpd[i]); |
545 | kw_offset = i + PCI_VPD_LRDT_TAG_SIZE; | 556 | kw_offset = i + PCI_VPD_LRDT_TAG_SIZE; |
546 | if (vpdr_len + kw_offset > VPD_LEN) { | 557 | if (vpdr_len + kw_offset > VPD_LEN) { |
547 | dev_err(adapter->pdev_dev, "bad VPD-R length %u\n", vpdr_len); | 558 | dev_err(adapter->pdev_dev, "bad VPD-R length %u\n", vpdr_len); |
548 | return -EINVAL; | 559 | ret = -EINVAL; |
560 | goto out; | ||
549 | } | 561 | } |
550 | 562 | ||
551 | #define FIND_VPD_KW(var, name) do { \ | 563 | #define FIND_VPD_KW(var, name) do { \ |
552 | var = pci_vpd_find_info_keyword(vpd, kw_offset, vpdr_len, name); \ | 564 | var = pci_vpd_find_info_keyword(vpd, kw_offset, vpdr_len, name); \ |
553 | if (var < 0) { \ | 565 | if (var < 0) { \ |
554 | dev_err(adapter->pdev_dev, "missing VPD keyword " name "\n"); \ | 566 | dev_err(adapter->pdev_dev, "missing VPD keyword " name "\n"); \ |
555 | return -EINVAL; \ | 567 | ret = -EINVAL; \ |
568 | goto out; \ | ||
556 | } \ | 569 | } \ |
557 | var += PCI_VPD_INFO_FLD_HDR_SIZE; \ | 570 | var += PCI_VPD_INFO_FLD_HDR_SIZE; \ |
558 | } while (0) | 571 | } while (0) |
@@ -564,7 +577,8 @@ int get_vpd_params(struct adapter *adapter, struct vpd_params *p) | |||
564 | if (csum) { | 577 | if (csum) { |
565 | dev_err(adapter->pdev_dev, | 578 | dev_err(adapter->pdev_dev, |
566 | "corrupted VPD EEPROM, actual csum %u\n", csum); | 579 | "corrupted VPD EEPROM, actual csum %u\n", csum); |
567 | return -EINVAL; | 580 | ret = -EINVAL; |
581 | goto out; | ||
568 | } | 582 | } |
569 | 583 | ||
570 | FIND_VPD_KW(ec, "EC"); | 584 | FIND_VPD_KW(ec, "EC"); |
@@ -587,6 +601,9 @@ int get_vpd_params(struct adapter *adapter, struct vpd_params *p) | |||
587 | FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_CCLK)); | 601 | FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_CCLK)); |
588 | ret = t4_query_params(adapter, adapter->mbox, 0, 0, | 602 | ret = t4_query_params(adapter, adapter->mbox, 0, 0, |
589 | 1, &cclk_param, &cclk_val); | 603 | 1, &cclk_param, &cclk_val); |
604 | |||
605 | out: | ||
606 | vfree(vpd); | ||
590 | if (ret) | 607 | if (ret) |
591 | return ret; | 608 | return ret; |
592 | p->cclk = cclk_val; | 609 | p->cclk = cclk_val; |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c index 18bf08c9d7a4..1077cb2b38db 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | |||
@@ -1099,7 +1099,7 @@ s32 ixgbe_reinit_fdir_tables_82599(struct ixgbe_hw *hw) | |||
1099 | if (IXGBE_READ_REG(hw, IXGBE_FDIRCTRL) & | 1099 | if (IXGBE_READ_REG(hw, IXGBE_FDIRCTRL) & |
1100 | IXGBE_FDIRCTRL_INIT_DONE) | 1100 | IXGBE_FDIRCTRL_INIT_DONE) |
1101 | break; | 1101 | break; |
1102 | udelay(10); | 1102 | usleep_range(1000, 2000); |
1103 | } | 1103 | } |
1104 | if (i >= IXGBE_FDIR_INIT_DONE_POLL) { | 1104 | if (i >= IXGBE_FDIR_INIT_DONE_POLL) { |
1105 | hw_dbg(hw, "Flow Director Signature poll time exceeded!\n"); | 1105 | hw_dbg(hw, "Flow Director Signature poll time exceeded!\n"); |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c index 90e41db3cb69..dbf37e4a45fd 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | |||
@@ -70,6 +70,7 @@ static s32 ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw) | |||
70 | 70 | ||
71 | switch (hw->device_id) { | 71 | switch (hw->device_id) { |
72 | case IXGBE_DEV_ID_X540T: | 72 | case IXGBE_DEV_ID_X540T: |
73 | case IXGBE_DEV_ID_X540T1: | ||
73 | return 0; | 74 | return 0; |
74 | case IXGBE_DEV_ID_82599_T3_LOM: | 75 | case IXGBE_DEV_ID_82599_T3_LOM: |
75 | return 0; | 76 | return 0; |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c index 4104ea25d818..56b20d17d0e4 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | |||
@@ -2690,10 +2690,7 @@ static int ixgbe_get_ts_info(struct net_device *dev, | |||
2690 | (1 << HWTSTAMP_FILTER_NONE) | | 2690 | (1 << HWTSTAMP_FILTER_NONE) | |
2691 | (1 << HWTSTAMP_FILTER_PTP_V1_L4_SYNC) | | 2691 | (1 << HWTSTAMP_FILTER_PTP_V1_L4_SYNC) | |
2692 | (1 << HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ) | | 2692 | (1 << HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ) | |
2693 | (1 << HWTSTAMP_FILTER_PTP_V2_SYNC) | | 2693 | (1 << HWTSTAMP_FILTER_PTP_V2_EVENT); |
2694 | (1 << HWTSTAMP_FILTER_PTP_V2_DELAY_REQ) | | ||
2695 | (1 << HWTSTAMP_FILTER_PTP_V2_EVENT) | | ||
2696 | (1 << HWTSTAMP_FILTER_SOME); | ||
2697 | break; | 2694 | break; |
2698 | #endif /* CONFIG_IXGBE_PTP */ | 2695 | #endif /* CONFIG_IXGBE_PTP */ |
2699 | default: | 2696 | default: |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 868af6938219..fa3d552e1f4a 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
@@ -114,6 +114,7 @@ static DEFINE_PCI_DEVICE_TABLE(ixgbe_pci_tbl) = { | |||
114 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_LS), board_82599 }, | 114 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_LS), board_82599 }, |
115 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599EN_SFP), board_82599 }, | 115 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599EN_SFP), board_82599 }, |
116 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_SFP_SF_QP), board_82599 }, | 116 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_SFP_SF_QP), board_82599 }, |
117 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540T1), board_X540 }, | ||
117 | /* required last entry */ | 118 | /* required last entry */ |
118 | {0, } | 119 | {0, } |
119 | }; | 120 | }; |
@@ -2322,6 +2323,12 @@ static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter, bool queues, | |||
2322 | default: | 2323 | default: |
2323 | break; | 2324 | break; |
2324 | } | 2325 | } |
2326 | |||
2327 | #ifdef CONFIG_IXGBE_PTP | ||
2328 | if (adapter->hw.mac.type == ixgbe_mac_X540) | ||
2329 | mask |= IXGBE_EIMS_TIMESYNC; | ||
2330 | #endif | ||
2331 | |||
2325 | if ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) && | 2332 | if ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) && |
2326 | !(adapter->flags2 & IXGBE_FLAG2_FDIR_REQUIRES_REINIT)) | 2333 | !(adapter->flags2 & IXGBE_FLAG2_FDIR_REQUIRES_REINIT)) |
2327 | mask |= IXGBE_EIMS_FLOW_DIR; | 2334 | mask |= IXGBE_EIMS_FLOW_DIR; |
@@ -2385,8 +2392,10 @@ static irqreturn_t ixgbe_msix_other(int irq, void *data) | |||
2385 | } | 2392 | } |
2386 | 2393 | ||
2387 | ixgbe_check_fan_failure(adapter, eicr); | 2394 | ixgbe_check_fan_failure(adapter, eicr); |
2395 | |||
2388 | #ifdef CONFIG_IXGBE_PTP | 2396 | #ifdef CONFIG_IXGBE_PTP |
2389 | ixgbe_ptp_check_pps_event(adapter, eicr); | 2397 | if (unlikely(eicr & IXGBE_EICR_TIMESYNC)) |
2398 | ixgbe_ptp_check_pps_event(adapter, eicr); | ||
2390 | #endif | 2399 | #endif |
2391 | 2400 | ||
2392 | /* re-enable the original interrupt state, no lsc, no queues */ | 2401 | /* re-enable the original interrupt state, no lsc, no queues */ |
@@ -2580,7 +2589,8 @@ static irqreturn_t ixgbe_intr(int irq, void *data) | |||
2580 | 2589 | ||
2581 | ixgbe_check_fan_failure(adapter, eicr); | 2590 | ixgbe_check_fan_failure(adapter, eicr); |
2582 | #ifdef CONFIG_IXGBE_PTP | 2591 | #ifdef CONFIG_IXGBE_PTP |
2583 | ixgbe_ptp_check_pps_event(adapter, eicr); | 2592 | if (unlikely(eicr & IXGBE_EICR_TIMESYNC)) |
2593 | ixgbe_ptp_check_pps_event(adapter, eicr); | ||
2584 | #endif | 2594 | #endif |
2585 | 2595 | ||
2586 | /* would disable interrupts here but EIAM disabled it */ | 2596 | /* would disable interrupts here but EIAM disabled it */ |
@@ -7045,6 +7055,7 @@ int ixgbe_wol_supported(struct ixgbe_adapter *adapter, u16 device_id, | |||
7045 | is_wol_supported = 1; | 7055 | is_wol_supported = 1; |
7046 | break; | 7056 | break; |
7047 | case IXGBE_DEV_ID_X540T: | 7057 | case IXGBE_DEV_ID_X540T: |
7058 | case IXGBE_DEV_ID_X540T1: | ||
7048 | /* check eeprom to see if enabled wol */ | 7059 | /* check eeprom to see if enabled wol */ |
7049 | if ((wol_cap == IXGBE_DEVICE_CAPS_WOL_PORT0_1) || | 7060 | if ((wol_cap == IXGBE_DEVICE_CAPS_WOL_PORT0_1) || |
7050 | ((wol_cap == IXGBE_DEVICE_CAPS_WOL_PORT0) && | 7061 | ((wol_cap == IXGBE_DEVICE_CAPS_WOL_PORT0) && |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c index 39881cb17a4b..d9291316ee9f 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | |||
@@ -106,6 +106,83 @@ static struct sock_filter ptp_filter[] = { | |||
106 | }; | 106 | }; |
107 | 107 | ||
108 | /** | 108 | /** |
109 | * ixgbe_ptp_setup_sdp | ||
110 | * @hw: the hardware private structure | ||
111 | * | ||
112 | * this function enables or disables the clock out feature on SDP0 for | ||
113 | * the X540 device. It will create a 1second periodic output that can | ||
114 | * be used as the PPS (via an interrupt). | ||
115 | * | ||
116 | * It calculates when the systime will be on an exact second, and then | ||
117 | * aligns the start of the PPS signal to that value. The shift is | ||
118 | * necessary because it can change based on the link speed. | ||
119 | */ | ||
120 | static void ixgbe_ptp_setup_sdp(struct ixgbe_adapter *adapter) | ||
121 | { | ||
122 | struct ixgbe_hw *hw = &adapter->hw; | ||
123 | int shift = adapter->cc.shift; | ||
124 | u32 esdp, tsauxc, clktiml, clktimh, trgttiml, trgttimh, rem; | ||
125 | u64 ns = 0, clock_edge = 0; | ||
126 | |||
127 | if ((adapter->flags2 & IXGBE_FLAG2_PTP_PPS_ENABLED) && | ||
128 | (hw->mac.type == ixgbe_mac_X540)) { | ||
129 | |||
130 | /* disable the pin first */ | ||
131 | IXGBE_WRITE_REG(hw, IXGBE_TSAUXC, 0x0); | ||
132 | IXGBE_WRITE_FLUSH(hw); | ||
133 | |||
134 | esdp = IXGBE_READ_REG(hw, IXGBE_ESDP); | ||
135 | |||
136 | /* | ||
137 | * enable the SDP0 pin as output, and connected to the | ||
138 | * native function for Timesync (ClockOut) | ||
139 | */ | ||
140 | esdp |= (IXGBE_ESDP_SDP0_DIR | | ||
141 | IXGBE_ESDP_SDP0_NATIVE); | ||
142 | |||
143 | /* | ||
144 | * enable the Clock Out feature on SDP0, and allow | ||
145 | * interrupts to occur when the pin changes | ||
146 | */ | ||
147 | tsauxc = (IXGBE_TSAUXC_EN_CLK | | ||
148 | IXGBE_TSAUXC_SYNCLK | | ||
149 | IXGBE_TSAUXC_SDP0_INT); | ||
150 | |||
151 | /* clock period (or pulse length) */ | ||
152 | clktiml = (u32)(NSECS_PER_SEC << shift); | ||
153 | clktimh = (u32)((NSECS_PER_SEC << shift) >> 32); | ||
154 | |||
155 | /* | ||
156 | * Account for the cyclecounter wrap-around value by | ||
157 | * using the converted ns value of the current time to | ||
158 | * check for when the next aligned second would occur. | ||
159 | */ | ||
160 | clock_edge |= (u64)IXGBE_READ_REG(hw, IXGBE_SYSTIML); | ||
161 | clock_edge |= (u64)IXGBE_READ_REG(hw, IXGBE_SYSTIMH) << 32; | ||
162 | ns = timecounter_cyc2time(&adapter->tc, clock_edge); | ||
163 | |||
164 | div_u64_rem(ns, NSECS_PER_SEC, &rem); | ||
165 | clock_edge += ((NSECS_PER_SEC - (u64)rem) << shift); | ||
166 | |||
167 | /* specify the initial clock start time */ | ||
168 | trgttiml = (u32)clock_edge; | ||
169 | trgttimh = (u32)(clock_edge >> 32); | ||
170 | |||
171 | IXGBE_WRITE_REG(hw, IXGBE_CLKTIML, clktiml); | ||
172 | IXGBE_WRITE_REG(hw, IXGBE_CLKTIMH, clktimh); | ||
173 | IXGBE_WRITE_REG(hw, IXGBE_TRGTTIML0, trgttiml); | ||
174 | IXGBE_WRITE_REG(hw, IXGBE_TRGTTIMH0, trgttimh); | ||
175 | |||
176 | IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp); | ||
177 | IXGBE_WRITE_REG(hw, IXGBE_TSAUXC, tsauxc); | ||
178 | } else { | ||
179 | IXGBE_WRITE_REG(hw, IXGBE_TSAUXC, 0x0); | ||
180 | } | ||
181 | |||
182 | IXGBE_WRITE_FLUSH(hw); | ||
183 | } | ||
184 | |||
185 | /** | ||
109 | * ixgbe_ptp_read - read raw cycle counter (to be used by time counter) | 186 | * ixgbe_ptp_read - read raw cycle counter (to be used by time counter) |
110 | * @cc: the cyclecounter structure | 187 | * @cc: the cyclecounter structure |
111 | * | 188 | * |
@@ -198,6 +275,9 @@ static int ixgbe_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) | |||
198 | now); | 275 | now); |
199 | 276 | ||
200 | spin_unlock_irqrestore(&adapter->tmreg_lock, flags); | 277 | spin_unlock_irqrestore(&adapter->tmreg_lock, flags); |
278 | |||
279 | ixgbe_ptp_setup_sdp(adapter); | ||
280 | |||
201 | return 0; | 281 | return 0; |
202 | } | 282 | } |
203 | 283 | ||
@@ -251,6 +331,7 @@ static int ixgbe_ptp_settime(struct ptp_clock_info *ptp, | |||
251 | timecounter_init(&adapter->tc, &adapter->cc, ns); | 331 | timecounter_init(&adapter->tc, &adapter->cc, ns); |
252 | spin_unlock_irqrestore(&adapter->tmreg_lock, flags); | 332 | spin_unlock_irqrestore(&adapter->tmreg_lock, flags); |
253 | 333 | ||
334 | ixgbe_ptp_setup_sdp(adapter); | ||
254 | return 0; | 335 | return 0; |
255 | } | 336 | } |
256 | 337 | ||
@@ -281,8 +362,9 @@ static int ixgbe_ptp_enable(struct ptp_clock_info *ptp, | |||
281 | if (on) | 362 | if (on) |
282 | adapter->flags2 |= IXGBE_FLAG2_PTP_PPS_ENABLED; | 363 | adapter->flags2 |= IXGBE_FLAG2_PTP_PPS_ENABLED; |
283 | else | 364 | else |
284 | adapter->flags2 &= | 365 | adapter->flags2 &= ~IXGBE_FLAG2_PTP_PPS_ENABLED; |
285 | ~IXGBE_FLAG2_PTP_PPS_ENABLED; | 366 | |
367 | ixgbe_ptp_setup_sdp(adapter); | ||
286 | return 0; | 368 | return 0; |
287 | default: | 369 | default: |
288 | break; | 370 | break; |
@@ -305,109 +387,15 @@ void ixgbe_ptp_check_pps_event(struct ixgbe_adapter *adapter, u32 eicr) | |||
305 | struct ixgbe_hw *hw = &adapter->hw; | 387 | struct ixgbe_hw *hw = &adapter->hw; |
306 | struct ptp_clock_event event; | 388 | struct ptp_clock_event event; |
307 | 389 | ||
308 | event.type = PTP_CLOCK_PPS; | ||
309 | |||
310 | /* Make sure ptp clock is valid, and PPS event enabled */ | ||
311 | if (!adapter->ptp_clock || | ||
312 | !(adapter->flags2 & IXGBE_FLAG2_PTP_PPS_ENABLED)) | ||
313 | return; | ||
314 | |||
315 | if (unlikely(eicr & IXGBE_EICR_TIMESYNC)) { | ||
316 | switch (hw->mac.type) { | ||
317 | case ixgbe_mac_X540: | ||
318 | ptp_clock_event(adapter->ptp_clock, &event); | ||
319 | break; | ||
320 | default: | ||
321 | break; | ||
322 | } | ||
323 | } | ||
324 | } | ||
325 | |||
326 | /** | ||
327 | * ixgbe_ptp_enable_sdp | ||
328 | * @hw: the hardware private structure | ||
329 | * @shift: the clock shift for calculating nanoseconds | ||
330 | * | ||
331 | * this function enables the clock out feature on the sdp0 for the | ||
332 | * X540 device. It will create a 1second periodic output that can be | ||
333 | * used as the PPS (via an interrupt). | ||
334 | * | ||
335 | * It calculates when the systime will be on an exact second, and then | ||
336 | * aligns the start of the PPS signal to that value. The shift is | ||
337 | * necessary because it can change based on the link speed. | ||
338 | */ | ||
339 | static void ixgbe_ptp_enable_sdp(struct ixgbe_hw *hw, int shift) | ||
340 | { | ||
341 | u32 esdp, tsauxc, clktiml, clktimh, trgttiml, trgttimh; | ||
342 | u64 clock_edge = 0; | ||
343 | u32 rem; | ||
344 | |||
345 | switch (hw->mac.type) { | 390 | switch (hw->mac.type) { |
346 | case ixgbe_mac_X540: | 391 | case ixgbe_mac_X540: |
347 | esdp = IXGBE_READ_REG(hw, IXGBE_ESDP); | 392 | ptp_clock_event(adapter->ptp_clock, &event); |
348 | |||
349 | /* | ||
350 | * enable the SDP0 pin as output, and connected to the native | ||
351 | * function for Timesync (ClockOut) | ||
352 | */ | ||
353 | esdp |= (IXGBE_ESDP_SDP0_DIR | | ||
354 | IXGBE_ESDP_SDP0_NATIVE); | ||
355 | |||
356 | /* | ||
357 | * enable the Clock Out feature on SDP0, and allow interrupts | ||
358 | * to occur when the pin changes | ||
359 | */ | ||
360 | tsauxc = (IXGBE_TSAUXC_EN_CLK | | ||
361 | IXGBE_TSAUXC_SYNCLK | | ||
362 | IXGBE_TSAUXC_SDP0_INT); | ||
363 | |||
364 | /* clock period (or pulse length) */ | ||
365 | clktiml = (u32)(NSECS_PER_SEC << shift); | ||
366 | clktimh = (u32)((NSECS_PER_SEC << shift) >> 32); | ||
367 | |||
368 | clock_edge |= (u64)IXGBE_READ_REG(hw, IXGBE_SYSTIML); | ||
369 | clock_edge |= (u64)IXGBE_READ_REG(hw, IXGBE_SYSTIMH) << 32; | ||
370 | |||
371 | /* | ||
372 | * account for the fact that we can't do u64 division | ||
373 | * with remainder, by converting the clock values into | ||
374 | * nanoseconds first | ||
375 | */ | ||
376 | clock_edge >>= shift; | ||
377 | div_u64_rem(clock_edge, NSECS_PER_SEC, &rem); | ||
378 | clock_edge += (NSECS_PER_SEC - rem); | ||
379 | clock_edge <<= shift; | ||
380 | |||
381 | /* specify the initial clock start time */ | ||
382 | trgttiml = (u32)clock_edge; | ||
383 | trgttimh = (u32)(clock_edge >> 32); | ||
384 | |||
385 | IXGBE_WRITE_REG(hw, IXGBE_CLKTIML, clktiml); | ||
386 | IXGBE_WRITE_REG(hw, IXGBE_CLKTIMH, clktimh); | ||
387 | IXGBE_WRITE_REG(hw, IXGBE_TRGTTIML0, trgttiml); | ||
388 | IXGBE_WRITE_REG(hw, IXGBE_TRGTTIMH0, trgttimh); | ||
389 | |||
390 | IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp); | ||
391 | IXGBE_WRITE_REG(hw, IXGBE_TSAUXC, tsauxc); | ||
392 | |||
393 | IXGBE_WRITE_REG(hw, IXGBE_EIMS, IXGBE_EICR_TIMESYNC); | ||
394 | break; | 393 | break; |
395 | default: | 394 | default: |
396 | break; | 395 | break; |
397 | } | 396 | } |
398 | } | 397 | } |
399 | 398 | ||
400 | /** | ||
401 | * ixgbe_ptp_disable_sdp | ||
402 | * @hw: the private hardware structure | ||
403 | * | ||
404 | * this function disables the auxiliary SDP clock out feature | ||
405 | */ | ||
406 | static void ixgbe_ptp_disable_sdp(struct ixgbe_hw *hw) | ||
407 | { | ||
408 | IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_EICR_TIMESYNC); | ||
409 | IXGBE_WRITE_REG(hw, IXGBE_TSAUXC, 0); | ||
410 | } | ||
411 | 399 | ||
412 | /** | 400 | /** |
413 | * ixgbe_ptp_overflow_check - delayed work to detect SYSTIME overflow | 401 | * ixgbe_ptp_overflow_check - delayed work to detect SYSTIME overflow |
@@ -822,9 +810,6 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter) | |||
822 | if (adapter->cycle_speed == cycle_speed && timinca) | 810 | if (adapter->cycle_speed == cycle_speed && timinca) |
823 | return; | 811 | return; |
824 | 812 | ||
825 | /* disable the SDP clock out */ | ||
826 | ixgbe_ptp_disable_sdp(hw); | ||
827 | |||
828 | /** | 813 | /** |
829 | * Scale the NIC cycle counter by a large factor so that | 814 | * Scale the NIC cycle counter by a large factor so that |
830 | * relatively small corrections to the frequency can be added | 815 | * relatively small corrections to the frequency can be added |
@@ -877,10 +862,6 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter) | |||
877 | IXGBE_WRITE_REG(hw, IXGBE_SYSTIMH, 0x00000000); | 862 | IXGBE_WRITE_REG(hw, IXGBE_SYSTIMH, 0x00000000); |
878 | IXGBE_WRITE_FLUSH(hw); | 863 | IXGBE_WRITE_FLUSH(hw); |
879 | 864 | ||
880 | /* now that the shift has been calculated and the systime | ||
881 | * registers reset, (re-)enable the Clock out feature*/ | ||
882 | ixgbe_ptp_enable_sdp(hw, shift); | ||
883 | |||
884 | /* store the new cycle speed */ | 865 | /* store the new cycle speed */ |
885 | adapter->cycle_speed = cycle_speed; | 866 | adapter->cycle_speed = cycle_speed; |
886 | 867 | ||
@@ -901,6 +882,12 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter) | |||
901 | ktime_to_ns(ktime_get_real())); | 882 | ktime_to_ns(ktime_get_real())); |
902 | 883 | ||
903 | spin_unlock_irqrestore(&adapter->tmreg_lock, flags); | 884 | spin_unlock_irqrestore(&adapter->tmreg_lock, flags); |
885 | |||
886 | /* | ||
887 | * Now that the shift has been calculated and the systime | ||
888 | * registers reset, (re-)enable the Clock out feature | ||
889 | */ | ||
890 | ixgbe_ptp_setup_sdp(adapter); | ||
904 | } | 891 | } |
905 | 892 | ||
906 | /** | 893 | /** |
@@ -979,10 +966,11 @@ void ixgbe_ptp_init(struct ixgbe_adapter *adapter) | |||
979 | */ | 966 | */ |
980 | void ixgbe_ptp_stop(struct ixgbe_adapter *adapter) | 967 | void ixgbe_ptp_stop(struct ixgbe_adapter *adapter) |
981 | { | 968 | { |
982 | ixgbe_ptp_disable_sdp(&adapter->hw); | ||
983 | |||
984 | /* stop the overflow check task */ | 969 | /* stop the overflow check task */ |
985 | adapter->flags2 &= ~IXGBE_FLAG2_OVERFLOW_CHECK_ENABLED; | 970 | adapter->flags2 &= ~(IXGBE_FLAG2_OVERFLOW_CHECK_ENABLED | |
971 | IXGBE_FLAG2_PTP_PPS_ENABLED); | ||
972 | |||
973 | ixgbe_ptp_setup_sdp(adapter); | ||
986 | 974 | ||
987 | if (adapter->ptp_clock) { | 975 | if (adapter->ptp_clock) { |
988 | ptp_clock_unregister(adapter->ptp_clock); | 976 | ptp_clock_unregister(adapter->ptp_clock); |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h index 400f86a31174..0722f3368092 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | |||
@@ -65,6 +65,7 @@ | |||
65 | #define IXGBE_DEV_ID_82599_LS 0x154F | 65 | #define IXGBE_DEV_ID_82599_LS 0x154F |
66 | #define IXGBE_DEV_ID_X540T 0x1528 | 66 | #define IXGBE_DEV_ID_X540T 0x1528 |
67 | #define IXGBE_DEV_ID_82599_SFP_SF_QP 0x154A | 67 | #define IXGBE_DEV_ID_82599_SFP_SF_QP 0x154A |
68 | #define IXGBE_DEV_ID_X540T1 0x1560 | ||
68 | 69 | ||
69 | /* VF Device IDs */ | 70 | /* VF Device IDs */ |
70 | #define IXGBE_DEV_ID_82599_VF 0x10ED | 71 | #define IXGBE_DEV_ID_82599_VF 0x10ED |
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig b/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig index bce01641ee6b..97302419a377 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig +++ b/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig | |||
@@ -26,7 +26,7 @@ if PCH_GBE | |||
26 | config PCH_PTP | 26 | config PCH_PTP |
27 | bool "PCH PTP clock support" | 27 | bool "PCH PTP clock support" |
28 | default n | 28 | default n |
29 | depends on PTP_1588_CLOCK_PCH | 29 | select PTP_1588_CLOCK_PCH |
30 | ---help--- | 30 | ---help--- |
31 | Say Y here if you want to use Precision Time Protocol (PTP) in the | 31 | Say Y here if you want to use Precision Time Protocol (PTP) in the |
32 | driver. PTP is a method to precisely synchronize distributed clocks | 32 | driver. PTP is a method to precisely synchronize distributed clocks |
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c index d15c888e9df8..49956730cd8d 100644 --- a/drivers/net/ethernet/ti/davinci_cpdma.c +++ b/drivers/net/ethernet/ti/davinci_cpdma.c | |||
@@ -863,6 +863,7 @@ int cpdma_chan_stop(struct cpdma_chan *chan) | |||
863 | 863 | ||
864 | next_dma = desc_read(desc, hw_next); | 864 | next_dma = desc_read(desc, hw_next); |
865 | chan->head = desc_from_phys(pool, next_dma); | 865 | chan->head = desc_from_phys(pool, next_dma); |
866 | chan->count--; | ||
866 | chan->stats.teardown_dequeue++; | 867 | chan->stats.teardown_dequeue++; |
867 | 868 | ||
868 | /* issue callback without locks held */ | 869 | /* issue callback without locks held */ |
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 5c7547c4f802..d44cca327588 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c | |||
@@ -1315,6 +1315,7 @@ static const struct team_option team_options[] = { | |||
1315 | 1315 | ||
1316 | static struct lock_class_key team_netdev_xmit_lock_key; | 1316 | static struct lock_class_key team_netdev_xmit_lock_key; |
1317 | static struct lock_class_key team_netdev_addr_lock_key; | 1317 | static struct lock_class_key team_netdev_addr_lock_key; |
1318 | static struct lock_class_key team_tx_busylock_key; | ||
1318 | 1319 | ||
1319 | static void team_set_lockdep_class_one(struct net_device *dev, | 1320 | static void team_set_lockdep_class_one(struct net_device *dev, |
1320 | struct netdev_queue *txq, | 1321 | struct netdev_queue *txq, |
@@ -1327,6 +1328,7 @@ static void team_set_lockdep_class(struct net_device *dev) | |||
1327 | { | 1328 | { |
1328 | lockdep_set_class(&dev->addr_list_lock, &team_netdev_addr_lock_key); | 1329 | lockdep_set_class(&dev->addr_list_lock, &team_netdev_addr_lock_key); |
1329 | netdev_for_each_tx_queue(dev, team_set_lockdep_class_one, NULL); | 1330 | netdev_for_each_tx_queue(dev, team_set_lockdep_class_one, NULL); |
1331 | dev->qdisc_tx_busylock = &team_tx_busylock_key; | ||
1330 | } | 1332 | } |
1331 | 1333 | ||
1332 | static int team_init(struct net_device *dev) | 1334 | static int team_init(struct net_device *dev) |
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index 926142ed8d7a..9497be1ad4c0 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h | |||
@@ -102,6 +102,7 @@ struct fib_info { | |||
102 | unsigned char fib_dead; | 102 | unsigned char fib_dead; |
103 | unsigned char fib_protocol; | 103 | unsigned char fib_protocol; |
104 | unsigned char fib_scope; | 104 | unsigned char fib_scope; |
105 | unsigned char fib_type; | ||
105 | __be32 fib_prefsrc; | 106 | __be32 fib_prefsrc; |
106 | u32 fib_priority; | 107 | u32 fib_priority; |
107 | u32 *fib_metrics; | 108 | u32 *fib_metrics; |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 0fef00f5d3ce..64158aa1bb5f 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -1068,7 +1068,7 @@ void sctp_outq_init(struct sctp_association *, struct sctp_outq *); | |||
1068 | void sctp_outq_teardown(struct sctp_outq *); | 1068 | void sctp_outq_teardown(struct sctp_outq *); |
1069 | void sctp_outq_free(struct sctp_outq*); | 1069 | void sctp_outq_free(struct sctp_outq*); |
1070 | int sctp_outq_tail(struct sctp_outq *, struct sctp_chunk *chunk); | 1070 | int sctp_outq_tail(struct sctp_outq *, struct sctp_chunk *chunk); |
1071 | int sctp_outq_sack(struct sctp_outq *, struct sctp_sackhdr *); | 1071 | int sctp_outq_sack(struct sctp_outq *, struct sctp_chunk *); |
1072 | int sctp_outq_is_empty(const struct sctp_outq *); | 1072 | int sctp_outq_is_empty(const struct sctp_outq *); |
1073 | void sctp_outq_restart(struct sctp_outq *); | 1073 | void sctp_outq_restart(struct sctp_outq *); |
1074 | 1074 | ||
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c index b258da88f675..add69d0fd99d 100644 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c | |||
@@ -105,7 +105,6 @@ static struct sk_buff *vlan_reorder_header(struct sk_buff *skb) | |||
105 | return NULL; | 105 | return NULL; |
106 | memmove(skb->data - ETH_HLEN, skb->data - VLAN_ETH_HLEN, 2 * ETH_ALEN); | 106 | memmove(skb->data - ETH_HLEN, skb->data - VLAN_ETH_HLEN, 2 * ETH_ALEN); |
107 | skb->mac_header += VLAN_HLEN; | 107 | skb->mac_header += VLAN_HLEN; |
108 | skb_reset_mac_len(skb); | ||
109 | return skb; | 108 | return skb; |
110 | } | 109 | } |
111 | 110 | ||
@@ -139,6 +138,8 @@ struct sk_buff *vlan_untag(struct sk_buff *skb) | |||
139 | 138 | ||
140 | skb_reset_network_header(skb); | 139 | skb_reset_network_header(skb); |
141 | skb_reset_transport_header(skb); | 140 | skb_reset_transport_header(skb); |
141 | skb_reset_mac_len(skb); | ||
142 | |||
142 | return skb; | 143 | return skb; |
143 | 144 | ||
144 | err_free: | 145 | err_free: |
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index 3509065e409a..267753060ffc 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c | |||
@@ -314,6 +314,7 @@ static struct fib_info *fib_find_info(const struct fib_info *nfi) | |||
314 | nfi->fib_scope == fi->fib_scope && | 314 | nfi->fib_scope == fi->fib_scope && |
315 | nfi->fib_prefsrc == fi->fib_prefsrc && | 315 | nfi->fib_prefsrc == fi->fib_prefsrc && |
316 | nfi->fib_priority == fi->fib_priority && | 316 | nfi->fib_priority == fi->fib_priority && |
317 | nfi->fib_type == fi->fib_type && | ||
317 | memcmp(nfi->fib_metrics, fi->fib_metrics, | 318 | memcmp(nfi->fib_metrics, fi->fib_metrics, |
318 | sizeof(u32) * RTAX_MAX) == 0 && | 319 | sizeof(u32) * RTAX_MAX) == 0 && |
319 | ((nfi->fib_flags ^ fi->fib_flags) & ~RTNH_F_DEAD) == 0 && | 320 | ((nfi->fib_flags ^ fi->fib_flags) & ~RTNH_F_DEAD) == 0 && |
@@ -833,6 +834,7 @@ struct fib_info *fib_create_info(struct fib_config *cfg) | |||
833 | fi->fib_flags = cfg->fc_flags; | 834 | fi->fib_flags = cfg->fc_flags; |
834 | fi->fib_priority = cfg->fc_priority; | 835 | fi->fib_priority = cfg->fc_priority; |
835 | fi->fib_prefsrc = cfg->fc_prefsrc; | 836 | fi->fib_prefsrc = cfg->fc_prefsrc; |
837 | fi->fib_type = cfg->fc_type; | ||
836 | 838 | ||
837 | fi->fib_nhs = nhs; | 839 | fi->fib_nhs = nhs; |
838 | change_nexthops(fi) { | 840 | change_nexthops(fi) { |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 480e68422efb..d7c56f8a5b4e 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -1769,14 +1769,6 @@ static void sit_route_add(struct net_device *dev) | |||
1769 | } | 1769 | } |
1770 | #endif | 1770 | #endif |
1771 | 1771 | ||
1772 | static void addrconf_add_lroute(struct net_device *dev) | ||
1773 | { | ||
1774 | struct in6_addr addr; | ||
1775 | |||
1776 | ipv6_addr_set(&addr, htonl(0xFE800000), 0, 0, 0); | ||
1777 | addrconf_prefix_route(&addr, 64, dev, 0, 0); | ||
1778 | } | ||
1779 | |||
1780 | static struct inet6_dev *addrconf_add_dev(struct net_device *dev) | 1772 | static struct inet6_dev *addrconf_add_dev(struct net_device *dev) |
1781 | { | 1773 | { |
1782 | struct inet6_dev *idev; | 1774 | struct inet6_dev *idev; |
@@ -1794,8 +1786,6 @@ static struct inet6_dev *addrconf_add_dev(struct net_device *dev) | |||
1794 | if (!(dev->flags & IFF_LOOPBACK)) | 1786 | if (!(dev->flags & IFF_LOOPBACK)) |
1795 | addrconf_add_mroute(dev); | 1787 | addrconf_add_mroute(dev); |
1796 | 1788 | ||
1797 | /* Add link local route */ | ||
1798 | addrconf_add_lroute(dev); | ||
1799 | return idev; | 1789 | return idev; |
1800 | } | 1790 | } |
1801 | 1791 | ||
@@ -2474,10 +2464,9 @@ static void addrconf_sit_config(struct net_device *dev) | |||
2474 | 2464 | ||
2475 | sit_add_v4_addrs(idev); | 2465 | sit_add_v4_addrs(idev); |
2476 | 2466 | ||
2477 | if (dev->flags&IFF_POINTOPOINT) { | 2467 | if (dev->flags&IFF_POINTOPOINT) |
2478 | addrconf_add_mroute(dev); | 2468 | addrconf_add_mroute(dev); |
2479 | addrconf_add_lroute(dev); | 2469 | else |
2480 | } else | ||
2481 | sit_route_add(dev); | 2470 | sit_route_add(dev); |
2482 | } | 2471 | } |
2483 | #endif | 2472 | #endif |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index d1ddbc6ddac5..7c7e963260e1 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -1593,17 +1593,18 @@ static int __ip6_del_rt(struct rt6_info *rt, struct nl_info *info) | |||
1593 | struct fib6_table *table; | 1593 | struct fib6_table *table; |
1594 | struct net *net = dev_net(rt->dst.dev); | 1594 | struct net *net = dev_net(rt->dst.dev); |
1595 | 1595 | ||
1596 | if (rt == net->ipv6.ip6_null_entry) | 1596 | if (rt == net->ipv6.ip6_null_entry) { |
1597 | return -ENOENT; | 1597 | err = -ENOENT; |
1598 | goto out; | ||
1599 | } | ||
1598 | 1600 | ||
1599 | table = rt->rt6i_table; | 1601 | table = rt->rt6i_table; |
1600 | write_lock_bh(&table->tb6_lock); | 1602 | write_lock_bh(&table->tb6_lock); |
1601 | |||
1602 | err = fib6_del(rt, info); | 1603 | err = fib6_del(rt, info); |
1603 | dst_release(&rt->dst); | ||
1604 | |||
1605 | write_unlock_bh(&table->tb6_lock); | 1604 | write_unlock_bh(&table->tb6_lock); |
1606 | 1605 | ||
1606 | out: | ||
1607 | dst_release(&rt->dst); | ||
1607 | return err; | 1608 | return err; |
1608 | } | 1609 | } |
1609 | 1610 | ||
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index bb738c9f9146..b833677d83d6 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c | |||
@@ -468,7 +468,7 @@ static int irda_open_tsap(struct irda_sock *self, __u8 tsap_sel, char *name) | |||
468 | notify_t notify; | 468 | notify_t notify; |
469 | 469 | ||
470 | if (self->tsap) { | 470 | if (self->tsap) { |
471 | IRDA_WARNING("%s: busy!\n", __func__); | 471 | IRDA_DEBUG(0, "%s: busy!\n", __func__); |
472 | return -EBUSY; | 472 | return -EBUSY; |
473 | } | 473 | } |
474 | 474 | ||
diff --git a/net/irda/irttp.c b/net/irda/irttp.c index 5c93f2952b08..1002e3396f72 100644 --- a/net/irda/irttp.c +++ b/net/irda/irttp.c | |||
@@ -440,7 +440,7 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, notify_t *notify) | |||
440 | */ | 440 | */ |
441 | lsap = irlmp_open_lsap(stsap_sel, &ttp_notify, 0); | 441 | lsap = irlmp_open_lsap(stsap_sel, &ttp_notify, 0); |
442 | if (lsap == NULL) { | 442 | if (lsap == NULL) { |
443 | IRDA_WARNING("%s: unable to allocate LSAP!!\n", __func__); | 443 | IRDA_DEBUG(0, "%s: unable to allocate LSAP!!\n", __func__); |
444 | return NULL; | 444 | return NULL; |
445 | } | 445 | } |
446 | 446 | ||
diff --git a/net/nfc/llcp/sock.c b/net/nfc/llcp/sock.c index 40f056debf9a..63e4cdc92376 100644 --- a/net/nfc/llcp/sock.c +++ b/net/nfc/llcp/sock.c | |||
@@ -497,15 +497,11 @@ static int llcp_sock_connect(struct socket *sock, struct sockaddr *_addr, | |||
497 | pr_debug("sock %p sk %p flags 0x%x\n", sock, sk, flags); | 497 | pr_debug("sock %p sk %p flags 0x%x\n", sock, sk, flags); |
498 | 498 | ||
499 | if (!addr || len < sizeof(struct sockaddr_nfc) || | 499 | if (!addr || len < sizeof(struct sockaddr_nfc) || |
500 | addr->sa_family != AF_NFC) { | 500 | addr->sa_family != AF_NFC) |
501 | pr_err("Invalid socket\n"); | ||
502 | return -EINVAL; | 501 | return -EINVAL; |
503 | } | ||
504 | 502 | ||
505 | if (addr->service_name_len == 0 && addr->dsap == 0) { | 503 | if (addr->service_name_len == 0 && addr->dsap == 0) |
506 | pr_err("Missing service name or dsap\n"); | ||
507 | return -EINVAL; | 504 | return -EINVAL; |
508 | } | ||
509 | 505 | ||
510 | pr_debug("addr dev_idx=%u target_idx=%u protocol=%u\n", addr->dev_idx, | 506 | pr_debug("addr dev_idx=%u target_idx=%u protocol=%u\n", addr->dev_idx, |
511 | addr->target_idx, addr->nfc_protocol); | 507 | addr->target_idx, addr->nfc_protocol); |
diff --git a/net/sctp/input.c b/net/sctp/input.c index 25dfe7380479..8bd3c279427e 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c | |||
@@ -68,8 +68,8 @@ | |||
68 | static int sctp_rcv_ootb(struct sk_buff *); | 68 | static int sctp_rcv_ootb(struct sk_buff *); |
69 | static struct sctp_association *__sctp_rcv_lookup(struct net *net, | 69 | static struct sctp_association *__sctp_rcv_lookup(struct net *net, |
70 | struct sk_buff *skb, | 70 | struct sk_buff *skb, |
71 | const union sctp_addr *laddr, | ||
72 | const union sctp_addr *paddr, | 71 | const union sctp_addr *paddr, |
72 | const union sctp_addr *laddr, | ||
73 | struct sctp_transport **transportp); | 73 | struct sctp_transport **transportp); |
74 | static struct sctp_endpoint *__sctp_rcv_lookup_endpoint(struct net *net, | 74 | static struct sctp_endpoint *__sctp_rcv_lookup_endpoint(struct net *net, |
75 | const union sctp_addr *laddr); | 75 | const union sctp_addr *laddr); |
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index d16632e1503a..1b4a7f8ec3fd 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c | |||
@@ -63,6 +63,7 @@ static int sctp_acked(struct sctp_sackhdr *sack, __u32 tsn); | |||
63 | static void sctp_check_transmitted(struct sctp_outq *q, | 63 | static void sctp_check_transmitted(struct sctp_outq *q, |
64 | struct list_head *transmitted_queue, | 64 | struct list_head *transmitted_queue, |
65 | struct sctp_transport *transport, | 65 | struct sctp_transport *transport, |
66 | union sctp_addr *saddr, | ||
66 | struct sctp_sackhdr *sack, | 67 | struct sctp_sackhdr *sack, |
67 | __u32 *highest_new_tsn); | 68 | __u32 *highest_new_tsn); |
68 | 69 | ||
@@ -1139,9 +1140,10 @@ static void sctp_sack_update_unack_data(struct sctp_association *assoc, | |||
1139 | * Process the SACK against the outqueue. Mostly, this just frees | 1140 | * Process the SACK against the outqueue. Mostly, this just frees |
1140 | * things off the transmitted queue. | 1141 | * things off the transmitted queue. |
1141 | */ | 1142 | */ |
1142 | int sctp_outq_sack(struct sctp_outq *q, struct sctp_sackhdr *sack) | 1143 | int sctp_outq_sack(struct sctp_outq *q, struct sctp_chunk *chunk) |
1143 | { | 1144 | { |
1144 | struct sctp_association *asoc = q->asoc; | 1145 | struct sctp_association *asoc = q->asoc; |
1146 | struct sctp_sackhdr *sack = chunk->subh.sack_hdr; | ||
1145 | struct sctp_transport *transport; | 1147 | struct sctp_transport *transport; |
1146 | struct sctp_chunk *tchunk = NULL; | 1148 | struct sctp_chunk *tchunk = NULL; |
1147 | struct list_head *lchunk, *transport_list, *temp; | 1149 | struct list_head *lchunk, *transport_list, *temp; |
@@ -1210,7 +1212,7 @@ int sctp_outq_sack(struct sctp_outq *q, struct sctp_sackhdr *sack) | |||
1210 | /* Run through the retransmit queue. Credit bytes received | 1212 | /* Run through the retransmit queue. Credit bytes received |
1211 | * and free those chunks that we can. | 1213 | * and free those chunks that we can. |
1212 | */ | 1214 | */ |
1213 | sctp_check_transmitted(q, &q->retransmit, NULL, sack, &highest_new_tsn); | 1215 | sctp_check_transmitted(q, &q->retransmit, NULL, NULL, sack, &highest_new_tsn); |
1214 | 1216 | ||
1215 | /* Run through the transmitted queue. | 1217 | /* Run through the transmitted queue. |
1216 | * Credit bytes received and free those chunks which we can. | 1218 | * Credit bytes received and free those chunks which we can. |
@@ -1219,7 +1221,8 @@ int sctp_outq_sack(struct sctp_outq *q, struct sctp_sackhdr *sack) | |||
1219 | */ | 1221 | */ |
1220 | list_for_each_entry(transport, transport_list, transports) { | 1222 | list_for_each_entry(transport, transport_list, transports) { |
1221 | sctp_check_transmitted(q, &transport->transmitted, | 1223 | sctp_check_transmitted(q, &transport->transmitted, |
1222 | transport, sack, &highest_new_tsn); | 1224 | transport, &chunk->source, sack, |
1225 | &highest_new_tsn); | ||
1223 | /* | 1226 | /* |
1224 | * SFR-CACC algorithm: | 1227 | * SFR-CACC algorithm: |
1225 | * C) Let count_of_newacks be the number of | 1228 | * C) Let count_of_newacks be the number of |
@@ -1326,6 +1329,7 @@ int sctp_outq_is_empty(const struct sctp_outq *q) | |||
1326 | static void sctp_check_transmitted(struct sctp_outq *q, | 1329 | static void sctp_check_transmitted(struct sctp_outq *q, |
1327 | struct list_head *transmitted_queue, | 1330 | struct list_head *transmitted_queue, |
1328 | struct sctp_transport *transport, | 1331 | struct sctp_transport *transport, |
1332 | union sctp_addr *saddr, | ||
1329 | struct sctp_sackhdr *sack, | 1333 | struct sctp_sackhdr *sack, |
1330 | __u32 *highest_new_tsn_in_sack) | 1334 | __u32 *highest_new_tsn_in_sack) |
1331 | { | 1335 | { |
@@ -1633,8 +1637,9 @@ static void sctp_check_transmitted(struct sctp_outq *q, | |||
1633 | /* Mark the destination transport address as | 1637 | /* Mark the destination transport address as |
1634 | * active if it is not so marked. | 1638 | * active if it is not so marked. |
1635 | */ | 1639 | */ |
1636 | if ((transport->state == SCTP_INACTIVE) || | 1640 | if ((transport->state == SCTP_INACTIVE || |
1637 | (transport->state == SCTP_UNCONFIRMED)) { | 1641 | transport->state == SCTP_UNCONFIRMED) && |
1642 | sctp_cmp_addr_exact(&transport->ipaddr, saddr)) { | ||
1638 | sctp_assoc_control_transport( | 1643 | sctp_assoc_control_transport( |
1639 | transport->asoc, | 1644 | transport->asoc, |
1640 | transport, | 1645 | transport, |
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index bcfebb91559d..57f7de839b03 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c | |||
@@ -752,11 +752,11 @@ static void sctp_cmd_transport_on(sctp_cmd_seq_t *cmds, | |||
752 | /* Helper function to process the process SACK command. */ | 752 | /* Helper function to process the process SACK command. */ |
753 | static int sctp_cmd_process_sack(sctp_cmd_seq_t *cmds, | 753 | static int sctp_cmd_process_sack(sctp_cmd_seq_t *cmds, |
754 | struct sctp_association *asoc, | 754 | struct sctp_association *asoc, |
755 | struct sctp_sackhdr *sackh) | 755 | struct sctp_chunk *chunk) |
756 | { | 756 | { |
757 | int err = 0; | 757 | int err = 0; |
758 | 758 | ||
759 | if (sctp_outq_sack(&asoc->outqueue, sackh)) { | 759 | if (sctp_outq_sack(&asoc->outqueue, chunk)) { |
760 | struct net *net = sock_net(asoc->base.sk); | 760 | struct net *net = sock_net(asoc->base.sk); |
761 | 761 | ||
762 | /* There are no more TSNs awaiting SACK. */ | 762 | /* There are no more TSNs awaiting SACK. */ |
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 094813b6c3c3..b6adef8a1e93 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -3179,7 +3179,7 @@ sctp_disposition_t sctp_sf_eat_sack_6_2(struct net *net, | |||
3179 | return sctp_sf_violation_ctsn(net, ep, asoc, type, arg, commands); | 3179 | return sctp_sf_violation_ctsn(net, ep, asoc, type, arg, commands); |
3180 | 3180 | ||
3181 | /* Return this SACK for further processing. */ | 3181 | /* Return this SACK for further processing. */ |
3182 | sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_SACK, SCTP_SACKH(sackh)); | 3182 | sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_SACK, SCTP_CHUNK(chunk)); |
3183 | 3183 | ||
3184 | /* Note: We do the rest of the work on the PROCESS_SACK | 3184 | /* Note: We do the rest of the work on the PROCESS_SACK |
3185 | * sideeffect. | 3185 | * sideeffect. |
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 09dc5b97e079..fd5f042dbff4 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -220,6 +220,7 @@ static int tipc_create(struct net *net, struct socket *sock, int protocol, | |||
220 | 220 | ||
221 | sock_init_data(sock, sk); | 221 | sock_init_data(sock, sk); |
222 | sk->sk_backlog_rcv = backlog_rcv; | 222 | sk->sk_backlog_rcv = backlog_rcv; |
223 | sk->sk_rcvbuf = TIPC_FLOW_CONTROL_WIN * 2 * TIPC_MAX_USER_MSG_SIZE * 2; | ||
223 | tipc_sk(sk)->p = tp_ptr; | 224 | tipc_sk(sk)->p = tp_ptr; |
224 | tipc_sk(sk)->conn_timeout = CONN_TIMEOUT_DEFAULT; | 225 | tipc_sk(sk)->conn_timeout = CONN_TIMEOUT_DEFAULT; |
225 | 226 | ||