From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KzLd4-0003Uz-TZ for qemu-devel@nongnu.org; Sun, 09 Nov 2008 20:31:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KzLd3-0003T6-Gm for qemu-devel@nongnu.org; Sun, 09 Nov 2008 20:31:46 -0500 Received: from [199.232.76.173] (port=55342 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KzLd3-0003T0-8m for qemu-devel@nongnu.org; Sun, 09 Nov 2008 20:31:45 -0500 Received: from rv-out-0708.google.com ([209.85.198.249]:22607) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KzLd3-0003Ps-00 for qemu-devel@nongnu.org; Sun, 09 Nov 2008 20:31:45 -0500 Received: by rv-out-0708.google.com with SMTP id f25so2141045rvb.22 for ; Sun, 09 Nov 2008 17:31:42 -0800 (PST) Message-ID: Date: Mon, 10 Nov 2008 02:31:42 +0100 From: "andrzej zaborowski" Subject: Re: [Qemu-devel] LSI53C895A, IDE HDD detection under SCO OpenServer 5.0.5 In-Reply-To: <287825.75973.qm@web51112.mail.re2.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <287825.75973.qm@web51112.mail.re2.yahoo.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi, 2008/11/4 Justin Chevrier : > Well I've made some progress with getting the LSI53C895A emulated card working under Openserver. After going through the debug log and scratching my head for quite some time. I found the following: > > The problem was with this block move: > > lsi_scsi: SCRIPTS dsp=0fae8e50 opcode 01000028 arg 00f63c40 > lsi_scsi: DMA addr=0x00f63c40 len=36 > > The number of bytes to be transferred (len) should be 40 which corresponds > to the block transfer of length 0x28 (from opcode 01000028). Instead we > have a length of 36 (0x24). The code responsible for this is (in 'lsi_do_dma'): > > if (count > s->current_dma_len) > count = s->current_dma_len; > > Basically we're overwriting the length 40 with the value 36 which I think we just left over in that variable from an earlier transfer. In my patch below I initialize s->current_dma_len to s->dbc before we begin the DMA transfer during Data In phase. > > The attached patch gets Openserver 5.0.5 past the hardware detection > (and it lists the hard drive to boot, woohoo). It appears to stop a little > while later (doesn't seem SCSI related), but it's been so long since I've > booted Openserver I'm not sure what's supposted to happen after the HW > detection using the boot/root disks. > > Give it a shot. Hopefully it doesn't break other OS's, but I haven't checked myself. If what I did makes sense and doesn't break anything I'd like to see it get merged into mainline. It makes sense and doesn't break x86/Linux for me, if there's no opposing comment for a moment, I'll merge this change. Cheers