[spice-gtk,v2,10/33] fixup! usb-redir: add files for SCSI and USB MSC implementation

Submitted by Frediano Ziglio on Aug. 9, 2019, 2:26 p.m.

Details

Message ID 20190809142651.2967-11-fziglio@redhat.com
State Superseded
Headers show
Series "CD emulation follow ups" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio Aug. 9, 2019, 2:26 p.m.
Remove some written only fields
---
 src/cd-scsi.h         | 1 -
 src/cd-usb-bulk-msd.c | 5 +----
 2 files changed, 1 insertion(+), 5 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/cd-scsi.h b/src/cd-scsi.h
index 65242444..c058a66e 100644
--- a/src/cd-scsi.h
+++ b/src/cd-scsi.h
@@ -58,7 +58,6 @@  typedef struct CdScsiRequest {
     uint8_t cdb[SCSI_CDB_BUF_SIZE];
     uint32_t cdb_len;
 
-    uint32_t tag;
     uint32_t lun;
 
     uint8_t *buf;
diff --git a/src/cd-usb-bulk-msd.c b/src/cd-usb-bulk-msd.c
index 387a42a7..cb0ad91c 100644
--- a/src/cd-usb-bulk-msd.c
+++ b/src/cd-usb-bulk-msd.c
@@ -74,7 +74,6 @@  typedef struct UsbCdBulkMsdRequest {
     CdScsiRequest scsi_req;
 
     uint32_t lun;
-    uint32_t usb_tag;
     uint32_t usb_req_len; /* length of data requested by usb */
     uint32_t scsi_in_len; /* length of data returned by scsi limited by usb request */
 
@@ -278,7 +277,6 @@  static int parse_usb_msd_cmd(UsbCdBulkMsdDevice *cd, uint8_t *buf, uint32_t cbw_
     }
 
     usb_req->lun = cbw->lun;
-    usb_req->usb_tag = le32toh(cbw->tag);
     usb_req->usb_req_len = le32toh(cbw->exp_data_len);
 
     usb_req->scsi_in_len = 0; /* no data from scsi yet */
@@ -303,12 +301,11 @@  static int parse_usb_msd_cmd(UsbCdBulkMsdDevice *cd, uint8_t *buf, uint32_t cbw_
     g_assert(scsi_req->cdb_len <= sizeof(scsi_req->cdb));
     memcpy(scsi_req->cdb, cbw->cmd, scsi_req->cdb_len);
 
-    scsi_req->tag = usb_req->usb_tag;
     scsi_req->lun = usb_req->lun;
 
     SPICE_DEBUG("CMD lun:%" G_GUINT32_FORMAT " tag:%#x flags:%08x "
         "cdb_len:%" G_GUINT32_FORMAT " req_len:%" G_GUINT32_FORMAT,
-        usb_req->lun, usb_req->usb_tag, cbw->flags,
+        usb_req->lun, le32toh(cbw->tag), cbw->flags,
         scsi_req->cdb_len, usb_req->usb_req_len);
 
     /* prepare status - CSW */