added feature of sharing CD image

Submitted by Frediano Ziglio on July 24, 2019, 10:53 a.m.

Details

Reviewer None
Submitted July 24, 2019, 10:53 a.m.
Last Updated Sept. 19, 2019, 2:11 p.m.
Revision 10

Cover Letter(s)

Revision 1
      This series of patches adds feature of sharing CD image via
redirection of emulated CD device. Currently the trigger to
create the device is command-line option:
'--spice-share-cd <ISO file name>

Yuri Benditovich (9):
  usb-redir: define interfaces to support emulated devices
  usb-redir: device error signal without device object
  usb-redir: Prepare for creation of emulated CD drive
  usb-redir: device description for emulated devices
  usb-redir: do not use spice_usb_acl_helper for emulated devices
  usb-redir: extend USB backend to support emulated devices
  usb-redir: add files for SCSI and USB MSC implementation
  usb-redir: add implementation of emulated CD device
  usb-redir: enable redirection of emulated CD drive

 src/cd-scsi-dev-params.h |   52 +
 src/cd-scsi.c            | 2770 ++++++++++++++++++++++++++++++++++++++
 src/cd-scsi.h            |  122 ++
 src/cd-usb-bulk-msd.c    |  555 ++++++++
 src/cd-usb-bulk-msd.h    |  134 ++
 src/channel-usbredir.c   |   29 +-
 src/meson.build          |    7 +
 src/scsi-constants.h     |  324 +++++
 src/spice-option.c       |   15 +
 src/usb-backend.c        |  715 +++++++++-
 src/usb-backend.h        |   36 +-
 src/usb-device-cd.c      |  794 +++++++++++
 src/usb-device-manager.c |   57 +-
 src/usb-emulation.h      |   88 ++
 14 files changed, 5658 insertions(+), 40 deletions(-)
 create mode 100644 src/cd-scsi-dev-params.h
 create mode 100644 src/cd-scsi.c
 create mode 100644 src/cd-scsi.h
 create mode 100644 src/cd-usb-bulk-msd.c
 create mode 100644 src/cd-usb-bulk-msd.h
 create mode 100644 src/scsi-constants.h
 create mode 100644 src/usb-device-cd.c
 create mode 100644 src/usb-emulation.h
    
Revision 2
      This series of patches adds feature of sharing CD image via
redirection of emulated CD device. Currently the trigger to
create the device is command-line option:
'--spice-share-cd <ISO file name>

Yuri Benditovich (9):
  usb-redir: define interfaces to support emulated devices
  usb-redir: device error signal without device object
  usb-redir: Prepare for creation of emulated CD drive
  usb-redir: device description for emulated devices
  usb-redir: do not use spice_usb_acl_helper for emulated devices
  usb-redir: extend USB backend to support emulated devices
  usb-redir: add files for SCSI and USB MSC implementation
  usb-redir: add implementation of emulated CD device
  usb-redir: enable redirection of emulated CD drive

 src/cd-scsi-dev-params.h |   52 +
 src/cd-scsi.c            | 2770 ++++++++++++++++++++++++++++++++++++++
 src/cd-scsi.h            |  122 ++
 src/cd-usb-bulk-msd.c    |  555 ++++++++
 src/cd-usb-bulk-msd.h    |  134 ++
 src/channel-usbredir.c   |   29 +-
 src/meson.build          |    7 +
 src/scsi-constants.h     |  324 +++++
 src/spice-option.c       |   15 +
 src/usb-backend.c        |  715 +++++++++-
 src/usb-backend.h        |   36 +-
 src/usb-device-cd.c      |  794 +++++++++++
 src/usb-device-manager.c |   57 +-
 src/usb-emulation.h      |   88 ++
 14 files changed, 5658 insertions(+), 40 deletions(-)
 create mode 100644 src/cd-scsi-dev-params.h
 create mode 100644 src/cd-scsi.c
 create mode 100644 src/cd-scsi.h
 create mode 100644 src/cd-usb-bulk-msd.c
 create mode 100644 src/cd-usb-bulk-msd.h
 create mode 100644 src/scsi-constants.h
 create mode 100644 src/usb-device-cd.c
 create mode 100644 src/usb-emulation.h
    
Revision 3
      This series of patches adds feature of sharing CD image via
redirection of emulated CD device. Currently the trigger to
create the device is command-line option:
'--spice-share-cd <ISO file name>

Yuri Benditovich (9):
  usb-redir: define interfaces to support emulated devices
  usb-redir: device error signal without device object
  usb-redir: Prepare for creation of emulated CD drive
  usb-redir: device description for emulated devices
  usb-redir: do not use spice_usb_acl_helper for emulated devices
  usb-redir: extend USB backend to support emulated devices
  usb-redir: add files for SCSI and USB MSC implementation
  usb-redir: add implementation of emulated CD device
  usb-redir: enable redirection of emulated CD drive

 src/cd-scsi-dev-params.h |   52 +
 src/cd-scsi.c            | 2770 ++++++++++++++++++++++++++++++++++++++
 src/cd-scsi.h            |  122 ++
 src/cd-usb-bulk-msd.c    |  555 ++++++++
 src/cd-usb-bulk-msd.h    |  134 ++
 src/channel-usbredir.c   |   29 +-
 src/meson.build          |    7 +
 src/scsi-constants.h     |  324 +++++
 src/spice-option.c       |   15 +
 src/usb-backend.c        |  715 +++++++++-
 src/usb-backend.h        |   36 +-
 src/usb-device-cd.c      |  794 +++++++++++
 src/usb-device-manager.c |   57 +-
 src/usb-emulation.h      |   88 ++
 14 files changed, 5658 insertions(+), 40 deletions(-)
 create mode 100644 src/cd-scsi-dev-params.h
 create mode 100644 src/cd-scsi.c
 create mode 100644 src/cd-scsi.h
 create mode 100644 src/cd-usb-bulk-msd.c
 create mode 100644 src/cd-usb-bulk-msd.h
 create mode 100644 src/scsi-constants.h
 create mode 100644 src/usb-device-cd.c
 create mode 100644 src/usb-emulation.h
    
Revision 4
      This series of patches adds feature of sharing CD image via
redirection of emulated CD device. Currently the trigger to
create the device is command-line option:
'--spice-share-cd <ISO file name>

Changes from v1: fixes resulted by reviews (mainly based on fixups
of Frediano Ziglio)

Yuri Benditovich (8):
  usb-redir: define interfaces to support emulated devices
  usb-redir: move implementation of device description to USB backend
  usb-redir: do not use spice_usb_acl_helper for emulated devices
  usb-redir: extend USB backend to support emulated devices
  usb-redir: add files for SCSI and USB MSC implementation
  usb-redir: add implementation of emulated CD device
  usb-redir: enable redirection of emulated CD drive
  usb-redir: command-line option to create emulated CD drive

 src/cd-scsi-dev-params.h |   49 +
 src/cd-scsi.c            | 2758 ++++++++++++++++++++++++++++++++++++++
 src/cd-scsi.h            |  121 ++
 src/cd-usb-bulk-msd.c    |  546 ++++++++
 src/cd-usb-bulk-msd.h    |  134 ++
 src/channel-usbredir.c   |   31 +-
 src/meson.build          |    8 +
 src/scsi-constants.h     |  324 +++++
 src/spice-option.c       |   17 +
 src/usb-backend.c        |  728 +++++++++-
 src/usb-backend.h        |    4 +
 src/usb-device-cd.c      |  790 +++++++++++
 src/usb-device-cd.h      |   37 +
 src/usb-device-manager.c |   63 +-
 src/usb-emulation.h      |   91 ++
 15 files changed, 5638 insertions(+), 63 deletions(-)
 create mode 100644 src/cd-scsi-dev-params.h
 create mode 100644 src/cd-scsi.c
 create mode 100644 src/cd-scsi.h
 create mode 100644 src/cd-usb-bulk-msd.c
 create mode 100644 src/cd-usb-bulk-msd.h
 create mode 100644 src/scsi-constants.h
 create mode 100644 src/usb-device-cd.c
 create mode 100644 src/usb-device-cd.h
 create mode 100644 src/usb-emulation.h
    
Revision 5
      This series of patches adds feature of sharing CD image via
redirection of emulated CD device. Currently the trigger to
create the device is command-line option:
'--spice-share-cd <ISO file name>

Changes from v2: fixes resulted by reviews (based on fixups
of Frediano Ziglio)

Changes from v1: fixes resulted by reviews (mainly based on fixups
of Frediano Ziglio)

Frediano Ziglio (1):
  usb-redir: cosmetic style fixes

Yuri Benditovich (8):
  usb-redir: define interfaces to support emulated devices
  usb-redir: move implementation of device description to USB backend
  usb-redir: do not use spice_usb_acl_helper for emulated devices
  usb-redir: extend USB backend to support emulated devices
  usb-redir: add files for SCSI and USB MSC implementation
  usb-redir: add implementation of emulated CD device
  usb-redir: enable redirection of emulated CD drive
  usb-redir: command-line option to create emulated CD drive

 src/cd-scsi-dev-params.h |   49 +
 src/cd-scsi.c            | 2740 ++++++++++++++++++++++++++++++++++++++
 src/cd-scsi.h            |  120 ++
 src/cd-usb-bulk-msd.c    |  544 ++++++++
 src/cd-usb-bulk-msd.h    |  134 ++
 src/channel-usbredir.c   |   31 +-
 src/meson.build          |    8 +
 src/scsi-constants.h     |  324 +++++
 src/spice-option.c       |   17 +
 src/usb-backend.c        |  777 ++++++++++-
 src/usb-backend.h        |    4 +
 src/usb-device-cd.c      |  783 +++++++++++
 src/usb-device-cd.h      |   34 +
 src/usb-device-manager.c |   63 +-
 src/usb-emulation.h      |   88 ++
 15 files changed, 5628 insertions(+), 88 deletions(-)
 create mode 100644 src/cd-scsi-dev-params.h
 create mode 100644 src/cd-scsi.c
 create mode 100644 src/cd-scsi.h
 create mode 100644 src/cd-usb-bulk-msd.c
 create mode 100644 src/cd-usb-bulk-msd.h
 create mode 100644 src/scsi-constants.h
 create mode 100644 src/usb-device-cd.c
 create mode 100644 src/usb-device-cd.h
 create mode 100644 src/usb-emulation.h
    
Revision 6
      Some updates to the series.
Some minor styles updates.
Big changes are the some rewrite of the USB emulation layer and
the test which is now testing attach/detach properly.

Frediano Ziglio (21):
  fixup! usb-redir: define interfaces to support emulated devices
  fixup! usb-redir: move implementation of device description to USB
    backend
  fixup! usb-redir: extend USB backend to support emulated devices
  fixup! usb-redir: extend USB backend to support emulated devices
  fixup! usb-redir: add files for SCSI and USB MSC implementation
  fixup! usb-redir: add files for SCSI and USB MSC implementation
  fixup! usb-redir: add files for SCSI and USB MSC implementation
  fixup! usb-redir: add implementation of emulated CD device
  fixup! usb-redir: enable redirection of emulated CD drive
  fixup! usb-redir: enable redirection of emulated CD drive
  build: Do not build usbredir dependent file is usbredir disabled
  test-cd-emu: Add base test for cd-emulation
  CI: Add --werror
  CI: Add usbredir packages to Windows
  cd-scsi: Do not export sense code constants
  usb-backend: Rewrite USB emulation support
  build: Use a convenience library for tests
  test-cd-emu: Test attach/detach emulated device
  test-cd-emu: Test detach and reattach
  test-cd-emu: Make sure we can call
    spice_usb_backend_channel_flush_writes
  test-cd-emu: Test no libusb context support

Yuri Benditovich (8):
  usb-redir: define interfaces to support emulated devices
  usb-redir: move implementation of device description to USB backend
  usb-redir: do not use spice_usb_acl_helper for emulated devices
  usb-redir: extend USB backend to support emulated devices
  usb-redir: add files for SCSI and USB MSC implementation
  usb-redir: add implementation of emulated CD device
  usb-redir: enable redirection of emulated CD drive
  usb-redir: command-line option to create emulated CD drive

 .gitlab-ci.yml           |   11 +-
 src/cd-scsi-dev-params.h |   46 +
 src/cd-scsi.c            | 2742 ++++++++++++++++++++++++++++++++++++++
 src/cd-scsi.h            |  117 ++
 src/cd-usb-bulk-msd.c    |  543 ++++++++
 src/cd-usb-bulk-msd.h    |  131 ++
 src/channel-usbredir.c   |   31 +-
 src/meson.build          |   21 +-
 src/scsi-constants.h     |  321 +++++
 src/spice-option.c       |   17 +
 src/usb-backend.c        |  782 ++++++++++-
 src/usb-backend.h        |    4 +
 src/usb-device-cd.c      |  784 +++++++++++
 src/usb-device-cd.h      |   34 +
 src/usb-device-manager.c |   63 +-
 src/usb-emulation.h      |   88 ++
 tests/cd-emu.c           |  302 +++++
 tests/meson.build        |   12 +-
 18 files changed, 5947 insertions(+), 102 deletions(-)
 create mode 100644 src/cd-scsi-dev-params.h
 create mode 100644 src/cd-scsi.c
 create mode 100644 src/cd-scsi.h
 create mode 100644 src/cd-usb-bulk-msd.c
 create mode 100644 src/cd-usb-bulk-msd.h
 create mode 100644 src/scsi-constants.h
 create mode 100644 src/usb-device-cd.c
 create mode 100644 src/usb-device-cd.h
 create mode 100644 src/usb-emulation.h
 create mode 100644 tests/cd-emu.c
    
Revision 7
      Changes since v4:
- updated "Acked-by" comments;
- fixed a small formatting issue (fixup);
- added some comment;
- updated some commit messages as required;
- remove a debug message in cd-emu test;
- prefer post-fixed increment/decrement;
- merged many acked fixups;
- cleanup temporary file in cd-emu test.

Frediano Ziglio (10):
  fixup! usb-redir: add files for SCSI and USB MSC implementation
  cd-scsi: Do not export sense code constants
  build: Do not build usbredir dependent file is usbredir disabled
  test-cd-emu: Add base test for cd-emulation
  usb-backend: Rewrite USB emulation support
  build: Use a convenience library for tests
  test-cd-emu: Test attach/detach emulated device
  test-cd-emu: Test detach and reattach
  test-cd-emu: Make sure we can call
    spice_usb_backend_channel_flush_writes
  test-cd-emu: Test no libusb context support

Yuri Benditovich (8):
  usb-redir: define interfaces to support emulated devices
  usb-redir: move implementation of device description to USB backend
  usb-redir: do not use spice_usb_acl_helper for emulated devices
  usb-redir: extend USB backend to support emulated devices
  usb-redir: add files for SCSI and USB MSC implementation
  usb-redir: add implementation of emulated CD device
  usb-redir: enable redirection of emulated CD drive
  usb-redir: command-line option to create emulated CD drive

 src/cd-scsi-dev-params.h |   46 +
 src/cd-scsi.c            | 2742 ++++++++++++++++++++++++++++++++++++++
 src/cd-scsi.h            |  117 ++
 src/cd-usb-bulk-msd.c    |  543 ++++++++
 src/cd-usb-bulk-msd.h    |  131 ++
 src/channel-usbredir.c   |   31 +-
 src/meson.build          |   21 +-
 src/scsi-constants.h     |  321 +++++
 src/spice-option.c       |   17 +
 src/usb-backend.c        |  772 ++++++++++-
 src/usb-backend.h        |    4 +
 src/usb-device-cd.c      |  784 +++++++++++
 src/usb-device-cd.h      |   34 +
 src/usb-device-manager.c |   63 +-
 src/usb-emulation.h      |   88 ++
 src/usbutil.c            |    3 -
 src/usbutil.h            |    4 -
 tests/cd-emu.c           |  320 +++++
 tests/meson.build        |   12 +-
 19 files changed, 5952 insertions(+), 101 deletions(-)
 create mode 100644 src/cd-scsi-dev-params.h
 create mode 100644 src/cd-scsi.c
 create mode 100644 src/cd-scsi.h
 create mode 100644 src/cd-usb-bulk-msd.c
 create mode 100644 src/cd-usb-bulk-msd.h
 create mode 100644 src/scsi-constants.h
 create mode 100644 src/usb-device-cd.c
 create mode 100644 src/usb-device-cd.h
 create mode 100644 src/usb-emulation.h
 create mode 100644 tests/cd-emu.c
    
Revision 8
      Changes since v5:
- rebased on master.

Frediano Ziglio (10):
  fixup! usb-redir: add files for SCSI and USB MSC implementation
  cd-scsi: Do not export sense code constants
  build: Do not build usbredir dependent file is usbredir disabled
  test-cd-emu: Add base test for cd-emulation
  usb-backend: Rewrite USB emulation support
  build: Use a convenience library for tests
  test-cd-emu: Test attach/detach emulated device
  test-cd-emu: Test detach and reattach
  test-cd-emu: Make sure we can call
    spice_usb_backend_channel_flush_writes
  test-cd-emu: Test no libusb context support

Yuri Benditovich (8):
  usb-redir: define interfaces to support emulated devices
  usb-redir: move implementation of device description to USB backend
  usb-redir: do not use spice_usb_acl_helper for emulated devices
  usb-redir: extend USB backend to support emulated devices
  usb-redir: add files for SCSI and USB MSC implementation
  usb-redir: add implementation of emulated CD device
  usb-redir: enable redirection of emulated CD drive
  usb-redir: command-line option to create emulated CD drive

 src/cd-scsi-dev-params.h |   46 +
 src/cd-scsi.c            | 2742 ++++++++++++++++++++++++++++++++++++++
 src/cd-scsi.h            |  117 ++
 src/cd-usb-bulk-msd.c    |  543 ++++++++
 src/cd-usb-bulk-msd.h    |  131 ++
 src/channel-usbredir.c   |   31 +-
 src/meson.build          |   21 +-
 src/scsi-constants.h     |  321 +++++
 src/spice-option.c       |   17 +
 src/usb-backend.c        |  772 ++++++++++-
 src/usb-backend.h        |    4 +
 src/usb-device-cd.c      |  784 +++++++++++
 src/usb-device-cd.h      |   34 +
 src/usb-device-manager.c |   63 +-
 src/usb-emulation.h      |   88 ++
 src/usbutil.c            |    3 -
 src/usbutil.h            |    4 -
 tests/cd-emu.c           |  320 +++++
 tests/meson.build        |   12 +-
 19 files changed, 5952 insertions(+), 101 deletions(-)
 create mode 100644 src/cd-scsi-dev-params.h
 create mode 100644 src/cd-scsi.c
 create mode 100644 src/cd-scsi.h
 create mode 100644 src/cd-usb-bulk-msd.c
 create mode 100644 src/cd-usb-bulk-msd.h
 create mode 100644 src/scsi-constants.h
 create mode 100644 src/usb-device-cd.c
 create mode 100644 src/usb-device-cd.h
 create mode 100644 src/usb-emulation.h
 create mode 100644 tests/cd-emu.c
    
Revision 9
      From: Victor Toso <me@victortoso.com>

Hi,

One patch that was not acked but a must to integrate most of this
patches was the "usb-redir: extend USB backend to support emulated
devices", previously v6 04/18

    https://lists.freedesktop.org/archives/spice-devel/2019-September/050730.html

Frediano improved the state a bit with v6 13/18 "usb-backend: Rewrite
USB emulation support".

    https://lists.freedesktop.org/archives/spice-devel/2019-September/050739.html

I don't see much of a point in having a 04/18 that introduces a few
things just to be removed on 13/18, so I had both of them merged in this
series, I hope that seems fine for you.

One thing that bothered me with v6 04/18 is the needed of usbredirparser
also for the non emulated scenario. I don't mind the design itself but
it is a lot to think and test in a single patch, so I propose to split
it.

I've also splitted a few other changes that seemed to me, could have its
own commit + rationale behind it. The diff between resulting code from
v6 and this v7 shouldn't be big.

All in all, not yet super satisfied with "usb-redir: extend USB backend
to support emulated devices" but would be fine to accept it if no ones
has better ideas for improvements or complains in the current code.

Cheers,
Victor

Frediano Ziglio (9):
  usb-backend: add safe check on attach()
  fixup! usb-redir: add files for SCSI and USB MSC implementation
  build: Do not build usbredir dependent file is usbredir disabled
  test-cd-emu: Add base test for cd-emulation
  build: Use a convenience library for tests
  test-cd-emu: Test attach/detach emulated device
  test-cd-emu: Test detach and reattach
  test-cd-emu: Make sure we can call
    spice_usb_backend_channel_flush_writes
  test-cd-emu: Test no libusb context support

Victor Toso (1):
  usb-backend: add guard and doc to check_filter()

Yuri Benditovich (10):
  usb-redir: define interfaces to support emulated devices
  usb-redir: move implementation of device description to USB backend
  usb-redir: do not use spice_usb_acl_helper for emulated devices
  usb-backend: no emulated isoch devices
  usb-backend: include usbredirparser
  usb-redir: extend USB backend to support emulated devices
  usb-redir: add files for SCSI and USB MSC implementation
  usb-redir: add implementation of emulated CD device
  usb-redir: enable redirection of emulated CD drive
  usb-redir: command-line option to create emulated CD drive

 src/cd-scsi-dev-params.h |   46 +
 src/cd-scsi.c            | 2740 ++++++++++++++++++++++++++++++++++++++
 src/cd-scsi.h            |  117 ++
 src/cd-usb-bulk-msd.c    |  543 ++++++++
 src/cd-usb-bulk-msd.h    |  131 ++
 src/channel-usbredir.c   |   31 +-
 src/meson.build          |   21 +-
 src/scsi-constants.h     |  321 +++++
 src/spice-option.c       |   17 +
 src/usb-backend.c        |  772 ++++++++++-
 src/usb-backend.h        |    8 +-
 src/usb-device-cd.c      |  784 +++++++++++
 src/usb-device-cd.h      |   34 +
 src/usb-device-manager.c |   63 +-
 src/usb-emulation.h      |   88 ++
 src/usbutil.c            |    3 -
 src/usbutil.h            |    4 -
 tests/cd-emu.c           |  320 +++++
 tests/meson.build        |   12 +-
 19 files changed, 5953 insertions(+), 102 deletions(-)
 create mode 100644 src/cd-scsi-dev-params.h
 create mode 100644 src/cd-scsi.c
 create mode 100644 src/cd-scsi.h
 create mode 100644 src/cd-usb-bulk-msd.c
 create mode 100644 src/cd-usb-bulk-msd.h
 create mode 100644 src/scsi-constants.h
 create mode 100644 src/usb-device-cd.c
 create mode 100644 src/usb-device-cd.h
 create mode 100644 src/usb-emulation.h
 create mode 100644 tests/cd-emu.c
    
Revision 10
      From: Victor Toso <me@victortoso.com>

Hi,

CI: https://gitlab.freedesktop.org/victortoso/spice-gtk/tree/cd-rom-split-v8

v7->v8 (review by Frediano):
* squashed v7 10/20 into v7 09/20 (an acked fixup)
* Added missing patch, now v8 10/20
* add proper sign-offs to v7 04,07,08/20
* fixed some typos in commit log

Tested now mostly with Fedora.
Waiting Yuri's feedback.

Cheers,
Victor

Frediano Ziglio (9):
  usb-backend: add safe check on attach()
  cd-scsi: Do not export sense code constants
  build: Do not build usbredir dependent file if usbredir is disabled
  test-cd-emu: Add base test for cd-emulation
  build: Use a convenience library for tests
  test-cd-emu: Test attach/detach emulated device
  test-cd-emu: Test detach and reattach
  test-cd-emu: Make sure we can call
    spice_usb_backend_channel_flush_writes
  test-cd-emu: Test no libusb context support

Victor Toso (1):
  usb-backend: add guard and doc to check_filter()

Yuri Benditovich (10):
  usb-redir: define interfaces to support emulated devices
  usb-redir: move implementation of device description to USB backend
  usb-redir: do not use spice_usb_acl_helper for emulated devices
  usb-backend: no emulated isoch devices
  usb-backend: include usbredirparser
  usb-redir: extend USB backend to support emulated devices
  usb-redir: add files for SCSI and USB MSC implementation
  usb-redir: add implementation of emulated CD device
  usb-redir: enable redirection of emulated CD drive
  usb-redir: command-line option to create emulated CD drive

 src/cd-scsi-dev-params.h |   46 +
 src/cd-scsi.c            | 2742 ++++++++++++++++++++++++++++++++++++++
 src/cd-scsi.h            |  117 ++
 src/cd-usb-bulk-msd.c    |  543 ++++++++
 src/cd-usb-bulk-msd.h    |  131 ++
 src/channel-usbredir.c   |   31 +-
 src/meson.build          |   21 +-
 src/scsi-constants.h     |  321 +++++
 src/spice-option.c       |   17 +
 src/usb-backend.c        |  771 ++++++++++-
 src/usb-backend.h        |    8 +-
 src/usb-device-cd.c      |  784 +++++++++++
 src/usb-device-cd.h      |   34 +
 src/usb-device-manager.c |   63 +-
 src/usb-emulation.h      |   88 ++
 src/usbutil.c            |    3 -
 src/usbutil.h            |    4 -
 tests/cd-emu.c           |  320 +++++
 tests/meson.build        |   12 +-
 19 files changed, 5955 insertions(+), 101 deletions(-)
 create mode 100644 src/cd-scsi-dev-params.h
 create mode 100644 src/cd-scsi.c
 create mode 100644 src/cd-scsi.h
 create mode 100644 src/cd-usb-bulk-msd.c
 create mode 100644 src/cd-usb-bulk-msd.h
 create mode 100644 src/scsi-constants.h
 create mode 100644 src/usb-device-cd.c
 create mode 100644 src/usb-device-cd.h
 create mode 100644 src/usb-emulation.h
 create mode 100644 tests/cd-emu.c
    

Revisions

Patches download mbox

# Name Submitter State A F R T
[spice-gtk,v4,01/29] usb-redir: define interfaces to support emulated devices Frediano Ziglio Superseded
[spice-gtk,v4,02/29] fixup! usb-redir: define interfaces to support emulated devices Frediano Ziglio Superseded
[spice-gtk,v4,03/29] usb-redir: move implementation of device description to USB backend Frediano Ziglio Superseded 1
[spice-gtk,v4,04/29] fixup! usb-redir: move implementation of device description to USB backend Frediano Ziglio Superseded
[spice-gtk,v4,05/29] usb-redir: do not use spice_usb_acl_helper for emulated devices Frediano Ziglio Superseded 1
[spice-gtk,v4,06/29] usb-redir: extend USB backend to support emulated devices Frediano Ziglio Superseded
[spice-gtk,v4,07/29] fixup! usb-redir: extend USB backend to support emulated devices Frediano Ziglio Superseded
[spice-gtk,v4,08/29] fixup! usb-redir: extend USB backend to support emulated devices Frediano Ziglio Superseded
[spice-gtk,v4,09/29] usb-redir: add files for SCSI and USB MSC implementation Frediano Ziglio Superseded
[spice-gtk,v4,10/29] fixup! usb-redir: add files for SCSI and USB MSC implementation Frediano Ziglio Superseded
[spice-gtk,v4,11/29] fixup! usb-redir: add files for SCSI and USB MSC implementation Frediano Ziglio Superseded
[spice-gtk,v4,12/29] fixup! usb-redir: add files for SCSI and USB MSC implementation Frediano Ziglio Superseded
[spice-gtk,v4,13/29] usb-redir: add implementation of emulated CD device Frediano Ziglio Superseded
[spice-gtk,v4,14/29] fixup! usb-redir: add implementation of emulated CD device Frediano Ziglio Superseded
[spice-gtk,v4,15/29] usb-redir: enable redirection of emulated CD drive Frediano Ziglio Superseded
[spice-gtk,v4,16/29] fixup! usb-redir: enable redirection of emulated CD drive Frediano Ziglio Superseded
[spice-gtk,v4,17/29] fixup! usb-redir: enable redirection of emulated CD drive Frediano Ziglio Superseded
[spice-gtk,v4,18/29] build: Do not build usbredir dependent file is usbredir disabled Frediano Ziglio Superseded
[spice-gtk,v4,19/29] usb-redir: command-line option to create emulated CD drive Frediano Ziglio Superseded
[spice-gtk,v4,20/29] test-cd-emu: Add base test for cd-emulation Frediano Ziglio Superseded
[spice-gtk,v4,21/29] CI: Add --werror Frediano Ziglio Superseded
[spice-gtk,v4,22/29] CI: Add usbredir packages to Windows Frediano Ziglio Superseded
[spice-gtk,v4,23/29] cd-scsi: Do not export sense code constants Frediano Ziglio Accepted
[spice-gtk,v4,24/29] usb-backend: Rewrite USB emulation support Frediano Ziglio Superseded
[spice-gtk,v4,25/29] build: Use a convenience library for tests Frediano Ziglio Accepted
[spice-gtk,v4,26/29] test-cd-emu: Test attach/detach emulated device Frediano Ziglio Superseded
[spice-gtk,v4,27/29] test-cd-emu: Test detach and reattach Frediano Ziglio Superseded
[spice-gtk,v4,28/29] test-cd-emu: Make sure we can call spice_usb_backend_channel_flush_writes Frediano Ziglio Accepted
[spice-gtk,v4,29/29] test-cd-emu: Test no libusb context support Frediano Ziglio Superseded

Patches download mbox

# Name Submitter State A F R T
[spice-gtk,v5,01/18] usb-redir: define interfaces to support emulated devices Frediano Ziglio Superseded 1
[spice-gtk,v5,02/18] usb-redir: move implementation of device description to USB backend Frediano Ziglio Superseded 1
[spice-gtk,v5,03/18] usb-redir: do not use spice_usb_acl_helper for emulated devices Frediano Ziglio Superseded 1
[spice-gtk,v5,04/18] usb-redir: extend USB backend to support emulated devices Frediano Ziglio Superseded
[spice-gtk,v5,05/18] usb-redir: add files for SCSI and USB MSC implementation Frediano Ziglio Superseded 1
[spice-gtk,v5,06/18] fixup! usb-redir: add files for SCSI and USB MSC implementation Frediano Ziglio Superseded
[spice-gtk,v5,07/18] cd-scsi: Do not export sense code constants Frediano Ziglio Superseded 1
[spice-gtk,v5,08/18] usb-redir: add implementation of emulated CD device Frediano Ziglio Accepted 1
[spice-gtk,v5,09/18] usb-redir: enable redirection of emulated CD drive Frediano Ziglio Accepted
[spice-gtk,v5,10/18] build: Do not build usbredir dependent file is usbredir disabled Frediano Ziglio Accepted
[spice-gtk,v5,11/18] usb-redir: command-line option to create emulated CD drive Frediano Ziglio Superseded
[spice-gtk,v5,12/18] test-cd-emu: Add base test for cd-emulation Frediano Ziglio Accepted
[spice-gtk,v5,13/18] usb-backend: Rewrite USB emulation support Frediano Ziglio Superseded
[spice-gtk,v5,14/18] build: Use a convenience library for tests Frediano Ziglio Superseded
[spice-gtk,v5,15/18] test-cd-emu: Test attach/detach emulated device Frediano Ziglio Superseded
[spice-gtk,v5,16/18] test-cd-emu: Test detach and reattach Frediano Ziglio Accepted
[spice-gtk,v5,17/18] test-cd-emu: Make sure we can call spice_usb_backend_channel_flush_writes Frediano Ziglio Superseded
[spice-gtk,v5,18/18] test-cd-emu: Test no libusb context support Frediano Ziglio Accepted

Patches download mbox

# Name Submitter State A F R T
[spice-gtk,v6,01/18] usb-redir: define interfaces to support emulated devices Frediano Ziglio Accepted 1
[spice-gtk,v6,02/18] usb-redir: move implementation of device description to USB backend Frediano Ziglio Accepted 1
[spice-gtk,v6,03/18] usb-redir: do not use spice_usb_acl_helper for emulated devices Frediano Ziglio Superseded 1
[spice-gtk,v6,04/18] usb-redir: extend USB backend to support emulated devices Frediano Ziglio Superseded
[spice-gtk,v6,05/18] usb-redir: add files for SCSI and USB MSC implementation Frediano Ziglio Superseded 1
[spice-gtk,v6,06/18] fixup! usb-redir: add files for SCSI and USB MSC implementation Frediano Ziglio Superseded
[spice-gtk,v6,07/18] cd-scsi: Do not export sense code constants Frediano Ziglio Superseded 1
[spice-gtk,v6,08/18] usb-redir: add implementation of emulated CD device Frediano Ziglio Superseded 1
[spice-gtk,v6,09/18] usb-redir: enable redirection of emulated CD drive Frediano Ziglio Superseded
[spice-gtk,v6,10/18] build: Do not build usbredir dependent file is usbredir disabled Frediano Ziglio Superseded
[spice-gtk,v6,11/18] usb-redir: command-line option to create emulated CD drive Frediano Ziglio Superseded
[spice-gtk,v6,12/18] test-cd-emu: Add base test for cd-emulation Frediano Ziglio Superseded
[spice-gtk,v6,13/18] usb-backend: Rewrite USB emulation support Frediano Ziglio Superseded
[spice-gtk,v6,14/18] build: Use a convenience library for tests Frediano Ziglio Superseded
[spice-gtk,v6,15/18] test-cd-emu: Test attach/detach emulated device Frediano Ziglio Accepted
[spice-gtk,v6,16/18] test-cd-emu: Test detach and reattach Frediano Ziglio Superseded
[spice-gtk,v6,17/18] test-cd-emu: Make sure we can call spice_usb_backend_channel_flush_writes Frediano Ziglio Superseded
[spice-gtk,v6,18/18] test-cd-emu: Test no libusb context support Frediano Ziglio Superseded

Patches download mbox

# Name Submitter State A F R T
[v7,01/20] usb-redir: define interfaces to support emulated devices Victor Toso Superseded 1
[v7,02/20] usb-redir: move implementation of device description to USB backend Victor Toso Superseded 1
[v7,03/20] usb-redir: do not use spice_usb_acl_helper for emulated devices Victor Toso Superseded 1
[v7,04/20] usb-backend: no emulated isoch devices Victor Toso Superseded
[v7,05/20] usb-backend: add guard and doc to check_filter() Victor Toso Superseded
[v7,06/20] usb-backend: add safe check on attach() Victor Toso Accepted
[v7,07/20] usb-backend: include usbredirparser Victor Toso Accepted
[v7,08/20] usb-redir: extend USB backend to support emulated devices Victor Toso Accepted
[v7,09/20] usb-redir: add files for SCSI and USB MSC implementation Victor Toso Superseded 1
[v7,10/20] fixup! usb-redir: add files for SCSI and USB MSC implementation Victor Toso Superseded
[v7,11/20] usb-redir: add implementation of emulated CD device Victor Toso Superseded 1
[v7,12/20] usb-redir: enable redirection of emulated CD drive Victor Toso Superseded
[v7,13/20] build: Do not build usbredir dependent file is usbredir disabled Victor Toso Superseded
[v7,14/20] usb-redir: command-line option to create emulated CD drive Victor Toso Superseded
[v7,15/20] test-cd-emu: Add base test for cd-emulation Victor Toso Superseded
[v7,16/20] build: Use a convenience library for tests Victor Toso Superseded
[v7,17/20] test-cd-emu: Test attach/detach emulated device Victor Toso Superseded
[v7,18/20] test-cd-emu: Test detach and reattach Victor Toso Superseded
[v7,19/20] test-cd-emu: Make sure we can call spice_usb_backend_channel_flush_writes Victor Toso Superseded
[v7,20/20] test-cd-emu: Test no libusb context support Victor Toso Superseded

Patches download mbox

# Name Submitter State A F R T
[v8,01/20] usb-redir: define interfaces to support emulated devices Victor Toso Accepted 1
[v8,02/20] usb-redir: move implementation of device description to USB backend Victor Toso Accepted 1
[v8,03/20] usb-redir: do not use spice_usb_acl_helper for emulated devices Victor Toso Accepted 1
[v8,04/20] usb-backend: no emulated isoch devices Victor Toso Accepted 1
[v8,05/20] usb-backend: add guard and doc to check_filter() Victor Toso Accepted 1
[v8,06/20] usb-backend: add safe check on attach() Victor Toso Accepted
[v8,07/20] usb-backend: include usbredirparser Victor Toso Accepted
[v8,08/20] usb-redir: extend USB backend to support emulated devices Victor Toso Accepted
[v8,09/20] usb-redir: add files for SCSI and USB MSC implementation Victor Toso Accepted 1
[v8,10/20] cd-scsi: Do not export sense code constants Victor Toso Accepted 1
[v8,11/20] usb-redir: add implementation of emulated CD device Victor Toso Accepted 1
[v8,12/20] usb-redir: enable redirection of emulated CD drive Victor Toso Accepted
[v8,13/20] build: Do not build usbredir dependent file if usbredir is disabled Victor Toso Accepted
[v8,14/20] usb-redir: command-line option to create emulated CD drive Victor Toso New
[v8,15/20] test-cd-emu: Add base test for cd-emulation Victor Toso Accepted
[v8,16/20] build: Use a convenience library for tests Victor Toso Accepted
[v8,17/20] test-cd-emu: Test attach/detach emulated device Victor Toso Accepted
[v8,18/20] test-cd-emu: Test detach and reattach Victor Toso Accepted
[v8,19/20] test-cd-emu: Make sure we can call spice_usb_backend_channel_flush_writes Victor Toso Accepted
[v8,20/20] test-cd-emu: Test no libusb context support Victor Toso Accepted