Add Zero Length Packet (ZLP) support for Gemalto IDBridge CT30 and K30

The Gemalto IDBridge CT30 and IDBridge K30 readers may send a ZLP after
some commands when connected on a USB3 bus. Only the readers with
firmware 2.00 have the problem.

The solution is to use a short read before every USB write.


git-svn-id: svn://anonscm.debian.org/pcsclite/trunk/Drivers/ccid@6650 0ce88b0d-b2fd-0310-8134-9614164e65ea
New firmware (2.0)


git-svn-id: svn://anonscm.debian.org/pcsclite/trunk/Drivers/ccid@6651 0ce88b0d-b2fd-0310-8134-9614164e65ea
New firmware and new name of the Gemalto USB Shell Token V2


git-svn-id: svn://anonscm.debian.org/pcsclite/trunk/Drivers/ccid@6652 0ce88b0d-b2fd-0310-8134-9614164e65ea
Add Gemalto IDBridge K30


git-svn-id: svn://anonscm.debian.org/pcsclite/trunk/Drivers/ccid@6655 0ce88b0d-b2fd-0310-8134-9614164e65ea
Move Gemalto IDBridge CT30 from "unsupported" to "should work" list


git-svn-id: svn://anonscm.debian.org/pcsclite/trunk/Drivers/ccid@6656 0ce88b0d-b2fd-0310-8134-9614164e65ea
Move Gemalto IDBridge K3000 from "should work" to "supported"


git-svn-id: svn://anonscm.debian.org/pcsclite/trunk/Drivers/ccid@6658 0ce88b0d-b2fd-0310-8134-9614164e65ea
Release 1.4.11


git-svn-id: svn://anonscm.debian.org/pcsclite/trunk/Drivers/ccid@6659 0ce88b0d-b2fd-0310-8134-9614164e65ea
Update from automake 1.13


git-svn-id: svn://anonscm.debian.org/pcsclite/trunk/Drivers/ccid@6661 0ce88b0d-b2fd-0310-8134-9614164e65ea
Use serialconfdir from pcsc-lite

Get the serialconfdir value from pcsc-lite pkg config instead of using
$(DESTDIR)/$(sysconfdir)/reader.conf.d/


git-svn-id: svn://anonscm.debian.org/pcsclite/trunk/Drivers/ccid@6664 0ce88b0d-b2fd-0310-8134-9614164e65ea
Disable class driver on Mac OS X

- we are building for a specific reader
- pcsc-lite on Mac OS X do not yet support "class" driver


git-svn-id: svn://anonscm.debian.org/pcsclite/trunk/Drivers/ccid@6666 0ce88b0d-b2fd-0310-8134-9614164e65ea
Update the bundle name template to include the vendor name

The bundle name template is now ifd-ccid-vendor-reader.bundle


git-svn-id: svn://anonscm.debian.org/pcsclite/trunk/Drivers/ccid@6667 0ce88b0d-b2fd-0310-8134-9614164e65ea
Remove libusb-config use

libusb-config was provided by libusb-0.1. We do not use this version
of the libusb API since version libccid 1.4.0 (August 2010)


git-svn-id: svn://anonscm.debian.org/pcsclite/trunk/Drivers/ccid@6672 0ce88b0d-b2fd-0310-8134-9614164e65ea
Check libusb is at least at version 1.0.8

The driver will need to use libusb_exit() for libusbx >= 1.0.16 because
of the libusb hotplug thread.

libusb_exit() was not working correctly in libusb < 1.0.8.

So we check the libusb library used will at least provide a working
libusb_exit() function.


git-svn-id: svn://anonscm.debian.org/pcsclite/trunk/Drivers/ccid@6673 0ce88b0d-b2fd-0310-8134-9614164e65ea
Call libusb_exit() when needed

Starting with libusbx 1.0.16 a hotplug thread is created by libusb. We
must cleanly stop the thread or bad thing can happen (crash on Mac OS X
for exampple)


git-svn-id: svn://anonscm.debian.org/pcsclite/trunk/Drivers/ccid@6674 0ce88b0d-b2fd-0310-8134-9614164e65ea
close_libusb_if_needed(): Reset ctx value to NULL

Make sure libusb_init() will be called for the next reader.

This was not a real problem since pcscd will unload the driver when no
more reader is using it.


git-svn-id: svn://anonscm.debian.org/pcsclite/trunk/Drivers/ccid@6675 0ce88b0d-b2fd-0310-8134-9614164e65ea
WriteUSB(): check return value for LIBUSB_ERROR_NO_DEVICE

If the device is removed we check for ENODEV == errno and now also for
LIBUSB_ERROR_NO_DEVICE == rv (libusb_bulk_transfer() return value)

Only the value returned by libusb_bulk_transfer() should be used in the
futur.


git-svn-id: svn://anonscm.debian.org/pcsclite/trunk/Drivers/ccid@6676 0ce88b0d-b2fd-0310-8134-9614164e65ea
ReadUSB(): check libusb return value for LIBUSB_ERROR_NO_DEVICE

Same change as in revision 6676 but for ReadUSB().


git-svn-id: svn://anonscm.debian.org/pcsclite/trunk/Drivers/ccid@6677 0ce88b0d-b2fd-0310-8134-9614164e65ea
Add support of multi-slot readers

Thanks to Johann Dantant for the initial patch


git-svn-id: svn://anonscm.debian.org/pcsclite/trunk/Drivers/ccid@6678 0ce88b0d-b2fd-0310-8134-9614164e65ea
CloseUSB(): free arrayOfSupportedDataRates on the last slot close

Do free .ccid.arrayOfSupportedDataRates array only when the last slot is
closed.

Multi-slot readers share the same .ccid.arrayOfSupportedDataRates array.

The GEMCOREPOSPRO and GEMCORESIMPRO are an exception and are not
correctly managed by this patch (memory may leak).


git-svn-id: svn://anonscm.debian.org/pcsclite/trunk/Drivers/ccid@6681 0ce88b0d-b2fd-0310-8134-9614164e65ea
Code factorisation


git-svn-id: svn://anonscm.debian.org/pcsclite/trunk/Drivers/ccid@6682 0ce88b0d-b2fd-0310-8134-9614164e65ea