From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HWfEJ-0001u7-LC for qemu-devel@nongnu.org; Wed, 28 Mar 2007 16:58:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HWfEH-0001rx-Oh for qemu-devel@nongnu.org; Wed, 28 Mar 2007 16:58:50 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HWfEH-0001ru-ML for qemu-devel@nongnu.org; Wed, 28 Mar 2007 15:58:49 -0500 Received: from moutng.kundenserver.de ([212.227.126.171]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HWfBl-0004Em-Jn for qemu-devel@nongnu.org; Wed, 28 Mar 2007 16:56:14 -0400 Message-ID: <460AD667.8070608@mail.berlios.de> Date: Wed, 28 Mar 2007 22:56:07 +0200 From: Stefan Weil MIME-Version: 1.0 Subject: Re: [Qemu-devel] [patch] More PCI ethernet emulations References: <33328190.1174979798015.JavaMail.root@eastrmwml08.mgt.cox.net> In-Reply-To: <33328190.1174979798015.JavaMail.root@eastrmwml08.mgt.cox.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: sol10x86@cox.net, QEMU Developers Good question. I stumbled about this, too, when I looked at the code how I could apply your patch. Some months had past since I wrote it :-) The code writes to a serial EEPROM, so the 16 bits are sent using only a clock and a single data bit. The EEPROM emulation then takes the single bits and puts them together. The function gets a byte which contains clock, data and two other significant bits, and 4 bits which are always 0. When called with a word, only one byte is needed. Maybe it is the wrong one - if you work with different endianess. I'l have a look at the other problems next weekend. Stefan Ben Taylor wrote: > I have a question. in eepro100_write2, I see a word (16-bits) being > passed in, but only the low part of the word gets written to the eeprom. > Since it's a word write, shouldn't it be writing both bytes to the eeprom? > > Ben