From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L50V5-0006xI-S8 for qemu-devel@nongnu.org; Tue, 25 Nov 2008 11:10:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L50V4-0006wu-3S for qemu-devel@nongnu.org; Tue, 25 Nov 2008 11:10:55 -0500 Received: from [199.232.76.173] (port=54039 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L50V3-0006wk-TD for qemu-devel@nongnu.org; Tue, 25 Nov 2008 11:10:53 -0500 Received: from e6.ny.us.ibm.com ([32.97.182.146]:41347) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L50V2-00085f-TS for qemu-devel@nongnu.org; Tue, 25 Nov 2008 11:10:53 -0500 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e6.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id mAPGA9al031209 for ; Tue, 25 Nov 2008 11:10:09 -0500 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id mAPGAm4n133226 for ; Tue, 25 Nov 2008 11:10:48 -0500 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id mAPHAvJH027522 for ; Tue, 25 Nov 2008 12:10:57 -0500 Date: Tue, 25 Nov 2008 10:10:47 -0600 From: Ryan Harper Subject: Re: [Qemu-devel] [5706] Implement LSI53C895A quirks exposed by OpenServer (Justin Chevrier). Message-ID: <20081125161047.GH31893@us.ibm.com> References: <299566.51371.qm@web51107.mail.re2.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <299566.51371.qm@web51107.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: Justin Chevrier Cc: qemu-devel@nongnu.org * Justin Chevrier [2008-11-25 00:13]: > andrzej zaborowski wrote: > > >He noticed that the patch uncovered an endiannes issue somewhere in > >lsi53c895a.c due to which the comparison that we added doesn't work on > >some target/host pairs. This is the issue that should be fixed next. > > I've done some more testing. I believe the line in question is wrong > and wasn't the right way to fix the original problem I was seeing with > Openserver. The original problem I observered in Openserver was that > it was sending an Inquiry with an allocation length of 40 to the scsi > drive but only got a reponse of length 36 (hardcoded in scsi-disk.c). > This caused it to panic. > > The patch below reverses this line and modifies scsi-disk.c to handle > different length Inquiry commands. Tested in Openserver and in debian > ARM from: (http://people.debian.org/~aurel32/qemu/armel). > > Give it a shot, hopefully it doesn't break anything. Yeah, that works just fine. > > Justin > > --- hw/scsi-disk.c (revision 5793) > +++ hw/scsi-disk.c (working copy) > @@ -492,7 +492,7 @@ > "is less than 36 (TODO: only 5 required)\n", len); > } > } > - memset(outbuf, 0, 36); > + memset(outbuf, 0, len); > > if (lun || buf[1] >> 5) { > outbuf[0] = 0x7f; /* LUN not supported */ > @@ -510,10 +510,10 @@ > Some later commands are also implemented. */ > outbuf[2] = 3; > outbuf[3] = 2; /* Format 2 */ > - outbuf[4] = 31; > + outbuf[4] = len - 5; /* Len(n - 4) */ Is there a better explanation that could be put here? -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryanh@us.ibm.com