Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 122ce878 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* '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
parents daf9fe2e 0636b33c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2953,6 +2953,9 @@ static void ib_mad_remove_device(struct ib_device *device)
{
	int i, num_ports, cur_port;

	if (rdma_node_get_transport(device->node_type) != RDMA_TRANSPORT_IB)
		return;

	if (device->node_type == RDMA_NODE_IB_SWITCH) {
		num_ports = 1;
		cur_port = 0;
+2 −0
Original line number Diff line number Diff line
@@ -189,6 +189,7 @@ static void close_rnic_dev(struct t3cdev *tdev)
	list_for_each_entry_safe(dev, tmp, &dev_list, entry) {
		if (dev->rdev.t3cdev_p == tdev) {
			dev->rdev.flags = CXIO_ERROR_FATAL;
			synchronize_net();
			cancel_delayed_work_sync(&dev->db_drop_task);
			list_del(&dev->entry);
			iwch_unregister_device(dev);
@@ -217,6 +218,7 @@ static void iwch_event_handler(struct t3cdev *tdev, u32 evt, u32 port_id)
	switch (evt) {
	case OFFLOAD_STATUS_DOWN: {
		rdev->flags = CXIO_ERROR_FATAL;
		synchronize_net();
		event.event  = IB_EVENT_DEVICE_FATAL;
		dispatch = 1;
		break;
+8 −0
Original line number Diff line number Diff line
@@ -1899,9 +1899,14 @@ void nes_destroy_nic_qp(struct nes_vnic *nesvnic)
	u16  wqe_fragment_index;
	u64 wqe_frag;
	u32 cqp_head;
	u32 wqm_cfg0;
	unsigned long flags;
	int ret;

	/* clear wqe stall before destroying NIC QP */
	wqm_cfg0 = nes_read_indexed(nesdev, NES_IDX_WQM_CONFIG0);
	nes_write_indexed(nesdev, NES_IDX_WQM_CONFIG0, wqm_cfg0 & 0xFFFF7FFF);

	/* Free remaining NIC receive buffers */
	while (nesvnic->nic.rq_head != nesvnic->nic.rq_tail) {
		nic_rqe   = &nesvnic->nic.rq_vbase[nesvnic->nic.rq_tail];
@@ -2020,6 +2025,9 @@ void nes_destroy_nic_qp(struct nes_vnic *nesvnic)

	pci_free_consistent(nesdev->pcidev, nesvnic->nic_mem_size, nesvnic->nic_vbase,
			nesvnic->nic_pbase);

	/* restore old wqm_cfg0 value */
	nes_write_indexed(nesdev, NES_IDX_WQM_CONFIG0, wqm_cfg0);
}

/**
+1 −0
Original line number Diff line number Diff line
@@ -160,6 +160,7 @@ enum indexed_regs {
	NES_IDX_ENDNODE0_NSTAT_TX_OCTETS_HI = 0x7004,
	NES_IDX_ENDNODE0_NSTAT_TX_FRAMES_LO = 0x7008,
	NES_IDX_ENDNODE0_NSTAT_TX_FRAMES_HI = 0x700c,
	NES_IDX_WQM_CONFIG0 = 0x5000,
	NES_IDX_WQM_CONFIG1 = 0x5004,
	NES_IDX_CM_CONFIG = 0x5100,
	NES_IDX_NIC_LOGPORT_TO_PHYPORT = 0x6000,
+28 −2
Original line number Diff line number Diff line
@@ -1595,7 +1595,6 @@ struct net_device *nes_netdev_init(struct nes_device *nesdev,
	struct nes_vnic *nesvnic;
	struct net_device *netdev;
	struct nic_qp_map *curr_qp_map;
	u32 u32temp;
	u8 phy_type = nesdev->nesadapter->phy_type[nesdev->mac_index];

	netdev = alloc_etherdev(sizeof(struct nes_vnic));
@@ -1707,6 +1706,10 @@ struct net_device *nes_netdev_init(struct nes_device *nesdev,
	     ((phy_type == NES_PHY_TYPE_PUMA_1G) &&
	      (((PCI_FUNC(nesdev->pcidev->devfn) == 1) && (nesdev->mac_index == 2)) ||
	       ((PCI_FUNC(nesdev->pcidev->devfn) == 2) && (nesdev->mac_index == 1)))))) {
		u32 u32temp;
		u32 link_mask;
		u32 link_val;

		u32temp = nes_read_indexed(nesdev, NES_IDX_PHY_PCS_CONTROL_STATUS0 +
				(0x200 * (nesdev->mac_index & 1)));
		if (phy_type != NES_PHY_TYPE_PUMA_1G) {
@@ -1715,13 +1718,36 @@ struct net_device *nes_netdev_init(struct nes_device *nesdev,
				(0x200 * (nesdev->mac_index & 1)), u32temp);
		}

		/* Check and set linkup here.  This is for back to back */
		/* configuration where second port won't get link interrupt */
		switch (phy_type) {
		case NES_PHY_TYPE_PUMA_1G:
			if (nesdev->mac_index < 2) {
				link_mask = 0x01010000;
				link_val = 0x01010000;
			} else {
				link_mask = 0x02020000;
				link_val = 0x02020000;
			}
			break;
		default:
			link_mask = 0x0f1f0000;
			link_val = 0x0f0f0000;
			break;
		}

		u32temp = nes_read_indexed(nesdev,
					   NES_IDX_PHY_PCS_CONTROL_STATUS0 +
					   (0x200 * (nesdev->mac_index & 1)));
		if ((u32temp & link_mask) == link_val)
			nesvnic->linkup = 1;

		/* clear the MAC interrupt status, assumes direct logical to physical mapping */
		u32temp = nes_read_indexed(nesdev, NES_IDX_MAC_INT_STATUS + (0x200 * nesdev->mac_index));
		nes_debug(NES_DBG_INIT, "Phy interrupt status = 0x%X.\n", u32temp);
		nes_write_indexed(nesdev, NES_IDX_MAC_INT_STATUS + (0x200 * nesdev->mac_index), u32temp);

		nes_init_phy(nesdev);

	}

	return netdev;
Loading