From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HfRTx-00027b-IT for qemu-devel@nongnu.org; Sat, 21 Apr 2007 22:07:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HfRTv-00027P-6h for qemu-devel@nongnu.org; Sat, 21 Apr 2007 22:07:16 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HfRTv-00027M-1g for qemu-devel@nongnu.org; Sat, 21 Apr 2007 22:07:15 -0400 Received: from ik-out-1112.google.com ([66.249.90.183]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HfROf-0002ky-TD for qemu-devel@nongnu.org; Sat, 21 Apr 2007 22:01:50 -0400 Received: by ik-out-1112.google.com with SMTP id b35so295150ika for ; Sat, 21 Apr 2007 19:01:47 -0700 (PDT) Message-ID: Date: Sun, 22 Apr 2007 10:01:47 +0800 From: "Wang Cheng Yeh" MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_127986_907786.1177207307587" Subject: [Qemu-devel] scsi interface patch 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 ------=_Part_127986_907786.1177207307587 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline The number of responded bytes from scsi device do not match the expected value of lsi53c895a driver. hence, the mismatch interrupt happen, but the driver does not always handle it correctly. My patch make the responded bytes as expected and the interrupt will not happen. Index: hw/scsi-disk.c =================================================================== RCS file: /sources/qemu/qemu/hw/scsi-disk.c,v retrieving revision 1.13 diff -r1.13 scsi-disk.c 359c359 < memset(outbuf, 0, 36); --- > memset(outbuf, 0, len); 377c377 < r->buf_len = 36; --- > r->buf_len = len; 442a443,446 > for(;r->buf_lenbuf_len++) > { > *p++=0; > } ------=_Part_127986_907786.1177207307587 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline The number of responded bytes from scsi device do not match the expected value of lsi53c895a driver.
hence, the mismatch interrupt happen, but the driver does not always handle it correctly.
My patch make the responded bytes as expected and the interrupt will not happen.

Index: hw/scsi-disk.c
===================================================================
RCS file: /sources/qemu/qemu/hw/scsi-disk.c,v
retrieving revision 1.13
diff -r1.13 scsi-disk.c
359c359
<       memset(outbuf, 0, 36);
---
>       memset(outbuf, 0, len);
377c377
<       r->buf_len = 36;
---
>       r->buf_len = len;
442a443,446
>             for(;r->buf_len<len;r->buf_len++)
>             {
>                 *p++=0;
>             }

------=_Part_127986_907786.1177207307587--