All of lore.kernel.org
 help / color / mirror / Atom feed
From: Justin Chevrier <theburner1@yahoo.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [5706] Implement LSI53C895A quirks exposed by OpenServer (Justin Chevrier).
Date: Mon, 24 Nov 2008 22:00:35 -0800 (PST)	[thread overview]
Message-ID: <299566.51371.qm@web51107.mail.re2.yahoo.com> (raw)

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.

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) */
         /* Sync data transfer and TCQ.  */
         outbuf[7] = 0x10 | (s->tcq ? 0x02 : 0);
-       r->buf_len = 36;
+       r->buf_len = len;
        break;
     case 0x16:
         DPRINTF("Reserve(6)\n");

--- hw/lsi53c895a.c     (revision 5793)
+++ hw/lsi53c895a.c     (working copy)
@@ -920,7 +920,6 @@
             break;
         case PHASE_DI:
             s->waiting = 2;
-            s->current_dma_len = s->dbc;
             lsi_do_dma(s, 0);
             if (s->waiting)
                 s->waiting = 3;




      

             reply	other threads:[~2008-11-25  6:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-25  6:00 Justin Chevrier [this message]
2008-11-25 16:10 ` [Qemu-devel] [5706] Implement LSI53C895A quirks exposed by OpenServer (Justin Chevrier) Ryan Harper
  -- strict thread matches above, loose matches on Subject: below --
2008-11-12 16:41 Andrzej Zaborowski
2008-11-24 23:10 ` Ryan Harper
2008-11-24 23:18   ` Ryan Harper
2008-11-24 23:51     ` Ryan Harper
2008-11-25  0:25       ` andrzej zaborowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=299566.51371.qm@web51107.mail.re2.yahoo.com \
    --to=theburner1@yahoo.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.