On Mon, Dec 14, 2009 at 9:05 PM, Theo de Raadt <dera...@cvs.openbsd.org>wrote:

>
>
> I don't know what that site means either.  Get it working, and get back
> to us.
>
>
Hey all, I ran into a snag I haven't been able to take care of yet while
trying to get a driver made for my edgeport device.
I am hoping for some guidance, so I'll do my best to post what I've read and
done to make it easier to help me.(Plus I don't want anyone thinking I am
posting here blindly without some extensive code and google reading)...

I haven't been able to get my hands on any documentation for the device.
I've tried to contact the author of the linux driver, but he said he didn't
have any documentation and he only worked on the older models that didn't
have the TI chipset.. So I attempted to contact the other names listed in
the sources in the linux driver, but nobody else responded...

To make a long story somewhat short, here is a link to the sources I have
been looking at while trying to write my OpenBSD driver:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/usb/serial/io_ti.c;h=d4cc0f7af400d0133653e4e0515b25a131e2a37f;hb=HEAD

Here is a link to my main file uep.c:
http://pastebin.ca/1730689

Here is a link to uep.h:
http://pastebin.ca/1730690

Here is a link to a dmesg after connecting my device and attaching my new
driver:
http://pastebin.ca/1730693

I've added a section to the files.usb file in /usr/src/sys/dev/usb for my
new driver as follows:
# Inside Out Edgeport
device    uep
attach    uep at uhub
file    dev/usb/uep.c            uep

I do not know for a fact this is correct, I may be wanting to use ucom(I'm
hoping I can) later..

To finally get to my problem.. I am trying to read the manufacturing
information off of the device.. but every time I call usbd_do_request I get
error 11 returned back to me meaning 'NO POWER'..

I don't quite understand why I'm getting this message.. The other devices
I've looked at don't do anything special before trying to read memory from
the device, nor does the linux driver as far as I can tell.
I've been reading uberry.c, umsm.c, and uvideo.c trying to find out the
order in which the usbd_* functions are called, but it doesn't appear that I
am doing anything special or different in my driver that would make it not
work..

furthermore.. I've read through the usbd_do_request_flags_pipe function
inside usbdi.c, and I can't see anywhere in the function where it returns
USBD_NO_POWER.. so I am confused as to why i'm getting that message.. the
only function that has a possibility of returning NO_POWER as far as I can
tell is the usbd_set_config_index function.

I hope this email has provided enough correct information to allow someone
smarter than myself to tell me what I am not doing correctly..

If there's anything that I left off, please let me know and I will get
whatever information is necessary.

Thank you all for your time, I appreciate it.

Reply via email to