[ofa-general] ***SPAM*** Re: MTHCA driver from OFED 1.3a package

Or Gerlitz or.gerlitz at gmail.com
Mon Nov 26 03:22:39 PST 2007


On 11/25/07, Lukas Hejtmanek <xhejtman at ics.muni.cz> wrote:
> I've already resolved this issue. For some reason, kernel drivers (2.6.18)
> works correctly under Xen Dom0. I was confused about OFED 1.2 which works but
> it contained patch to work under Xen. After applying similar patch to the OFED
> 1.3a, it works now as well.

Can you please clarify what is the patch in OFED 1.2 which once
deployed to OFED 1.3 makes it work for you? Looking on the 1.2 sources
under
ofa_kernel-1.2/kernel_patches/fixes I see three patches that contain
the word coherent, but neither of them seemed to me what you are
referring to, am I wrong? The patches are:
mthca_3_alloc_consistent.patch
mthca_4_dma_align_reserved_mtts.patch
mthca_5_roland_fix_icm_coherent.patch

Or.

change-log for mthca_3_alloc_consistent.patch

Fix non-cache-coherent CPUs with memfree HCAs.

We allocate the MTT table with alloc_pages() and then do
pci_map_sg(), so we must call pci_dma_sync_sg after the CPU
writes to the MTT table (this works since device never writes the
MTTs on memfree).

For MPTs, both the device and CPU might write there, so we must
allocate dma coherent memory for these.

Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>

change-log for mthca_4_dma_align_reserved_mtts.patch

[PATCHv3 5 of 5] IB/mthca: reserved MTTs and memory alignment issues

This fixes several issues related to reserved MTTs and memory alignment.

1. MTTs are allocated in non-cache-coherent memory, so we must give
reserved MTTs their own cache line, to prevent both device and
CPU from writing into the same cache line at the same time.

2. reserved_mtts field has different meaning in Tavor and Arbel,
so we are wasting mtt entries on memfree. fix the Arbel case to match
Tavor semantics.

Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>


change-log for mthca_5_roland_fix_icm_coherent.patch

commit 1c7c25e1a36ea2aa053373dfb363fd646677edac
Author: Roland Dreier <rolandd at cisco.com>
Date:   Wed Feb 14 08:45:17 2007 -0800

   IB/mthca: Fix allocation of ICM chunks in coherent memory

   The change to allow allocating ICM chunks from coherent memory did not
   increment the count of sg entries properly, so a chunk that required
   more than allocation would not be mapped properly by the HCA.

   Fix this by adding the missing increment of chunk->nsg.

   Signed-off-by: Roland Dreier <rolandd at cisco.com>



More information about the general mailing list