Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Oct 2017 12:23:13 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        Tomasz CEDRO <tomek@cedro.info>, Hans Petter Selasky <hps@selasky.org>
Cc:        "freebsd-usb@FreeBSD.org" <freebsd-usb@freebsd.org>
Subject:   Re: USB/U3G: Added support for Panasonic CF-F9 GOBI 3G modem to U3G module
Message-ID:  <1506882193.22078.32.camel@freebsd.org>
In-Reply-To: <CAFYkXjkzm%2Bz4c9chtvO_Go9cfnn3_Awpx2m%2BcvNUZR_qxX1-Sw@mail.gmail.com>
References:  <CAFYkXjnF%2BwkrxNC6nf9s20AytVkszykEcPsr=roiaYugAo5YWg@mail.gmail.com> <ec4baec2-66a9-c5ce-eb89-01f553890a11@selasky.org> <1506465459.73082.168.camel@freebsd.org> <165556bc-c011-bebd-feee-5bbd4cb5943e@selasky.org> <CAFYkXjm=TsHzjXgfFFRyXdSnj3RoeN%2BMNE_K5DBuHphygcqyjw@mail.gmail.com> <1506876055.22078.24.camel@freebsd.org> <CAFYkXjkYsfdWPBJu_wQWZcbHzR9vG0W7qdscBF1ornsZik6gbw@mail.gmail.com> <87d62aba-0b35-8b20-cf1f-9fd2de2d301a@selasky.org> <CAFYkXjkzm%2Bz4c9chtvO_Go9cfnn3_Awpx2m%2BcvNUZR_qxX1-Sw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2017-10-01 at 20:17 +0200, Tomasz CEDRO wrote:
> On Sun, Oct 1, 2017 at 7:21 PM, Hans Petter Selasky <hps@selasky.org>
> wrote:
> > 
> > On 10/01/17 19:09, Tomasz CEDRO wrote:
> > > 
> > > 
> > > On Sun, Oct 1, 2017 at 6:40 PM, Ian Lepore <ian@freebsd.org>
> > > wrote:
> > > > 
> > > > 
> > > > On Sun, 2017-10-01 at 18:33 +0200, Tomasz CEDRO wrote:
> > > > > 
> > > > > 
> > > > > On Wed, Sep 27, 2017 at 8:32 AM, Hans Petter Selasky <hps@sel
> > > > > asky.org
> > > > > > 
> > > > > > 
> > > > > > wrote:
> > > > > > 
> > > > > > On 09/27/17 00:37, Ian Lepore wrote:
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > On Wed, 2017-09-27 at 00:30 +0200, Hans Petter Selasky
> > > > > > > wrote:
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > On 09/27/17 00:11, Tomasz CEDRO wrote:
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > https://github.com/freebsd/freebsd/pull/115
> > > > > > > > > 
> > > > > > > > > :-)
> > > > > > > > > 
> > > > > > > > The devd.conf rule should match more than just vendor
> > > > > > > > and
> > > > > > > > product:
> > > > > > > > 
> > > > > > > > 
> > > > > > > > +# Load GOBI 2000/3000 U3G QDL modem firmware on attach
> > > > > > > > / boot.
> > > > > > > > +# Note: This requires additional "gobi_loader" utility
> > > > > > > > to be
> > > > > > > > installed,
> > > > > > > > +#   as well as valid QDL driver firmware files placed
> > > > > > > > in
> > > > > > > > /boot/firmware/gobi.
> > > > > > > > +#   If modem does not accept valid firmware try
> > > > > > > > gobi_loader
> > > > > > > > -2000
> > > > > > > > switch.
> > > > > > > > +#   Please adjust modem VID/PID to match your device
> > > > > > > > supported
> > > > > > > > by
> > > > > > > > u3g
> > > > > > > > module.
> > > > > > > > +#attach 100 {
> > > > > > > > +#      match "vendor" "0x04da";
> > > > > > > > +#      match "product" "0x250e";
> > > > > > > > +#      action "/usr/local/sbin/gobi_loader /dev/cuaU0
> > > > > > > > /boot/firmware/gobi/";
> > > > > > > > +#};
> > > > > > > > 
> > > > > > > > Else patch looks good.
> > > > > > > > 
> > > > > > > > --HPS
> > > > > > > 
> > > > > > > Hard-coding /dev/cuaU0 cannot possibly be right.
> > > > > > > 
> > > > > > > -- Ian
> > > > > > > 
> > > > > > These three lines are missing:
> > > > > > 
> > > > > >          match "system"          "DEVFS";
> > > > > >          match "subsystem"       "CDEV";
> > > > > >          match "type"            "CREATE";
> > > > > > 
> > > > > > 
> > > > > > --HPS
> > > > > Thanks! Updated! :-)
> > > > > 
> > > > > https://github.com/freebsd/freebsd/pull/115
> > > > > 
> > > > If this is to be an example, it should be correct.  Please
> > > > replace the
> > > > "cuaU0" with "$cdev".  (See /etc/devd/uath.conf for an
> > > > example).
> > > > 
> > > > -- Ian
> > > 
> > > Thanks Ian! Is it okay now? I have moved this example to
> > > dedicated
> > > /etc/devd/u3g.conf file, and added u3g load to
> > > /etc/devd/usb.conf.. if
> > > syntax is okay I will verify on my laptop..
> > > 
> > > https://github.com/freebsd/freebsd/pull/115
> > > 
> > Looks good to me. Don't forget to MFC!
> > 
> > --HPS
> /etc/devd/u3g.conf:
> 
> notify 100 {
>  match "system" "USB";
>  match "subsystem" "DEVICE";
>  match "type" "ATTACH";
>  match "vendor" "0x04da";
>  match "product" "0x250e";
>  action "/usr/local/bin/gobi_loader /dev/$cdev /boot/firmware/gobi/";
> };
> 
> This does not work when /dev/$cdev is used.. but it works when
> /dev/cuaU0 is used. Ian, could you please advise? :-)
> 

Hmmm, then I'd have to surmise that everything in /etc/devd/uath.conf
will fail the same way.

I noticed earlier the events mentioned were

         match "system"          "DEVFS";
         match "subsystem"       "CDEV";
         match "type"            "CREATE";

and I would expect $cdev to have the right value on a CDEV/CREATE
event, but not necessarily on a DEVICE/ATTACH event.

-- Ian



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