Re: Trying to get usbnet working to gumstix

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Leith Brandeland
Date: Thursday, March 27, 2008 - 2:40 pm

On Thu, Mar 13, 2008 at 2:03 PM, Leith Brandeland <leith@brandeland.com>
wrote:

I'm still digging into this, but not making a whole lot of headway.  I'm
hoping there are still some folks out there with some insight into this
little problem that can help.

So, again, the /var/log/messages error that I'm seeing is:

Mar 26 16:27:37 fw /bsd: cdce0: interface alternate setting 0 failed

looking into the code (sys/dev/usb/if_cdce.c), I think that this is where
the error is coming from:

for (j = 0; j < numalts; j++) {
            if (usbd_set_interface(sc->cdce_data_iface, j)) {
                printf("%s: interface alternate setting %d failed\n",
                    sc->cdce_dev.dv_xname, j);
                return;
            }

So, looking at the usbd_set_interface function (in usbdi.c)

usbd_set_interface(usbd_interface_handle iface, int altidx)
{
        usb_device_request_t req;
        usbd_status err;
        void *endpoints;

        if (LIST_FIRST(&iface->pipes) != 0)
                return (USBD_IN_USE);

        endpoints = iface->endpoints;
        err = usbd_fill_iface_data(iface->device, iface->index, altidx);
        if (err)
                return (err);
....<snip>....

I don't know if perhaps the error is farther down the code, but I forked my
investigation to look at the usbd_fill_iface_data in "usb_subr.c"

usbd_status
usbd_fill_iface_data(usbd_device_handle dev, int ifaceidx, int altidx)
{
        usbd_interface_handle ifc = &dev->ifaces[ifaceidx];
        usb_interface_descriptor_t *idesc;
        char *p, *end;
        int endpt, nendpt;

        DPRINTFN(4,("usbd_fill_iface_data: ifaceidx=%d altidx=%d\n",
                    ifaceidx, altidx));
        idesc = usbd_find_idesc(dev->cdesc, ifaceidx, altidx);
        if (idesc == NULL)
                return (USBD_INVAL);


First of all, can anyone say if I'm going down the right path?  Where can I
find some more information on this?

Thanks.
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Trying to get usbnet working to gumstix, Leith Brandeland, (Thu Mar 13, 6:52 am)
Re: Trying to get usbnet working to gumstix, Stuart Henderson, (Thu Mar 13, 7:11 am)
cdce to zaurus, Stuart Henderson, (Thu Mar 13, 7:28 am)
Re: cdce to zaurus, Stuart Henderson, (Thu Mar 13, 10:39 am)
Re: Trying to get usbnet working to gumstix, Leith Brandeland, (Thu Mar 13, 11:13 am)
Re: Trying to get usbnet working to gumstix, Leith Brandeland, (Thu Mar 13, 12:03 pm)
Re: Trying to get usbnet working to gumstix, Sean Kennedy, (Fri Mar 14, 5:59 am)
Re: Trying to get usbnet working to gumstix, Stuart Henderson, (Fri Mar 14, 6:15 am)
Re: Trying to get usbnet working to gumstix, Leith Brandeland, (Thu Mar 27, 2:40 pm)