]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Fix naming of MTD partitions for FPGA bitfiles
authorBen Hutchings <bhutchings@solarflare.com>
Mon, 22 Apr 2013 21:40:07 +0000 (22:40 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Apr 2013 05:37:00 +0000 (01:37 -0400)
commit74ce6bfc2e801bdd5e1b12a53fa6083380c16139
tree0d482d48741bc40969b20e518be69d76750736b9
parent30431abf33c8da2b45ddfb69179ecae33a78cf2d
sfc: Fix naming of MTD partitions for FPGA bitfiles

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: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/mcdi.c