It's because device->mr might not be allocated at all if
always_register=Y, however in this case for all-immediatedata writes
I don't need memory registration and I can use pd->local_dma_lkey.
This hunk prevents a NULL dereference (as I mentioned, device->mr might
not be allocated at all).
I am not sure to follow, but can't you put this fix into a separate
patch to make things more clearer?
I don't know how to split this patch any further. Before this patch in
case always_register=Y we *always registered* and never allocated the
global mr. This patch allows us not to do it ifor all-immediatedata
writes. So in order not to hit a NULL deref we use this conditional.
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html