From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MiWqJ-00025K-CL for qemu-devel@nongnu.org; Tue, 01 Sep 2009 13:08:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MiWqD-000242-VW for qemu-devel@nongnu.org; Tue, 01 Sep 2009 13:08:26 -0400 Received: from [199.232.76.173] (port=35321 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MiWqD-00023z-Sr for qemu-devel@nongnu.org; Tue, 01 Sep 2009 13:08:21 -0400 Received: from mail-yw0-f195.google.com ([209.85.211.195]:58401) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MiWqD-0004ZB-HL for qemu-devel@nongnu.org; Tue, 01 Sep 2009 13:08:21 -0400 Received: by ywh33 with SMTP id 33so196944ywh.18 for ; Tue, 01 Sep 2009 10:08:20 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Artyom Tarasenko Date: Tue, 1 Sep 2009 19:08:00 +0200 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 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: Blue Swirl Cc: qemu-devel 2009/9/1 Blue Swirl : > Usually the first byte is bus id. What if you changed (as a hack) here: > =A0 =A0DPRINTF("do_cmd: busid 0x%x\n", buf[0]); > =A0 =A0lun =3D buf[0] & 7; > =A0 =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?