[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [5706] Implement LSI53C895A quirks exposed by OpenServe
From: |
Ryan Harper |
Subject: |
Re: [Qemu-devel] [5706] Implement LSI53C895A quirks exposed by OpenServer (Justin Chevrier). |
Date: |
Tue, 25 Nov 2008 10:10:47 -0600 |
User-agent: |
Mutt/1.5.6+20040907i |
* Justin Chevrier <address@hidden> [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
address@hidden