linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fxload putting code at a wrong place
@ 2002-01-17  8:45 Matthieu Lochegnies
  2002-01-17 14:48 ` David Brownell
  0 siblings, 1 reply; 2+ messages in thread
From: Matthieu Lochegnies @ 2002-01-17  8:45 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 250 bytes --]

  High !

  I just bought an Ez USB development kit and tried to play with it
using fxload. The new merging algorithm seems to forget to initialize
data_addr.

  Attached is a small patch that, I think, fixes it.

  Regards,

-- 
Matthieu Lochegnies

[-- Attachment #2: ezusb.pch --]
[-- Type: text/plain, Size: 786 bytes --]

Index: ezusb.c
===================================================================
RCS file: /cvsroot/linux-hotplug/admin/fxload/ezusb.c,v
retrieving revision 1.3
diff -u -r1.3 ezusb.c
--- ezusb.c	2001/12/27 17:59:33	1.3
+++ ezusb.c	2002/01/17 08:33:28
@@ -130,6 +130,7 @@
       FILE*image;
       int rc;
       unsigned short cpucs_addr;
+      unsigned char first_line = 1;
 
       /* EZ-USB FX and FX2 devices differ, apart from the 8051 core */
       if (fx2)
@@ -186,6 +187,13 @@
 	    buf[7] = 0;
 	    off = strtoul(buf+3, 0, 16);
 	    buf[7] = tmp;
+
+              /* Initialize data_addr */
+            if( first_line )
+            {
+              data_addr = off;
+              first_line = 0;
+            }
 
 	      /* Read the record type */
 	    tmp = buf[9];

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-01-17 14:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-17  8:45 fxload putting code at a wrong place Matthieu Lochegnies
2002-01-17 14:48 ` David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).