Installing the USB7/AVR-CDC driver in LinuxFull Disclosure: I have not personally used the USB7 with Linux in a very long time, the following information has been collected from user submission, the LKML, and the AVR-CDC or AVR-USB documentation. If you have anything to add to this documentation, please contact me (). Linux installation instructions depend on your kernel version. To establish your kernel version, run the command uname -r and examine the output. For kernels 2.6.22 and below, this should be plug-n-play. Kernels 2.6.23 and later, may require a kernel patch. 2.6.22 and BelowThe USB7 should be available directly as a USB serial port under /dev/ttyACM0 (or similiar). For users with UHCI host controllers, you may need to apply the following patch: --- old/drivers/usb/host/uhci-q.c 2007-12-10 08:22:18.000000000 +0100 +++ new/drivers/usb/host/uhci-q.c 2007-12-10 08:06:28.000000000 +0100 @@ -1046,14 +1046,14 @@ int ret; /* Can't have low-speed bulk transfers */ - if (urb->dev->speed == USB_SPEED_LOW) - return -EINVAL; + /*if (urb->dev->speed == USB_SPEED_LOW) + return -EINVAL;*/ if (qh->state != QH_STATE_ACTIVE) - qh->skel = SKEL_BULK; + qh->skel = (urb->dev->speed == USB_SPEED_LOW ? SKEL_LS_CONTROL : SKEL_BULK); ret = uhci_submit_common(uhci, urb, qh); - if (ret == 0) + if (ret == 0 && urb->dev->speed != USB_SPEED_LOW) uhci_add_fsbr(uhci, urb); return ret; } 2.6.23 and AboveA patch to the kernel source has enabled the magic remapping of USB bulk endpoints to interupt endpoints for low-speed devices. Unfortunetly this makes AVR-CDC/the USB7 incompatible with the CDC-ACM driver. Your distrobution might have already fixed this, though, so look for a CDC endpoint under /dev/ttyACM0 (or similiar) first. It just might work out of the box. If you're running Ubuntu 8.x or 9.x, this has been known to cause kernel panics, so save your changes first! (Thanks John Hobbs for noting some distributions already have this patch.) Otherwise: you will need to apply the following patch: -- linux-2.6.25/drivers/usb/core/config.c 2008-04-16 22:49:44.000000000 -0400 +++ linux-2.6.25-usbpatch/drivers/usb/core/config.c 2008-06-12 23:56:54.000000000 -0400 @@ -137,12 +137,16 @@ if (to_usb_device(ddev)->speed == USB_SPEED_LOW && usb_endpoint_xfer_bulk(d)) { dev_warn(ddev, "config %d interface %d altsetting %d " - "endpoint 0x%X is Bulk; changing to Interrupt\n", - cfgno, inum, asnum, d->bEndpointAddress); - endpoint->desc.bmAttributes = USB_ENDPOINT_XFER_INT; - endpoint->desc.bInterval = 1; - if (le16_to_cpu(endpoint->desc.wMaxPacketSize) > 8) - endpoint->desc.wMaxPacketSize = cpu_to_le16(8); + "endpoint 0x%X is Bulk; this violates USB spec for " + "low speed devices.\n", + cfgno, inum, asnum, d->bEndpointAddress); +// dev_warn(ddev, "config %d interface %d altsetting %d " +// "endpoint 0x%X is Bulk; changing to Interrupt\n", +// cfgno, inum, asnum, d->bEndpointAddress); +// endpoint->desc.bmAttributes = USB_ENDPOINT_XFER_INT; +// endpoint->desc.bInterval = 1; +// if (le16_to_cpu(endpoint->desc.wMaxPacketSize) > 8) +// endpoint->desc.wMaxPacketSize = cpu_to_le16(8); } /* Skip over any Class Specific or Vendor Specific descriptors; diff -ur linux-2.6.25/drivers/usb/host/uhci-q.c linux-2.6.25-usbpatch/drivers/usb/host/uhci-q.c --- linux-2.6.25/drivers/usb/host/uhci-q.c 2008-04-16 22:49:44.000000000 -0400 +++ linux-2.6.25-usbpatch/drivers/usb/host/uhci-q.c 2008-06-13 17:41:22.000000000 -0400 @@ -1042,8 +1042,8 @@ int ret; /* Can't have low-speed bulk transfers */ - if (urb->dev->speed == USB_SPEED_LOW) - return -EINVAL; +// if (urb->dev->speed == USB_SPEED_LOW) +// return -EINVAL; if (qh->state != QH_STATE_ACTIVE) qh->skel = SKEL_BULK; Thank you Jason Boyles for supplying the above patch. |