Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
IB/iser: Add dependency on INFINIBAND_ADDR_TRANS
IPoIB: Do not join broadcast group if interface is brought down
RDMA/nes: Fix for NIPQUAD removal
IPoIB: Fix loss of connectivity after bonding failover on both sides
IB/mlx4: Don't register IB device for adapters with no IB ports
mlx4_core: Fix warning from min()
IB/ehca: spin_lock_irqsave() takes an unsigned long

+47 -31
+1 -1
drivers/infiniband/hw/ehca/ehca_main.c
··· 955 955 struct ehca_eq *eq = &shca->eq; 956 956 int max = 3; 957 957 volatile u64 q_ofs, q_ofs2; 958 - u64 flags; 958 + unsigned long flags; 959 959 spin_lock_irqsave(&eq->spinlock, flags); 960 960 q_ofs = eq->ipz_queue.current_q_offset; 961 961 spin_unlock_irqrestore(&eq->spinlock, flags);
+9 -4
drivers/infiniband/hw/mlx4/main.c
··· 543 543 { 544 544 static int mlx4_ib_version_printed; 545 545 struct mlx4_ib_dev *ibdev; 546 + int num_ports = 0; 546 547 int i; 547 - 548 548 549 549 if (!mlx4_ib_version_printed) { 550 550 printk(KERN_INFO "%s", mlx4_ib_version); 551 551 ++mlx4_ib_version_printed; 552 552 } 553 + 554 + mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_IB) 555 + num_ports++; 556 + 557 + /* No point in registering a device with no ports... */ 558 + if (num_ports == 0) 559 + return NULL; 553 560 554 561 ibdev = (struct mlx4_ib_dev *) ib_alloc_device(sizeof *ibdev); 555 562 if (!ibdev) { ··· 581 574 ibdev->ib_dev.owner = THIS_MODULE; 582 575 ibdev->ib_dev.node_type = RDMA_NODE_IB_CA; 583 576 ibdev->ib_dev.local_dma_lkey = dev->caps.reserved_lkey; 584 - ibdev->num_ports = 0; 585 - mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_IB) 586 - ibdev->num_ports++; 577 + ibdev->num_ports = num_ports; 587 578 ibdev->ib_dev.phys_port_cnt = ibdev->num_ports; 588 579 ibdev->ib_dev.num_comp_vectors = dev->caps.num_comp_vectors; 589 580 ibdev->ib_dev.dma_device = &dev->pdev->dev;
+9 -3
drivers/infiniband/hw/nes/nes_cm.c
··· 778 778 unsigned long flags; 779 779 struct list_head *hte; 780 780 struct nes_cm_node *cm_node; 781 + __be32 tmp_addr = cpu_to_be32(loc_addr); 781 782 782 783 /* get a handle on the hte */ 783 784 hte = &cm_core->connected_nodes; 784 785 785 786 nes_debug(NES_DBG_CM, "Searching for an owner node: %pI4:%x from core %p->%p\n", 786 - &loc_addr, loc_port, cm_core, hte); 787 + &tmp_addr, loc_port, cm_core, hte); 787 788 788 789 /* walk list and find cm_node associated with this session ID */ 789 790 spin_lock_irqsave(&cm_core->ht_lock, flags); ··· 817 816 { 818 817 unsigned long flags; 819 818 struct nes_cm_listener *listen_node; 819 + __be32 tmp_addr = cpu_to_be32(dst_addr); 820 820 821 821 /* walk list and find cm_node associated with this session ID */ 822 822 spin_lock_irqsave(&cm_core->listen_list_lock, flags); ··· 835 833 spin_unlock_irqrestore(&cm_core->listen_list_lock, flags); 836 834 837 835 nes_debug(NES_DBG_CM, "Unable to find listener for %pI4:%x\n", 838 - &dst_addr, dst_port); 836 + &tmp_addr, dst_port); 839 837 840 838 /* no listener */ 841 839 return NULL; ··· 2061 2059 struct tcphdr *tcph; 2062 2060 struct nes_cm_info nfo; 2063 2061 int skb_handled = 1; 2062 + __be32 tmp_daddr, tmp_saddr; 2064 2063 2065 2064 if (!skb) 2066 2065 return 0; ··· 2077 2074 nfo.rem_addr = ntohl(iph->saddr); 2078 2075 nfo.rem_port = ntohs(tcph->source); 2079 2076 2077 + tmp_daddr = cpu_to_be32(iph->daddr); 2078 + tmp_saddr = cpu_to_be32(iph->saddr); 2079 + 2080 2080 nes_debug(NES_DBG_CM, "Received packet: dest=%pI4:0x%04X src=%pI4:0x%04X\n", 2081 - &iph->daddr, tcph->dest, &iph->saddr, tcph->source); 2081 + &tmp_daddr, tcph->dest, &tmp_saddr, tcph->source); 2082 2082 2083 2083 do { 2084 2084 cm_node = find_node(cm_core,
+3 -1
drivers/infiniband/hw/nes/nes_utils.c
··· 655 655 struct nes_adapter *nesadapter = nesdev->nesadapter; 656 656 int arp_index; 657 657 int err = 0; 658 + __be32 tmp_addr; 658 659 659 660 for (arp_index = 0; (u32) arp_index < nesadapter->arp_table_size; arp_index++) { 660 661 if (nesadapter->arp_table[arp_index].ip_addr == ip_addr) ··· 683 682 684 683 /* DELETE or RESOLVE */ 685 684 if (arp_index == nesadapter->arp_table_size) { 685 + tmp_addr = cpu_to_be32(ip_addr); 686 686 nes_debug(NES_DBG_NETDEV, "MAC for %pI4 not in ARP table - cannot %s\n", 687 - &ip_addr, action == NES_ARP_RESOLVE ? "resolve" : "delete"); 687 + &tmp_addr, action == NES_ARP_RESOLVE ? "resolve" : "delete"); 688 688 return -1; 689 689 } 690 690
+19 -19
drivers/infiniband/ulp/ipoib/ipoib_main.c
··· 711 711 712 712 neigh = *to_ipoib_neigh(skb->dst->neighbour); 713 713 714 - if (neigh->ah) 715 - if (unlikely((memcmp(&neigh->dgid.raw, 716 - skb->dst->neighbour->ha + 4, 717 - sizeof(union ib_gid))) || 718 - (neigh->dev != dev))) { 719 - spin_lock_irqsave(&priv->lock, flags); 720 - /* 721 - * It's safe to call ipoib_put_ah() inside 722 - * priv->lock here, because we know that 723 - * path->ah will always hold one more reference, 724 - * so ipoib_put_ah() will never do more than 725 - * decrement the ref count. 726 - */ 714 + if (unlikely((memcmp(&neigh->dgid.raw, 715 + skb->dst->neighbour->ha + 4, 716 + sizeof(union ib_gid))) || 717 + (neigh->dev != dev))) { 718 + spin_lock_irqsave(&priv->lock, flags); 719 + /* 720 + * It's safe to call ipoib_put_ah() inside 721 + * priv->lock here, because we know that 722 + * path->ah will always hold one more reference, 723 + * so ipoib_put_ah() will never do more than 724 + * decrement the ref count. 725 + */ 726 + if (neigh->ah) 727 727 ipoib_put_ah(neigh->ah); 728 - list_del(&neigh->list); 729 - ipoib_neigh_free(dev, neigh); 730 - spin_unlock_irqrestore(&priv->lock, flags); 731 - ipoib_path_lookup(skb, dev); 732 - return NETDEV_TX_OK; 733 - } 728 + list_del(&neigh->list); 729 + ipoib_neigh_free(dev, neigh); 730 + spin_unlock_irqrestore(&priv->lock, flags); 731 + ipoib_path_lookup(skb, dev); 732 + return NETDEV_TX_OK; 733 + } 734 734 735 735 if (ipoib_cm_get(neigh)) { 736 736 if (ipoib_cm_up(neigh)) {
+3
drivers/infiniband/ulp/ipoib/ipoib_multicast.c
··· 529 529 if (!priv->broadcast) { 530 530 struct ipoib_mcast *broadcast; 531 531 532 + if (!test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags)) 533 + return; 534 + 532 535 broadcast = ipoib_mcast_alloc(dev, 1); 533 536 if (!broadcast) { 534 537 ipoib_warn(priv, "failed to allocate broadcast group\n");
+1 -1
drivers/infiniband/ulp/iser/Kconfig
··· 1 1 config INFINIBAND_ISER 2 2 tristate "iSCSI Extensions for RDMA (iSER)" 3 - depends on SCSI && INET 3 + depends on SCSI && INET && INFINIBAND_ADDR_TRANS 4 4 select SCSI_ISCSI_ATTRS 5 5 ---help--- 6 6 Support for the iSCSI Extensions for RDMA (iSER) Protocol
+2 -2
drivers/net/mlx4/main.c
··· 912 912 int i; 913 913 914 914 if (msi_x) { 915 - nreq = min(dev->caps.num_eqs - dev->caps.reserved_eqs, 916 - num_possible_cpus() + 1); 915 + nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs, 916 + num_possible_cpus() + 1); 917 917 entries = kcalloc(nreq, sizeof *entries, GFP_KERNEL); 918 918 if (!entries) 919 919 goto no_msi;