search for: sense_buffer

Displaying 20 results from an estimated 55 matches for "sense_buffer".

2014 Dec 01
2
[PATCH v7 42/46] virtio_scsi: v1.0 support
...? Might make this statement and the > min_t statement below easier to read. I prefer 1:1 code conversions. We can do refactorings on top. Since you mention this line as hard to read, I'll just make it > 80 chars for now, and trivial line splits can come later. OK? > > if (sc->sense_buffer) { > > memcpy(sc->sense_buffer, resp->sense, > > - min_t(u32, resp->sense_len, VIRTIO_SCSI_SENSE_SIZE)); > > + min_t(u32, > > + virtio32_to_cpu(vscsi->vdev, resp->sense_len), > > + VIRTIO_SCSI_SENSE_SIZE)); > > i...
2014 Dec 01
2
[PATCH v7 42/46] virtio_scsi: v1.0 support
...? Might make this statement and the > min_t statement below easier to read. I prefer 1:1 code conversions. We can do refactorings on top. Since you mention this line as hard to read, I'll just make it > 80 chars for now, and trivial line splits can come later. OK? > > if (sc->sense_buffer) { > > memcpy(sc->sense_buffer, resp->sense, > > - min_t(u32, resp->sense_len, VIRTIO_SCSI_SENSE_SIZE)); > > + min_t(u32, > > + virtio32_to_cpu(vscsi->vdev, resp->sense_len), > > + VIRTIO_SCSI_SENSE_SIZE)); > > i...
2014 Nov 30
2
[PATCH v7 42/46] virtio_scsi: v1.0 support
...host_byte(sc, DID_OK); @@ -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); if (sc->sense_buffer) { memcpy(sc->sense_buffer, resp->sense, - min_t(u32, resp->sense_len, VIRTIO_SCSI_SENSE_SIZE)); + min_t(u32, + virtio32_to_cpu(vscsi->vdev, resp->sense_len), + VIRTIO_SCSI_SENSE_SIZE)); if (resp->sense_len) set_driver_byte(sc, DRIVER_SENSE)...
2014 Nov 30
2
[PATCH v7 42/46] virtio_scsi: v1.0 support
...host_byte(sc, DID_OK); @@ -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); if (sc->sense_buffer) { memcpy(sc->sense_buffer, resp->sense, - min_t(u32, resp->sense_len, VIRTIO_SCSI_SENSE_SIZE)); + min_t(u32, + virtio32_to_cpu(vscsi->vdev, resp->sense_len), + VIRTIO_SCSI_SENSE_SIZE)); if (resp->sense_len) set_driver_byte(sc, DRIVER_SENSE)...
2008 May 30
5
[PATCH 1/4] pvSCSI driver
pvSCSI backend driver Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com> Signed-off-by: Jun Kamada <kama@jp.fujitsu.com> ----- Jun Kamada _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
2014 Dec 01
0
[PATCH v7 42/46] virtio_scsi: v1.0 support
...> - 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->sense, > - min_t(u32, resp->sense_len, VIRTIO_SCSI_SENSE_SIZE)); > + min_t(u32, > + virtio32_to_cpu(vscsi->vdev, resp->sense_len), > + VIRTIO_SCSI_SENSE_SIZE)); > if (resp->sense_len) >...
2014 Dec 01
0
[PATCH v7 42/46] virtio_scsi: v1.0 support
...> - 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->sense, > - min_t(u32, resp->sense_len, VIRTIO_SCSI_SENSE_SIZE)); > + min_t(u32, > + virtio32_to_cpu(vscsi->vdev, resp->sense_len), > + VIRTIO_SCSI_SENSE_SIZE)); > if (resp->sense_len) >...
2014 Nov 24
0
[PATCH v3 37/41] virtio_scsi: v1.0 support
...st_byte(sc, DID_OK); @@ -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); if (sc->sense_buffer) { memcpy(sc->sense_buffer, resp->sense, - min_t(u32, resp->sense_len, VIRTIO_SCSI_SENSE_SIZE)); + min_t(u32, + __virtio32_to_cpu(vscsi->vdev, resp->sense_len), + VIRTIO_SCSI_SENSE_SIZE)); if (resp->sense_len) set_driver_byte(sc, DRIVER_SENS...
2014 Nov 24
0
[PATCH v3 37/41] virtio_scsi: v1.0 support
...st_byte(sc, DID_OK); @@ -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); if (sc->sense_buffer) { memcpy(sc->sense_buffer, resp->sense, - min_t(u32, resp->sense_len, VIRTIO_SCSI_SENSE_SIZE)); + min_t(u32, + __virtio32_to_cpu(vscsi->vdev, resp->sense_len), + VIRTIO_SCSI_SENSE_SIZE)); if (resp->sense_len) set_driver_byte(sc, DRIVER_SENS...
2014 Nov 27
0
[PATCH v5 41/45] virtio_scsi: v1.0 support
...host_byte(sc, DID_OK); @@ -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); if (sc->sense_buffer) { memcpy(sc->sense_buffer, resp->sense, - min_t(u32, resp->sense_len, VIRTIO_SCSI_SENSE_SIZE)); + min_t(u32, + virtio32_to_cpu(vscsi->vdev, resp->sense_len), + VIRTIO_SCSI_SENSE_SIZE)); if (resp->sense_len) set_driver_byte(sc, DRIVER_SENSE)...
2014 Nov 27
0
[PATCH v6 42/46] virtio_scsi: v1.0 support
...host_byte(sc, DID_OK); @@ -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); if (sc->sense_buffer) { memcpy(sc->sense_buffer, resp->sense, - min_t(u32, resp->sense_len, VIRTIO_SCSI_SENSE_SIZE)); + min_t(u32, + virtio32_to_cpu(vscsi->vdev, resp->sense_len), + VIRTIO_SCSI_SENSE_SIZE)); if (resp->sense_len) set_driver_byte(sc, DRIVER_SENSE)...
2014 Dec 01
0
[PATCH v8 42/50] virtio_scsi: v1.0 support
...host_byte(sc, DID_OK); @@ -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); if (sc->sense_buffer) { memcpy(sc->sense_buffer, resp->sense, - min_t(u32, resp->sense_len, VIRTIO_SCSI_SENSE_SIZE)); + min_t(u32, + virtio32_to_cpu(vscsi->vdev, resp->sense_len), + VIRTIO_SCSI_SENSE_SIZE)); if (resp->sense_len) set_driver_byte(sc, DRIVER_SENSE)...
2014 Nov 27
0
[PATCH v5 41/45] virtio_scsi: v1.0 support
...host_byte(sc, DID_OK); @@ -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); if (sc->sense_buffer) { memcpy(sc->sense_buffer, resp->sense, - min_t(u32, resp->sense_len, VIRTIO_SCSI_SENSE_SIZE)); + min_t(u32, + virtio32_to_cpu(vscsi->vdev, resp->sense_len), + VIRTIO_SCSI_SENSE_SIZE)); if (resp->sense_len) set_driver_byte(sc, DRIVER_SENSE)...
2014 Nov 27
0
[PATCH v6 42/46] virtio_scsi: v1.0 support
...host_byte(sc, DID_OK); @@ -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); if (sc->sense_buffer) { memcpy(sc->sense_buffer, resp->sense, - min_t(u32, resp->sense_len, VIRTIO_SCSI_SENSE_SIZE)); + min_t(u32, + virtio32_to_cpu(vscsi->vdev, resp->sense_len), + VIRTIO_SCSI_SENSE_SIZE)); if (resp->sense_len) set_driver_byte(sc, DRIVER_SENSE)...
2014 Dec 01
0
[PATCH v8 42/50] virtio_scsi: v1.0 support
...host_byte(sc, DID_OK); @@ -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); if (sc->sense_buffer) { memcpy(sc->sense_buffer, resp->sense, - min_t(u32, resp->sense_len, VIRTIO_SCSI_SENSE_SIZE)); + min_t(u32, + virtio32_to_cpu(vscsi->vdev, resp->sense_len), + VIRTIO_SCSI_SENSE_SIZE)); if (resp->sense_len) set_driver_byte(sc, DRIVER_SENSE)...
2010 Dec 06
7
[PATCH 1/8] staging: hv: Convert camel case struct fields in vstorage.h to lowercase
...et->VmSrb.Lun = Request->LunId; + vstorPacket->vm_srb.port_number = Request->Host; + vstorPacket->vm_srb.path_id = Request->Bus; + vstorPacket->vm_srb.target_id = Request->TargetId; + vstorPacket->vm_srb.lun = Request->LunId; - vstorPacket->VmSrb.SenseInfoLength = SENSE_BUFFER_SIZE; + vstorPacket->vm_srb.sense_info_length = SENSE_BUFFER_SIZE; /* Copy over the scsi command descriptor block */ - vstorPacket->VmSrb.CdbLength = Request->CdbLen; - memcpy(&vstorPacket->VmSrb.Cdb, Request->Cdb, Request->CdbLen); + vstorPacket->vm_srb.cdb_length = Re...
2010 Dec 06
7
[PATCH 1/8] staging: hv: Convert camel case struct fields in vstorage.h to lowercase
...et->VmSrb.Lun = Request->LunId; + vstorPacket->vm_srb.port_number = Request->Host; + vstorPacket->vm_srb.path_id = Request->Bus; + vstorPacket->vm_srb.target_id = Request->TargetId; + vstorPacket->vm_srb.lun = Request->LunId; - vstorPacket->VmSrb.SenseInfoLength = SENSE_BUFFER_SIZE; + vstorPacket->vm_srb.sense_info_length = SENSE_BUFFER_SIZE; /* Copy over the scsi command descriptor block */ - vstorPacket->VmSrb.CdbLength = Request->CdbLen; - memcpy(&vstorPacket->VmSrb.Cdb, Request->Cdb, Request->CdbLen); + vstorPacket->vm_srb.cdb_length = Re...
2011 Mar 28
22
[PATCH 00/22] Staging: hv: Cleanup-storage-drivers-phase-III
This patch-set deals with some of the style isues in blkvsc_drv.c. We also get rid most of the "dead code" in this file: 1) Get rid of most of the forward declarations in this file. The only remaining forward declarations are to deal with circular dependencies. 2) Get rid of most of the dead code in the file. Some of the functions in this file are place holders - they
2011 Mar 28
22
[PATCH 00/22] Staging: hv: Cleanup-storage-drivers-phase-III
This patch-set deals with some of the style isues in blkvsc_drv.c. We also get rid most of the "dead code" in this file: 1) Get rid of most of the forward declarations in this file. The only remaining forward declarations are to deal with circular dependencies. 2) Get rid of most of the dead code in the file. Some of the functions in this file are place holders - they
2014 Nov 25
2
[PATCH v4 38/42] virtio_scsi: v1.0 support
...st_byte(sc, DID_OK); @@ -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); if (sc->sense_buffer) { memcpy(sc->sense_buffer, resp->sense, - min_t(u32, resp->sense_len, VIRTIO_SCSI_SENSE_SIZE)); + min_t(u32, + __virtio32_to_cpu(vscsi->vdev, resp->sense_len), + VIRTIO_SCSI_SENSE_SIZE)); if (resp->sense_len) set_driver_byte(sc, DRIVER_SENS...