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

Commit 907d91d7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
  IB/mthca: Fix max_srq_sge returned by ib_query_device for Tavor devices
  IB/cache: Use correct pointer to calculate size
  IPoIB: Use spin_lock_irq() instead of spin_lock_irqsave()
  IPoIB: Close race in ipoib_flush_paths()
  IB/mthca: Disable tuning PCI read burst size
  IPoIB: Make send and receive queue sizes tunable
  IPoIB: Wait for join to finish before freeing mcast struct
  IB: simplify static rate encoding
  IPoIB: Consolidate private neighbour data handling
  IB/srp: Fix memory leak in options parsing
  IB/mthca: Always build debugging code unless CONFIG_EMBEDDED=y
  IPoIB: Always build debugging code unless CONFIG_EMBEDDED=y
  IB/mad: fix oops in cancel_mads
parents 646e120f 59fef3b1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -302,7 +302,7 @@ static void ib_cache_setup_one(struct ib_device *device)
		kmalloc(sizeof *device->cache.pkey_cache *
			(end_port(device) - start_port(device) + 1), GFP_KERNEL);
	device->cache.gid_cache =
		kmalloc(sizeof *device->cache.pkey_cache *
		kmalloc(sizeof *device->cache.gid_cache *
			(end_port(device) - start_port(device) + 1), GFP_KERNEL);

	if (!device->cache.pkey_cache || !device->cache.gid_cache) {
+1 −1
Original line number Diff line number Diff line
@@ -2311,6 +2311,7 @@ static void local_completions(void *data)
		local = list_entry(mad_agent_priv->local_list.next,
				   struct ib_mad_local_private,
				   completion_list);
		list_del(&local->completion_list);
		spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
		if (local->mad_priv) {
			recv_mad_agent = local->recv_mad_agent;
@@ -2362,7 +2363,6 @@ static void local_completions(void *data)
						   &mad_send_wc);

		spin_lock_irqsave(&mad_agent_priv->lock, flags);
		list_del(&local->completion_list);
		atomic_dec(&mad_agent_priv->refcount);
		if (!recv)
			kmem_cache_free(ib_mad_cache, local->mad_priv);
+34 −0
Original line number Diff line number Diff line
@@ -45,6 +45,40 @@
#include <rdma/ib_verbs.h>
#include <rdma/ib_cache.h>

int ib_rate_to_mult(enum ib_rate rate)
{
	switch (rate) {
	case IB_RATE_2_5_GBPS: return  1;
	case IB_RATE_5_GBPS:   return  2;
	case IB_RATE_10_GBPS:  return  4;
	case IB_RATE_20_GBPS:  return  8;
	case IB_RATE_30_GBPS:  return 12;
	case IB_RATE_40_GBPS:  return 16;
	case IB_RATE_60_GBPS:  return 24;
	case IB_RATE_80_GBPS:  return 32;
	case IB_RATE_120_GBPS: return 48;
	default:	       return -1;
	}
}
EXPORT_SYMBOL(ib_rate_to_mult);

enum ib_rate mult_to_ib_rate(int mult)
{
	switch (mult) {
	case 1:  return IB_RATE_2_5_GBPS;
	case 2:  return IB_RATE_5_GBPS;
	case 4:  return IB_RATE_10_GBPS;
	case 8:  return IB_RATE_20_GBPS;
	case 12: return IB_RATE_30_GBPS;
	case 16: return IB_RATE_40_GBPS;
	case 24: return IB_RATE_60_GBPS;
	case 32: return IB_RATE_80_GBPS;
	case 48: return IB_RATE_120_GBPS;
	default: return IB_RATE_PORT_CURRENT;
	}
}
EXPORT_SYMBOL(mult_to_ib_rate);

/* Protection domains */

struct ib_pd *ib_alloc_pd(struct ib_device *device)
+6 −5
Original line number Diff line number Diff line
@@ -7,10 +7,11 @@ config INFINIBAND_MTHCA
	  ("Tavor") and the MT25208 PCI Express HCA ("Arbel").

config INFINIBAND_MTHCA_DEBUG
	bool "Verbose debugging output"
	bool "Verbose debugging output" if EMBEDDED
	depends on INFINIBAND_MTHCA
	default n
	default y
	---help---
	  This option causes the mthca driver produce a bunch of debug
	  messages.  Select this is you are developing the driver or
	  trying to diagnose a problem.
	  This option causes debugging code to be compiled into the
	  mthca driver.  The output can be turned on via the
	  debug_level module parameter (which can also be set after
	  the driver is loaded through sysfs).
+0 −4
Original line number Diff line number Diff line
ifdef CONFIG_INFINIBAND_MTHCA_DEBUG
EXTRA_CFLAGS += -DDEBUG
endif

obj-$(CONFIG_INFINIBAND_MTHCA) += ib_mthca.o

ib_mthca-y :=	mthca_main.o mthca_cmd.o mthca_profile.o mthca_reset.o \
Loading