Fwd: umodem (4) recognize a CDC-ACM device
Marcelo/Porks
marcelorossi at gmail.com
Mon Jun 7 12:01:37 UTC 2010
On Fri, Jun 4, 2010 at 12:32 PM, Marcelo/Porks <marcelorossi at gmail.com> wrote:
> On Fri, Jun 4, 2010 at 4:28 AM, Hans Petter Selasky <hselasky at c2i.net> wrote:
>>> On Thu, Jun 3, 2010 at 12:57 PM, Hans Petter Selasky <hselasky at c2i.net>
>> wrote:
>>> > Should be like this: Note the structure is called "bulk_min":
>>> >
>>> > static const uint16_t bulk_min[USB_SPEED_MAX] = {
>>> > [USB_SPEED_LOW] = 8,
>>> > [USB_SPEED_FULL] = 8,
>>> > [USB_SPEED_HIGH] = 512,
>>> > [USB_SPEED_VARIABLE] = 512,
>>> > [USB_SPEED_SUPER] = 1024,
>>> > };
>>> > --HPS
>> I think you also need to remove the check for LOW speed in the EHCI/OHCI/UHCI
>> controller drivers too. See usb/controller/{ehci.c,uhci.c,ohci.c}
>>
>> case UE_BULK:
>> if (udev->speed != USB_SPEED_LOW) {
>> ep->methods = &uhci_device_bulk_methods;
>> }
>> break;
>>
>> --HPS
>>
>
> Hia Hans! It seems to work now or at least it was recognized.
>
> I'll make more tests on Monday and post the results.
Hi all! Just to confirm, The patch works fine and I can use the device.
Bellow is the full patch that Hans sent to me in private. Thanks again, Hans.
======================
Differences ...
==== //depot/projects/usb/src/sys/dev/usb/controller/ehci.c#53 (text+ko) ====
@@ -3792,9 +3792,7 @@
}
break;
case UE_BULK:
- if (udev->speed != USB_SPEED_LOW) {
- ep->methods = &ehci_device_bulk_methods;
- }
+ ep->methods = &ehci_device_bulk_methods;
break;
default:
/* do nothing */
==== //depot/projects/usb/src/sys/dev/usb/controller/ohci.c#35 (text+ko) ====
@@ -2614,9 +2614,7 @@
}
break;
case UE_BULK:
- if (udev->speed != USB_SPEED_LOW) {
- ep->methods = &ohci_device_bulk_methods;
- }
+ ep->methods = &ohci_device_bulk_methods;
break;
default:
/* do nothing */
==== //depot/projects/usb/src/sys/dev/usb/controller/uhci.c#32 (text+ko) ====
@@ -3068,9 +3068,7 @@
}
break;
case UE_BULK:
- if (udev->speed != USB_SPEED_LOW) {
- ep->methods = &uhci_device_bulk_methods;
- }
+ ep->methods = &uhci_device_bulk_methods;
break;
default:
/* do nothing */
==== //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#177 (text+ko) ====
@@ -3057,7 +3057,7 @@
};
static const uint16_t bulk_min[USB_SPEED_MAX] = {
- [USB_SPEED_LOW] = 0, /* not supported */
+ [USB_SPEED_LOW] = 8,
[USB_SPEED_FULL] = 8,
[USB_SPEED_HIGH] = 512,
[USB_SPEED_VARIABLE] = 512,
--
Marcelo Rossi
"This e-mail is provided "AS IS" with no warranties, and confers no rights."
More information about the freebsd-current
mailing list