qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] new scsi interface patch
@ 2007-04-23  1:09 Wang Cheng Yeh
  0 siblings, 0 replies; only message in thread
From: Wang Cheng Yeh @ 2007-04-23  1:09 UTC (permalink / raw)
  To: qemu-devel


[-- Attachment #1.1: Type: text/plain, Size: 189 bytes --]

The previous patch is not correct as Paul Brook said.
I read the standard and know the allocation length.
And then, I find the number of length is not correct.
Please review the new patch.

[-- Attachment #1.2: Type: text/html, Size: 265 bytes --]

[-- Attachment #2: tmp.txt --]
[-- Type: text/plain, Size: 1313 bytes --]

Index: hw/scsi-disk.c
===================================================================
RCS file: /sources/qemu/qemu/hw/scsi-disk.c,v
retrieving revision 1.13
diff -u -p -r1.13 scsi-disk.c
--- hw/scsi-disk.c	29 Aug 2006 04:52:16 -0000	1.13
+++ hw/scsi-disk.c	23 Apr 2007 01:00:06 -0000
@@ -371,7 +371,7 @@ int32_t scsi_send_command(SCSIDevice *s,
            Some later commands are also implemented. */
 	outbuf[2] = 3;
 	outbuf[3] = 2; /* Format 2 */
-	outbuf[4] = 32;
+	outbuf[4] = 31;
         /* Sync data transfer and TCQ.  */
         outbuf[7] = 0x10 | (s->tcq ? 0x02 : 0);
 	r->buf_len = 36;
@@ -407,7 +407,7 @@ int32_t scsi_send_command(SCSIDevice *s,
                 p[0] = 8;
                 p[1] = 0x12;
                 p[2] = 4; /* WCE */
-                p += 19;
+                p += 20;
             }
             if ((page == 0x3f || page == 0x2a)
                     && (bdrv_get_type_hint(s->bdrv) == BDRV_TYPE_CDROM)) {
@@ -437,7 +437,7 @@ int32_t scsi_send_command(SCSIDevice *s,
                 p[19] = (16 * 176) & 0xff;
                 p[20] = (16 * 176) >> 8; // 16x write speed current
                 p[21] = (16 * 176) & 0xff;
-                p += 21;
+                p += 22;
             }
             r->buf_len = p - outbuf;
             outbuf[0] = r->buf_len - 4;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-04-23  1:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-23  1:09 [Qemu-devel] new scsi interface patch Wang Cheng Yeh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).