All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ruien Zhang <zhangruien@bytedance.com>
To: peter.maydell@linaro.org, richard.henderson@linaro.org,
	kraxel@redhat.com, eblake@redhat.com, pbonzini@redhat.com,
	berrange@redhat.com
Cc: qemu-devel@nongnu.org, zhangruien <zhangruien@bytedance.com>
Subject: [PATCH 0/2] Introduce printer subsystem and USB printer device
Date: Thu, 13 Jan 2022 19:56:57 +0800	[thread overview]
Message-ID: <20220113115659.72788-1-zhangruien@bytedance.com> (raw)

From: zhangruien <zhangruien@bytedance.com>

Currently, printer support in QEMU can generally be considered with these
approaches:

1) USB passthrough & redirection, with the limitation of flexibility and
   transport-specific issues that come along with.

2) Network reachability with network printers, which is also driver-specific,
   thus less friendly to small systems.

Driverless Printing [1] may or may not be network-dependent, the former is the
general case while the latter imposes less restraints on cloud environments, and
it doesn't necessarily mean that we have to follow the methods in 1) to achieve
this. Transport protocols targeted at devices such as USB printer class [2] with
the extension of IPP-over-USB [3] and many others can be integrated into QEMU,
presenting more flexibility and functionality.

This patchset introduces:

1) Skeleton of QEMU printer subsystem with a dummy builtin driver.

2) USB printer device emulation, with definitions in the extension of IPP-over-
   USB [3].

WIP:

1) QEMU printer subsystem interfaces, which will be finalized with a concrete
   backend driver.

2) IPP-over-USB implementation.

[1]: https://openprinting.github.io/driverless
[2]: https://www.usb.org/sites/default/files/usbprint11a021811.pdf
[3]: https://www.usb.org/document-library/ipp-protocol-10

zhangruien (2):
  printer: Introduce printer subsystem
  usb-printer: Introduce USB printer class

 MAINTAINERS                 |   7 +
 docs/system/devices/usb.rst |   3 +
 hw/usb/Kconfig              |   5 +
 hw/usb/dev-printer.c        | 423 ++++++++++++++++++++++++++++++++++++++++++++
 hw/usb/meson.build          |   1 +
 hw/usb/trace-events         |  11 ++
 include/hw/usb/printer.h    |  93 ++++++++++
 include/printer/printer.h   |  42 +++++
 meson.build                 |  12 +-
 meson_options.txt           |   3 +
 printer/builtin.c           |  61 +++++++
 printer/meson.build         |  14 ++
 printer/printer.c           | 191 ++++++++++++++++++++
 printer/trace-events        |   5 +
 printer/trace.h             |   1 +
 qapi/meson.build            |   1 +
 qapi/printer.json           |  47 +++++
 qapi/qapi-schema.json       |   1 +
 qemu-options.hx             |   8 +
 softmmu/vl.c                |   4 +
 20 files changed, 932 insertions(+), 1 deletion(-)
 create mode 100644 hw/usb/dev-printer.c
 create mode 100644 include/hw/usb/printer.h
 create mode 100644 include/printer/printer.h
 create mode 100644 printer/builtin.c
 create mode 100644 printer/meson.build
 create mode 100644 printer/printer.c
 create mode 100644 printer/trace-events
 create mode 100644 printer/trace.h
 create mode 100644 qapi/printer.json

-- 
2.11.0



             reply	other threads:[~2022-01-13 14:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13 11:56 Ruien Zhang [this message]
2022-01-13 11:56 ` [PATCH 1/2] printer: Introduce printer subsystem Ruien Zhang
2022-01-13 11:56 ` [PATCH 2/2] usb-printer: Introduce USB printer class Ruien Zhang
2022-01-14  9:32 ` [PATCH 0/2] Introduce printer subsystem and USB printer device Gerd Hoffmann
2022-01-14 13:38   ` Ruien Zhang
2022-01-15 15:31   ` Ruien Zhang
2022-01-17  7:17     ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220113115659.72788-1-zhangruien@bytedance.com \
    --to=zhangruien@bytedance.com \
    --cc=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.