Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Oct 2004 15:42:01 +0200
From:      Bernd Walter <ticso@cicely12.cicely.de>
To:        Niki Denev <nike_d@cytexbg.com>
Cc:        ticso@cicely.de
Subject:   Re: attaching ugen(4) on multi interface USB devices
Message-ID:  <20041007134200.GI15371@cicely12.cicely.de>
In-Reply-To: <cone.1097155332.331217.30337.1001@niked.office.suresupport.com>
References:  <cone.1097065805.20394.26649.1001@niked.office.suresupport.com> <20041006124919.GZ15371@cicely12.cicely.de> <cone.1097155332.331217.30337.1001@niked.office.suresupport.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Oct 07, 2004 at 04:22:12PM +0300, Niki Denev wrote:
> Bernd Walter writes:
> >On Wed, Oct 06, 2004 at 03:30:05PM +0300, Niki Denev wrote:
> >If you already an interface driver atatched then ugen fails to attach
> >the whole device.
> 
> well, i think that this can be a problem sometimes.

Yes - this is very often a problem :(

> actually i don't need kernel driver for obex devices, because everyting can 
> and will be probably better done in the userland via ugen. 
> but this means that the phone modem and obex interfaces can't be used 
> together.

Exactly that's the reason why you want a obex kernel driver.
That doesn't mean it has to provide more functionality then ugen and
you can still do the processing in userland.

> why not having a ugen(4) for every USB device? even it is supported?
> it probably won't harm anyone, but will make possible accessing parts of 
> the device that are otherwise hidden.

It can harm.
Say you have other drivers attached and ugen switches the configuration
of the device/interface that the other driver(s) uses.
Many safety checks need to added to ugen for this.

Copy the ugen driver to uobex, swtich it to be an interface level driver
and strip the functionality down to what you really need.

> >11 interface descriptors sounds unlikely to be correct - it's more
> >likely that some of them are alternative configurations and a device
> >or interface can only be in a single configuration at a given time.
> >You can switch between alternative configurations via ugen.
> >
> 
> It seems that this is the way that the CDC WMC (wireless mobile 
> communication) devices are made.
> At least that is what i understand when reading some of the specifications 
> published at usb.org

Well - as I already wrote - I know almost nothing about this type of
devices, but it still sound unlikely to be correct to what I know about
USB - that doesn't mean it can't be correct.

> >I don't know about OBEX, but why don't you just create an interface
> >class driver that attaches to OBEX interfaces - writing USB drivers is
> >not very difficult if you know USB and a few kernel basics.
> >
> 
> I've done some testing in this area and i've made a driver based on 
> ucom/umodem that attaches to OBEX devices. (only attaches at the moment).
> And here i discovered that usbdevs can't show more than 4 interfaces on USB 
> device. I tracked down this to USB_MAX_DEVNAMES=4.
> Is there a reason for this to be set this low?

As I already wrote - 11 interfaces is very unusual and therfor you
usually don't have that many drivers attached as well.
Raise the limit if you need - or better make it a kernel tunable and
document that your OBEX driver needs at least 11.

-- 
B.Walter                   BWCT                http://www.bwct.de
bernd@bwct.de                                  info@bwct.de



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041007134200.GI15371>