aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/virtio_scsi.h
diff options
context:
space:
mode:
authorCong Meng <mc@linux.vnet.ibm.com>2012-07-05 05:06:43 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-07-20 03:58:58 -0400
commit365a7150094114a0f8ef0b6164e6b04b519039e8 (patch)
treedbe3630391256c1771de226d4d74d2ce5ab50ab6 /include/linux/virtio_scsi.h
parent2bd37f0fde99cbf8b78fb55f1128e8c3a63cf1da (diff)
[SCSI] virtio-scsi: hotplug support for virtio-scsi
This patch implements the hotplug support for virtio-scsi. When there is a device attached/detached, the virtio-scsi driver will be signaled via event virtual queue and it will add/remove the scsi device in question automatically. Signed-off-by: Sen Wang <senwang@linux.vnet.ibm.com> Signed-off-by: Cong Meng <mc@linux.vnet.ibm.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'include/linux/virtio_scsi.h')
-rw-r--r--include/linux/virtio_scsi.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/virtio_scsi.h b/include/linux/virtio_scsi.h
index 8ddeafdc0546..dc8d305b0e05 100644
--- a/include/linux/virtio_scsi.h
+++ b/include/linux/virtio_scsi.h
@@ -69,6 +69,10 @@ struct virtio_scsi_config {
69 u32 max_lun; 69 u32 max_lun;
70} __packed; 70} __packed;
71 71
72/* Feature Bits */
73#define VIRTIO_SCSI_F_INOUT 0
74#define VIRTIO_SCSI_F_HOTPLUG 1
75
72/* Response codes */ 76/* Response codes */
73#define VIRTIO_SCSI_S_OK 0 77#define VIRTIO_SCSI_S_OK 0
74#define VIRTIO_SCSI_S_OVERRUN 1 78#define VIRTIO_SCSI_S_OVERRUN 1
@@ -105,6 +109,11 @@ struct virtio_scsi_config {
105#define VIRTIO_SCSI_T_TRANSPORT_RESET 1 109#define VIRTIO_SCSI_T_TRANSPORT_RESET 1
106#define VIRTIO_SCSI_T_ASYNC_NOTIFY 2 110#define VIRTIO_SCSI_T_ASYNC_NOTIFY 2
107 111
112/* Reasons of transport reset event */
113#define VIRTIO_SCSI_EVT_RESET_HARD 0
114#define VIRTIO_SCSI_EVT_RESET_RESCAN 1
115#define VIRTIO_SCSI_EVT_RESET_REMOVED 2
116
108#define VIRTIO_SCSI_S_SIMPLE 0 117#define VIRTIO_SCSI_S_SIMPLE 0
109#define VIRTIO_SCSI_S_ORDERED 1 118#define VIRTIO_SCSI_S_ORDERED 1
110#define VIRTIO_SCSI_S_HEAD 2 119#define VIRTIO_SCSI_S_HEAD 2