From 93161b69a53241be71e1aab7f792d78d9bfd19d3 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Mon, 30 Jul 2012 07:52:03 +1000 Subject: [PATCH 1/9] SCSI: Update the sense code for PREVENT REMOVAL errors Change the sense codes for failures to eject a device that is locked by PREVENT_ALLOW_MEDIUM_REMOVAL from the generic MEDIA_LOAD_OR_EJECT_FAILED to the more specific MEDIUM_REMOVAL_PREVENTED. The second sense code is more accurate, and is also listed in MMC annex F for the recommended sense codes for MMC devices while the first sense code is not. Signed-off-by: Ronnie Sahlberg Signed-off-by: Paolo Bonzini --- hw/scsi-bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index e4ec19e051..68049f628a 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -1103,7 +1103,7 @@ const struct SCSISense sense_code_NO_MEDIUM = { /* LUN not ready, medium removal prevented */ const struct SCSISense sense_code_NOT_READY_REMOVAL_PREVENTED = { - .key = NOT_READY, .asc = 0x53, .ascq = 0x00 + .key = NOT_READY, .asc = 0x53, .ascq = 0x02 }; /* Hardware error, internal target failure */ @@ -1153,7 +1153,7 @@ const struct SCSISense sense_code_INCOMPATIBLE_FORMAT = { /* Illegal request, medium removal prevented */ const struct SCSISense sense_code_ILLEGAL_REQ_REMOVAL_PREVENTED = { - .key = ILLEGAL_REQUEST, .asc = 0x53, .ascq = 0x00 + .key = ILLEGAL_REQUEST, .asc = 0x53, .ascq = 0x02 }; /* Command aborted, I/O process terminated */ From ae5708b36d34f72aa8c91e3dad56b266dfde73f1 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sat, 28 Jul 2012 11:14:53 +1000 Subject: [PATCH 2/9] SCSI: STARTSTOPUNIT only eject/load media if powercondition is 0 The START STOP UNIT command will only eject/load media if power condition is zero. If power condition is !0 then LOEJ and START will be ignored. From MMC (sbc contains similar wordings too) The Power Conditions field requests the block device to be placed in the power condition defined in Table 558. If this field has a value other than 0h then the Start and LoEj bits shall be ignored. Signed-off-by: Ronnie Sahlberg Signed-off-by: Paolo Bonzini --- hw/scsi-disk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 84b63ffafb..e2ec177069 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -1247,6 +1247,12 @@ static int scsi_disk_emulate_start_stop(SCSIDiskReq *r) SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, req->dev); bool start = req->cmd.buf[4] & 1; bool loej = req->cmd.buf[4] & 2; /* load on start, eject on !start */ + int pwrcnd = req->cmd.buf[4] & 0xf0; + + if (pwrcnd) { + /* eject/load only happens for power condition == 0 */ + return 0; + } if ((s->features & (1 << SCSI_DISK_F_REMOVABLE)) && loej) { if (!start && !s->tray_open && s->tray_locked) { From 18fc611b81d449827916f1cb27b3dbf0bcf364a8 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Tue, 31 Jul 2012 07:54:57 +0200 Subject: [PATCH 3/9] megasas: Update function megasys_scsi_uninit Commit f90c2bcdbc69e41e575f868b984c3e2de8f51bac changed PCIUnregisterFunc, therefore the function prototype needs an update. megasas.o is currently not linked, so this bug was not detected by the buildbots. Signed-off-by: Stefan Weil Signed-off-by: Paolo Bonzini --- hw/megasas.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/megasas.c b/hw/megasas.c index 9a0eab1c98..8a4960f8a1 100644 --- a/hw/megasas.c +++ b/hw/megasas.c @@ -2040,7 +2040,7 @@ static const VMStateDescription vmstate_megasas = { } }; -static int megasas_scsi_uninit(PCIDevice *d) +static void megasas_scsi_uninit(PCIDevice *d) { MegasasState *s = DO_UPCAST(MegasasState, dev, d); @@ -2050,7 +2050,6 @@ static int megasas_scsi_uninit(PCIDevice *d) memory_region_destroy(&s->mmio_io); memory_region_destroy(&s->port_io); memory_region_destroy(&s->queue_io); - return 0; } static const struct SCSIBusInfo megasas_scsi_info = { From 79fb50bb95ff85fe388a40e4884080f5a0c1bb21 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 31 Jul 2012 16:10:23 +0200 Subject: [PATCH 4/9] scsi-disk: fix compilation with DEBUG_SCSI Reported-by: Gerhard Wiesinger Signed-off-by: Paolo Bonzini --- hw/scsi-disk.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index e2ec177069..a9c727905a 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -447,7 +447,7 @@ static void scsi_write_complete(void * opaque, int ret) return; } else { scsi_init_iovec(r, SCSI_DMA_BUF_SIZE); - DPRINTF("Write complete tag=0x%x more=%d\n", r->req.tag, r->qiov.size); + DPRINTF("Write complete tag=0x%x more=%zd\n", r->req.tag, r->qiov.size); scsi_req_data(&r->req, r->qiov.size); } @@ -1277,7 +1277,7 @@ static void scsi_disk_emulate_read_data(SCSIRequest *req) int buflen = r->iov.iov_len; if (buflen) { - DPRINTF("Read buf_len=%zd\n", buflen); + DPRINTF("Read buf_len=%d\n", buflen); r->iov.iov_len = 0; r->started = true; scsi_req_data(&r->req, buflen); @@ -1455,7 +1455,7 @@ static void scsi_disk_emulate_write_data(SCSIRequest *req) if (r->iov.iov_len) { int buflen = r->iov.iov_len; - DPRINTF("Write buf_len=%zd\n", buflen); + DPRINTF("Write buf_len=%d\n", buflen); r->iov.iov_len = 0; scsi_req_data(&r->req, buflen); return; @@ -2093,23 +2093,24 @@ static SCSIRequest *scsi_new_request(SCSIDevice *d, uint32_t tag, uint32_t lun, const SCSIReqOps *ops; uint8_t command; -#ifdef DEBUG_SCSI - DPRINTF("Command: lun=%d tag=0x%x data=0x%02x", lun, buf[0]); - { - int i; - for (i = 1; i < r->req.cmd.len; i++) { - printf(" 0x%02x", buf[i]); - } - printf("\n"); - } -#endif - command = buf[0]; ops = scsi_disk_reqops_dispatch[command]; if (!ops) { ops = &scsi_disk_emulate_reqops; } req = scsi_req_alloc(ops, &s->qdev, tag, lun, hba_private); + +#ifdef DEBUG_SCSI + DPRINTF("Command: lun=%d tag=0x%x data=0x%02x", lun, tag, buf[0]); + { + int i; + for (i = 1; i < req->cmd.len; i++) { + printf(" 0x%02x", buf[i]); + } + printf("\n"); + } +#endif + return req; } From 76b523db0074aaf489cb80ccd0943b69ea67e30b Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Wed, 1 Aug 2012 12:46:50 +0200 Subject: [PATCH 5/9] megasas: static SAS addresses This patch introduces a new property 'sas_address' which allows the user to specify the SAS address for the HBA. The default address is following the NAA locally assigned identifier format with the locally assigned address 0x525400 as used eg for the MAC addresses. The lower bytes are set to the pci address which will ensure uniqueness for the local machine. The port addresses are now calculated based on the magic number 0x1221 (which is found in real hardware, too) plus the device number. Signed-off-by: Hannes Reinecke Cc: Paolo Bonzini Cc: Andreas Faerber Cc: Anthony Liguori Cc: Alexander Graf Signed-off-by: Paolo Bonzini --- hw/megasas.c | 65 ++++++++++++++++++++++++++++++++++++++-------------- hw/mfi.h | 1 + 2 files changed, 49 insertions(+), 17 deletions(-) diff --git a/hw/megasas.c b/hw/megasas.c index 8a4960f8a1..c35a15db4f 100644 --- a/hw/megasas.c +++ b/hw/megasas.c @@ -38,6 +38,9 @@ #define MEGASAS_MAX_SECTORS 0xFFFF /* No real limit */ #define MEGASAS_MAX_ARRAYS 128 +#define NAA_LOCALLY_ASSIGNED_ID 0x3ULL +#define IEEE_COMPANY_LOCALLY_ASSIGNED 0x525400 + #define MEGASAS_FLAG_USE_JBOD 0 #define MEGASAS_MASK_USE_JBOD (1 << MEGASAS_FLAG_USE_JBOD) #define MEGASAS_FLAG_USE_MSIX 1 @@ -89,6 +92,8 @@ typedef struct MegasasState { int shutdown_event; int boot_event; + uint64_t sas_addr; + uint64_t reply_queue_pa; void *reply_queue; int reply_queue_len; @@ -372,14 +377,16 @@ static uint64_t megasas_fw_time(void) return bcd_time; } -static uint64_t megasas_gen_sas_addr(uint64_t id) +/* + * Default disk sata address + * 0x1221 is the magic number as + * present in real hardware, + * so use it here, too. + */ +static uint64_t megasas_get_sata_addr(uint16_t id) { - uint64_t addr; - - addr = 0x5001a4aULL << 36; - addr |= id & 0xfffffffff; - - return addr; + uint64_t addr = (0x1221ULL << 48); + return addr & (id << 24); } /* @@ -652,10 +659,7 @@ static int megasas_ctrl_get_info(MegasasState *s, MegasasCmd *cmd) size_t dcmd_size = sizeof(info); BusChild *kid; int num_ld_disks = 0; - - QTAILQ_FOREACH(kid, &s->bus.qbus.children, sibling) { - num_ld_disks++; - } + uint16_t sdev_id; memset(&info, 0x0, cmd->iov_size); if (cmd->iov_size < dcmd_size) { @@ -669,10 +673,29 @@ static int megasas_ctrl_get_info(MegasasState *s, MegasasCmd *cmd) info.pci.subvendor = cpu_to_le16(PCI_VENDOR_ID_LSI_LOGIC); info.pci.subdevice = cpu_to_le16(0x1013); - info.host.type = MFI_INFO_HOST_PCIX; + /* + * For some reason the firmware supports + * only up to 8 device ports. + * Despite supporting a far larger number + * of devices for the physical devices. + * So just display the first 8 devices + * in the device port list, independent + * of how many logical devices are actually + * present. + */ + info.host.type = MFI_INFO_HOST_PCIE; info.device.type = MFI_INFO_DEV_SAS3G; - info.device.port_count = 2; - info.device.port_addr[0] = cpu_to_le64(megasas_gen_sas_addr((uint64_t)s)); + info.device.port_count = 8; + QTAILQ_FOREACH(kid, &s->bus.qbus.children, sibling) { + SCSIDevice *sdev = DO_UPCAST(SCSIDevice, qdev, kid->child); + + if (num_ld_disks < 8) { + sdev_id = ((sdev->id & 0xFF) >> 8) | (sdev->lun & 0xFF); + info.device.port_addr[num_ld_disks] = + cpu_to_le64(megasas_get_sata_addr(sdev_id)); + } + num_ld_disks++; + } memcpy(info.product_name, "MegaRAID SAS 8708EM2", 20); snprintf(info.serial_number, 32, "QEMU%08lx", @@ -761,7 +784,7 @@ static int megasas_mfc_get_defaults(MegasasState *s, MegasasCmd *cmd) return MFI_STAT_INVALID_PARAMETER; } - info.sas_addr = cpu_to_le64(megasas_gen_sas_addr((uint64_t)s)); + info.sas_addr = cpu_to_le64(s->sas_addr); info.stripe_size = 3; info.flush_time = 4; info.background_rate = 30; @@ -891,7 +914,7 @@ static int megasas_dcmd_pd_get_list(MegasasState *s, MegasasCmd *cmd) info.addr[num_pd_disks].scsi_dev_type = sdev->type; info.addr[num_pd_disks].connect_port_bitmap = 0x1; info.addr[num_pd_disks].sas_addr[0] = - cpu_to_le64(megasas_gen_sas_addr((uint64_t)sdev)); + cpu_to_le64(megasas_get_sata_addr(sdev_id)); num_pd_disks++; offset += sizeof(struct mfi_pd_address); } @@ -994,7 +1017,7 @@ static int megasas_pd_get_info_submit(SCSIDevice *sdev, int lun, info->slot_number = (sdev->id & 0xFF); info->path_info.count = 1; info->path_info.sas_addr[0] = - cpu_to_le64(megasas_gen_sas_addr((uint64_t)sdev)); + cpu_to_le64(megasas_get_sata_addr(sdev_id)); info->connected_port_bitmap = 0x1; info->device_speed = 1; info->link_speed = 1; @@ -2102,6 +2125,13 @@ static int megasas_scsi_init(PCIDevice *dev) msix_vector_use(&s->dev, 0); } + if (!s->sas_addr) { + s->sas_addr = ((NAA_LOCALLY_ASSIGNED_ID << 24) | + IEEE_COMPANY_LOCALLY_ASSIGNED) << 36; + s->sas_addr |= (pci_bus_num(dev->bus) << 16); + s->sas_addr |= (PCI_SLOT(dev->devfn) << 8); + s->sas_addr |= PCI_FUNC(dev->devfn); + } if (s->fw_sge >= MEGASAS_MAX_SGE - MFI_PASS_FRAME_SIZE) { s->fw_sge = MEGASAS_MAX_SGE - MFI_PASS_FRAME_SIZE; } else if (s->fw_sge >= 128 - MFI_PASS_FRAME_SIZE) { @@ -2136,6 +2166,7 @@ static Property megasas_properties[] = { MEGASAS_DEFAULT_SGE), DEFINE_PROP_UINT32("max_cmds", MegasasState, fw_cmds, MEGASAS_DEFAULT_FRAMES), + DEFINE_PROP_HEX64("sas_address", MegasasState, sas_addr, 0), #ifdef USE_MSIX DEFINE_PROP_BIT("use_msix", MegasasState, flags, MEGASAS_FLAG_USE_MSIX, false), diff --git a/hw/mfi.h b/hw/mfi.h index 3045d4eb6e..436b6906b1 100644 --- a/hw/mfi.h +++ b/hw/mfi.h @@ -656,6 +656,7 @@ struct mfi_info_device { #define MFI_INFO_DEV_SAS3G 0x02 #define MFI_INFO_DEV_SATA1 0x04 #define MFI_INFO_DEV_SATA3G 0x08 +#define MFI_INFO_DEV_PCIE 0x10 uint8_t reserved[6]; uint8_t port_count; uint64_t port_addr[8]; From ca5481ed57f620c81a0636e3ddf49478a950d649 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 1 Aug 2012 12:56:17 +0200 Subject: [PATCH 6/9] Revert "megasas: disable due to build breakage" This reverts commit 92336855975805d88c7979f53bc05c2d47abab04. Signed-off-by: Paolo Bonzini --- default-configs/pci.mak | 1 + 1 file changed, 1 insertion(+) diff --git a/default-configs/pci.mak b/default-configs/pci.mak index 9d3e1dbda1..4b49c0012b 100644 --- a/default-configs/pci.mak +++ b/default-configs/pci.mak @@ -10,6 +10,7 @@ CONFIG_EEPRO100_PCI=y CONFIG_PCNET_PCI=y CONFIG_PCNET_COMMON=y CONFIG_LSI_SCSI_PCI=y +CONFIG_MEGASAS_SCSI_PCI=y CONFIG_RTL8139_PCI=y CONFIG_E1000_PCI=y CONFIG_IDE_CORE=y From e7b2f53bd280fec199693e0dab6fc9748170e16e Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 2 Aug 2012 15:41:47 +0200 Subject: [PATCH 7/9] esp: enable for all PCI machines Signed-off-by: Paolo Bonzini --- default-configs/i386-softmmu.mak | 1 - default-configs/pci.mak | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak index fee8cde88b..2c78175ae7 100644 --- a/default-configs/i386-softmmu.mak +++ b/default-configs/i386-softmmu.mak @@ -25,4 +25,3 @@ CONFIG_HPET=y CONFIG_APPLESMC=y CONFIG_I8259=y CONFIG_PFLASH_CFI01=y -CONFIG_ESP=y diff --git a/default-configs/pci.mak b/default-configs/pci.mak index 4b49c0012b..9febb47ae6 100644 --- a/default-configs/pci.mak +++ b/default-configs/pci.mak @@ -17,3 +17,4 @@ CONFIG_IDE_CORE=y CONFIG_IDE_QDEV=y CONFIG_IDE_PCI=y CONFIG_AHCI=y +CONFIG_ESP=y From 1f07730896f4a38a66bc3a6837704290ff2927f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Thu, 2 Aug 2012 10:40:30 +0200 Subject: [PATCH 8/9] esp: add missing const on TypeInfo structures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hervé Poussineau Signed-off-by: Paolo Bonzini --- hw/esp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/esp.c b/hw/esp.c index a011347b4f..77f57076c7 100644 --- a/hw/esp.c +++ b/hw/esp.c @@ -816,7 +816,7 @@ static void sysbus_esp_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_sysbus_esp_scsi; } -static TypeInfo sysbus_esp_info = { +static const TypeInfo sysbus_esp_info = { .name = "esp", .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(SysBusESPState), @@ -1176,7 +1176,7 @@ static void esp_pci_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_esp_pci_scsi; } -static TypeInfo esp_pci_info = { +static const TypeInfo esp_pci_info = { .name = "am53c974", .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(PCIESPState), From e4b65262a3b6633fe107e4ce7660b41a71a16e5f Mon Sep 17 00:00:00 2001 From: Cong Meng Date: Fri, 3 Aug 2012 12:02:19 +0800 Subject: [PATCH 9/9] scsi: add support for ATA_PASSTHROUGH_xx scsi command Correct the command names of opcode 0x85 and 0xa1, and calculate their xfer size from CDB. Signed-off-by: Cong Meng Signed-off-by: Paolo Bonzini --- hw/scsi-bus.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++++-- hw/scsi-defs.h | 4 +-- 2 files changed, 87 insertions(+), 5 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index 68049f628a..6120cc83c1 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -733,6 +733,72 @@ static int scsi_get_performance_length(int num_desc, int type, int data_type) } } +static int ata_passthrough_xfer_unit(SCSIDevice *dev, uint8_t *buf) +{ + int byte_block = (buf[2] >> 2) & 0x1; + int type = (buf[2] >> 4) & 0x1; + int xfer_unit; + + if (byte_block) { + if (type) { + xfer_unit = dev->blocksize; + } else { + xfer_unit = 512; + } + } else { + xfer_unit = 1; + } + + return xfer_unit; +} + +static int ata_passthrough_12_xfer_size(SCSIDevice *dev, uint8_t *buf) +{ + int length = buf[2] & 0x3; + int xfer; + int unit = ata_passthrough_xfer_unit(dev, buf); + + switch (length) { + case 0: + case 3: /* USB-specific. */ + xfer = 0; + break; + case 1: + xfer = buf[3]; + break; + case 2: + xfer = buf[4]; + break; + } + + return xfer * unit; +} + +static int ata_passthrough_16_xfer_size(SCSIDevice *dev, uint8_t *buf) +{ + int extend = buf[1] & 0x1; + int length = buf[2] & 0x3; + int xfer; + int unit = ata_passthrough_xfer_unit(dev, buf); + + switch (length) { + case 0: + case 3: /* USB-specific. */ + xfer = 0; + break; + case 1: + xfer = buf[4]; + xfer |= (extend ? buf[3] << 8 : 0); + break; + case 2: + xfer = buf[6]; + xfer |= (extend ? buf[5] << 8 : 0); + break; + } + + return xfer * unit; +} + static int scsi_req_length(SCSICommand *cmd, SCSIDevice *dev, uint8_t *buf) { switch (buf[0] >> 5) { @@ -867,6 +933,17 @@ static int scsi_req_length(SCSICommand *cmd, SCSIDevice *dev, uint8_t *buf) cmd->xfer = buf[9] | (buf[8] << 8); } break; + case ATA_PASSTHROUGH_12: + if (dev->type == TYPE_ROM) { + /* BLANK command of MMC */ + cmd->xfer = 0; + } else { + cmd->xfer = ata_passthrough_12_xfer_size(dev, buf); + } + break; + case ATA_PASSTHROUGH_16: + cmd->xfer = ata_passthrough_16_xfer_size(dev, buf); + break; } return 0; } @@ -996,9 +1073,14 @@ static void scsi_cmd_xfer_mode(SCSICommand *cmd) case SEND_DVD_STRUCTURE: case PERSISTENT_RESERVE_OUT: case MAINTENANCE_OUT: - case ATA_PASSTHROUGH: cmd->mode = SCSI_XFER_TO_DEV; break; + case ATA_PASSTHROUGH_12: + case ATA_PASSTHROUGH_16: + /* T_DIR */ + cmd->mode = (cmd->buf[2] & 0x8) ? + SCSI_XFER_FROM_DEV : SCSI_XFER_TO_DEV; + break; default: cmd->mode = SCSI_XFER_FROM_DEV; break; @@ -1335,7 +1417,7 @@ static const char *scsi_command_name(uint8_t cmd) [ PERSISTENT_RESERVE_OUT ] = "PERSISTENT_RESERVE_OUT", [ WRITE_FILEMARKS_16 ] = "WRITE_FILEMARKS_16", [ EXTENDED_COPY ] = "EXTENDED_COPY", - [ ATA_PASSTHROUGH ] = "ATA_PASSTHROUGH", + [ ATA_PASSTHROUGH_16 ] = "ATA_PASSTHROUGH_16", [ ACCESS_CONTROL_IN ] = "ACCESS_CONTROL_IN", [ ACCESS_CONTROL_OUT ] = "ACCESS_CONTROL_OUT", [ READ_16 ] = "READ_16", @@ -1352,7 +1434,7 @@ static const char *scsi_command_name(uint8_t cmd) [ SERVICE_ACTION_IN_16 ] = "SERVICE_ACTION_IN_16", [ WRITE_LONG_16 ] = "WRITE_LONG_16", [ REPORT_LUNS ] = "REPORT_LUNS", - [ BLANK ] = "BLANK", + [ ATA_PASSTHROUGH_12 ] = "BLANK/ATA_PASSTHROUGH_12", [ MOVE_MEDIUM ] = "MOVE_MEDIUM", [ EXCHANGE_MEDIUM ] = "EXCHANGE MEDIUM", [ LOAD_UNLOAD ] = "LOAD_UNLOAD", diff --git a/hw/scsi-defs.h b/hw/scsi-defs.h index 8a73f745ba..d7a401912b 100644 --- a/hw/scsi-defs.h +++ b/hw/scsi-defs.h @@ -100,7 +100,7 @@ #define READ_REVERSE_16 0x81 #define ALLOW_OVERWRITE 0x82 #define EXTENDED_COPY 0x83 -#define ATA_PASSTHROUGH 0x85 +#define ATA_PASSTHROUGH_16 0x85 #define ACCESS_CONTROL_IN 0x86 #define ACCESS_CONTROL_OUT 0x87 #define READ_16 0x88 @@ -117,7 +117,7 @@ #define SERVICE_ACTION_IN_16 0x9e #define WRITE_LONG_16 0x9f #define REPORT_LUNS 0xa0 -#define BLANK 0xa1 +#define ATA_PASSTHROUGH_12 0xa1 #define MAINTENANCE_IN 0xa3 #define MAINTENANCE_OUT 0xa4 #define MOVE_MEDIUM 0xa5