aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts.py
diff options
context:
space:
mode:
authorIan Abbott <[email protected]>2017-01-04 10:55:37 +0000
committerGreg Kroah-Hartman <[email protected]>2017-01-10 17:38:32 +0100
commit7cff0b776a7a5d60b9323ece37619ef95e92d12e (patch)
tree82cb227987054222f060aa989dbcc29e449be579 /tools/perf/scripts/python/syscall-counts.py
parent3bc3a8239009d6eac56e5076ea5e3eef2b61cd9b (diff)
staging: comedi: daqboard2000: check firmware length
Firmware files for DAQBoard/2000 have a header, which is skipped, followed by a sequence of FPGA configuration bytes to be programmed in pairs. The FPGA configuration bytes start with the sequence 0xff, 0x20. Make the firmware loading callback function `daqboard2000_load_firmware()` return an error `-EINVAL` if the FPGA start sequence is not found, or the remaining length is not a multiple of 2. The firmware loading callback tries to program the FPGA up to 3 times until it succeeds or it has tried too many times. Currently, it searches for the FPGA start sequence in the firmware data each time through the retry loop. Change it to adjust the start position and length before entering the loop. Signed-off-by: Ian Abbott <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions