diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-30 16:13:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-30 16:13:05 -0400 |
commit | 13d2080db3472b3399ba32e6026960de5d32a344 (patch) | |
tree | 8df5d34c2601559f911fd35d9c4e4da68a5efeee /drivers | |
parent | 46a1f21a679abaaeae6db9969963dc998c9f1c1c (diff) | |
parent | f85eda8d75d37a3796cee7f5a906e50e3f13d9e1 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull SCSI target fixes from Nicholas Bellinger:
"This includes the bug-fix for a >= v3.8-rc1 regression specific to
iscsi-target persistent reservation conflict handling (CC'ed to
stable), and a tcm_vhost patch to drop VIRTIO_RING_F_EVENT_IDX usage
so that in-flight qemu vhost-scsi-pci device code can detect the
proper vhost feature bits.
Also, there are two more tcm_vhost patches still being discussed by
MST and Asias for v3.9 that will be required for the in-flight qemu
vhost-scsi-pci device patch to function properly, and that should
(hopefully) be the last target fixes for this round."
* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
target: Fix RESERVATION_CONFLICT status regression for iscsi-target special case
tcm_vhost: Avoid VIRTIO_RING_F_EVENT_IDX feature bit
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/target/target_core_transport.c | 4 | ||||
-rw-r--r-- | drivers/vhost/tcm_vhost.c | 13 |
2 files changed, 14 insertions, 3 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 2030b608136d..3243ea790eab 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c | |||
@@ -1139,8 +1139,10 @@ target_setup_cmd_from_cdb(struct se_cmd *cmd, unsigned char *cdb) | |||
1139 | return ret; | 1139 | return ret; |
1140 | 1140 | ||
1141 | ret = target_check_reservation(cmd); | 1141 | ret = target_check_reservation(cmd); |
1142 | if (ret) | 1142 | if (ret) { |
1143 | cmd->scsi_status = SAM_STAT_RESERVATION_CONFLICT; | ||
1143 | return ret; | 1144 | return ret; |
1145 | } | ||
1144 | 1146 | ||
1145 | ret = dev->transport->parse_cdb(cmd); | 1147 | ret = dev->transport->parse_cdb(cmd); |
1146 | if (ret) | 1148 | if (ret) |
diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c index 43fb11ee2e8d..2968b4934659 100644 --- a/drivers/vhost/tcm_vhost.c +++ b/drivers/vhost/tcm_vhost.c | |||
@@ -60,6 +60,15 @@ enum { | |||
60 | VHOST_SCSI_VQ_IO = 2, | 60 | VHOST_SCSI_VQ_IO = 2, |
61 | }; | 61 | }; |
62 | 62 | ||
63 | /* | ||
64 | * VIRTIO_RING_F_EVENT_IDX seems broken. Not sure the bug is in | ||
65 | * kernel but disabling it helps. | ||
66 | * TODO: debug and remove the workaround. | ||
67 | */ | ||
68 | enum { | ||
69 | VHOST_SCSI_FEATURES = VHOST_FEATURES & (~VIRTIO_RING_F_EVENT_IDX) | ||
70 | }; | ||
71 | |||
63 | #define VHOST_SCSI_MAX_TARGET 256 | 72 | #define VHOST_SCSI_MAX_TARGET 256 |
64 | #define VHOST_SCSI_MAX_VQ 128 | 73 | #define VHOST_SCSI_MAX_VQ 128 |
65 | 74 | ||
@@ -946,7 +955,7 @@ static void vhost_scsi_flush(struct vhost_scsi *vs) | |||
946 | 955 | ||
947 | static int vhost_scsi_set_features(struct vhost_scsi *vs, u64 features) | 956 | static int vhost_scsi_set_features(struct vhost_scsi *vs, u64 features) |
948 | { | 957 | { |
949 | if (features & ~VHOST_FEATURES) | 958 | if (features & ~VHOST_SCSI_FEATURES) |
950 | return -EOPNOTSUPP; | 959 | return -EOPNOTSUPP; |
951 | 960 | ||
952 | mutex_lock(&vs->dev.mutex); | 961 | mutex_lock(&vs->dev.mutex); |
@@ -992,7 +1001,7 @@ static long vhost_scsi_ioctl(struct file *f, unsigned int ioctl, | |||
992 | return -EFAULT; | 1001 | return -EFAULT; |
993 | return 0; | 1002 | return 0; |
994 | case VHOST_GET_FEATURES: | 1003 | case VHOST_GET_FEATURES: |
995 | features = VHOST_FEATURES; | 1004 | features = VHOST_SCSI_FEATURES; |
996 | if (copy_to_user(featurep, &features, sizeof features)) | 1005 | if (copy_to_user(featurep, &features, sizeof features)) |
997 | return -EFAULT; | 1006 | return -EFAULT; |
998 | return 0; | 1007 | return 0; |