From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MiWu1-0003h2-0y for qemu-devel@nongnu.org; Tue, 01 Sep 2009 13:12:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MiWtv-0003gX-IC for qemu-devel@nongnu.org; Tue, 01 Sep 2009 13:12:15 -0400 Received: from [199.232.76.173] (port=35518 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MiWtv-0003gQ-DS for qemu-devel@nongnu.org; Tue, 01 Sep 2009 13:12:11 -0400 Received: from mail-ew0-f223.google.com ([209.85.219.223]:63042) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MiWtv-0005Az-3e for qemu-devel@nongnu.org; Tue, 01 Sep 2009 13:12:11 -0400 Received: by ewy23 with SMTP id 23so142530ewy.8 for ; Tue, 01 Sep 2009 10:12:10 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Blue Swirl Date: Tue, 1 Sep 2009 20:11:50 +0300 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: sparc esp dma endianness [patch-rfc] List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Artyom Tarasenko Cc: qemu-devel On Tue, Sep 1, 2009 at 8:08 PM, Artyom Tarasenko wrote: > 2009/9/1 Blue Swirl : >> Usually the first byte is bus id. What if you changed (as a hack) here: >> =C2=A0 =C2=A0DPRINTF("do_cmd: busid 0x%x\n", buf[0]); >> =C2=A0 =C2=A0lun =3D buf[0] & 7; >> =C2=A0 =C2=A0datalen =3D s->current_dev->send_command(s->current_dev, 0,= &buf[1], lun); >> &buf[1] to &buf[0]? > > Yep, figured that out too, but did a little more complex hack: > > lun =3D buf[1] >>5; > datalen =3D s->current_dev->send_command(s->current_dev, 0, &buf[0], lun)= ; > > with this hack OBP checks proper LUNs. > > So, the problem is not endianness, but the missing bus id. But how the > bus id should get into the dma buffer? > It should be generated by esp, right? > It could be pushed into FIFO with PIO.