• Ben Hutchings's avatar
    sfc: Ensure MCDI buffers, but not lengths, are dword aligned · 9528b921
    Ben Hutchings authored
    We currently require that MCDI request and response lengths are
    multiples of 4 bytes, because we will copy dwords in and out of shared
    memory and we want to be sure we won't read or write out of bounds.
    But all we really need to know is that there is sufficient padding for
    that.  Also, we should ensure that buffers are dword-aligned, as on
    some architectures misaligned access will result in data corruption or
    a crash.
    
    Change the buffer type to array-of-efx_dword_t and remove the
    requirement that the lengths are multiples of 4.
    Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
    9528b921
mcdi.h 7.98 KB