Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Aug 2010 03:10:48 +0000 (UTC)
From:      Jeff Roberson <jeff@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r211260 - projects/ofed/head/sys/ofed/include/linux/mlx4
Message-ID:  <201008130310.o7D3Amdo075871@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jeff
Date: Fri Aug 13 03:10:48 2010
New Revision: 211260
URL: http://svn.freebsd.org/changeset/base/211260

Log:
   - Just check the direct buf pointer against NULL rather than assuming it
     will be set for 64bit systems.  This works in more cases.  On BSD
     we may not allocate a direct map for a large non-contiguous region to
     avoid the vm address space allocator expense.
  
  Sponsored by:	Isilon Systems, iX Systems, and Panasas.

Modified:
  projects/ofed/head/sys/ofed/include/linux/mlx4/device.h

Modified: projects/ofed/head/sys/ofed/include/linux/mlx4/device.h
==============================================================================
--- projects/ofed/head/sys/ofed/include/linux/mlx4/device.h	Fri Aug 13 03:09:08 2010	(r211259)
+++ projects/ofed/head/sys/ofed/include/linux/mlx4/device.h	Fri Aug 13 03:10:48 2010	(r211260)
@@ -497,7 +497,7 @@ int mlx4_buf_alloc(struct mlx4_dev *dev,
 void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf);
 static inline void *mlx4_buf_offset(struct mlx4_buf *buf, int offset)
 {
-	if (BITS_PER_LONG == 64 || buf->nbufs == 1)
+	if (buf->direct.buf != NULL)
 		return buf->direct.buf + offset;
 	else
 		return buf->page_list[offset >> PAGE_SHIFT].buf +



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008130310.o7D3Amdo075871>