diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-13 17:38:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-13 17:38:31 -0500 |
commit | 122ce878dc189860a380539bde19498bf93443a7 (patch) | |
tree | 8414acd7b686ad4af6b16d0952823f07a12f2522 /drivers/infiniband/hw | |
parent | daf9fe2ee9a203c4fc555cfe5c5f3d9f660e743c (diff) | |
parent | 0636b33c5f2fac4e274464ae6867805f080fc433 (diff) |
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:
RDMA/nes: Fix CX4 link problem in back-to-back configuration
RDMA/nes: Clear stall bit before destroying NIC QP
RDMA/nes: Set assume_aligned_header bit
RDMA/cxgb3: Wait at least one schedule cycle during device removal
IB/mad: Ignore iWARP devices on device removal
IPoIB: Include return code in trace message for ib_post_send() failures
IPoIB: Fix TX queue lockup with mixed UD/CM traffic
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_hw.c | 8 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_hw.h | 1 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_nic.c | 30 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_verbs.c | 1 |
5 files changed, 40 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch.c b/drivers/infiniband/hw/cxgb3/iwch.c index ee1d8b4d4541..63f975f3e30f 100644 --- a/drivers/infiniband/hw/cxgb3/iwch.c +++ b/drivers/infiniband/hw/cxgb3/iwch.c | |||
@@ -189,6 +189,7 @@ static void close_rnic_dev(struct t3cdev *tdev) | |||
189 | list_for_each_entry_safe(dev, tmp, &dev_list, entry) { | 189 | list_for_each_entry_safe(dev, tmp, &dev_list, entry) { |
190 | if (dev->rdev.t3cdev_p == tdev) { | 190 | if (dev->rdev.t3cdev_p == tdev) { |
191 | dev->rdev.flags = CXIO_ERROR_FATAL; | 191 | dev->rdev.flags = CXIO_ERROR_FATAL; |
192 | synchronize_net(); | ||
192 | cancel_delayed_work_sync(&dev->db_drop_task); | 193 | cancel_delayed_work_sync(&dev->db_drop_task); |
193 | list_del(&dev->entry); | 194 | list_del(&dev->entry); |
194 | iwch_unregister_device(dev); | 195 | iwch_unregister_device(dev); |
@@ -217,6 +218,7 @@ static void iwch_event_handler(struct t3cdev *tdev, u32 evt, u32 port_id) | |||
217 | switch (evt) { | 218 | switch (evt) { |
218 | case OFFLOAD_STATUS_DOWN: { | 219 | case OFFLOAD_STATUS_DOWN: { |
219 | rdev->flags = CXIO_ERROR_FATAL; | 220 | rdev->flags = CXIO_ERROR_FATAL; |
221 | synchronize_net(); | ||
220 | event.event = IB_EVENT_DEVICE_FATAL; | 222 | event.event = IB_EVENT_DEVICE_FATAL; |
221 | dispatch = 1; | 223 | dispatch = 1; |
222 | break; | 224 | break; |
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c index ce7f53833577..925075557dc2 100644 --- a/drivers/infiniband/hw/nes/nes_hw.c +++ b/drivers/infiniband/hw/nes/nes_hw.c | |||
@@ -1899,9 +1899,14 @@ void nes_destroy_nic_qp(struct nes_vnic *nesvnic) | |||
1899 | u16 wqe_fragment_index; | 1899 | u16 wqe_fragment_index; |
1900 | u64 wqe_frag; | 1900 | u64 wqe_frag; |
1901 | u32 cqp_head; | 1901 | u32 cqp_head; |
1902 | u32 wqm_cfg0; | ||
1902 | unsigned long flags; | 1903 | unsigned long flags; |
1903 | int ret; | 1904 | int ret; |
1904 | 1905 | ||
1906 | /* clear wqe stall before destroying NIC QP */ | ||
1907 | wqm_cfg0 = nes_read_indexed(nesdev, NES_IDX_WQM_CONFIG0); | ||
1908 | nes_write_indexed(nesdev, NES_IDX_WQM_CONFIG0, wqm_cfg0 & 0xFFFF7FFF); | ||
1909 | |||
1905 | /* Free remaining NIC receive buffers */ | 1910 | /* Free remaining NIC receive buffers */ |
1906 | while (nesvnic->nic.rq_head != nesvnic->nic.rq_tail) { | 1911 | while (nesvnic->nic.rq_head != nesvnic->nic.rq_tail) { |
1907 | nic_rqe = &nesvnic->nic.rq_vbase[nesvnic->nic.rq_tail]; | 1912 | nic_rqe = &nesvnic->nic.rq_vbase[nesvnic->nic.rq_tail]; |
@@ -2020,6 +2025,9 @@ void nes_destroy_nic_qp(struct nes_vnic *nesvnic) | |||
2020 | 2025 | ||
2021 | pci_free_consistent(nesdev->pcidev, nesvnic->nic_mem_size, nesvnic->nic_vbase, | 2026 | pci_free_consistent(nesdev->pcidev, nesvnic->nic_mem_size, nesvnic->nic_vbase, |
2022 | nesvnic->nic_pbase); | 2027 | nesvnic->nic_pbase); |
2028 | |||
2029 | /* restore old wqm_cfg0 value */ | ||
2030 | nes_write_indexed(nesdev, NES_IDX_WQM_CONFIG0, wqm_cfg0); | ||
2023 | } | 2031 | } |
2024 | 2032 | ||
2025 | /** | 2033 | /** |
diff --git a/drivers/infiniband/hw/nes/nes_hw.h b/drivers/infiniband/hw/nes/nes_hw.h index 9b1e7f869d83..bbbfe9fc5a5a 100644 --- a/drivers/infiniband/hw/nes/nes_hw.h +++ b/drivers/infiniband/hw/nes/nes_hw.h | |||
@@ -160,6 +160,7 @@ enum indexed_regs { | |||
160 | NES_IDX_ENDNODE0_NSTAT_TX_OCTETS_HI = 0x7004, | 160 | NES_IDX_ENDNODE0_NSTAT_TX_OCTETS_HI = 0x7004, |
161 | NES_IDX_ENDNODE0_NSTAT_TX_FRAMES_LO = 0x7008, | 161 | NES_IDX_ENDNODE0_NSTAT_TX_FRAMES_LO = 0x7008, |
162 | NES_IDX_ENDNODE0_NSTAT_TX_FRAMES_HI = 0x700c, | 162 | NES_IDX_ENDNODE0_NSTAT_TX_FRAMES_HI = 0x700c, |
163 | NES_IDX_WQM_CONFIG0 = 0x5000, | ||
163 | NES_IDX_WQM_CONFIG1 = 0x5004, | 164 | NES_IDX_WQM_CONFIG1 = 0x5004, |
164 | NES_IDX_CM_CONFIG = 0x5100, | 165 | NES_IDX_CM_CONFIG = 0x5100, |
165 | NES_IDX_NIC_LOGPORT_TO_PHYPORT = 0x6000, | 166 | NES_IDX_NIC_LOGPORT_TO_PHYPORT = 0x6000, |
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c index a1d79b6856ac..91fdde382e82 100644 --- a/drivers/infiniband/hw/nes/nes_nic.c +++ b/drivers/infiniband/hw/nes/nes_nic.c | |||
@@ -1595,7 +1595,6 @@ struct net_device *nes_netdev_init(struct nes_device *nesdev, | |||
1595 | struct nes_vnic *nesvnic; | 1595 | struct nes_vnic *nesvnic; |
1596 | struct net_device *netdev; | 1596 | struct net_device *netdev; |
1597 | struct nic_qp_map *curr_qp_map; | 1597 | struct nic_qp_map *curr_qp_map; |
1598 | u32 u32temp; | ||
1599 | u8 phy_type = nesdev->nesadapter->phy_type[nesdev->mac_index]; | 1598 | u8 phy_type = nesdev->nesadapter->phy_type[nesdev->mac_index]; |
1600 | 1599 | ||
1601 | netdev = alloc_etherdev(sizeof(struct nes_vnic)); | 1600 | netdev = alloc_etherdev(sizeof(struct nes_vnic)); |
@@ -1707,6 +1706,10 @@ struct net_device *nes_netdev_init(struct nes_device *nesdev, | |||
1707 | ((phy_type == NES_PHY_TYPE_PUMA_1G) && | 1706 | ((phy_type == NES_PHY_TYPE_PUMA_1G) && |
1708 | (((PCI_FUNC(nesdev->pcidev->devfn) == 1) && (nesdev->mac_index == 2)) || | 1707 | (((PCI_FUNC(nesdev->pcidev->devfn) == 1) && (nesdev->mac_index == 2)) || |
1709 | ((PCI_FUNC(nesdev->pcidev->devfn) == 2) && (nesdev->mac_index == 1)))))) { | 1708 | ((PCI_FUNC(nesdev->pcidev->devfn) == 2) && (nesdev->mac_index == 1)))))) { |
1709 | u32 u32temp; | ||
1710 | u32 link_mask; | ||
1711 | u32 link_val; | ||
1712 | |||
1710 | u32temp = nes_read_indexed(nesdev, NES_IDX_PHY_PCS_CONTROL_STATUS0 + | 1713 | u32temp = nes_read_indexed(nesdev, NES_IDX_PHY_PCS_CONTROL_STATUS0 + |
1711 | (0x200 * (nesdev->mac_index & 1))); | 1714 | (0x200 * (nesdev->mac_index & 1))); |
1712 | if (phy_type != NES_PHY_TYPE_PUMA_1G) { | 1715 | if (phy_type != NES_PHY_TYPE_PUMA_1G) { |
@@ -1715,13 +1718,36 @@ struct net_device *nes_netdev_init(struct nes_device *nesdev, | |||
1715 | (0x200 * (nesdev->mac_index & 1)), u32temp); | 1718 | (0x200 * (nesdev->mac_index & 1)), u32temp); |
1716 | } | 1719 | } |
1717 | 1720 | ||
1721 | /* Check and set linkup here. This is for back to back */ | ||
1722 | /* configuration where second port won't get link interrupt */ | ||
1723 | switch (phy_type) { | ||
1724 | case NES_PHY_TYPE_PUMA_1G: | ||
1725 | if (nesdev->mac_index < 2) { | ||
1726 | link_mask = 0x01010000; | ||
1727 | link_val = 0x01010000; | ||
1728 | } else { | ||
1729 | link_mask = 0x02020000; | ||
1730 | link_val = 0x02020000; | ||
1731 | } | ||
1732 | break; | ||
1733 | default: | ||
1734 | link_mask = 0x0f1f0000; | ||
1735 | link_val = 0x0f0f0000; | ||
1736 | break; | ||
1737 | } | ||
1738 | |||
1739 | u32temp = nes_read_indexed(nesdev, | ||
1740 | NES_IDX_PHY_PCS_CONTROL_STATUS0 + | ||
1741 | (0x200 * (nesdev->mac_index & 1))); | ||
1742 | if ((u32temp & link_mask) == link_val) | ||
1743 | nesvnic->linkup = 1; | ||
1744 | |||
1718 | /* clear the MAC interrupt status, assumes direct logical to physical mapping */ | 1745 | /* clear the MAC interrupt status, assumes direct logical to physical mapping */ |
1719 | u32temp = nes_read_indexed(nesdev, NES_IDX_MAC_INT_STATUS + (0x200 * nesdev->mac_index)); | 1746 | u32temp = nes_read_indexed(nesdev, NES_IDX_MAC_INT_STATUS + (0x200 * nesdev->mac_index)); |
1720 | nes_debug(NES_DBG_INIT, "Phy interrupt status = 0x%X.\n", u32temp); | 1747 | nes_debug(NES_DBG_INIT, "Phy interrupt status = 0x%X.\n", u32temp); |
1721 | nes_write_indexed(nesdev, NES_IDX_MAC_INT_STATUS + (0x200 * nesdev->mac_index), u32temp); | 1748 | nes_write_indexed(nesdev, NES_IDX_MAC_INT_STATUS + (0x200 * nesdev->mac_index), u32temp); |
1722 | 1749 | ||
1723 | nes_init_phy(nesdev); | 1750 | nes_init_phy(nesdev); |
1724 | |||
1725 | } | 1751 | } |
1726 | 1752 | ||
1727 | return netdev; | 1753 | return netdev; |
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index 815725f886c4..69928296d74b 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c | |||
@@ -1323,6 +1323,7 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd, | |||
1323 | nesqp->nesqp_context->aeq_token_low = cpu_to_le32((u32)((unsigned long)(nesqp))); | 1323 | nesqp->nesqp_context->aeq_token_low = cpu_to_le32((u32)((unsigned long)(nesqp))); |
1324 | nesqp->nesqp_context->aeq_token_high = cpu_to_le32((u32)(upper_32_bits((unsigned long)(nesqp)))); | 1324 | nesqp->nesqp_context->aeq_token_high = cpu_to_le32((u32)(upper_32_bits((unsigned long)(nesqp)))); |
1325 | nesqp->nesqp_context->ird_ord_sizes = cpu_to_le32(NES_QPCONTEXT_ORDIRD_ALSMM | | 1325 | nesqp->nesqp_context->ird_ord_sizes = cpu_to_le32(NES_QPCONTEXT_ORDIRD_ALSMM | |
1326 | NES_QPCONTEXT_ORDIRD_AAH | | ||
1326 | ((((u32)nesadapter->max_irrq_wr) << | 1327 | ((((u32)nesadapter->max_irrq_wr) << |
1327 | NES_QPCONTEXT_ORDIRD_IRDSIZE_SHIFT) & NES_QPCONTEXT_ORDIRD_IRDSIZE_MASK)); | 1328 | NES_QPCONTEXT_ORDIRD_IRDSIZE_SHIFT) & NES_QPCONTEXT_ORDIRD_IRDSIZE_MASK)); |
1328 | if (disable_mpa_crc) { | 1329 | if (disable_mpa_crc) { |