From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Sun, 18 May 2003 20:39:15 +0000 Subject: fxload to restictive with address range Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org --- Sorry, i diffed a old version. Here is the same mail with new diff. btw: Are you expecting CR/LF in the record lines? It raises "record to short?". Please see patch. --- Hello, i have a DSL-USB-Modem: http://www.devolo.de/produkte/adsl/mladslfunusb/index.php inside is the 6485 Chip from Aanalog Devices: http://www.analog.com/Analog_Root/productPage/productHome/0%2C2121%2CAD6485%2C00.html A part of the chip is some kind of ezusb 8051. (in the same chip is Ethernet and DSL-Pump) I have extracted the firmware by sniffing Windows USB, then converted to Intel-Hex-File. http://vrfy.org/eagle6485.ihx I've successfull loaded the firmware into the device with a modified fxload. Unfortunately fxload does not support the address range of this chip. I changed the following lines and everything is working well. --- ezusb.c 2003-05-18 22:15:20.000000000 +0200 +++ ezusb.c.orig 2002-04-12 06:08:01.000000000 +0200 @@ -64,8 +64,8 @@ /* with 8KB RAM, 0x0000-0x1b3f can be written * we can't tell if it's a 4KB device here */ - if (addr <= 0x7b3f) - return ((addr + len) > 0x7b40); + if (addr <= 0x1b3f) + return ((addr + len) > 0x1b40); /* there may be more RAM; unclear if we can write it. * some bulk buffers may be unused, 0x1b3f-0x1f3f @@ -361,7 +361,7 @@ return -3; } - if ((len * 2) + 11 > strlen(buf)) { + if ((len * 2) + 11 >= strlen(buf)) { fprintf (stderr, "record too short?\n"); return -4; } I expect more devices of this kind to appear in the future. Maybe somebody can check, how to be prepared for larger internal RAM sizes. Have a good day Kay Sievers ------------------------------------------------------- This SF.net email is sponsored by: If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software. http://www.objectstore.net/sourceforge _______________________________________________ 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