Re: [Qemu-devel] [PATCH] add suport for ATA_PASSTHROUGH_xx scsi command

2012-08-01 Thread Cong Meng
I see. thank both. On Wed 01 Aug 2012 04:49:18 PM CST, ronnie sahlberg wrote: Because opcode 0xA1 has a different meaning for CDROM/MMC devices. On such devices 0xA1 means BLANK, so it would collide if QEMU some day adds support for re-writeable mmc device. On Wed, Aug 1, 2012 at 6:45 PM, Paol

Re: [Qemu-devel] [PATCH] add suport for ATA_PASSTHROUGH_xx scsi command

2012-08-01 Thread ronnie sahlberg
Because opcode 0xA1 has a different meaning for CDROM/MMC devices. On such devices 0xA1 means BLANK, so it would collide if QEMU some day adds support for re-writeable mmc device. On Wed, Aug 1, 2012 at 6:45 PM, Paolo Bonzini wrote: > Il 01/08/2012 10:43, Cong Meng ha scritto: >>> >>> Please mak

Re: [Qemu-devel] [PATCH] add suport for ATA_PASSTHROUGH_xx scsi command

2012-08-01 Thread Paolo Bonzini
Il 01/08/2012 10:43, Cong Meng ha scritto: >> >> Please make this conditional on the type _not_ being TYPE_ROM. > > May I ask why cdrom device should be an exception? Because CD-ROM devices do not support ATA PASSTHROUGH (the SAT standard only describes direct access devices---type=0x00). The 0x

Re: [Qemu-devel] [PATCH] add suport for ATA_PASSTHROUGH_xx scsi command

2012-08-01 Thread Cong Meng
On Wed 01 Aug 2012 04:20:28 PM CST, Paolo Bonzini wrote: Il 01/08/2012 09:53, Cong Meng ha scritto: Correct the command names of opcode 0x85 and 0xa1, and calculate their xfer size from CDB. Signed-off-by: Cong Meng --- hw/scsi-bus.c | 17 ++--- hw/scsi-defs.h |4 ++--

Re: [Qemu-devel] [PATCH] add suport for ATA_PASSTHROUGH_xx scsi command

2012-08-01 Thread Paolo Bonzini
Il 01/08/2012 09:53, Cong Meng ha scritto: > Correct the command names of opcode 0x85 and 0xa1, and calculate > their xfer size from CDB. > > Signed-off-by: Cong Meng > --- > hw/scsi-bus.c | 17 ++--- > hw/scsi-defs.h |4 ++-- > 2 files changed, 16 insertions(+), 5 deletions(-

[Qemu-devel] [PATCH] add suport for ATA_PASSTHROUGH_xx scsi command

2012-08-01 Thread Cong Meng
Correct the command names of opcode 0x85 and 0xa1, and calculate their xfer size from CDB. Signed-off-by: Cong Meng --- hw/scsi-bus.c | 17 ++--- hw/scsi-defs.h |4 ++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index e4ec19e