search for: virtio_scsi_sense_size

Displaying 20 results from an estimated 68 matches for "virtio_scsi_sense_size".

2015 Mar 11
4
[PATCH] uapi/virtio_scsi: allow overriding CDB/SENSE size
QEMU wants to use virtio scsi structures with a different VIRTIO_SCSI_CDB_SIZE/VIRTIO_SCSI_SENSE_SIZE, let's add ifdefs to allow overriding them. Keep the old defines under new names: VIRTIO_SCSI_CDB_DEFAULT_SIZE/VIRTIO_SCSI_SENSE_DEFAULT_SIZE, since that's what these values really are: defaults for cdb/sense size fields. Suggested-by: Paolo Bonzini <pbonzini at redhat.com> Signed-o...
2015 Mar 11
4
[PATCH] uapi/virtio_scsi: allow overriding CDB/SENSE size
QEMU wants to use virtio scsi structures with a different VIRTIO_SCSI_CDB_SIZE/VIRTIO_SCSI_SENSE_SIZE, let's add ifdefs to allow overriding them. Keep the old defines under new names: VIRTIO_SCSI_CDB_DEFAULT_SIZE/VIRTIO_SCSI_SENSE_DEFAULT_SIZE, since that's what these values really are: defaults for cdb/sense size fields. Suggested-by: Paolo Bonzini <pbonzini at redhat.com> Signed-o...
2014 Dec 01
2
[PATCH v7 42/46] virtio_scsi: v1.0 support
...++++++++++----------------- > > 2 files changed, 49 insertions(+), 34 deletions(-) > > > > > @@ -196,10 +196,13 @@ static void virtscsi_complete_cmd(struct virtio_scsi *vscsi, void *buf) > > break; > > } > > > > - WARN_ON(resp->sense_len > VIRTIO_SCSI_SENSE_SIZE); > > + WARN_ON(virtio32_to_cpu(vscsi->vdev, resp->sense_len) > > > + VIRTIO_SCSI_SENSE_SIZE); > > Introduce a local variable for this? Might make this statement and the > min_t statement below easier to read. I prefer 1:1 code conversions. We can do refactorings on...
2014 Dec 01
2
[PATCH v7 42/46] virtio_scsi: v1.0 support
...++++++++++----------------- > > 2 files changed, 49 insertions(+), 34 deletions(-) > > > > > @@ -196,10 +196,13 @@ static void virtscsi_complete_cmd(struct virtio_scsi *vscsi, void *buf) > > break; > > } > > > > - WARN_ON(resp->sense_len > VIRTIO_SCSI_SENSE_SIZE); > > + WARN_ON(virtio32_to_cpu(vscsi->vdev, resp->sense_len) > > > + VIRTIO_SCSI_SENSE_SIZE); > > Introduce a local variable for this? Might make this statement and the > min_t statement below easier to read. I prefer 1:1 code conversions. We can do refactorings on...
2014 Nov 30
2
[PATCH v7 42/46] virtio_scsi: v1.0 support
...si.h b/include/linux/virtio_scsi.h index de429d1..af44864 100644 --- a/include/linux/virtio_scsi.h +++ b/include/linux/virtio_scsi.h @@ -27,13 +27,15 @@ #ifndef _LINUX_VIRTIO_SCSI_H #define _LINUX_VIRTIO_SCSI_H +#include <linux/virtio_types.h> + #define VIRTIO_SCSI_CDB_SIZE 32 #define VIRTIO_SCSI_SENSE_SIZE 96 /* SCSI command request, followed by data-out */ struct virtio_scsi_cmd_req { u8 lun[8]; /* Logical Unit Number */ - u64 tag; /* Command identifier */ + __virtio64 tag; /* Command identifier */ u8 task_attr; /* Task attribute */ u8 prio; /* SAM command priority field */ u8 crn;...
2014 Nov 30
2
[PATCH v7 42/46] virtio_scsi: v1.0 support
...si.h b/include/linux/virtio_scsi.h index de429d1..af44864 100644 --- a/include/linux/virtio_scsi.h +++ b/include/linux/virtio_scsi.h @@ -27,13 +27,15 @@ #ifndef _LINUX_VIRTIO_SCSI_H #define _LINUX_VIRTIO_SCSI_H +#include <linux/virtio_types.h> + #define VIRTIO_SCSI_CDB_SIZE 32 #define VIRTIO_SCSI_SENSE_SIZE 96 /* SCSI command request, followed by data-out */ struct virtio_scsi_cmd_req { u8 lun[8]; /* Logical Unit Number */ - u64 tag; /* Command identifier */ + __virtio64 tag; /* Command identifier */ u8 task_attr; /* Task attribute */ u8 prio; /* SAM command priority field */ u8 crn;...
2014 Nov 24
0
[PATCH v3 37/41] virtio_scsi: v1.0 support
...si.h b/include/linux/virtio_scsi.h index de429d1..af44864 100644 --- a/include/linux/virtio_scsi.h +++ b/include/linux/virtio_scsi.h @@ -27,13 +27,15 @@ #ifndef _LINUX_VIRTIO_SCSI_H #define _LINUX_VIRTIO_SCSI_H +#include <linux/virtio_types.h> + #define VIRTIO_SCSI_CDB_SIZE 32 #define VIRTIO_SCSI_SENSE_SIZE 96 /* SCSI command request, followed by data-out */ struct virtio_scsi_cmd_req { u8 lun[8]; /* Logical Unit Number */ - u64 tag; /* Command identifier */ + __virtio64 tag; /* Command identifier */ u8 task_attr; /* Task attribute */ u8 prio; /* SAM command priority field */ u8 crn;...
2014 Nov 24
0
[PATCH v3 37/41] virtio_scsi: v1.0 support
...si.h b/include/linux/virtio_scsi.h index de429d1..af44864 100644 --- a/include/linux/virtio_scsi.h +++ b/include/linux/virtio_scsi.h @@ -27,13 +27,15 @@ #ifndef _LINUX_VIRTIO_SCSI_H #define _LINUX_VIRTIO_SCSI_H +#include <linux/virtio_types.h> + #define VIRTIO_SCSI_CDB_SIZE 32 #define VIRTIO_SCSI_SENSE_SIZE 96 /* SCSI command request, followed by data-out */ struct virtio_scsi_cmd_req { u8 lun[8]; /* Logical Unit Number */ - u64 tag; /* Command identifier */ + __virtio64 tag; /* Command identifier */ u8 task_attr; /* Task attribute */ u8 prio; /* SAM command priority field */ u8 crn;...
2014 Dec 01
0
[PATCH v7 42/46] virtio_scsi: v1.0 support
...i/virtio_scsi.c | 51 ++++++++++++++++++++++++++++----------------- > 2 files changed, 49 insertions(+), 34 deletions(-) > > @@ -196,10 +196,13 @@ static void virtscsi_complete_cmd(struct virtio_scsi *vscsi, void *buf) > break; > } > > - WARN_ON(resp->sense_len > VIRTIO_SCSI_SENSE_SIZE); > + WARN_ON(virtio32_to_cpu(vscsi->vdev, resp->sense_len) > > + VIRTIO_SCSI_SENSE_SIZE); Introduce a local variable for this? Might make this statement and the min_t statement below easier to read. > if (sc->sense_buffer) { > memcpy(sc->sense_buffer, resp->se...
2015 Mar 11
0
[PATCH] uapi/virtio_scsi: allow overriding CDB/SENSE size
On 11/03/2015 14:19, Michael S. Tsirkin wrote: > QEMU wants to use virtio scsi structures with > a different VIRTIO_SCSI_CDB_SIZE/VIRTIO_SCSI_SENSE_SIZE, > let's add ifdefs to allow overriding them. > > Keep the old defines under new names: > VIRTIO_SCSI_CDB_DEFAULT_SIZE/VIRTIO_SCSI_SENSE_DEFAULT_SIZE, > since that's what these values really are: > defaults for cdb/sense size fields. > > Suggested-by: Paolo Bonzini...
2015 Mar 12
0
[PATCH] uapi/virtio_scsi: allow overriding CDB/SENSE size
On Wed, Mar 11, 2015 at 02:19:03PM +0100, Michael S. Tsirkin wrote: > QEMU wants to use virtio scsi structures with > a different VIRTIO_SCSI_CDB_SIZE/VIRTIO_SCSI_SENSE_SIZE, > let's add ifdefs to allow overriding them. > > Keep the old defines under new names: > VIRTIO_SCSI_CDB_DEFAULT_SIZE/VIRTIO_SCSI_SENSE_DEFAULT_SIZE, > since that's what these values really are: > defaults for cdb/sense size fields. > > Suggested-by: Paolo Bonzini...
2014 Dec 01
0
[PATCH v7 42/46] virtio_scsi: v1.0 support
...i/virtio_scsi.c | 51 ++++++++++++++++++++++++++++----------------- > 2 files changed, 49 insertions(+), 34 deletions(-) > > @@ -196,10 +196,13 @@ static void virtscsi_complete_cmd(struct virtio_scsi *vscsi, void *buf) > break; > } > > - WARN_ON(resp->sense_len > VIRTIO_SCSI_SENSE_SIZE); > + WARN_ON(virtio32_to_cpu(vscsi->vdev, resp->sense_len) > > + VIRTIO_SCSI_SENSE_SIZE); Introduce a local variable for this? Might make this statement and the min_t statement below easier to read. > if (sc->sense_buffer) { > memcpy(sc->sense_buffer, resp->se...
2015 Mar 11
0
[PATCH] uapi/virtio_scsi: allow overriding CDB/SENSE size
On 11/03/2015 14:19, Michael S. Tsirkin wrote: > QEMU wants to use virtio scsi structures with > a different VIRTIO_SCSI_CDB_SIZE/VIRTIO_SCSI_SENSE_SIZE, > let's add ifdefs to allow overriding them. > > Keep the old defines under new names: > VIRTIO_SCSI_CDB_DEFAULT_SIZE/VIRTIO_SCSI_SENSE_DEFAULT_SIZE, > since that's what these values really are: > defaults for cdb/sense size fields. > > Suggested-by: Paolo Bonzini...
2015 Mar 12
0
[PATCH] uapi/virtio_scsi: allow overriding CDB/SENSE size
On Wed, Mar 11, 2015 at 02:19:03PM +0100, Michael S. Tsirkin wrote: > QEMU wants to use virtio scsi structures with > a different VIRTIO_SCSI_CDB_SIZE/VIRTIO_SCSI_SENSE_SIZE, > let's add ifdefs to allow overriding them. > > Keep the old defines under new names: > VIRTIO_SCSI_CDB_DEFAULT_SIZE/VIRTIO_SCSI_SENSE_DEFAULT_SIZE, > since that's what these values really are: > defaults for cdb/sense size fields. > > Suggested-by: Paolo Bonzini...
2014 Nov 27
0
[PATCH v5 41/45] virtio_scsi: v1.0 support
...si.h b/include/linux/virtio_scsi.h index de429d1..af44864 100644 --- a/include/linux/virtio_scsi.h +++ b/include/linux/virtio_scsi.h @@ -27,13 +27,15 @@ #ifndef _LINUX_VIRTIO_SCSI_H #define _LINUX_VIRTIO_SCSI_H +#include <linux/virtio_types.h> + #define VIRTIO_SCSI_CDB_SIZE 32 #define VIRTIO_SCSI_SENSE_SIZE 96 /* SCSI command request, followed by data-out */ struct virtio_scsi_cmd_req { u8 lun[8]; /* Logical Unit Number */ - u64 tag; /* Command identifier */ + __virtio64 tag; /* Command identifier */ u8 task_attr; /* Task attribute */ u8 prio; /* SAM command priority field */ u8 crn;...
2014 Nov 27
0
[PATCH v6 42/46] virtio_scsi: v1.0 support
...si.h b/include/linux/virtio_scsi.h index de429d1..af44864 100644 --- a/include/linux/virtio_scsi.h +++ b/include/linux/virtio_scsi.h @@ -27,13 +27,15 @@ #ifndef _LINUX_VIRTIO_SCSI_H #define _LINUX_VIRTIO_SCSI_H +#include <linux/virtio_types.h> + #define VIRTIO_SCSI_CDB_SIZE 32 #define VIRTIO_SCSI_SENSE_SIZE 96 /* SCSI command request, followed by data-out */ struct virtio_scsi_cmd_req { u8 lun[8]; /* Logical Unit Number */ - u64 tag; /* Command identifier */ + __virtio64 tag; /* Command identifier */ u8 task_attr; /* Task attribute */ u8 prio; /* SAM command priority field */ u8 crn;...
2014 Dec 01
0
[PATCH v8 42/50] virtio_scsi: v1.0 support
...si.h b/include/linux/virtio_scsi.h index de429d1..af44864 100644 --- a/include/linux/virtio_scsi.h +++ b/include/linux/virtio_scsi.h @@ -27,13 +27,15 @@ #ifndef _LINUX_VIRTIO_SCSI_H #define _LINUX_VIRTIO_SCSI_H +#include <linux/virtio_types.h> + #define VIRTIO_SCSI_CDB_SIZE 32 #define VIRTIO_SCSI_SENSE_SIZE 96 /* SCSI command request, followed by data-out */ struct virtio_scsi_cmd_req { u8 lun[8]; /* Logical Unit Number */ - u64 tag; /* Command identifier */ + __virtio64 tag; /* Command identifier */ u8 task_attr; /* Task attribute */ u8 prio; /* SAM command priority field */ u8 crn;...
2014 Nov 27
0
[PATCH v5 41/45] virtio_scsi: v1.0 support
...si.h b/include/linux/virtio_scsi.h index de429d1..af44864 100644 --- a/include/linux/virtio_scsi.h +++ b/include/linux/virtio_scsi.h @@ -27,13 +27,15 @@ #ifndef _LINUX_VIRTIO_SCSI_H #define _LINUX_VIRTIO_SCSI_H +#include <linux/virtio_types.h> + #define VIRTIO_SCSI_CDB_SIZE 32 #define VIRTIO_SCSI_SENSE_SIZE 96 /* SCSI command request, followed by data-out */ struct virtio_scsi_cmd_req { u8 lun[8]; /* Logical Unit Number */ - u64 tag; /* Command identifier */ + __virtio64 tag; /* Command identifier */ u8 task_attr; /* Task attribute */ u8 prio; /* SAM command priority field */ u8 crn;...
2014 Nov 27
0
[PATCH v6 42/46] virtio_scsi: v1.0 support
...si.h b/include/linux/virtio_scsi.h index de429d1..af44864 100644 --- a/include/linux/virtio_scsi.h +++ b/include/linux/virtio_scsi.h @@ -27,13 +27,15 @@ #ifndef _LINUX_VIRTIO_SCSI_H #define _LINUX_VIRTIO_SCSI_H +#include <linux/virtio_types.h> + #define VIRTIO_SCSI_CDB_SIZE 32 #define VIRTIO_SCSI_SENSE_SIZE 96 /* SCSI command request, followed by data-out */ struct virtio_scsi_cmd_req { u8 lun[8]; /* Logical Unit Number */ - u64 tag; /* Command identifier */ + __virtio64 tag; /* Command identifier */ u8 task_attr; /* Task attribute */ u8 prio; /* SAM command priority field */ u8 crn;...
2014 Dec 01
0
[PATCH v8 42/50] virtio_scsi: v1.0 support
...si.h b/include/linux/virtio_scsi.h index de429d1..af44864 100644 --- a/include/linux/virtio_scsi.h +++ b/include/linux/virtio_scsi.h @@ -27,13 +27,15 @@ #ifndef _LINUX_VIRTIO_SCSI_H #define _LINUX_VIRTIO_SCSI_H +#include <linux/virtio_types.h> + #define VIRTIO_SCSI_CDB_SIZE 32 #define VIRTIO_SCSI_SENSE_SIZE 96 /* SCSI command request, followed by data-out */ struct virtio_scsi_cmd_req { u8 lun[8]; /* Logical Unit Number */ - u64 tag; /* Command identifier */ + __virtio64 tag; /* Command identifier */ u8 task_attr; /* Task attribute */ u8 prio; /* SAM command priority field */ u8 crn;...