Re: umodem(4) with "no pointer to data interface"

2014-01-31 Thread Brett Lymn
On Thu, Jan 30, 2014 at 12:09:47PM +0900, Ryo ONODERA wrote: > > However your code does not work for my USB modem. > dmesg is here. Only control interface is detected. > > umodem0 at uhub2 port 1 configuration 1 interface 0 > umodem0: Conexant USB Modem, rev 1.10/1.00, addr 3, iclass 2/2 > umodem

Re: umodem(4) with "no pointer to data interface"

2014-01-29 Thread Ryo ONODERA
From: Brett Lymn , Date: Sun, 26 Jan 2014 19:50:59 +1030 > On Thu, Jan 23, 2014 at 08:09:03PM +1030, Brett Lymn wrote: >> >> Yes, I agree that is probably not a wise thing to assume. I think we >> should iterate over all the interfaces looking for a data interface if >> it is not a union with th

Re: umodem(4) with "no pointer to data interface"

2014-01-26 Thread Brett Lymn
On Thu, Jan 23, 2014 at 08:09:03PM +1030, Brett Lymn wrote: > > Yes, I agree that is probably not a wise thing to assume. I think we > should iterate over all the interfaces looking for a data interface if > it is not a union with the control interface. If you don't beat me to > it I will try to

Re: umodem(4) with "no pointer to data interface"

2014-01-23 Thread Brett Lymn
On Thu, Jan 23, 2014 at 05:19:56AM +0900, Ryo ONODERA wrote: > Hi, > > From: Felix Deichmann , Date: Wed, 22 Jan 2014 19:32:08 > +0100 > > > Am 22.01.2014 14:26, schrieb Ryo ONODERA: > >> Each quirky USB modem has specific data interface number. In my case > >> it is 1. > > > > This is also wha

Re: umodem(4) with "no pointer to data interface"

2014-01-22 Thread Ryo ONODERA
Hi, From: Felix Deichmann , Date: Wed, 22 Jan 2014 19:32:08 +0100 > Am 22.01.2014 14:26, schrieb Ryo ONODERA: >> Each quirky USB modem has specific data interface number. In my case >> it is 1. > > This is also what Linux does (but for *all* quirky USB modems with > NO_UNION_NORMAL, this is alw

Re: umodem(4) with "no pointer to data interface"

2014-01-22 Thread Felix Deichmann
Am 22.01.2014 14:26, schrieb Ryo ONODERA: Each quirky USB modem has specific data interface number. In my case it is 1. This is also what Linux does (but for *all* quirky USB modems with NO_UNION_NORMAL, this is always 1). This number should be given from dev table, I feel. Are you sure t

Re: umodem(4) with "no pointer to data interface"

2014-01-22 Thread Ryo ONODERA
Hi, From: Brett Lymn , Date: Wed, 22 Jan 2014 22:17:52 +1030 > On Wed, Jan 22, 2014 at 12:28:50PM +0100, Felix Deichmann wrote: >> >> Adding the Conexant modem with UQ_NO_UNION_NRM (or maybe something >> else?) to usb_quirks would be the most elegant solution, right? > > only part of the soluti

Re: umodem(4) with "no pointer to data interface"

2014-01-22 Thread Brett Lymn
On Wed, Jan 22, 2014 at 12:28:50PM +0100, Felix Deichmann wrote: > > Adding the Conexant modem with UQ_NO_UNION_NRM (or maybe something > else?) to usb_quirks would be the most elegant solution, right? only part of the solution - you would get hit by the "no data interface" when it tries to get t

Re: umodem(4) with "no pointer to data interface"

2014-01-22 Thread Felix Deichmann
2014/1/22 Brett Lymn : > That will cause getcaps to return 0 for the data interface - that is not > correct. Adding the Conexant modem with UQ_NO_UNION_NRM (or maybe something else?) to usb_quirks would be the most elegant solution, right? Then umodem_get_caps() should be fixed, and OpenBSD (seems

Re: umodem(4) with "no pointer to data interface"

2014-01-22 Thread Brett Lymn
On Wed, Jan 22, 2014 at 09:37:52AM +0100, Felix Deichmann wrote: > > But we also have a UQ_NO_UNION_NRM flag available (umodem_get_caps() > in umodem_common.c). I would try to apply this for the Conexant > modems. That will cause getcaps to return 0 for the data interface - that is not correct.

Re: umodem(4) with "no pointer to data interface"

2014-01-22 Thread Brett Lymn
On Tue, Jan 21, 2014 at 08:11:19PM +0100, Felix Deichmann wrote: > > IMHO your *logic* is not to blame. > Applying De Morgan's laws result in > > !(uaa->proto == UIPROTO_CDC_NOCLASS || uaa->proto == UIPROTO_CDC_AT) > >and > > (uaa->proto != UIPROTO_CDC_NOCLASS && uaa->proto != UIPROTO_CDC_A

Re: umodem(4) with "no pointer to data interface"

2014-01-22 Thread Ryo ONODERA
From: Felix Deichmann , Date: Tue, 21 Jan 2014 20:11:19 +0100 > Am 21.01.2014 13:15, schrieb Brett Lymn: >> Interface class is UICLASS_CDC, subclass >> UISUBCLASS_ABSTRACT_CONTROL_MODEL >> protocol is UIPROTO_CDC_AT. Umodem should attach on this. Maybe I >> borked the match... try changing: >>

Re: umodem(4) with "no pointer to data interface"

2014-01-22 Thread Ryo ONODERA
From: Brett Lymn , Date: Tue, 21 Jan 2014 22:45:58 +1030 > On Tue, Jan 21, 2014 at 07:49:18PM +0900, Ryo ONODERA wrote: >> >> Here is output of >> # ./probe_usb /dev/ugen0.00 >> >> There is two interfaces. >> > > Yes, that is fine. Lots of usb devices have more than one interface. > > >> >

Re: umodem(4) with "no pointer to data interface"

2014-01-22 Thread Felix Deichmann
2014/1/21 Felix Deichmann : > Conexant has quirks? Looking at the Linux driver (cdc-acm.c), it becomes clear that the Conexant USB modems (and so many others!) probably have quirks: They are marked with NO_UNION_NORMAL, which means that (a) they have no union descriptor, or (b) the union descripto

Re: umodem(4) with "no pointer to data interface"

2014-01-21 Thread Felix Deichmann
Am 21.01.2014 13:15, schrieb Brett Lymn: Interface class is UICLASS_CDC, subclass UISUBCLASS_ABSTRACT_CONTROL_MODEL protocol is UIPROTO_CDC_AT. Umodem should attach on this. Maybe I borked the match... try changing: if (uaa->class != UICLASS_CDC || uaa->subclass != UISUBC

Re: umodem(4) with "no pointer to data interface"

2014-01-21 Thread Ryo ONODERA
Hi, Thank you. But very recent current kernel does not boot... I will try your patch tomorrow. From: Brett Lymn , Date: Tue, 21 Jan 2014 22:45:58 +1030 > On Tue, Jan 21, 2014 at 07:49:18PM +0900, Ryo ONODERA wrote: >> >> Here is output of >> # ./probe_usb /dev/ugen0.00 >> >> There is two inte

Re: umodem(4) with "no pointer to data interface"

2014-01-21 Thread Brett Lymn
On Tue, Jan 21, 2014 at 07:49:18PM +0900, Ryo ONODERA wrote: > > Here is output of > # ./probe_usb /dev/ugen0.00 > > There is two interfaces. > Yes, that is fine. Lots of usb devices have more than one interface. > > Interface 0: > Length: 9 > Descriptor Type: 4 > Interface No: 0 >

Re: umodem(4) with "no pointer to data interface"

2014-01-21 Thread Ryo ONODERA
Hi, From: Brett Lymn , Date: Tue, 21 Jan 2014 20:43:36 +1030 > On Tue, Jan 21, 2014 at 06:55:47PM +0900, Ryo ONODERA wrote: >> >> Without my modification, my USB modem is recognized as single ugen(4). >> > > ok, clearly not correct :) > >> Here is output of usbdevs(8) without my modification.

Re: umodem(4) with "no pointer to data interface"

2014-01-21 Thread Brett Lymn
On Tue, Jan 21, 2014 at 06:55:47PM +0900, Ryo ONODERA wrote: > > Without my modification, my USB modem is recognized as single ugen(4). > ok, clearly not correct :) > Here is output of usbdevs(8) without my modification. > >port 1 addr 11: full speed, power 100 mA, config 1, USB Modem(0x13

Re: umodem(4) with "no pointer to data interface"

2014-01-21 Thread Ryo ONODERA
Hi, From: Brett Lymn , Date: Tue, 21 Jan 2014 20:05:36 +1030 > On Mon, Jan 20, 2014 at 07:18:32PM +0900, Ryo ONODERA wrote: >> >> I have gotten strange dmesg output for umodem(4). >> How to avoid this strangeness? >> > > By not forcing umodem to connect a non-modem interface? > Does umodem not

Re: umodem(4) with "no pointer to data interface"

2014-01-21 Thread Brett Lymn
On Mon, Jan 20, 2014 at 07:18:32PM +0900, Ryo ONODERA wrote: > > I have gotten strange dmesg output for umodem(4). > How to avoid this strangeness? > By not forcing umodem to connect a non-modem interface? Does umodem not attach at all without your modifications? If it doesn't then what are the

umodem(4) with "no pointer to data interface"

2014-01-20 Thread Ryo ONODERA
Hi, I have gotten strange dmesg output for umodem(4). How to avoid this strangeness? My Conexant USB modem is not detected as umodem(4). I have added the following lines like ubt(4) like http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/usb/ubt.c.diff?r1=1.48&r2=1.49 Index: umodem.c ==