From:   John Homppi
Sent:   Sunday, December 14, 2003 12:38 PM
To:     'Sergey Vlasov'
Cc:     '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
Subject:        RE: [linux-usb-devel] hid and low-speed devices

Hi Sergey,
This failure mode also occurs with the ADU200 device from Ontrak Control Systems.
The ADU200 is a HID device with no bulk endpoints; only control and interrupt endpoints.


As you pointed out, hid-core.c assumes that all HID devices have a bulk-out endpoint.
Thus the ADU200 appears in the hid_blacklist in hid-core.c


If someone knowledgeable made the change to hid-core.c then I would be willing
to test it. I suspect that the change may not be simple as there may be repercussions in
other areas of the Linux kernel.


I already have code that attempts to use the ADU200 as a HID device (of course it
fails so I have been using my own driver instead.)


Bye,
John Homppi


Sergey Vlasov wrote: ---------- From: Sergey Vlasov Sent: Sunday, December 14, 2003 11:14 AM To: Johann Deneux Cc: [EMAIL PROTECTED] Subject: Re: [linux-usb-devel] hid and low-speed devices

<<<original message from Johann Deneux snipped>>>

Seems that the real problem is in hid-core.c:

                endpoint = &interface->endpoint[n].desc;
                if ((endpoint->bmAttributes & 3) != 3)           /* Not an interrupt 
endpoint */
                        continue;

                if (endpoint->bEndpointAddress & USB_DIR_IN) {
                        if (hid->urbin)
                                continue;
                        if (!(hid->urbin = usb_alloc_urb(0, GFP_KERNEL)))
                                goto fail;
                        pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
                        usb_fill_int_urb(hid->urbin, dev, pipe, hid->inbuf, 0,
                                         hid_irq_in, hid, endpoint->bInterval);
                        hid->urbin->transfer_dma = hid->inbuf_dma;
                        hid->urbin->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
                } else {
                        if (hid->urbout)
                                continue;
                        if (!(hid->urbout = usb_alloc_urb(0, GFP_KERNEL)))
                                goto fail;
                        pipe = usb_sndbulkpipe(dev, endpoint->bEndpointAddress);
                        usb_fill_bulk_urb(hid->urbout, dev, pipe, hid->outbuf, 0,
                                          hid_irq_out, hid);
                        hid->urbout->transfer_dma = hid->outbuf_dma;
                        hid->urbout->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
                }

Notice that for the input endpoint it correctly uses usb_rcvintpipe()
and usb_fill_int_urb(), but for the output endpoint usb_sndbulkpipe()
and usb_fill_bulk_urb() are used (even though it is really an
interrupt endpoint).  How could this work?

So it is the HID core which must be fixed.  Unfortunately, I don't
have any HID device which would have an interrupt out endpoint...



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to