usb: ccid bugfix, misc small improvements.

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJa4vliAAoJEEy22O7T6HE4SbEP/1KLjFyC3B9T2jhoTy2WN9vI
 t4x4HUvA6/GjA3qZ+ep+MiZnw46LtaaAC8NoqLpQL3iuWFtwvdx/k1eGvRjBMGH8
 1mRN48qw8jajo2synJXdvImGJBjr2hppuQDV/n2MxG4V4Zpo6j4Upcao6lGH1mfD
 RKg7a6RUfETKeuMImvU3GbB0kSngNpMdwEKbjHgQZuzuLxnUyjuL9K2pAHZtlAWe
 AXcbDWrH2AjDLmBrQuIvprfq2ANu5VVO3l9chpMNXm0zlYsVIdY+CkqkyFmfreV3
 B13rXZarColWj/jFcX/lJ+I2HJ8nKyXMG1b2MLMHCTPASB6iKsXBMzsrklIEscys
 uBBRpMJUZTBUP0SlptX+YDcvoBcMFpL0hiEAIvRIsnzQosTKgus8eTu2c7I31ayX
 2oYfCfJuF+3fh0kooHikyZ3yCEPVMZPrEviYJgIoNyg7fmdMN8s2DNyaZj36hihU
 vr9URpphsQDJFI5cVE3BGZMloVoAe5ZWWvnMJcOavzMViItMt2r5ois03CdDfpw3
 v7wPYd0f60ZC2eq1wcJ3lGdsBzZbsy/fnPrdg8UYAOfpEw1cSbMvdhgLS0qnDxI7
 e7XmIxN5REnUKt59eHTFnYNYzhQE0QPKPMn3toM2l+vCUXPydd9ZuV7GZ9ecqhbx
 beVMX0Wky/COSxUco7JY
 =I+9b
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/usb-20180427-pull-request' into staging

usb: ccid bugfix, misc small improvements.

# gpg: Signature made Fri 27 Apr 2018 11:20:18 BST
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/usb-20180427-pull-request:
  ccid-card: include libcacard.h only
  Fix libusb-1.0.22 deprecated libusb_set_debug with libusb_set_option
  ccid: Fix dwProtocols advertisement of T=0

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2018-04-27 12:27:59 +01:00
commit 6f0c4706b3
5 changed files with 9 additions and 8 deletions

2
configure vendored
View File

@ -4478,7 +4478,7 @@ fi
# check for smartcard support
if test "$smartcard" != "no"; then
if $pkg_config libcacard; then
if $pkg_config --atleast-version=2.5.1 libcacard; then
libcacard_cflags=$($pkg_config --cflags libcacard)
libcacard_libs=$($pkg_config --libs libcacard)
smartcard="yes"

View File

@ -27,10 +27,7 @@
*/
#include "qemu/osdep.h"
#include <eventt.h>
#include <vevent.h>
#include <vreader.h>
#include <vcard_emul.h>
#include <libcacard.h>
#include "qemu/thread.h"
#include "qemu/main-loop.h"

View File

@ -9,7 +9,7 @@
*/
#include "qemu/osdep.h"
#include <cacard/vscard_common.h>
#include <libcacard.h>
#include "chardev/char-fe.h"
#include "qemu/error-report.h"
#include "qemu/sockets.h"

View File

@ -329,8 +329,8 @@ static const uint8_t qemu_ccid_descriptor[] = {
*/
0x07, /* u8 bVoltageSupport; 01h - 5.0v, 02h - 3.0, 03 - 1.8 */
0x00, 0x00, /* u32 dwProtocols; RRRR PPPP. RRRR = 0000h.*/
0x01, 0x00, /* PPPP: 0001h = Protocol T=0, 0002h = Protocol T=1 */
0x01, 0x00, /* u32 dwProtocols; RRRR PPPP. RRRR = 0000h.*/
0x00, 0x00, /* PPPP: 0001h = Protocol T=0, 0002h = Protocol T=1 */
/* u32 dwDefaultClock; in kHZ (0x0fa0 is 4 MHz) */
0xa0, 0x0f, 0x00, 0x00,
/* u32 dwMaximumClock; */

View File

@ -247,7 +247,11 @@ static int usb_host_init(void)
if (rc != 0) {
return -1;
}
#if LIBUSB_API_VERSION >= 0x01000106
libusb_set_option(ctx, LIBUSB_OPTION_LOG_LEVEL, loglevel);
#else
libusb_set_debug(ctx, loglevel);
#endif
#ifdef CONFIG_WIN32
/* FIXME: add support for Windows. */
#else