From: Vladimir Sokolovsky Date: Tue, 15 Jul 2008 06:48:53 +0000 (-0700) Subject: mlx4_core: Use MOD_STAT_CFG command to get minimal page size X-Git-Tag: v2.6.27-rc1~1090^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d92865158d0e21ef4350703af64bc2a610d81d3;p=pandora-kernel.git mlx4_core: Use MOD_STAT_CFG command to get minimal page size There was a bug in some versions of the mlx4 driver in mlx4_alloc_fmr(), which hardcoded the minimum acceptable page_shift to be 12. However, new ConnectX firmware can support a minimum page_shift of 9 (log_pg_sz of 9 returned by QUERY_DEV_LIM) -- so with old drivers, ib_fmr_alloc() would fail for ULPs using the device minimum when creating FMRs. To preserve firmware compatibility with released mlx4 drivers, the firmware will continue to return 12 as before for log_page_sz in QUERY_DEV_CAP for these drivers. However, to enable new drivers to take advantage of the available smaller page size, the mlx4 driver now first sets the log_pg_sz to the device minimum by setting a log_page_sz value to 0 via the MOD_STAT_CFG command and then reading the real minimum via QUERY_DEV_CAP. Signed-off-by: Jack Morgenstein Signed-off-by: Vladimir Sokolovsky Signed-off-by: Roland Dreier --- Reading git-diff-tree failed