Thanks Dr. Ludovic Rousseau

Following your advice, the problem exists in the function of
"IFDHICCPresence" in ifdhandler.c.

ret = read(SmartCard[readerNum].fd, buffer, sizeof(buffer));
PRINTFD("read %d\n", ret);
if (ret != 4)
  return IFD_COMMUNICATION_ERROR;

The above snippet which returns -1 will call the function "skel_read"
in the kernel module driver DT3500.c which returns -84. In fact, the
error occurs when "usb_bulk_msg" is called in skel_read. I check
errno.h and find that 84 is the error number of
#define EILSEQ          84      /* Illegal byte sequence */

The snippet in skel_read is :
......
        /* do a blocking bulk read to get data from the device */
        retval = usb_bulk_msg(dev->udev,
                              usb_rcvbulkpipe(dev->udev,
dev->bulk_in_endpointAddr),
                              dev->bulk_in_buffer,
                              //min(dev->bulk_in_size, count),
                              dev->bulk_in_size,
                              &count, HZ*10);

        err("retval of skel_read %d", retval);
......

Reading Documentation/usb/error-codes.txt, I find that:
a) CRC mismatch
b) no response packet received within the
prescribed bus turn-around time
c) unknown USB error

How to make sure what the matter really is? I still can't understand
why the same code can run on kernel 2.6.11 but fail on kernel 2.6.14.
:(


On 1/19/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Send Muscle mailing list submissions to
>        [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.drizzle.com/mailman/listinfo/muscle
> or, via email, send a message with subject or body 'help' to
>        [EMAIL PROTECTED]
>
> You can reach the person managing the list at
>        [EMAIL PROTECTED]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Muscle digest..."
>
>
> Today's Topics:
>
>   1. Re: Where is the implementation of IFDH_icc_presence?
(Ludovic Rousseau)
>   2. compiling pcsc-lite for mips (Ivan Korzakow)
>   3. Re: compiling pcsc-lite for mips (Ludovic Rousseau)
>   4. Re: compiling pcsc-lite for mips (Ivan Korzakow)
>   5. Re: compiling pcsc-lite for mips (Ludovic Rousseau)
>   6. Re: compiling pcsc-lite for mips (Ivan Korzakow)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 18 Jan 2006 09:26:33 +0100
> From: Ludovic Rousseau <[EMAIL PROTECTED]>
> Subject: Re: [Muscle] Re: Muscle Digest, Vol 23, Issue 12
> To: MUSCLE <[email protected]>
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On 18/01/06, mail mail <[EMAIL PROTECTED]> wrote:
> > Thanks Dr. Ludovic Rousseau.
> >
> > According to the usb-skeleton.c (my driver is derived from this code),
> > which function should I concern most to find out the problem?
> >
> > skel_read
> > skel_write
> > skel_ioctl
> > skel_open
> > skel_probe
> > usb_skel_init
>
> You should look for the problem in the USER SPACE part of the driver,
> not in the KERNEL SPACE part of the driver.
>
> The user space driver should be somewhere in /usr/local/pcsc/driver/*.bunble/
>
> Bye,
>
> --
>  Dr. Ludovic Rousseau
>
>
>

_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to