• Ben Hutchings's avatar
    sfc: Fix naming of MTD partitions for FPGA bitfiles · 89cc80a4
    Ben Hutchings authored
    efx_mcdi_get_board_cfg() uses a buffer for the firmware response that
    is only large enough to hold subtypes for the originally defined set
    of NVRAM partitions.  Longer responses are truncated, and we may read
    off the end of the buffer when copying out subtypes for additional
    partitions.  In particular, this can result in the MTD partition for
    an FPGA bitfile being named e.g. 'eth5 sfc_fpga:00' when it should be
    'eth5 sfc_fpga:01'.  This means the firmware update tool (sfupdate)
    can't tell which bitfile should be written to the partition.
    
    Correct the response buffer size.
    Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    89cc80a4
mcdi.c 31.8 KB