From mboxrd@z Thu Jan 1 00:00:00 1970 From: lochegm1@cti.ecp.fr (Matthieu Lochegnies) Date: Thu, 17 Jan 2002 08:45:11 +0000 Subject: fxload putting code at a wrong place MIME-Version: 1 Content-Type: multipart/mixed; boundary="UugvWAfsgieZRqgk" Message-Id: List-Id: To: linux-hotplug@vger.kernel.org --UugvWAfsgieZRqgk Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline 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 --UugvWAfsgieZRqgk Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="ezusb.pch" 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]; --UugvWAfsgieZRqgk-- _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel