dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone

Blame 0010-scsi-move-block-scsi.h-to-include-scsi-constants.h.patch

59eb7a
From: Paolo Bonzini <pbonzini@redhat.com>
59eb7a
Date: Tue, 22 Aug 2017 09:23:55 +0200
59eb7a
Subject: [PATCH] scsi: move block/scsi.h to include/scsi/constants.h
59eb7a
MIME-Version: 1.0
59eb7a
Content-Type: text/plain; charset=UTF-8
59eb7a
Content-Transfer-Encoding: 8bit
59eb7a
59eb7a
Complete the transition by renaming this header, which was
59eb7a
shared by block/iscsi.c and the SCSI emulation code.
59eb7a
59eb7a
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
59eb7a
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
59eb7a
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
59eb7a
---
59eb7a
 block/iscsi.c                   |   2 +-
59eb7a
 hw/block/virtio-blk.c           |   2 +-
59eb7a
 hw/scsi/megasas.c               |   2 +-
59eb7a
 hw/scsi/mptendian.c             |   2 +-
59eb7a
 hw/scsi/mptsas.c                |   2 +-
59eb7a
 hw/scsi/scsi-bus.c              |   2 +-
59eb7a
 hw/scsi/scsi-disk.c             |   2 +-
59eb7a
 hw/scsi/scsi-generic.c          |   2 +-
59eb7a
 hw/scsi/spapr_vscsi.c           |   2 +-
59eb7a
 hw/scsi/virtio-scsi-dataplane.c |   2 +-
59eb7a
 hw/scsi/virtio-scsi.c           |   2 +-
59eb7a
 hw/scsi/vmw_pvscsi.c            |   2 +-
59eb7a
 hw/usb/dev-uas.c                |   2 +-
59eb7a
 include/block/scsi.h            | 314 ----------------------------------------
59eb7a
 include/hw/ide/internal.h       |   2 +-
59eb7a
 include/scsi/constants.h        | 314 ++++++++++++++++++++++++++++++++++++++++
59eb7a
 scsi/utils.c                    |   2 +-
59eb7a
 tests/virtio-scsi-test.c        |   2 +-
59eb7a
 18 files changed, 330 insertions(+), 330 deletions(-)
59eb7a
 delete mode 100644 include/block/scsi.h
59eb7a
 create mode 100644 include/scsi/constants.h
59eb7a
59eb7a
diff --git a/block/iscsi.c b/block/iscsi.c
59eb7a
index 40adc3c493..c4586be720 100644
59eb7a
--- a/block/iscsi.c
59eb7a
+++ b/block/iscsi.c
59eb7a
@@ -34,7 +34,7 @@
59eb7a
 #include "qemu/bitops.h"
59eb7a
 #include "qemu/bitmap.h"
59eb7a
 #include "block/block_int.h"
59eb7a
-#include "block/scsi.h"
59eb7a
+#include "scsi/constants.h"
59eb7a
 #include "qemu/iov.h"
59eb7a
 #include "qemu/uuid.h"
59eb7a
 #include "qmp-commands.h"
59eb7a
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
59eb7a
index a16ac75090..05d1440786 100644
59eb7a
--- a/hw/block/virtio-blk.c
59eb7a
+++ b/hw/block/virtio-blk.c
59eb7a
@@ -22,7 +22,7 @@
59eb7a
 #include "sysemu/blockdev.h"
59eb7a
 #include "hw/virtio/virtio-blk.h"
59eb7a
 #include "dataplane/virtio-blk.h"
59eb7a
-#include "block/scsi.h"
59eb7a
+#include "scsi/constants.h"
59eb7a
 #ifdef __linux__
59eb7a
 # include <scsi/sg.h>
59eb7a
 #endif
59eb7a
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
59eb7a
index 734fdaef90..0db68aacee 100644
59eb7a
--- a/hw/scsi/megasas.c
59eb7a
+++ b/hw/scsi/megasas.c
59eb7a
@@ -27,7 +27,7 @@
59eb7a
 #include "hw/pci/msix.h"
59eb7a
 #include "qemu/iov.h"
59eb7a
 #include "hw/scsi/scsi.h"
59eb7a
-#include "block/scsi.h"
59eb7a
+#include "scsi/constants.h"
59eb7a
 #include "trace.h"
59eb7a
 #include "qapi/error.h"
59eb7a
 #include "mfi.h"
59eb7a
diff --git a/hw/scsi/mptendian.c b/hw/scsi/mptendian.c
59eb7a
index b7fe2a2a36..3415229b5e 100644
59eb7a
--- a/hw/scsi/mptendian.c
59eb7a
+++ b/hw/scsi/mptendian.c
59eb7a
@@ -28,7 +28,7 @@
59eb7a
 #include "hw/pci/msi.h"
59eb7a
 #include "qemu/iov.h"
59eb7a
 #include "hw/scsi/scsi.h"
59eb7a
-#include "block/scsi.h"
59eb7a
+#include "scsi/constants.h"
59eb7a
 #include "trace.h"
59eb7a
 
59eb7a
 #include "mptsas.h"
59eb7a
diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c
59eb7a
index 765ab53c34..8bae8f543e 100644
59eb7a
--- a/hw/scsi/mptsas.c
59eb7a
+++ b/hw/scsi/mptsas.c
59eb7a
@@ -30,7 +30,7 @@
59eb7a
 #include "hw/pci/msi.h"
59eb7a
 #include "qemu/iov.h"
59eb7a
 #include "hw/scsi/scsi.h"
59eb7a
-#include "block/scsi.h"
59eb7a
+#include "scsi/constants.h"
59eb7a
 #include "trace.h"
59eb7a
 #include "qapi/error.h"
59eb7a
 #include "mptsas.h"
59eb7a
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
59eb7a
index 652ab046ab..977f7bce1f 100644
59eb7a
--- a/hw/scsi/scsi-bus.c
59eb7a
+++ b/hw/scsi/scsi-bus.c
59eb7a
@@ -3,7 +3,7 @@
59eb7a
 #include "qapi/error.h"
59eb7a
 #include "qemu/error-report.h"
59eb7a
 #include "hw/scsi/scsi.h"
59eb7a
-#include "block/scsi.h"
59eb7a
+#include "scsi/constants.h"
59eb7a
 #include "hw/qdev.h"
59eb7a
 #include "sysemu/block-backend.h"
59eb7a
 #include "sysemu/blockdev.h"
59eb7a
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
59eb7a
index 0a1f4ef0c7..5faf6682c5 100644
59eb7a
--- a/hw/scsi/scsi-disk.c
59eb7a
+++ b/hw/scsi/scsi-disk.c
59eb7a
@@ -32,7 +32,7 @@ do { printf("scsi-disk: " fmt , ## __VA_ARGS__); } while (0)
59eb7a
 #include "qapi/error.h"
59eb7a
 #include "qemu/error-report.h"
59eb7a
 #include "hw/scsi/scsi.h"
59eb7a
-#include "block/scsi.h"
59eb7a
+#include "scsi/constants.h"
59eb7a
 #include "sysemu/sysemu.h"
59eb7a
 #include "sysemu/block-backend.h"
59eb7a
 #include "sysemu/blockdev.h"
59eb7a
diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c
59eb7a
index 04c687ee76..bd0d9ff355 100644
59eb7a
--- a/hw/scsi/scsi-generic.c
59eb7a
+++ b/hw/scsi/scsi-generic.c
59eb7a
@@ -34,7 +34,7 @@ do { printf("scsi-generic: " fmt , ## __VA_ARGS__); } while (0)
59eb7a
 do { fprintf(stderr, "scsi-generic: " fmt , ## __VA_ARGS__); } while (0)
59eb7a
 
59eb7a
 #include <scsi/sg.h>
59eb7a
-#include "block/scsi.h"
59eb7a
+#include "scsi/constants.h"
59eb7a
 
59eb7a
 #ifndef MAX_UINT
59eb7a
 #define MAX_UINT ((unsigned int)-1)
59eb7a
diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c
59eb7a
index 55ee48c4da..360db53ac8 100644
59eb7a
--- a/hw/scsi/spapr_vscsi.c
59eb7a
+++ b/hw/scsi/spapr_vscsi.c
59eb7a
@@ -36,7 +36,7 @@
59eb7a
 #include "cpu.h"
59eb7a
 #include "hw/hw.h"
59eb7a
 #include "hw/scsi/scsi.h"
59eb7a
-#include "block/scsi.h"
59eb7a
+#include "scsi/constants.h"
59eb7a
 #include "srp.h"
59eb7a
 #include "hw/qdev.h"
59eb7a
 #include "hw/ppc/spapr.h"
59eb7a
diff --git a/hw/scsi/virtio-scsi-dataplane.c b/hw/scsi/virtio-scsi-dataplane.c
59eb7a
index 944ea4eb53..add4b3f4a4 100644
59eb7a
--- a/hw/scsi/virtio-scsi-dataplane.c
59eb7a
+++ b/hw/scsi/virtio-scsi-dataplane.c
59eb7a
@@ -17,7 +17,7 @@
59eb7a
 #include "qemu/error-report.h"
59eb7a
 #include "sysemu/block-backend.h"
59eb7a
 #include "hw/scsi/scsi.h"
59eb7a
-#include "block/scsi.h"
59eb7a
+#include "scsi/constants.h"
59eb7a
 #include "hw/virtio/virtio-bus.h"
59eb7a
 #include "hw/virtio/virtio-access.h"
59eb7a
 
59eb7a
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
59eb7a
index eb639442d1..823a1e9a42 100644
59eb7a
--- a/hw/scsi/virtio-scsi.c
59eb7a
+++ b/hw/scsi/virtio-scsi.c
59eb7a
@@ -21,7 +21,7 @@
59eb7a
 #include "qemu/iov.h"
59eb7a
 #include "sysemu/block-backend.h"
59eb7a
 #include "hw/scsi/scsi.h"
59eb7a
-#include "block/scsi.h"
59eb7a
+#include "scsi/constants.h"
59eb7a
 #include "hw/virtio/virtio-bus.h"
59eb7a
 #include "hw/virtio/virtio-access.h"
59eb7a
 
59eb7a
diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c
59eb7a
index 77d8b6f9e2..6d3f0bf11d 100644
59eb7a
--- a/hw/scsi/vmw_pvscsi.c
59eb7a
+++ b/hw/scsi/vmw_pvscsi.c
59eb7a
@@ -28,7 +28,7 @@
59eb7a
 #include "qemu/osdep.h"
59eb7a
 #include "qapi/error.h"
59eb7a
 #include "hw/scsi/scsi.h"
59eb7a
-#include "block/scsi.h"
59eb7a
+#include "scsi/constants.h"
59eb7a
 #include "hw/pci/msi.h"
59eb7a
 #include "vmw_pvscsi.h"
59eb7a
 #include "trace.h"
59eb7a
diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c
59eb7a
index fffc424396..c218b53f09 100644
59eb7a
--- a/hw/usb/dev-uas.c
59eb7a
+++ b/hw/usb/dev-uas.c
59eb7a
@@ -19,7 +19,7 @@
59eb7a
 #include "hw/usb.h"
59eb7a
 #include "hw/usb/desc.h"
59eb7a
 #include "hw/scsi/scsi.h"
59eb7a
-#include "block/scsi.h"
59eb7a
+#include "scsi/constants.h"
59eb7a
 
59eb7a
 /* --------------------------------------------------------------------- */
59eb7a
 
59eb7a
diff --git a/include/block/scsi.h b/include/block/scsi.h
59eb7a
deleted file mode 100644
59eb7a
index a141dd71f8..0000000000
59eb7a
--- a/include/block/scsi.h
59eb7a
+++ /dev/null
59eb7a
@@ -1,314 +0,0 @@
59eb7a
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
59eb7a
-   This file is part of the GNU C Library.
59eb7a
-
59eb7a
-   The GNU C Library is free software; you can redistribute it and/or
59eb7a
-   modify it under the terms of the GNU Lesser General Public
59eb7a
-   License as published by the Free Software Foundation; either
59eb7a
-   version 2.1 of the License, or (at your option) any later version.
59eb7a
-
59eb7a
-   The GNU C Library is distributed in the hope that it will be useful,
59eb7a
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
59eb7a
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
59eb7a
-   Lesser General Public License for more details.
59eb7a
-
59eb7a
-   You should have received a copy of the GNU Lesser General Public
59eb7a
-   License along with this library; if not, see <http://www.gnu.org/licenses/>.
59eb7a
-*/
59eb7a
-
59eb7a
-/*
59eb7a
- * This header file contains public constants and structures used by
59eb7a
- * the scsi code for linux.
59eb7a
- */
59eb7a
-
59eb7a
-#ifndef BLOCK_SCSI_H
59eb7a
-#define BLOCK_SCSI_H
59eb7a
-
59eb7a
-/*
59eb7a
- *      SCSI opcodes
59eb7a
- */
59eb7a
-
59eb7a
-#define TEST_UNIT_READY       0x00
59eb7a
-#define REWIND                0x01
59eb7a
-#define REQUEST_SENSE         0x03
59eb7a
-#define FORMAT_UNIT           0x04
59eb7a
-#define READ_BLOCK_LIMITS     0x05
59eb7a
-#define INITIALIZE_ELEMENT_STATUS 0x07
59eb7a
-#define REASSIGN_BLOCKS       0x07
59eb7a
-#define READ_6                0x08
59eb7a
-#define WRITE_6               0x0a
59eb7a
-#define SET_CAPACITY          0x0b
59eb7a
-#define READ_REVERSE          0x0f
59eb7a
-#define WRITE_FILEMARKS       0x10
59eb7a
-#define SPACE                 0x11
59eb7a
-#define INQUIRY               0x12
59eb7a
-#define RECOVER_BUFFERED_DATA 0x14
59eb7a
-#define MODE_SELECT           0x15
59eb7a
-#define RESERVE               0x16
59eb7a
-#define RELEASE               0x17
59eb7a
-#define COPY                  0x18
59eb7a
-#define ERASE                 0x19
59eb7a
-#define MODE_SENSE            0x1a
59eb7a
-#define LOAD_UNLOAD           0x1b
59eb7a
-#define SCAN                  0x1b
59eb7a
-#define START_STOP            0x1b
59eb7a
-#define RECEIVE_DIAGNOSTIC    0x1c
59eb7a
-#define SEND_DIAGNOSTIC       0x1d
59eb7a
-#define ALLOW_MEDIUM_REMOVAL  0x1e
59eb7a
-#define SET_WINDOW            0x24
59eb7a
-#define READ_CAPACITY_10      0x25
59eb7a
-#define GET_WINDOW            0x25
59eb7a
-#define READ_10               0x28
59eb7a
-#define WRITE_10              0x2a
59eb7a
-#define SEND                  0x2a
59eb7a
-#define SEEK_10               0x2b
59eb7a
-#define LOCATE_10             0x2b
59eb7a
-#define POSITION_TO_ELEMENT   0x2b
59eb7a
-#define WRITE_VERIFY_10       0x2e
59eb7a
-#define VERIFY_10             0x2f
59eb7a
-#define SEARCH_HIGH           0x30
59eb7a
-#define SEARCH_EQUAL          0x31
59eb7a
-#define OBJECT_POSITION       0x31
59eb7a
-#define SEARCH_LOW            0x32
59eb7a
-#define SET_LIMITS            0x33
59eb7a
-#define PRE_FETCH             0x34
59eb7a
-#define READ_POSITION         0x34
59eb7a
-#define GET_DATA_BUFFER_STATUS 0x34
59eb7a
-#define SYNCHRONIZE_CACHE     0x35
59eb7a
-#define LOCK_UNLOCK_CACHE     0x36
59eb7a
-#define INITIALIZE_ELEMENT_STATUS_WITH_RANGE 0x37
59eb7a
-#define READ_DEFECT_DATA      0x37
59eb7a
-#define MEDIUM_SCAN           0x38
59eb7a
-#define COMPARE               0x39
59eb7a
-#define COPY_VERIFY           0x3a
59eb7a
-#define WRITE_BUFFER          0x3b
59eb7a
-#define READ_BUFFER           0x3c
59eb7a
-#define UPDATE_BLOCK          0x3d
59eb7a
-#define READ_LONG_10          0x3e
59eb7a
-#define WRITE_LONG_10         0x3f
59eb7a
-#define CHANGE_DEFINITION     0x40
59eb7a
-#define WRITE_SAME_10         0x41
59eb7a
-#define UNMAP                 0x42
59eb7a
-#define READ_TOC              0x43
59eb7a
-#define REPORT_DENSITY_SUPPORT 0x44
59eb7a
-#define GET_CONFIGURATION     0x46
59eb7a
-#define SANITIZE              0x48
59eb7a
-#define GET_EVENT_STATUS_NOTIFICATION 0x4a
59eb7a
-#define LOG_SELECT            0x4c
59eb7a
-#define LOG_SENSE             0x4d
59eb7a
-#define READ_DISC_INFORMATION 0x51
59eb7a
-#define RESERVE_TRACK         0x53
59eb7a
-#define MODE_SELECT_10        0x55
59eb7a
-#define RESERVE_10            0x56
59eb7a
-#define RELEASE_10            0x57
59eb7a
-#define MODE_SENSE_10         0x5a
59eb7a
-#define SEND_CUE_SHEET        0x5d
59eb7a
-#define PERSISTENT_RESERVE_IN 0x5e
59eb7a
-#define PERSISTENT_RESERVE_OUT 0x5f
59eb7a
-#define VARLENGTH_CDB         0x7f
59eb7a
-#define WRITE_FILEMARKS_16    0x80
59eb7a
-#define READ_REVERSE_16       0x81
59eb7a
-#define ALLOW_OVERWRITE       0x82
59eb7a
-#define EXTENDED_COPY         0x83
59eb7a
-#define ATA_PASSTHROUGH_16    0x85
59eb7a
-#define ACCESS_CONTROL_IN     0x86
59eb7a
-#define ACCESS_CONTROL_OUT    0x87
59eb7a
-#define READ_16               0x88
59eb7a
-#define COMPARE_AND_WRITE     0x89
59eb7a
-#define WRITE_16              0x8a
59eb7a
-#define WRITE_VERIFY_16       0x8e
59eb7a
-#define VERIFY_16             0x8f
59eb7a
-#define PRE_FETCH_16          0x90
59eb7a
-#define SPACE_16              0x91
59eb7a
-#define SYNCHRONIZE_CACHE_16  0x91
59eb7a
-#define LOCATE_16             0x92
59eb7a
-#define WRITE_SAME_16         0x93
59eb7a
-#define ERASE_16              0x93
59eb7a
-#define SERVICE_ACTION_IN_16  0x9e
59eb7a
-#define WRITE_LONG_16         0x9f
59eb7a
-#define REPORT_LUNS           0xa0
59eb7a
-#define ATA_PASSTHROUGH_12    0xa1
59eb7a
-#define MAINTENANCE_IN        0xa3
59eb7a
-#define MAINTENANCE_OUT       0xa4
59eb7a
-#define MOVE_MEDIUM           0xa5
59eb7a
-#define EXCHANGE_MEDIUM       0xa6
59eb7a
-#define SET_READ_AHEAD        0xa7
59eb7a
-#define READ_12               0xa8
59eb7a
-#define WRITE_12              0xaa
59eb7a
-#define SERVICE_ACTION_IN_12  0xab
59eb7a
-#define ERASE_12              0xac
59eb7a
-#define READ_DVD_STRUCTURE    0xad
59eb7a
-#define WRITE_VERIFY_12       0xae
59eb7a
-#define VERIFY_12             0xaf
59eb7a
-#define SEARCH_HIGH_12        0xb0
59eb7a
-#define SEARCH_EQUAL_12       0xb1
59eb7a
-#define SEARCH_LOW_12         0xb2
59eb7a
-#define READ_ELEMENT_STATUS   0xb8
59eb7a
-#define SEND_VOLUME_TAG       0xb6
59eb7a
-#define READ_DEFECT_DATA_12   0xb7
59eb7a
-#define SET_CD_SPEED          0xbb
59eb7a
-#define MECHANISM_STATUS      0xbd
59eb7a
-#define READ_CD               0xbe
59eb7a
-#define SEND_DVD_STRUCTURE    0xbf
59eb7a
-
59eb7a
-/*
59eb7a
- * SERVICE ACTION IN subcodes
59eb7a
- */
59eb7a
-#define SAI_READ_CAPACITY_16  0x10
59eb7a
-
59eb7a
-/*
59eb7a
- * READ POSITION service action codes
59eb7a
- */
59eb7a
-#define SHORT_FORM_BLOCK_ID  0x00
59eb7a
-#define SHORT_FORM_VENDOR_SPECIFIC 0x01
59eb7a
-#define LONG_FORM            0x06
59eb7a
-#define EXTENDED_FORM        0x08
59eb7a
-
59eb7a
-/*
59eb7a
- *  SAM Status codes
59eb7a
- */
59eb7a
-
59eb7a
-#define GOOD                 0x00
59eb7a
-#define CHECK_CONDITION      0x02
59eb7a
-#define CONDITION_GOOD       0x04
59eb7a
-#define BUSY                 0x08
59eb7a
-#define INTERMEDIATE_GOOD    0x10
59eb7a
-#define INTERMEDIATE_C_GOOD  0x14
59eb7a
-#define RESERVATION_CONFLICT 0x18
59eb7a
-#define COMMAND_TERMINATED   0x22
59eb7a
-#define TASK_SET_FULL        0x28
59eb7a
-#define ACA_ACTIVE           0x30
59eb7a
-#define TASK_ABORTED         0x40
59eb7a
-
59eb7a
-#define STATUS_MASK          0x3e
59eb7a
-
59eb7a
-/*
59eb7a
- *  SENSE KEYS
59eb7a
- */
59eb7a
-
59eb7a
-#define NO_SENSE            0x00
59eb7a
-#define RECOVERED_ERROR     0x01
59eb7a
-#define NOT_READY           0x02
59eb7a
-#define MEDIUM_ERROR        0x03
59eb7a
-#define HARDWARE_ERROR      0x04
59eb7a
-#define ILLEGAL_REQUEST     0x05
59eb7a
-#define UNIT_ATTENTION      0x06
59eb7a
-#define DATA_PROTECT        0x07
59eb7a
-#define BLANK_CHECK         0x08
59eb7a
-#define COPY_ABORTED        0x0a
59eb7a
-#define ABORTED_COMMAND     0x0b
59eb7a
-#define VOLUME_OVERFLOW     0x0d
59eb7a
-#define MISCOMPARE          0x0e
59eb7a
-
59eb7a
-
59eb7a
-/*
59eb7a
- *  DEVICE TYPES
59eb7a
- */
59eb7a
-
59eb7a
-#define TYPE_DISK           0x00
59eb7a
-#define TYPE_TAPE           0x01
59eb7a
-#define TYPE_PRINTER        0x02
59eb7a
-#define TYPE_PROCESSOR      0x03    /* HP scanners use this */
59eb7a
-#define TYPE_WORM           0x04    /* Treated as ROM by our system */
59eb7a
-#define TYPE_ROM            0x05
59eb7a
-#define TYPE_SCANNER        0x06
59eb7a
-#define TYPE_MOD            0x07    /* Magneto-optical disk -
59eb7a
-				     * - treated as TYPE_DISK */
59eb7a
-#define TYPE_MEDIUM_CHANGER 0x08
59eb7a
-#define TYPE_STORAGE_ARRAY  0x0c    /* Storage array device */
59eb7a
-#define TYPE_ENCLOSURE      0x0d    /* Enclosure Services Device */
59eb7a
-#define TYPE_RBC            0x0e    /* Simplified Direct-Access Device */
59eb7a
-#define TYPE_OSD            0x11    /* Object-storage Device */
59eb7a
-#define TYPE_WLUN           0x1e    /* Well known LUN */
59eb7a
-#define TYPE_NOT_PRESENT    0x1f
59eb7a
-#define TYPE_INACTIVE       0x20
59eb7a
-#define TYPE_NO_LUN         0x7f
59eb7a
-
59eb7a
-/* Mode page codes for mode sense/set */
59eb7a
-#define MODE_PAGE_R_W_ERROR                   0x01
59eb7a
-#define MODE_PAGE_HD_GEOMETRY                 0x04
59eb7a
-#define MODE_PAGE_FLEXIBLE_DISK_GEOMETRY      0x05
59eb7a
-#define MODE_PAGE_CACHING                     0x08
59eb7a
-#define MODE_PAGE_AUDIO_CTL                   0x0e
59eb7a
-#define MODE_PAGE_POWER                       0x1a
59eb7a
-#define MODE_PAGE_FAULT_FAIL                  0x1c
59eb7a
-#define MODE_PAGE_TO_PROTECT                  0x1d
59eb7a
-#define MODE_PAGE_CAPABILITIES                0x2a
59eb7a
-#define MODE_PAGE_ALLS                        0x3f
59eb7a
-/* Not in Mt. Fuji, but in ATAPI 2.6 -- deprecated now in favor
59eb7a
- * of MODE_PAGE_SENSE_POWER */
59eb7a
-#define MODE_PAGE_CDROM                       0x0d
59eb7a
-
59eb7a
-/* Event notification classes for GET EVENT STATUS NOTIFICATION */
59eb7a
-#define GESN_NO_EVENTS                0
59eb7a
-#define GESN_OPERATIONAL_CHANGE       1
59eb7a
-#define GESN_POWER_MANAGEMENT         2
59eb7a
-#define GESN_EXTERNAL_REQUEST         3
59eb7a
-#define GESN_MEDIA                    4
59eb7a
-#define GESN_MULTIPLE_HOSTS           5
59eb7a
-#define GESN_DEVICE_BUSY              6
59eb7a
-
59eb7a
-/* Event codes for MEDIA event status notification */
59eb7a
-#define MEC_NO_CHANGE                 0
59eb7a
-#define MEC_EJECT_REQUESTED           1
59eb7a
-#define MEC_NEW_MEDIA                 2
59eb7a
-#define MEC_MEDIA_REMOVAL             3 /* only for media changers */
59eb7a
-#define MEC_MEDIA_CHANGED             4 /* only for media changers */
59eb7a
-#define MEC_BG_FORMAT_COMPLETED       5 /* MRW or DVD+RW b/g format completed */
59eb7a
-#define MEC_BG_FORMAT_RESTARTED       6 /* MRW or DVD+RW b/g format restarted */
59eb7a
-
59eb7a
-#define MS_TRAY_OPEN                  1
59eb7a
-#define MS_MEDIA_PRESENT              2
59eb7a
-
59eb7a
-/*
59eb7a
- * Based on values from <linux/cdrom.h> but extending CD_MINS
59eb7a
- * to the maximum common size allowed by the Orange's Book ATIP
59eb7a
- *
59eb7a
- * 90 and 99 min CDs are also available but using them as the
59eb7a
- * upper limit reduces the effectiveness of the heuristic to
59eb7a
- * detect DVDs burned to less than 25% of their maximum capacity
59eb7a
- */
59eb7a
-
59eb7a
-/* Some generally useful CD-ROM information */
59eb7a
-#define CD_MINS                       80 /* max. minutes per CD */
59eb7a
-#define CD_SECS                       60 /* seconds per minute */
59eb7a
-#define CD_FRAMES                     75 /* frames per second */
59eb7a
-#define CD_FRAMESIZE                2048 /* bytes per frame, "cooked" mode */
59eb7a
-#define CD_MAX_BYTES       (CD_MINS * CD_SECS * CD_FRAMES * CD_FRAMESIZE)
59eb7a
-#define CD_MAX_SECTORS     (CD_MAX_BYTES / 512)
59eb7a
-
59eb7a
-/*
59eb7a
- * The MMC values are not IDE specific and might need to be moved
59eb7a
- * to a common header if they are also needed for the SCSI emulation
59eb7a
- */
59eb7a
-
59eb7a
-/* Profile list from MMC-6 revision 1 table 91 */
59eb7a
-#define MMC_PROFILE_NONE                0x0000
59eb7a
-#define MMC_PROFILE_CD_ROM              0x0008
59eb7a
-#define MMC_PROFILE_CD_R                0x0009
59eb7a
-#define MMC_PROFILE_CD_RW               0x000A
59eb7a
-#define MMC_PROFILE_DVD_ROM             0x0010
59eb7a
-#define MMC_PROFILE_DVD_R_SR            0x0011
59eb7a
-#define MMC_PROFILE_DVD_RAM             0x0012
59eb7a
-#define MMC_PROFILE_DVD_RW_RO           0x0013
59eb7a
-#define MMC_PROFILE_DVD_RW_SR           0x0014
59eb7a
-#define MMC_PROFILE_DVD_R_DL_SR         0x0015
59eb7a
-#define MMC_PROFILE_DVD_R_DL_JR         0x0016
59eb7a
-#define MMC_PROFILE_DVD_RW_DL           0x0017
59eb7a
-#define MMC_PROFILE_DVD_DDR             0x0018
59eb7a
-#define MMC_PROFILE_DVD_PLUS_RW         0x001A
59eb7a
-#define MMC_PROFILE_DVD_PLUS_R          0x001B
59eb7a
-#define MMC_PROFILE_DVD_PLUS_RW_DL      0x002A
59eb7a
-#define MMC_PROFILE_DVD_PLUS_R_DL       0x002B
59eb7a
-#define MMC_PROFILE_BD_ROM              0x0040
59eb7a
-#define MMC_PROFILE_BD_R_SRM            0x0041
59eb7a
-#define MMC_PROFILE_BD_R_RRM            0x0042
59eb7a
-#define MMC_PROFILE_BD_RE               0x0043
59eb7a
-#define MMC_PROFILE_HDDVD_ROM           0x0050
59eb7a
-#define MMC_PROFILE_HDDVD_R             0x0051
59eb7a
-#define MMC_PROFILE_HDDVD_RAM           0x0052
59eb7a
-#define MMC_PROFILE_HDDVD_RW            0x0053
59eb7a
-#define MMC_PROFILE_HDDVD_R_DL          0x0058
59eb7a
-#define MMC_PROFILE_HDDVD_RW_DL         0x005A
59eb7a
-#define MMC_PROFILE_INVALID             0xFFFF
59eb7a
-
59eb7a
-#endif
59eb7a
diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h
59eb7a
index 482a9512be..63a99e0366 100644
59eb7a
--- a/include/hw/ide/internal.h
59eb7a
+++ b/include/hw/ide/internal.h
59eb7a
@@ -11,7 +11,7 @@
59eb7a
 #include "sysemu/dma.h"
59eb7a
 #include "sysemu/sysemu.h"
59eb7a
 #include "hw/block/block.h"
59eb7a
-#include "block/scsi.h"
59eb7a
+#include "scsi/constants.h"
59eb7a
 
59eb7a
 /* debug IDE devices */
59eb7a
 //#define DEBUG_IDE
59eb7a
diff --git a/include/scsi/constants.h b/include/scsi/constants.h
59eb7a
new file mode 100644
59eb7a
index 0000000000..a141dd71f8
59eb7a
--- /dev/null
59eb7a
+++ b/include/scsi/constants.h
59eb7a
@@ -0,0 +1,314 @@
59eb7a
+/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
59eb7a
+   This file is part of the GNU C Library.
59eb7a
+
59eb7a
+   The GNU C Library is free software; you can redistribute it and/or
59eb7a
+   modify it under the terms of the GNU Lesser General Public
59eb7a
+   License as published by the Free Software Foundation; either
59eb7a
+   version 2.1 of the License, or (at your option) any later version.
59eb7a
+
59eb7a
+   The GNU C Library is distributed in the hope that it will be useful,
59eb7a
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
59eb7a
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
59eb7a
+   Lesser General Public License for more details.
59eb7a
+
59eb7a
+   You should have received a copy of the GNU Lesser General Public
59eb7a
+   License along with this library; if not, see <http://www.gnu.org/licenses/>.
59eb7a
+*/
59eb7a
+
59eb7a
+/*
59eb7a
+ * This header file contains public constants and structures used by
59eb7a
+ * the scsi code for linux.
59eb7a
+ */
59eb7a
+
59eb7a
+#ifndef BLOCK_SCSI_H
59eb7a
+#define BLOCK_SCSI_H
59eb7a
+
59eb7a
+/*
59eb7a
+ *      SCSI opcodes
59eb7a
+ */
59eb7a
+
59eb7a
+#define TEST_UNIT_READY       0x00
59eb7a
+#define REWIND                0x01
59eb7a
+#define REQUEST_SENSE         0x03
59eb7a
+#define FORMAT_UNIT           0x04
59eb7a
+#define READ_BLOCK_LIMITS     0x05
59eb7a
+#define INITIALIZE_ELEMENT_STATUS 0x07
59eb7a
+#define REASSIGN_BLOCKS       0x07
59eb7a
+#define READ_6                0x08
59eb7a
+#define WRITE_6               0x0a
59eb7a
+#define SET_CAPACITY          0x0b
59eb7a
+#define READ_REVERSE          0x0f
59eb7a
+#define WRITE_FILEMARKS       0x10
59eb7a
+#define SPACE                 0x11
59eb7a
+#define INQUIRY               0x12
59eb7a
+#define RECOVER_BUFFERED_DATA 0x14
59eb7a
+#define MODE_SELECT           0x15
59eb7a
+#define RESERVE               0x16
59eb7a
+#define RELEASE               0x17
59eb7a
+#define COPY                  0x18
59eb7a
+#define ERASE                 0x19
59eb7a
+#define MODE_SENSE            0x1a
59eb7a
+#define LOAD_UNLOAD           0x1b
59eb7a
+#define SCAN                  0x1b
59eb7a
+#define START_STOP            0x1b
59eb7a
+#define RECEIVE_DIAGNOSTIC    0x1c
59eb7a
+#define SEND_DIAGNOSTIC       0x1d
59eb7a
+#define ALLOW_MEDIUM_REMOVAL  0x1e
59eb7a
+#define SET_WINDOW            0x24
59eb7a
+#define READ_CAPACITY_10      0x25
59eb7a
+#define GET_WINDOW            0x25
59eb7a
+#define READ_10               0x28
59eb7a
+#define WRITE_10              0x2a
59eb7a
+#define SEND                  0x2a
59eb7a
+#define SEEK_10               0x2b
59eb7a
+#define LOCATE_10             0x2b
59eb7a
+#define POSITION_TO_ELEMENT   0x2b
59eb7a
+#define WRITE_VERIFY_10       0x2e
59eb7a
+#define VERIFY_10             0x2f
59eb7a
+#define SEARCH_HIGH           0x30
59eb7a
+#define SEARCH_EQUAL          0x31
59eb7a
+#define OBJECT_POSITION       0x31
59eb7a
+#define SEARCH_LOW            0x32
59eb7a
+#define SET_LIMITS            0x33
59eb7a
+#define PRE_FETCH             0x34
59eb7a
+#define READ_POSITION         0x34
59eb7a
+#define GET_DATA_BUFFER_STATUS 0x34
59eb7a
+#define SYNCHRONIZE_CACHE     0x35
59eb7a
+#define LOCK_UNLOCK_CACHE     0x36
59eb7a
+#define INITIALIZE_ELEMENT_STATUS_WITH_RANGE 0x37
59eb7a
+#define READ_DEFECT_DATA      0x37
59eb7a
+#define MEDIUM_SCAN           0x38
59eb7a
+#define COMPARE               0x39
59eb7a
+#define COPY_VERIFY           0x3a
59eb7a
+#define WRITE_BUFFER          0x3b
59eb7a
+#define READ_BUFFER           0x3c
59eb7a
+#define UPDATE_BLOCK          0x3d
59eb7a
+#define READ_LONG_10          0x3e
59eb7a
+#define WRITE_LONG_10         0x3f
59eb7a
+#define CHANGE_DEFINITION     0x40
59eb7a
+#define WRITE_SAME_10         0x41
59eb7a
+#define UNMAP                 0x42
59eb7a
+#define READ_TOC              0x43
59eb7a
+#define REPORT_DENSITY_SUPPORT 0x44
59eb7a
+#define GET_CONFIGURATION     0x46
59eb7a
+#define SANITIZE              0x48
59eb7a
+#define GET_EVENT_STATUS_NOTIFICATION 0x4a
59eb7a
+#define LOG_SELECT            0x4c
59eb7a
+#define LOG_SENSE             0x4d
59eb7a
+#define READ_DISC_INFORMATION 0x51
59eb7a
+#define RESERVE_TRACK         0x53
59eb7a
+#define MODE_SELECT_10        0x55
59eb7a
+#define RESERVE_10            0x56
59eb7a
+#define RELEASE_10            0x57
59eb7a
+#define MODE_SENSE_10         0x5a
59eb7a
+#define SEND_CUE_SHEET        0x5d
59eb7a
+#define PERSISTENT_RESERVE_IN 0x5e
59eb7a
+#define PERSISTENT_RESERVE_OUT 0x5f
59eb7a
+#define VARLENGTH_CDB         0x7f
59eb7a
+#define WRITE_FILEMARKS_16    0x80
59eb7a
+#define READ_REVERSE_16       0x81
59eb7a
+#define ALLOW_OVERWRITE       0x82
59eb7a
+#define EXTENDED_COPY         0x83
59eb7a
+#define ATA_PASSTHROUGH_16    0x85
59eb7a
+#define ACCESS_CONTROL_IN     0x86
59eb7a
+#define ACCESS_CONTROL_OUT    0x87
59eb7a
+#define READ_16               0x88
59eb7a
+#define COMPARE_AND_WRITE     0x89
59eb7a
+#define WRITE_16              0x8a
59eb7a
+#define WRITE_VERIFY_16       0x8e
59eb7a
+#define VERIFY_16             0x8f
59eb7a
+#define PRE_FETCH_16          0x90
59eb7a
+#define SPACE_16              0x91
59eb7a
+#define SYNCHRONIZE_CACHE_16  0x91
59eb7a
+#define LOCATE_16             0x92
59eb7a
+#define WRITE_SAME_16         0x93
59eb7a
+#define ERASE_16              0x93
59eb7a
+#define SERVICE_ACTION_IN_16  0x9e
59eb7a
+#define WRITE_LONG_16         0x9f
59eb7a
+#define REPORT_LUNS           0xa0
59eb7a
+#define ATA_PASSTHROUGH_12    0xa1
59eb7a
+#define MAINTENANCE_IN        0xa3
59eb7a
+#define MAINTENANCE_OUT       0xa4
59eb7a
+#define MOVE_MEDIUM           0xa5
59eb7a
+#define EXCHANGE_MEDIUM       0xa6
59eb7a
+#define SET_READ_AHEAD        0xa7
59eb7a
+#define READ_12               0xa8
59eb7a
+#define WRITE_12              0xaa
59eb7a
+#define SERVICE_ACTION_IN_12  0xab
59eb7a
+#define ERASE_12              0xac
59eb7a
+#define READ_DVD_STRUCTURE    0xad
59eb7a
+#define WRITE_VERIFY_12       0xae
59eb7a
+#define VERIFY_12             0xaf
59eb7a
+#define SEARCH_HIGH_12        0xb0
59eb7a
+#define SEARCH_EQUAL_12       0xb1
59eb7a
+#define SEARCH_LOW_12         0xb2
59eb7a
+#define READ_ELEMENT_STATUS   0xb8
59eb7a
+#define SEND_VOLUME_TAG       0xb6
59eb7a
+#define READ_DEFECT_DATA_12   0xb7
59eb7a
+#define SET_CD_SPEED          0xbb
59eb7a
+#define MECHANISM_STATUS      0xbd
59eb7a
+#define READ_CD               0xbe
59eb7a
+#define SEND_DVD_STRUCTURE    0xbf
59eb7a
+
59eb7a
+/*
59eb7a
+ * SERVICE ACTION IN subcodes
59eb7a
+ */
59eb7a
+#define SAI_READ_CAPACITY_16  0x10
59eb7a
+
59eb7a
+/*
59eb7a
+ * READ POSITION service action codes
59eb7a
+ */
59eb7a
+#define SHORT_FORM_BLOCK_ID  0x00
59eb7a
+#define SHORT_FORM_VENDOR_SPECIFIC 0x01
59eb7a
+#define LONG_FORM            0x06
59eb7a
+#define EXTENDED_FORM        0x08
59eb7a
+
59eb7a
+/*
59eb7a
+ *  SAM Status codes
59eb7a
+ */
59eb7a
+
59eb7a
+#define GOOD                 0x00
59eb7a
+#define CHECK_CONDITION      0x02
59eb7a
+#define CONDITION_GOOD       0x04
59eb7a
+#define BUSY                 0x08
59eb7a
+#define INTERMEDIATE_GOOD    0x10
59eb7a
+#define INTERMEDIATE_C_GOOD  0x14
59eb7a
+#define RESERVATION_CONFLICT 0x18
59eb7a
+#define COMMAND_TERMINATED   0x22
59eb7a
+#define TASK_SET_FULL        0x28
59eb7a
+#define ACA_ACTIVE           0x30
59eb7a
+#define TASK_ABORTED         0x40
59eb7a
+
59eb7a
+#define STATUS_MASK          0x3e
59eb7a
+
59eb7a
+/*
59eb7a
+ *  SENSE KEYS
59eb7a
+ */
59eb7a
+
59eb7a
+#define NO_SENSE            0x00
59eb7a
+#define RECOVERED_ERROR     0x01
59eb7a
+#define NOT_READY           0x02
59eb7a
+#define MEDIUM_ERROR        0x03
59eb7a
+#define HARDWARE_ERROR      0x04
59eb7a
+#define ILLEGAL_REQUEST     0x05
59eb7a
+#define UNIT_ATTENTION      0x06
59eb7a
+#define DATA_PROTECT        0x07
59eb7a
+#define BLANK_CHECK         0x08
59eb7a
+#define COPY_ABORTED        0x0a
59eb7a
+#define ABORTED_COMMAND     0x0b
59eb7a
+#define VOLUME_OVERFLOW     0x0d
59eb7a
+#define MISCOMPARE          0x0e
59eb7a
+
59eb7a
+
59eb7a
+/*
59eb7a
+ *  DEVICE TYPES
59eb7a
+ */
59eb7a
+
59eb7a
+#define TYPE_DISK           0x00
59eb7a
+#define TYPE_TAPE           0x01
59eb7a
+#define TYPE_PRINTER        0x02
59eb7a
+#define TYPE_PROCESSOR      0x03    /* HP scanners use this */
59eb7a
+#define TYPE_WORM           0x04    /* Treated as ROM by our system */
59eb7a
+#define TYPE_ROM            0x05
59eb7a
+#define TYPE_SCANNER        0x06
59eb7a
+#define TYPE_MOD            0x07    /* Magneto-optical disk -
59eb7a
+				     * - treated as TYPE_DISK */
59eb7a
+#define TYPE_MEDIUM_CHANGER 0x08
59eb7a
+#define TYPE_STORAGE_ARRAY  0x0c    /* Storage array device */
59eb7a
+#define TYPE_ENCLOSURE      0x0d    /* Enclosure Services Device */
59eb7a
+#define TYPE_RBC            0x0e    /* Simplified Direct-Access Device */
59eb7a
+#define TYPE_OSD            0x11    /* Object-storage Device */
59eb7a
+#define TYPE_WLUN           0x1e    /* Well known LUN */
59eb7a
+#define TYPE_NOT_PRESENT    0x1f
59eb7a
+#define TYPE_INACTIVE       0x20
59eb7a
+#define TYPE_NO_LUN         0x7f
59eb7a
+
59eb7a
+/* Mode page codes for mode sense/set */
59eb7a
+#define MODE_PAGE_R_W_ERROR                   0x01
59eb7a
+#define MODE_PAGE_HD_GEOMETRY                 0x04
59eb7a
+#define MODE_PAGE_FLEXIBLE_DISK_GEOMETRY      0x05
59eb7a
+#define MODE_PAGE_CACHING                     0x08
59eb7a
+#define MODE_PAGE_AUDIO_CTL                   0x0e
59eb7a
+#define MODE_PAGE_POWER                       0x1a
59eb7a
+#define MODE_PAGE_FAULT_FAIL                  0x1c
59eb7a
+#define MODE_PAGE_TO_PROTECT                  0x1d
59eb7a
+#define MODE_PAGE_CAPABILITIES                0x2a
59eb7a
+#define MODE_PAGE_ALLS                        0x3f
59eb7a
+/* Not in Mt. Fuji, but in ATAPI 2.6 -- deprecated now in favor
59eb7a
+ * of MODE_PAGE_SENSE_POWER */
59eb7a
+#define MODE_PAGE_CDROM                       0x0d
59eb7a
+
59eb7a
+/* Event notification classes for GET EVENT STATUS NOTIFICATION */
59eb7a
+#define GESN_NO_EVENTS                0
59eb7a
+#define GESN_OPERATIONAL_CHANGE       1
59eb7a
+#define GESN_POWER_MANAGEMENT         2
59eb7a
+#define GESN_EXTERNAL_REQUEST         3
59eb7a
+#define GESN_MEDIA                    4
59eb7a
+#define GESN_MULTIPLE_HOSTS           5
59eb7a
+#define GESN_DEVICE_BUSY              6
59eb7a
+
59eb7a
+/* Event codes for MEDIA event status notification */
59eb7a
+#define MEC_NO_CHANGE                 0
59eb7a
+#define MEC_EJECT_REQUESTED           1
59eb7a
+#define MEC_NEW_MEDIA                 2
59eb7a
+#define MEC_MEDIA_REMOVAL             3 /* only for media changers */
59eb7a
+#define MEC_MEDIA_CHANGED             4 /* only for media changers */
59eb7a
+#define MEC_BG_FORMAT_COMPLETED       5 /* MRW or DVD+RW b/g format completed */
59eb7a
+#define MEC_BG_FORMAT_RESTARTED       6 /* MRW or DVD+RW b/g format restarted */
59eb7a
+
59eb7a
+#define MS_TRAY_OPEN                  1
59eb7a
+#define MS_MEDIA_PRESENT              2
59eb7a
+
59eb7a
+/*
59eb7a
+ * Based on values from <linux/cdrom.h> but extending CD_MINS
59eb7a
+ * to the maximum common size allowed by the Orange's Book ATIP
59eb7a
+ *
59eb7a
+ * 90 and 99 min CDs are also available but using them as the
59eb7a
+ * upper limit reduces the effectiveness of the heuristic to
59eb7a
+ * detect DVDs burned to less than 25% of their maximum capacity
59eb7a
+ */
59eb7a
+
59eb7a
+/* Some generally useful CD-ROM information */
59eb7a
+#define CD_MINS                       80 /* max. minutes per CD */
59eb7a
+#define CD_SECS                       60 /* seconds per minute */
59eb7a
+#define CD_FRAMES                     75 /* frames per second */
59eb7a
+#define CD_FRAMESIZE                2048 /* bytes per frame, "cooked" mode */
59eb7a
+#define CD_MAX_BYTES       (CD_MINS * CD_SECS * CD_FRAMES * CD_FRAMESIZE)
59eb7a
+#define CD_MAX_SECTORS     (CD_MAX_BYTES / 512)
59eb7a
+
59eb7a
+/*
59eb7a
+ * The MMC values are not IDE specific and might need to be moved
59eb7a
+ * to a common header if they are also needed for the SCSI emulation
59eb7a
+ */
59eb7a
+
59eb7a
+/* Profile list from MMC-6 revision 1 table 91 */
59eb7a
+#define MMC_PROFILE_NONE                0x0000
59eb7a
+#define MMC_PROFILE_CD_ROM              0x0008
59eb7a
+#define MMC_PROFILE_CD_R                0x0009
59eb7a
+#define MMC_PROFILE_CD_RW               0x000A
59eb7a
+#define MMC_PROFILE_DVD_ROM             0x0010
59eb7a
+#define MMC_PROFILE_DVD_R_SR            0x0011
59eb7a
+#define MMC_PROFILE_DVD_RAM             0x0012
59eb7a
+#define MMC_PROFILE_DVD_RW_RO           0x0013
59eb7a
+#define MMC_PROFILE_DVD_RW_SR           0x0014
59eb7a
+#define MMC_PROFILE_DVD_R_DL_SR         0x0015
59eb7a
+#define MMC_PROFILE_DVD_R_DL_JR         0x0016
59eb7a
+#define MMC_PROFILE_DVD_RW_DL           0x0017
59eb7a
+#define MMC_PROFILE_DVD_DDR             0x0018
59eb7a
+#define MMC_PROFILE_DVD_PLUS_RW         0x001A
59eb7a
+#define MMC_PROFILE_DVD_PLUS_R          0x001B
59eb7a
+#define MMC_PROFILE_DVD_PLUS_RW_DL      0x002A
59eb7a
+#define MMC_PROFILE_DVD_PLUS_R_DL       0x002B
59eb7a
+#define MMC_PROFILE_BD_ROM              0x0040
59eb7a
+#define MMC_PROFILE_BD_R_SRM            0x0041
59eb7a
+#define MMC_PROFILE_BD_R_RRM            0x0042
59eb7a
+#define MMC_PROFILE_BD_RE               0x0043
59eb7a
+#define MMC_PROFILE_HDDVD_ROM           0x0050
59eb7a
+#define MMC_PROFILE_HDDVD_R             0x0051
59eb7a
+#define MMC_PROFILE_HDDVD_RAM           0x0052
59eb7a
+#define MMC_PROFILE_HDDVD_RW            0x0053
59eb7a
+#define MMC_PROFILE_HDDVD_R_DL          0x0058
59eb7a
+#define MMC_PROFILE_HDDVD_RW_DL         0x005A
59eb7a
+#define MMC_PROFILE_INVALID             0xFFFF
59eb7a
+
59eb7a
+#endif
59eb7a
diff --git a/scsi/utils.c b/scsi/utils.c
59eb7a
index 6ee9f4095b..fab60bdf20 100644
59eb7a
--- a/scsi/utils.c
59eb7a
+++ b/scsi/utils.c
59eb7a
@@ -14,7 +14,7 @@
59eb7a
  */
59eb7a
 
59eb7a
 #include "qemu/osdep.h"
59eb7a
-#include "block/scsi.h"
59eb7a
+#include "scsi/constants.h"
59eb7a
 #include "scsi/utils.h"
59eb7a
 #include "qemu/bswap.h"
59eb7a
 
59eb7a
diff --git a/tests/virtio-scsi-test.c b/tests/virtio-scsi-test.c
59eb7a
index 87a3b6e81a..082d323541 100644
59eb7a
--- a/tests/virtio-scsi-test.c
59eb7a
+++ b/tests/virtio-scsi-test.c
59eb7a
@@ -10,7 +10,7 @@
59eb7a
 
59eb7a
 #include "qemu/osdep.h"
59eb7a
 #include "libqtest.h"
59eb7a
-#include "block/scsi.h"
59eb7a
+#include "scsi/constants.h"
59eb7a
 #include "libqos/libqos-pc.h"
59eb7a
 #include "libqos/libqos-spapr.h"
59eb7a
 #include "libqos/virtio.h"